AnsweredAssumed Answered

Hibernate Configuration Problems

Question asked by citrosoft on Nov 11, 2005
I am trying to write a simple unit test that initializes the Repository using the application-context.xml Spring configuration file.  Spring cannot create the hibernate-related beans due to a couple of errors. 

The first is that it cannot find the asm classes (org.objectweb.asm.Type) which are required by Hibnerate.  I find it strage that your deployment does not include asm.jar and asm-attr.jar which are both required by hibernate.  Once I add those jars to my classpath I get the following exception:

Caused by: org.xml.sax.SAXParseException: Attribute "lazy" with value "no-proxy" must have a value from the list "true false proxy ".

Does anyone out there know why I'm seeing this strange Hibernate behavior?  The app works fine when deployed in Tomcat (yet I don't know how as the asm jars are missing).

Here is my simple test:

public class AlfrescoAccessTest extends TestCase {

    private static ApplicationContext context =
            new ClassPathXmlApplicationContext("classpath:alfresco/application-context.xml");

    public void testBasicServiceAccess() {
        ServiceRegistry registry = (ServiceRegistry)context.getBean(ServiceRegistry.SERVICE_REGISTRY);
        TransactionService trxService = (TransactionService)registry.getTransactionService();
        NodeService nodeService = (NodeService)registry.getNodeService();