java.lang.NoSuchMethodError: org.slf4j.Logger.trace(Ljava/lang/String;)V

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

java.lang.NoSuchMethodError: org.slf4j.Logger.trace(Ljava/lang/String;)V

AlessandroIlardo
Hello there,
I am using NetBeans with Junit, HIbernate and OpenEJB to test an EJB module.
On the OpenEJB log I get the following error:


2009-06-15 14:56:22,434 - INFO  - openejb.home = /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1
2009-06-15 14:56:22,435 - INFO  - openejb.base = /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1
2009-06-15 14:56:23,371 - INFO  - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service)
2009-06-15 14:56:23,384 - INFO  - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
2009-06-15 14:56:23,395 - INFO  - Configuring Service(id=My DataSource, type=Resource, provider-id=Default JDBC Database)
2009-06-15 14:56:23,413 - INFO  - Configuring Service(id=My Unmanaged DataSource, type=Resource, provider-id=Default JDBC Database)
2009-06-15 14:56:23,424 - INFO  - Configuring Service(id=My JMS Resource Adapter, type=Resource, provider-id=Default JMS Resource Adapter)
2009-06-15 14:56:23,436 - INFO  - Configuring Service(id=My JMS Connection Factory, type=Resource, provider-id=Default JMS Connection Factory)
2009-06-15 14:56:23,448 - INFO  - Configuring Service(id=UnmanagedIdentityManagerDS, type=Resource, provider-id=Default JDBC Database)
2009-06-15 14:56:23,461 - INFO  - Configuring Service(id=My CMP Container, type=Container, provider-id=Default CMP Container)
2009-06-15 14:56:23,472 - INFO  - Configuring Service(id=My BMP Container, type=Container, provider-id=Default BMP Container)
2009-06-15 14:56:23,483 - INFO  - Configuring Service(id=My Stateful Container, type=Container, provider-id=Default Stateful Container)
2009-06-15 14:56:23,495 - INFO  - Configuring Service(id=My Stateless Container, type=Container, provider-id=Default Stateless Container)
2009-06-15 14:56:23,520 - INFO  - Configuring Service(id=My MDB Container , type=Container, provider-id=Default MDB Container)
2009-06-15 14:56:23,596 - INFO  - Configuring enterprise application: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar
2009-06-15 14:56:24,986 - INFO  - Configuring PersistenceUnit(name=IdentityManager-ejbPU, provider=org.hibernate.ejb.HibernatePersistence)
2009-06-15 14:56:24,988 - INFO  - Adjusting PersistenceUnit IdentityManager-ejbPU <jta-data-source> to Resource ID 'My DataSource' from 'java:/IdentityManagerDS'
2009-06-15 14:56:24,989 - INFO  - Adjusting PersistenceUnit IdentityManager-ejbPU <non-jta-data-source> to Resource ID 'My Unmanaged DataSource' from 'null'
2009-06-15 14:56:25,037 - INFO  - Enterprise application "/home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar" loaded.
2009-06-15 14:56:25,549 - INFO  - Found ClientModule in classpath: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/lib/xml-resolver-1.2.jar
2009-06-15 14:56:25,593 - INFO  - Found ClientModule in classpath: /home/alessandro/Documents/Java/shared-lib/hibernate-entitymanager-3.4.0.GA/lib/javassist.jar
2009-06-15 14:56:25,597 - INFO  - Found EjbModule in classpath: /home/alessandro/Work-Space/NetBeansProject/IdentityManager/IdentityManager-ejb/trunk/dist/IdentityManager-ejb.jar
2009-06-15 14:56:25,682 - INFO  - Found ClientModule in classpath: /home/alessandro/.netbeans/6.1/ant/lib/ant.jar
2009-06-15 14:56:26,389 - INFO  - Found ClientModule in classpath: /home/alessandro/.netbeans/6.1/ant/lib/ant-launcher.jar
2009-06-15 14:56:26,435 - INFO  - Beginning load: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/lib/xml-resolver-1.2.jar
2009-06-15 14:56:26,441 - INFO  - Beginning load: /home/alessandro/Documents/Java/shared-lib/hibernate-entitymanager-3.4.0.GA/lib/javassist.jar
2009-06-15 14:56:26,463 - INFO  - Beginning load: /home/alessandro/Work-Space/NetBeansProject/IdentityManager/IdentityManager-ejb/trunk/dist/IdentityManager-ejb.jar
2009-06-15 14:56:26,468 - INFO  - Beginning load: /home/alessandro/.netbeans/6.1/ant/lib/ant.jar
2009-06-15 14:56:26,494 - INFO  - Beginning load: /home/alessandro/.netbeans/6.1/ant/lib/ant-launcher.jar
2009-06-15 14:56:26,513 - INFO  - Configuring enterprise application: classpath.ear
2009-06-15 14:56:26,516 - WARN  - No application-client.xml found assuming annotations present: classpath.ear, module: xml-resolver-1.2.jar
2009-06-15 14:56:26,517 - WARN  - No application-client.xml found assuming annotations present: classpath.ear, module: javassist.jar
2009-06-15 14:56:26,517 - WARN  - No application-client.xml found assuming annotations present: classpath.ear, module: ant.jar
2009-06-15 14:56:26,517 - WARN  - No application-client.xml found assuming annotations present: classpath.ear, module: ant-launcher.jar
2009-06-15 14:56:27,994 - INFO  - Configuring PersistenceUnit(name=IdentityManager-ejbPU, provider=org.hibernate.ejb.HibernatePersistence)
2009-06-15 14:56:28,005 - INFO  - Enterprise application "classpath.ear" loaded.
2009-06-15 14:56:28,006 - INFO  - Creating TransactionManager(id=Default Transaction Manager)
2009-06-15 14:56:28,122 - INFO  - Creating SecurityService(id=Default Security Service)
2009-06-15 14:56:28,183 - INFO  - Creating Resource(id=My DataSource)
2009-06-15 14:56:28,216 - INFO  - Creating Resource(id=My Unmanaged DataSource)
2009-06-15 14:56:28,239 - INFO  - Creating Resource(id=UnmanagedIdentityManagerDS)
2009-06-15 14:56:28,248 - INFO  - Creating Resource(id=My JMS Resource Adapter)
2009-06-15 14:56:28,733 - INFO  - Creating Resource(id=My JMS Connection Factory)
2009-06-15 14:56:28,741 - INFO  - Creating ConnectionManager for Resource(id=My JMS Connection Factory)
2009-06-15 14:56:28,784 - INFO  - Creating Container(id=My CMP Container)
2009-06-15 14:56:28,817 - INFO  - Creating Container(id=My BMP Container)
2009-06-15 14:56:28,835 - INFO  - Creating Container(id=My Stateful Container)
2009-06-15 14:56:28,889 - INFO  - Creating Container(id=My Stateless Container)
2009-06-15 14:56:28,901 - INFO  - Creating Container(id=My MDB Container )
2009-06-15 14:56:28,912 - INFO  - Assembling app: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar
2009-06-15 14:56:28,954 - INFO  - PersistenceUnit(name=IdentityManager-ejbPU, provider=org.hibernate.ejb.HibernatePersistence)
2009-06-15 14:56:29,575 - INFO  - Undeploying app: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar
2009-06-15 14:56:29,582 - ERROR - Application could not be deployed:  /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar
org.apache.openejb.OpenEJBException: Creating application failed: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar: org.slf4j.Logger.trace(Ljava/lang/String;)V
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:658)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:442)
        at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:360)
        at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:272)
        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
        at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
        at javax.naming.InitialContext.init(InitialContext.java:240)
        at javax.naming.InitialContext.<init>(InitialContext.java:214)
        at eu.virtualLab.security.user.test.Init.setUp(Init.java:72)
        at junit.framework.TestCase.runBare(TestCase.java:128)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:228)
        at junit.framework.TestSuite.run(TestSuite.java:223)
        at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
        at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:32)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766)
Caused by: java.lang.NoSuchMethodError: org.slf4j.Logger.trace(Ljava/lang/String;)V
        at org.hibernate.cfg.annotations.PropertyBinder.make(PropertyBinder.java:184)
        at org.hibernate.cfg.AnnotationBinder.bindId(AnnotationBinder.java:1911)
        at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1279)
        at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:754)
        at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:546)
        at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:291)
        at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1148)
        at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1226)
        at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:173)
        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:854)
        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:425)
        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:131)
        at org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:183)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:482)
        ... 31 more
2009-06-15 14:56:29,585 - INFO  - Assembling app: classpath.ear
2009-06-15 14:56:29,586 - INFO  - Undeploying app: classpath.ear
2009-06-15 14:56:29,588 - ERROR - Application could not be deployed:  classpath.ear
org.apache.openejb.OpenEJBException: Creating application failed: classpath.ear: org.apache.openejb.OpenEJBException: Could not lookup <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS' for unit 'IdentityManager-ejbPU': Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial: Could not lookup <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS' for unit 'IdentityManager-ejbPU': Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:658)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:442)
        at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:360)
        at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:272)
        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
        at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
        at javax.naming.InitialContext.init(InitialContext.java:240)
        at javax.naming.InitialContext.<init>(InitialContext.java:214)
        at eu.virtualLab.security.user.test.Init.setUp(Init.java:72)
        at junit.framework.TestCase.runBare(TestCase.java:128)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:228)
        at junit.framework.TestSuite.run(TestSuite.java:223)
        at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
        at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:32)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766)
Caused by: org.apache.openejb.OpenEJBException: org.apache.openejb.OpenEJBException: Could not lookup <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS' for unit 'IdentityManager-ejbPU': Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial: Could not lookup <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS' for unit 'IdentityManager-ejbPU': Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:487)
        ... 31 more
Caused by: org.apache.openejb.OpenEJBException: Could not lookup <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS' for unit 'IdentityManager-ejbPU': Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:122)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:482)
        ... 31 more
Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
        at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:342)
        at javax.naming.InitialContext.lookup(InitialContext.java:409)
        at org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:133)
        at org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:123)
        at org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:119)
        ... 32 more



To me it looks like a jars conflict. The OpenEJB library included into the project

-rw-r--r-- 1 alessandro alessandro   106398 2009-05-23 01:25 activeio-core-3.0.0-incubator.jar
-rw-r--r-- 1 alessandro alessandro  1683897 2009-05-23 01:25 activemq-core-4.1.1.jar
-rw-r--r-- 1 alessandro alessandro    78641 2009-05-23 01:27 activemq-ra-4.1.1.jar
-rw-r--r-- 1 alessandro alessandro   329586 2009-05-23 01:25 backport-util-concurrent-2.1.jar
-rw-r--r-- 1 alessandro alessandro  1593423 2009-05-23 01:34 bcprov-jdk15-140.jar
-rw-r--r-- 1 alessandro alessandro    36174 2009-05-23 01:27 commons-cli-1.1.jar
-rw-r--r-- 1 alessandro alessandro   571259 2009-05-20 20:35 commons-collections-3.2.jar
-rw-r--r-- 1 alessandro alessandro   202182 2009-05-28 23:23 commons-dbcp-all-1.3-r699049.jar
-rw-r--r-- 1 alessandro alessandro   207723 2009-05-20 20:35 commons-lang-2.1.jar
-rw-r--r-- 1 alessandro alessandro    52915 2009-05-20 20:37 commons-logging-1.1.jar
-rw-r--r-- 1 alessandro alessandro    62086 2009-05-23 01:27 commons-pool-1.3.jar
-rw-r--r-- 1 alessandro alessandro  2881944 2009-05-23 01:34 cxf-bundle-2.0.9.jar
lrwxrwxrwx 1 alessandro alessandro       52 2009-06-15 14:39 dom4j.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/dom4j.jar
-rw-r--r-- 1 alessandro alessandro    18843 2009-05-31 03:15 ejb31-api-experimental-3.1.1.jar
lrwxrwxrwx 1 alessandro alessandro       63 2009-06-15 14:40 ejb3-persistence.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/ejb3-persistence.jar
-rw-r--r-- 1 alessandro alessandro   100863 2009-05-23 01:27 geronimo-connector-2.1.jar
-rw-r--r-- 1 alessandro alessandro   304552 2009-05-23 01:27 geronimo-javamail_1.4_mail-1.2.jar
-rw-r--r-- 1 alessandro alessandro    51278 2009-05-23 01:27 geronimo-transaction-2.1.jar
lrwxrwxrwx 1 alessandro alessandro       68 2009-06-15 14:35 hibernate-annotations.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/hibernate-annotations.jar
lrwxrwxrwx 1 alessandro alessandro       76 2009-06-15 14:36 hibernate-commons-annotations.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/hibernate-commons-annotations.jar
lrwxrwxrwx 1 alessandro alessandro       61 2009-06-15 14:36 hibernate-core.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/hibernate-core.jar
-rw-r--r-- 1 alessandro alessandro    79981 2009-05-23 01:27 howl-1.0.1-1.jar
-rw-r--r-- 1 alessandro alessandro   643727 2009-05-23 01:27 hsqldb-1.8.0.7.jar
-rw-r--r-- 1 alessandro alessandro   753070 2009-05-31 03:15 javaee-api-5.0-2.jar
lrwxrwxrwx 1 alessandro alessandro       56 2009-06-15 14:40 javassist.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/javassist.jar
-rw-r--r-- 1 alessandro alessandro   787619 2009-05-23 01:26 jaxb-impl-2.0.5.jar
lrwxrwxrwx 1 alessandro alessandro       50 2009-06-15 14:40 jta.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/jta.jar
-rw-r--r-- 1 alessandro alessandro   358085 2009-05-23 01:25 log4j-1.2.12.jar
-rw-r--r-- 1 alessandro alessandro    32900 2009-05-23 01:34 neethi-2.0.4.jar
-rw-r--r-- 1 alessandro alessandro     8517 2009-05-31 03:17 openejb-api-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro   200563 2009-05-31 03:18 openejb-client-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro  1448855 2009-05-31 03:18 openejb-core-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    56068 2009-05-31 03:21 openejb-cxf-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    56184 2009-05-31 03:19 openejb-ejbd-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    16019 2009-05-31 03:19 openejb-hsql-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    41760 2009-05-31 03:19 openejb-http-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    12847 2009-05-31 03:17 openejb-javaagent-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro   788210 2009-05-31 03:17 openejb-jee-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    41511 2009-05-31 03:17 openejb-loader-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    27680 2009-05-31 03:19 openejb-multicast-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    74989 2009-05-31 03:18 openejb-server-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    31632 2009-05-31 03:19 openejb-telnet-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    46317 2009-05-31 03:19 openejb-webservices-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro 11712276 2009-05-23 01:27 openjpa-1.2.0.jar
-rw-r--r-- 1 alessandro alessandro   155714 2009-05-23 01:34 opensaml-1.1.jar
-rw-r--r-- 1 alessandro alessandro   388716 2009-05-23 01:28 quartz-1.5.2.jar
-rw-r--r-- 1 alessandro alessandro   278301 2009-05-23 01:30 saaj-impl-1.3.jar
-rw-r--r-- 1 alessandro alessandro   205877 2009-05-23 01:27 serp-1.13.1.jar
-rw-r--r-- 1 alessandro alessandro    12231 2009-05-23 01:34 slf4j-api-1.3.1.jar
-rw-r--r-- 1 alessandro alessandro     7515 2009-05-23 01:34 slf4j-jdk14-1.3.1.jar
-rw-r--r-- 1 alessandro alessandro    26514 2009-05-23 01:26 stax-api-1.0.1.jar
-rw-r--r-- 1 alessandro alessandro    43161 2009-05-23 01:28 swizzle-stream-1.0.1.jar
-rw-r--r-- 1 alessandro alessandro   148522 2009-05-23 01:28 wsdl4j-1.6.1.jar
-rw-r--r-- 1 alessandro alessandro   307437 2009-05-23 01:34 wss4j-1.5.4.jar
-rw-r--r-- 1 alessandro alessandro   504969 2009-05-23 01:26 wstx-asl-3.2.0.jar
-rw-r--r-- 1 alessandro alessandro   123396 2009-05-31 03:15 xbean-asm-shaded-3.6-r779512.jar
-rw-r--r-- 1 alessandro alessandro    40330 2009-05-31 03:15 xbean-finder-shaded-3.6-r779512.jar
-rw-r--r-- 1 alessandro alessandro    51495 2009-05-28 13:31 xbean-naming-3.5.jar
-rw-r--r-- 1 alessandro alessandro   150222 2009-05-31 03:15 xbean-reflect-3.6-r779512.jar
-rw-r--r-- 1 alessandro alessandro    84091 2009-05-23 01:34 xml-resolver-1.2.jar
-rw-r--r-- 1 alessandro alessandro   139721 2009-05-23 01:34 XmlSchema-1.4.2.jar
-rw-r--r-- 1 alessandro alessandro   413902 2009-05-23 01:34 xmlsec-1.4.0.jar


Thanks in advance for any help
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoSuchMethodError: org.slf4j.Logger.trace(Ljava/lang/String;)V

Nikolaos Mpallas
From the trace it's obvious that you haven't set correctly the InitialContext
try initializing the OpenEJB contain like this...
 Properties props = new Properties();
                   
props.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.apache.openejb.client.LocalInitialContextFactory");
                    props.setProperty("openejb.configuration", config.toExternalForm());
                    props.put("openejb.validation.output.level","VERBOSE");
                    props.put("openejb.jndiname.format","upstream/mint/{deploymentId}");
this will create a defaultCtx which causes the
NoInitialContextFoundException....

regards
\n\m
 
On Monday 15 June 2009 16:02:48 AlessandroIlardo wrote:

> Hello there,
> I am using NetBeans with Junit, HIbernate and OpenEJB to test an EJB
> module. On the OpenEJB log I get the following error:
>
>
> 2009-06-15 14:56:22,434 - INFO  - openejb.home =
> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1
> 2009-06-15 14:56:22,435 - INFO  - openejb.base =
> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1
> 2009-06-15 14:56:23,371 - INFO  - Configuring Service(id=Default Security
> Service, type=SecurityService, provider-id=Default Security Service)
> 2009-06-15 14:56:23,384 - INFO  - Configuring Service(id=Default
> Transaction Manager, type=TransactionManager, provider-id=Default
> Transaction Manager) 2009-06-15 14:56:23,395 - INFO  - Configuring
> Service(id=My DataSource, type=Resource, provider-id=Default JDBC Database)
> 2009-06-15 14:56:23,413 - INFO  - Configuring Service(id=My Unmanaged
> DataSource, type=Resource, provider-id=Default JDBC Database)
> 2009-06-15 14:56:23,424 - INFO  - Configuring Service(id=My JMS Resource
> Adapter, type=Resource, provider-id=Default JMS Resource Adapter)
> 2009-06-15 14:56:23,436 - INFO  - Configuring Service(id=My JMS Connection
> Factory, type=Resource, provider-id=Default JMS Connection Factory)
> 2009-06-15 14:56:23,448 - INFO  - Configuring
> Service(id=UnmanagedIdentityManagerDS, type=Resource, provider-id=Default
> JDBC Database)
> 2009-06-15 14:56:23,461 - INFO  - Configuring Service(id=My CMP Container,
> type=Container, provider-id=Default CMP Container)
> 2009-06-15 14:56:23,472 - INFO  - Configuring Service(id=My BMP Container,
> type=Container, provider-id=Default BMP Container)
> 2009-06-15 14:56:23,483 - INFO  - Configuring Service(id=My Stateful
> Container, type=Container, provider-id=Default Stateful Container)
> 2009-06-15 14:56:23,495 - INFO  - Configuring Service(id=My Stateless
> Container, type=Container, provider-id=Default Stateless Container)
> 2009-06-15 14:56:23,520 - INFO  - Configuring Service(id=My MDB Container ,
> type=Container, provider-id=Default MDB Container)
> 2009-06-15 14:56:23,596 - INFO  - Configuring enterprise application:
> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManag
>er-ejb.jar 2009-06-15 14:56:24,986 - INFO  - Configuring
> PersistenceUnit(name=IdentityManager-ejbPU,
> provider=org.hibernate.ejb.HibernatePersistence)
> 2009-06-15 14:56:24,988 - INFO  - Adjusting PersistenceUnit
> IdentityManager-ejbPU <jta-data-source> to Resource ID 'My DataSource' from
> 'java:/IdentityManagerDS'
> 2009-06-15 14:56:24,989 - INFO  - Adjusting PersistenceUnit
> IdentityManager-ejbPU <non-jta-data-source> to Resource ID 'My Unmanaged
> DataSource' from 'null'
> 2009-06-15 14:56:25,037 - INFO  - Enterprise application
> "/home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityMana
>ger-ejb.jar" loaded.
> 2009-06-15 14:56:25,549 - INFO  - Found ClientModule in classpath:
> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/lib/xml-resolver-1
>.2.jar 2009-06-15 14:56:25,593 - INFO  - Found ClientModule in classpath:
> /home/alessandro/Documents/Java/shared-lib/hibernate-entitymanager-3.4.0.GA
>/lib/javassist.jar 2009-06-15 14:56:25,597 - INFO  - Found EjbModule in
> classpath:
> /home/alessandro/Work-Space/NetBeansProject/IdentityManager/IdentityManager
>-ejb/trunk/dist/IdentityManager-ejb.jar 2009-06-15 14:56:25,682 - INFO  -
> Found ClientModule in classpath:
> /home/alessandro/.netbeans/6.1/ant/lib/ant.jar
> 2009-06-15 14:56:26,389 - INFO  - Found ClientModule in classpath:
> /home/alessandro/.netbeans/6.1/ant/lib/ant-launcher.jar
> 2009-06-15 14:56:26,435 - INFO  - Beginning load:
> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/lib/xml-resolver-1
>.2.jar 2009-06-15 14:56:26,441 - INFO  - Beginning load:
> /home/alessandro/Documents/Java/shared-lib/hibernate-entitymanager-3.4.0.GA
>/lib/javassist.jar 2009-06-15 14:56:26,463 - INFO  - Beginning load:
> /home/alessandro/Work-Space/NetBeansProject/IdentityManager/IdentityManager
>-ejb/trunk/dist/IdentityManager-ejb.jar 2009-06-15 14:56:26,468 - INFO  -
> Beginning load:
> /home/alessandro/.netbeans/6.1/ant/lib/ant.jar
> 2009-06-15 14:56:26,494 - INFO  - Beginning load:
> /home/alessandro/.netbeans/6.1/ant/lib/ant-launcher.jar
> 2009-06-15 14:56:26,513 - INFO  - Configuring enterprise application:
> classpath.ear
> 2009-06-15 14:56:26,516 - WARN  - No application-client.xml found assuming
> annotations present: classpath.ear, module: xml-resolver-1.2.jar
> 2009-06-15 14:56:26,517 - WARN  - No application-client.xml found assuming
> annotations present: classpath.ear, module: javassist.jar
> 2009-06-15 14:56:26,517 - WARN  - No application-client.xml found assuming
> annotations present: classpath.ear, module: ant.jar
> 2009-06-15 14:56:26,517 - WARN  - No application-client.xml found assuming
> annotations present: classpath.ear, module: ant-launcher.jar
> 2009-06-15 14:56:27,994 - INFO  - Configuring
> PersistenceUnit(name=IdentityManager-ejbPU,
> provider=org.hibernate.ejb.HibernatePersistence)
> 2009-06-15 14:56:28,005 - INFO  - Enterprise application "classpath.ear"
> loaded.
> 2009-06-15 14:56:28,006 - INFO  - Creating TransactionManager(id=Default
> Transaction Manager)
> 2009-06-15 14:56:28,122 - INFO  - Creating SecurityService(id=Default
> Security Service)
> 2009-06-15 14:56:28,183 - INFO  - Creating Resource(id=My DataSource)
> 2009-06-15 14:56:28,216 - INFO  - Creating Resource(id=My Unmanaged
> DataSource)
> 2009-06-15 14:56:28,239 - INFO  - Creating
> Resource(id=UnmanagedIdentityManagerDS)
> 2009-06-15 14:56:28,248 - INFO  - Creating Resource(id=My JMS Resource
> Adapter)
> 2009-06-15 14:56:28,733 - INFO  - Creating Resource(id=My JMS Connection
> Factory)
> 2009-06-15 14:56:28,741 - INFO  - Creating ConnectionManager for
> Resource(id=My JMS Connection Factory)
> 2009-06-15 14:56:28,784 - INFO  - Creating Container(id=My CMP Container)
> 2009-06-15 14:56:28,817 - INFO  - Creating Container(id=My BMP Container)
> 2009-06-15 14:56:28,835 - INFO  - Creating Container(id=My Stateful
> Container)
> 2009-06-15 14:56:28,889 - INFO  - Creating Container(id=My Stateless
> Container)
> 2009-06-15 14:56:28,901 - INFO  - Creating Container(id=My MDB Container )
> 2009-06-15 14:56:28,912 - INFO  - Assembling app:
> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManag
>er-ejb.jar 2009-06-15 14:56:28,954 - INFO  -
> PersistenceUnit(name=IdentityManager-ejbPU,
> provider=org.hibernate.ejb.HibernatePersistence)
> 2009-06-15 14:56:29,575 - INFO  - Undeploying app:
> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManag
>er-ejb.jar 2009-06-15 14:56:29,582 - ERROR - Application could not be
> deployed:
> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManag
>er-ejb.jar org.apache.openejb.OpenEJBException: Creating application failed:
> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManag
>er-ejb.jar: org.slf4j.Logger.trace(Ljava/lang/String;)V
> at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.
>java:658) at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.
>java:442) at
> org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembl
>er.java:360) at
> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:272) at
> org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
> at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
> at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:5
>7) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>l.java:43) at java.lang.reflect.Method.invoke(Method.java:616)
> at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
> at
> org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialConte
>xtFactory.java:71) at
> org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialConte
>xtFactory.java:53) at
> org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(Loca
>lInitialContextFactory.java:42) at
> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684) at
> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305) at
> javax.naming.InitialContext.init(InitialContext.java:240)
> at javax.naming.InitialContext.<init>(InitialContext.java:214)
> at eu.virtualLab.security.user.test.Init.setUp(Init.java:72)
> at junit.framework.TestCase.runBare(TestCase.java:128)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.framework.TestSuite.runTest(TestSuite.java:228)
> at junit.framework.TestSuite.run(TestSuite.java:223)
> at
> org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:3
>5) at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:32) at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestR
>unner.java:421) at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTe
>stRunner.java:912) at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTest
>Runner.java:766) Caused by: java.lang.NoSuchMethodError:
> org.slf4j.Logger.trace(Ljava/lang/String;)V
> at
> org.hibernate.cfg.annotations.PropertyBinder.make(PropertyBinder.java:184)
> at org.hibernate.cfg.AnnotationBinder.bindId(AnnotationBinder.java:1911)
> at
> org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBind
>er.java:1279) at
> org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:754) at
> org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(Annotation
>Configuration.java:546) at
> org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfi
>guration.java:291) at
> org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1148) at
> org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:12
>26) at
> org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigur
>ator.java:173) at
> org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:854)
> at
> org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:425)
> at
> org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(
>HibernatePersistence.java:131) at
> org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManager
>Factory(PersistenceBuilder.java:183) at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.
>java:482) ... 31 more
> 2009-06-15 14:56:29,585 - INFO  - Assembling app: classpath.ear
> 2009-06-15 14:56:29,586 - INFO  - Undeploying app: classpath.ear
> 2009-06-15 14:56:29,588 - ERROR - Application could not be deployed:
> classpath.ear
> org.apache.openejb.OpenEJBException: Creating application failed:
> classpath.ear: org.apache.openejb.OpenEJBException: Could not lookup
> <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS' for unit
> 'IdentityManager-ejbPU': Need to specify class name in environment or
> system property, or as an applet parameter, or in an application resource
> file: java.naming.factory.initial: Could not lookup <jta-data-source>
> 'java:openejb/Resource/java:/IdentityManagerDS' for unit
> 'IdentityManager-ejbPU': Need to specify class name in environment or
> system property, or as an applet parameter, or in an application resource
> file: java.naming.factory.initial
> at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.
>java:658) at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.
>java:442) at
> org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembl
>er.java:360) at
> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:272) at
> org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
> at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
> at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:5
>7) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>l.java:43) at java.lang.reflect.Method.invoke(Method.java:616)
> at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
> at
> org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialConte
>xtFactory.java:71) at
> org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialConte
>xtFactory.java:53) at
> org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(Loca
>lInitialContextFactory.java:42) at
> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684) at
> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305) at
> javax.naming.InitialContext.init(InitialContext.java:240)
> at javax.naming.InitialContext.<init>(InitialContext.java:214)
> at eu.virtualLab.security.user.test.Init.setUp(Init.java:72)
> at junit.framework.TestCase.runBare(TestCase.java:128)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.framework.TestSuite.runTest(TestSuite.java:228)
> at junit.framework.TestSuite.run(TestSuite.java:223)
> at
> org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:3
>5) at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:32) at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestR
>unner.java:421) at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTe
>stRunner.java:912) at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTest
>Runner.java:766) Caused by: org.apache.openejb.OpenEJBException:
> org.apache.openejb.OpenEJBException: Could not lookup <jta-data-source>
> 'java:openejb/Resource/java:/IdentityManagerDS' for unit
> 'IdentityManager-ejbPU': Need to specify class name in environment or
> system property, or as an applet parameter, or in an application resource
> file: java.naming.factory.initial: Could not lookup <jta-data-source>
> 'java:openejb/Resource/java:/IdentityManagerDS' for unit
> 'IdentityManager-ejbPU': Need to specify class name in environment or
> system property, or as an applet parameter, or in an application resource
> file: java.naming.factory.initial
> at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.
>java:487) ... 31 more
> Caused by: org.apache.openejb.OpenEJBException: Could not lookup
> <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS' for unit
> 'IdentityManager-ejbPU': Need to specify class name in environment or
> system property, or as an applet parameter, or in an application resource
> file: java.naming.factory.initial
> at
> org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManager
>Factory(PersistenceBuilder.java:122) at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.
>java:482) ... 31 more
> Caused by: javax.naming.NoInitialContextException: Need to specify class
> name in environment or system property, or as an applet parameter, or in an
> application resource file:  java.naming.factory.initial
> at
> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662) at
> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305) at
> javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:342)
> at javax.naming.InitialContext.lookup(InitialContext.java:409)
> at
> org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:133)
> at
> org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:123)
> at
> org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManager
>Factory(PersistenceBuilder.java:119) ... 32 more
>
>
>
> To me it looks like a jars conflict. The OpenEJB library included into the
> project
>
> -rw-r--r-- 1 alessandro alessandro   106398 2009-05-23 01:25
> activeio-core-3.0.0-incubator.jar
> -rw-r--r-- 1 alessandro alessandro  1683897 2009-05-23 01:25
> activemq-core-4.1.1.jar
> -rw-r--r-- 1 alessandro alessandro    78641 2009-05-23 01:27
> activemq-ra-4.1.1.jar
> -rw-r--r-- 1 alessandro alessandro   329586 2009-05-23 01:25
> backport-util-concurrent-2.1.jar
> -rw-r--r-- 1 alessandro alessandro  1593423 2009-05-23 01:34
> bcprov-jdk15-140.jar
> -rw-r--r-- 1 alessandro alessandro    36174 2009-05-23 01:27
> commons-cli-1.1.jar
> -rw-r--r-- 1 alessandro alessandro   571259 2009-05-20 20:35
> commons-collections-3.2.jar
> -rw-r--r-- 1 alessandro alessandro   202182 2009-05-28 23:23
> commons-dbcp-all-1.3-r699049.jar
> -rw-r--r-- 1 alessandro alessandro   207723 2009-05-20 20:35
> commons-lang-2.1.jar
> -rw-r--r-- 1 alessandro alessandro    52915 2009-05-20 20:37
> commons-logging-1.1.jar
> -rw-r--r-- 1 alessandro alessandro    62086 2009-05-23 01:27
> commons-pool-1.3.jar
> -rw-r--r-- 1 alessandro alessandro  2881944 2009-05-23 01:34
> cxf-bundle-2.0.9.jar
> lrwxrwxrwx 1 alessandro alessandro       52 2009-06-15 14:39 dom4j.jar ->
> ../../hibernate-entitymanager-3.4.0.GA/lib/dom4j.jar
> -rw-r--r-- 1 alessandro alessandro    18843 2009-05-31 03:15
> ejb31-api-experimental-3.1.1.jar
> lrwxrwxrwx 1 alessandro alessandro       63 2009-06-15 14:40
> ejb3-persistence.jar ->
> ../../hibernate-entitymanager-3.4.0.GA/lib/ejb3-persistence.jar
> -rw-r--r-- 1 alessandro alessandro   100863 2009-05-23 01:27
> geronimo-connector-2.1.jar
> -rw-r--r-- 1 alessandro alessandro   304552 2009-05-23 01:27
> geronimo-javamail_1.4_mail-1.2.jar
> -rw-r--r-- 1 alessandro alessandro    51278 2009-05-23 01:27
> geronimo-transaction-2.1.jar
> lrwxrwxrwx 1 alessandro alessandro       68 2009-06-15 14:35
> hibernate-annotations.jar ->
> ../../hibernate-entitymanager-3.4.0.GA/lib/hibernate-annotations.jar
> lrwxrwxrwx 1 alessandro alessandro       76 2009-06-15 14:36
> hibernate-commons-annotations.jar ->
> ../../hibernate-entitymanager-3.4.0.GA/lib/hibernate-commons-annotations.ja
>r lrwxrwxrwx 1 alessandro alessandro       61 2009-06-15 14:36
> hibernate-core.jar ->
> ../../hibernate-entitymanager-3.4.0.GA/lib/hibernate-core.jar
> -rw-r--r-- 1 alessandro alessandro    79981 2009-05-23 01:27
> howl-1.0.1-1.jar
> -rw-r--r-- 1 alessandro alessandro   643727 2009-05-23 01:27
> hsqldb-1.8.0.7.jar
> -rw-r--r-- 1 alessandro alessandro   753070 2009-05-31 03:15
> javaee-api-5.0-2.jar
> lrwxrwxrwx 1 alessandro alessandro       56 2009-06-15 14:40 javassist.jar
> -> ../../hibernate-entitymanager-3.4.0.GA/lib/javassist.jar
> -rw-r--r-- 1 alessandro alessandro   787619 2009-05-23 01:26
> jaxb-impl-2.0.5.jar
> lrwxrwxrwx 1 alessandro alessandro       50 2009-06-15 14:40 jta.jar ->
> ../../hibernate-entitymanager-3.4.0.GA/lib/jta.jar
> -rw-r--r-- 1 alessandro alessandro   358085 2009-05-23 01:25
> log4j-1.2.12.jar
> -rw-r--r-- 1 alessandro alessandro    32900 2009-05-23 01:34
> neethi-2.0.4.jar
> -rw-r--r-- 1 alessandro alessandro     8517 2009-05-31 03:17
> openejb-api-3.1.1.jar
> -rw-r--r-- 1 alessandro alessandro   200563 2009-05-31 03:18
> openejb-client-3.1.1.jar
> -rw-r--r-- 1 alessandro alessandro  1448855 2009-05-31 03:18
> openejb-core-3.1.1.jar
> -rw-r--r-- 1 alessandro alessandro    56068 2009-05-31 03:21
> openejb-cxf-3.1.1.jar
> -rw-r--r-- 1 alessandro alessandro    56184 2009-05-31 03:19
> openejb-ejbd-3.1.1.jar
> -rw-r--r-- 1 alessandro alessandro    16019 2009-05-31 03:19
> openejb-hsql-3.1.1.jar
> -rw-r--r-- 1 alessandro alessandro    41760 2009-05-31 03:19
> openejb-http-3.1.1.jar
> -rw-r--r-- 1 alessandro alessandro    12847 2009-05-31 03:17
> openejb-javaagent-3.1.1.jar
> -rw-r--r-- 1 alessandro alessandro   788210 2009-05-31 03:17
> openejb-jee-3.1.1.jar
> -rw-r--r-- 1 alessandro alessandro    41511 2009-05-31 03:17
> openejb-loader-3.1.1.jar
> -rw-r--r-- 1 alessandro alessandro    27680 2009-05-31 03:19
> openejb-multicast-3.1.1.jar
> -rw-r--r-- 1 alessandro alessandro    74989 2009-05-31 03:18
> openejb-server-3.1.1.jar
> -rw-r--r-- 1 alessandro alessandro    31632 2009-05-31 03:19
> openejb-telnet-3.1.1.jar
> -rw-r--r-- 1 alessandro alessandro    46317 2009-05-31 03:19
> openejb-webservices-3.1.1.jar
> -rw-r--r-- 1 alessandro alessandro 11712276 2009-05-23 01:27
> openjpa-1.2.0.jar
> -rw-r--r-- 1 alessandro alessandro   155714 2009-05-23 01:34
> opensaml-1.1.jar
> -rw-r--r-- 1 alessandro alessandro   388716 2009-05-23 01:28
> quartz-1.5.2.jar
> -rw-r--r-- 1 alessandro alessandro   278301 2009-05-23 01:30
> saaj-impl-1.3.jar
> -rw-r--r-- 1 alessandro alessandro   205877 2009-05-23 01:27
> serp-1.13.1.jar -rw-r--r-- 1 alessandro alessandro    12231 2009-05-23
> 01:34
> slf4j-api-1.3.1.jar
> -rw-r--r-- 1 alessandro alessandro     7515 2009-05-23 01:34
> slf4j-jdk14-1.3.1.jar
> -rw-r--r-- 1 alessandro alessandro    26514 2009-05-23 01:26
> stax-api-1.0.1.jar
> -rw-r--r-- 1 alessandro alessandro    43161 2009-05-23 01:28
> swizzle-stream-1.0.1.jar
> -rw-r--r-- 1 alessandro alessandro   148522 2009-05-23 01:28
> wsdl4j-1.6.1.jar
> -rw-r--r-- 1 alessandro alessandro   307437 2009-05-23 01:34
> wss4j-1.5.4.jar -rw-r--r-- 1 alessandro alessandro   504969 2009-05-23
> 01:26
> wstx-asl-3.2.0.jar
> -rw-r--r-- 1 alessandro alessandro   123396 2009-05-31 03:15
> xbean-asm-shaded-3.6-r779512.jar
> -rw-r--r-- 1 alessandro alessandro    40330 2009-05-31 03:15
> xbean-finder-shaded-3.6-r779512.jar
> -rw-r--r-- 1 alessandro alessandro    51495 2009-05-28 13:31
> xbean-naming-3.5.jar
> -rw-r--r-- 1 alessandro alessandro   150222 2009-05-31 03:15
> xbean-reflect-3.6-r779512.jar
> -rw-r--r-- 1 alessandro alessandro    84091 2009-05-23 01:34
> xml-resolver-1.2.jar
> -rw-r--r-- 1 alessandro alessandro   139721 2009-05-23 01:34
> XmlSchema-1.4.2.jar
> -rw-r--r-- 1 alessandro alessandro   413902 2009-05-23 01:34
> xmlsec-1.4.0.jar
>
>
> Thanks in advance for any help

--

"To err is human,to forgive beyond the scope of an operating system"
\n\
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoSuchMethodError: org.slf4j.Logger.trace(Ljava/lang/String;)V

Jean-Louis MONTEIRO
In reply to this post by AlessandroIlardo
Hi,

Which Hibernate version are you using ?
It looks like Hibernate depends on a newer slf4j version than OpenEjb.
FYI, OpenEJB is using SLF4J 1.3.1.




   --
    Jean-Louis Monteiro
    http://twitter.com/jlouismonteiro
    http://www.tomitribe.com
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoSuchMethodError: org.slf4j.Logger.trace(Ljava/lang/String;)V

AlessandroIlardo
In reply to this post by AlessandroIlardo
I've been playing around, trying to figure out what's wrong. I reviewed the JUnit code and the Open EJB initialization looks fine, comparing it on what it's reported by the tutorial.

/*
 * Created on Jun 9, 2009, 2:31:00 PM
 * copyright by www.virtual-lab.eu
 * License: This code is subject to international copyright.
 * The use of the following code is permitted only and exclusively
 * under written permission by the author Alessandro Ilardo.
 * For further informations please contact <ilardo.a@virtual-lab.eu>
 */
package eu.virtualLab.security.user.test;

import eu.virtualLab.security.user.ejb.IdentityManagerLocal;
import java.io.IOException;
import java.net.URL;
import java.util.Enumeration;
import java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NameClassPair;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import junit.framework.TestCase;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;

/**
 *
 * @author Alessandro Ilardo <ilardo.a@virtual-lab.eu>
 */
public class Init extends TestCase {

    private InitialContext initialContext;
    private IdentityManagerLocal localInterface;

    public Init(String name) {
        super(name);
        // Debug
        try {
            Enumeration<URL> ejbJars = this.getClass().getClassLoader().getResources("META-INF/ejb-jar.xml");
            while (ejbJars.hasMoreElements()) {
                URL url = ejbJars.nextElement();
                System.out.println("[Init] app = " + url);
            }
        } catch (IOException ex) {
            System.err.println("[Init] " + ex.getMessage());
        }
    }

    @BeforeClass
    public static void setUpClass() throws Exception {
    }

    @AfterClass
    public static void tearDownClass() throws Exception {
    }

    @Before
    @Override
    public void setUp() {
        //Init the OpenEJB Container
        try {

            System.out.println("[setUp] Preparing OpenEJB.");

//            props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
//            props.setProperty("openejb.configuration", config.toExternalForm());
//            props.put("openejb.validation.output.level", "VERBOSE");
//            props.put("openejb.jndiname.format", "upstream/mint/{deploymentId}");

            Properties p = new Properties();
            p.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
            p.put("openejb.validation.output.level", "VERBOSE");
//            p.put("openejb.jndiname.format", "upstream/mint/{deploymentId}");
            //Config the DataSource with MySQL
            p.put("IdentityManagerDS", "new://Resource?type=DataSource");
            p.put("IdentityManagerDS.JdbcDriver", "com.mysql.jdbc.Driver");
            p.put("IdentityManagerDS.JdbcUrl", "jdbc:mysql://localhost:3306/IdentityManager");
            p.setProperty("IdentityManagerDS.UserName", "root");
            p.setProperty("IdentityManagerDS.Password", "xxxxxxxxx");

            //It's specially for MySQL where hibernate.dialect must be explicitly set
            p.put("IdentityManager-ejbPU.hibernate.dialect", "org.hibernate.dialect.MySQLInnoDBDialect");

            initialContext = new InitialContext(p);
            System.out.println("[setUp] OpenEJB Initialized.");
           
            Object object = this.getInitialContext().lookup("IdentityManagerBeanLocal");
            System.out.println("[setUp] Succesfully found IdentityManagerBean in JNDI context.");
            localInterface = (IdentityManagerLocal) object;

        } catch (NamingException ex) {
            System.err.println("[setUp] " + ex.getMessage());
            listBindings(initialContext);
            System.exit(1);
        }

    }

    private InitialContext getInitialContext() {
        return initialContext;
    }

    protected static void listBindings(InitialContext ctx) {
        try {
            NamingEnumeration ne = ctx.list(".");
            while (ne.hasMore()) {
                NameClassPair obj = (NameClassPair) ne.next();
                System.out.println("[listBindings] Object key : " + obj.getName());
                System.out.println("[listBindings] Object type : " + obj.getClassName());
            }
        } catch (NamingException ex) {
            System.err.println("[listBindings] " + ex.getMessage());
            System.exit(1);
        }
    }

    protected IdentityManagerLocal getEJBLocalInterface() {
        return this.localInterface;
    }

    @After
    @Override
    public void tearDown() {
    }
}


EJB stuff

....
@Stateless
public class IdentityManagerBean implements IdentityManagerRemote, IdentityManagerLocal {
....

META-INF/open-ejb.jar

<openejb-jar>
  <ejb-deployment ejb-name="IdentityManagerBean">
    <jndi name="IdentityManagerBeanLocal" interface="Local"/> 
  </ejb-deployment>
</openejb-jar>

META-INF/ejb-jar.xml

<ejb-jar />

META-INF/persistence.xml

<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
  <persistence-unit name="IdentityManager-ejbPU" transaction-type="JTA">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
   
    <jta-data-source>IdentityManagerDS</jta-data-source>
    <properties>
      <property name="hibernate.hbm2ddl.auto" value="update"/>
    </properties>
  </persistence-unit>
</persistence>


OUTPUT (NETBEANS RUN PROGRAM)

init:
deps-jar:
init:
deps-jar:
compile:
library-inclusion-in-archive:
dist:
compile:
run:
[getMockUser]
 eu.virtualLab.security.user.entity.User[id=1]
 eu.virtualLab.security.user.entity.User[username=alessandro]  [Init] app = jar:file:/home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/lib/openejb-core-3.1.1.jar!/META-INF/ejb-jar.xml
[Init] app = jar:file:/home/alessandro/Work-Space/NetBeansProject/IdentityManager/IdentityManager-ejb/trunk/dist/IdentityManager-ejb.jar!/META-INF/ejb-jar.xml
[JunitUserActions] Constructor invoked
.[setUp] Preparing OpenEJB.
Apache OpenEJB 3.1.1    build: 20090530-06:18
http://openejb.apache.org/
Jun 16, 2009 2:53:26 PM org.hibernate.cfg.annotations.Version <clinit>
INFO: Hibernate Annotations 3.4.0.GA
Jun 16, 2009 2:53:26 PM org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.3.0.SP1
Jun 16, 2009 2:53:26 PM org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
Jun 16, 2009 2:53:26 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: Bytecode provider name : javassist
Jun 16, 2009 2:53:26 PM org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
Jun 16, 2009 2:53:26 PM org.hibernate.annotations.common.Version <clinit>
INFO: Hibernate Commons Annotations 3.1.0.GA
Jun 16, 2009 2:53:26 PM org.hibernate.ejb.Version <clinit>
INFO: Hibernate EntityManager 3.4.0.GA
Jun 16, 2009 2:53:26 PM org.hibernate.ejb.Ejb3Configuration configure
INFO: Processing PersistenceUnitInfo [
        name: IdentityManager-ejbPU
        ...]
Jun 16, 2009 2:53:27 PM org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: eu.virtualLab.security.user.entity.Role
Jun 16, 2009 2:53:27 PM org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity eu.virtualLab.security.user.entity.Role on table USR_ROLE
Jun 16, 2009 2:53:27 PM org.hibernate.ejb.Ejb3Configuration configure
INFO: Processing PersistenceUnitInfo [
        name: IdentityManager-ejbPU
        ...]
Jun 16, 2009 2:53:27 PM org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: eu.virtualLab.security.user.entity.Role
Jun 16, 2009 2:53:27 PM org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity eu.virtualLab.security.user.entity.Role on table USR_ROLE
[setUp] OpenEJB Initialized.
[setUp] Name "IdentityManagerBeanLocal" not found.
E
Time: 8.123
There was 1 error:
1) testUserExist(eu.virtualLab.security.user.test.JunitUserActions)java.lang.NullPointerException
        at eu.virtualLab.security.user.test.Init.listBindings(Init.java:107)
        at eu.virtualLab.security.user.test.Init.setUp(Init.java:94)
        at eu.virtualLab.security.user.test.Main.main(Main.java:43)

FAILURES!!!
Tests run: 1,  Failures: 0,  Errors: 1



OpenEJB LOG

2009-06-16 14:43:31,609 - INFO  - openejb.home = /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1
2009-06-16 14:43:31,611 - INFO  - openejb.base = /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1
2009-06-16 14:43:32,835 - INFO  - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service)
2009-06-16 14:43:32,844 - INFO  - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
2009-06-16 14:43:32,852 - INFO  - Configuring Service(id=My DataSource, type=Resource, provider-id=Default JDBC Database)
2009-06-16 14:43:32,870 - INFO  - Configuring Service(id=My Unmanaged DataSource, type=Resource, provider-id=Default JDBC Database)
2009-06-16 14:43:32,902 - INFO  - Configuring Service(id=My JMS Resource Adapter, type=Resource, provider-id=Default JMS Resource Adapter)
2009-06-16 14:43:32,904 - INFO  - Configuring Service(id=My JMS Connection Factory, type=Resource, provider-id=Default JMS Connection Factory)
2009-06-16 14:43:32,905 - INFO  - Configuring Service(id=IdentityManagerDS, type=Resource, provider-id=Default JDBC Database)
2009-06-16 14:43:32,909 - INFO  - Configuring Service(id=My CMP Container, type=Container, provider-id=Default CMP Container)
2009-06-16 14:43:32,911 - INFO  - Configuring Service(id=My BMP Container, type=Container, provider-id=Default BMP Container)
2009-06-16 14:43:32,913 - INFO  - Configuring Service(id=My Stateful Container, type=Container, provider-id=Default Stateful Container)
2009-06-16 14:43:32,915 - INFO  - Configuring Service(id=My Stateless Container, type=Container, provider-id=Default Stateless Container)
2009-06-16 14:43:32,917 - INFO  - Configuring Service(id=My MDB Container , type=Container, provider-id=Default MDB Container)
2009-06-16 14:43:33,000 - INFO  - Configuring enterprise application: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar
2009-06-16 14:43:34,576 - INFO  - Configuring PersistenceUnit(name=IdentityManager-ejbPU, provider=org.hibernate.ejb.HibernatePersistence)
2009-06-16 14:43:34,584 - INFO  - Auto-creating a Resource with id 'IdentityManagerDSNonJta' of type 'DataSource for 'IdentityManager-ejbPU'.
2009-06-16 14:43:34,584 - INFO  - Configuring Service(id=IdentityManagerDSNonJta, type=Resource, provider-id=IdentityManagerDS)
2009-06-16 14:43:34,585 - INFO  - Adjusting PersistenceUnit IdentityManager-ejbPU <jta-data-source> to Resource ID 'IdentityManagerDS' from 'java:/IdentityManagerDS'
2009-06-16 14:43:34,585 - INFO  - Adjusting PersistenceUnit IdentityManager-ejbPU <non-jta-data-source> to Resource ID 'IdentityManagerDSNonJta' from 'null'
2009-06-16 14:43:34,626 - INFO  - Using 'openejb.validation.output.level=VERBOSE'
2009-06-16 14:43:34,626 - INFO  - Enterprise application "/home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar" loaded.
2009-06-16 14:43:35,105 - INFO  - Found ClientModule in classpath: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/lib/xml-resolver-1.2.jar
2009-06-16 14:43:35,126 - INFO  - Found ClientModule in classpath: /home/alessandro/Documents/Java/shared-lib/hibernate-entitymanager-3.4.0.GA/lib/javassist.jar
2009-06-16 14:43:35,127 - INFO  - Found EjbModule in classpath: /home/alessandro/Work-Space/NetBeansProject/IdentityManager/IdentityManager-ejb/trunk/dist/IdentityManager-ejb.jar
2009-06-16 14:43:36,138 - INFO  - Beginning load: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/lib/xml-resolver-1.2.jar
2009-06-16 14:43:36,144 - INFO  - Beginning load: /home/alessandro/Documents/Java/shared-lib/hibernate-entitymanager-3.4.0.GA/lib/javassist.jar
2009-06-16 14:43:36,166 - INFO  - Beginning load: /home/alessandro/Work-Space/NetBeansProject/IdentityManager/IdentityManager-ejb/trunk/dist/IdentityManager-ejb.jar
2009-06-16 14:43:36,171 - INFO  - Configuring enterprise application: classpath.ear
2009-06-16 14:43:36,175 - WARN  - No application-client.xml found assuming annotations present: classpath.ear, module: xml-resolver-1.2.jar
2009-06-16 14:43:36,175 - WARN  - No application-client.xml found assuming annotations present: classpath.ear, module: javassist.jar
2009-06-16 14:43:36,924 - INFO  - Configuring PersistenceUnit(name=IdentityManager-ejbPU, provider=org.hibernate.ejb.HibernatePersistence)
2009-06-16 14:43:36,925 - INFO  - Adjusting PersistenceUnit IdentityManager-ejbPU <non-jta-data-source> to Resource ID 'IdentityManagerDSNonJta' from 'null'
2009-06-16 14:43:36,944 - INFO  - Using 'openejb.validation.output.level=VERBOSE'
2009-06-16 14:43:36,944 - INFO  - Enterprise application "classpath.ear" loaded.
2009-06-16 14:43:36,945 - INFO  - Creating TransactionManager(id=Default Transaction Manager)
2009-06-16 14:43:37,093 - INFO  - Creating SecurityService(id=Default Security Service)
2009-06-16 14:43:37,170 - INFO  - Creating Resource(id=My DataSource)
2009-06-16 14:43:37,207 - INFO  - Creating Resource(id=My Unmanaged DataSource)
2009-06-16 14:43:37,240 - INFO  - Creating Resource(id=IdentityManagerDS)
2009-06-16 14:43:37,254 - INFO  - Creating Resource(id=My JMS Resource Adapter)
2009-06-16 14:43:37,736 - INFO  - Creating Resource(id=My JMS Connection Factory)
2009-06-16 14:43:37,754 - INFO  - Creating ConnectionManager for Resource(id=My JMS Connection Factory)
2009-06-16 14:43:37,821 - INFO  - Creating Resource(id=IdentityManagerDSNonJta)
2009-06-16 14:43:37,829 - INFO  - Creating Container(id=My CMP Container)
2009-06-16 14:43:37,901 - INFO  - Creating Container(id=My BMP Container)
2009-06-16 14:43:37,922 - INFO  - Creating Container(id=My Stateful Container)
2009-06-16 14:43:37,986 - INFO  - Creating Container(id=My Stateless Container)
2009-06-16 14:43:38,016 - INFO  - Creating Container(id=My MDB Container )
2009-06-16 14:43:38,028 - INFO  - Assembling app: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar
2009-06-16 14:43:38,045 - INFO  - PersistenceUnit(name=IdentityManager-ejbPU, provider=org.hibernate.ejb.HibernatePersistence)
2009-06-16 14:43:38,840 - INFO  - Undeploying app: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar
2009-06-16 14:43:38,876 - ERROR - Application could not be deployed:  /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar
org.apache.openejb.OpenEJBException: Creating application failed: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar: org.slf4j.Logger.trace(Ljava/lang/String;)V
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:658)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:442)
        at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:360)
        at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:272)
        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
        at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
        at javax.naming.InitialContext.init(InitialContext.java:240)
        at javax.naming.InitialContext.<init>(InitialContext.java:214)
        at eu.virtualLab.security.user.test.Init.setUp(Init.java:85)
        at junit.framework.TestCase.runBare(TestCase.java:128)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:228)
        at junit.framework.TestSuite.run(TestSuite.java:223)
        at junit.textui.TestRunner.doRun(TestRunner.java:115)
        at junit.textui.TestRunner.doRun(TestRunner.java:108)
        at junit.textui.TestRunner.run(TestRunner.java:76)
        at junit.textui.TestRunner.run(TestRunner.java:61)
        at eu.virtualLab.security.user.test.Main.main(Main.java:43)
Caused by: java.lang.NoSuchMethodError: org.slf4j.Logger.trace(Ljava/lang/String;)V
        at org.hibernate.cfg.annotations.PropertyBinder.make(PropertyBinder.java:184)
        at org.hibernate.cfg.AnnotationBinder.bindId(AnnotationBinder.java:1911)
        at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1279)
        at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:754)
        at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:546)
        at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:291)
        at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1148)
        at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1226)
        at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:173)
        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:854)
        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:425)
        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:131)
        at org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:183)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:482)
        ... 31 more
2009-06-16 14:43:38,883 - INFO  - Assembling app: classpath.ear
2009-06-16 14:43:38,884 - INFO  - PersistenceUnit(name=IdentityManager-ejbPU, provider=org.hibernate.ejb.HibernatePersistence)
2009-06-16 14:43:38,940 - INFO  - Undeploying app: classpath.ear
2009-06-16 14:43:38,941 - ERROR - Application could not be deployed:  classpath.ear
org.apache.openejb.OpenEJBException: Creating application failed: classpath.ear: org.slf4j.Logger.trace(Ljava/lang/String;)V
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:658)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:442)
        at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:360)
        at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:272)
        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
        at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
        at javax.naming.InitialContext.init(InitialContext.java:240)
        at javax.naming.InitialContext.<init>(InitialContext.java:214)
        at eu.virtualLab.security.user.test.Init.setUp(Init.java:85)
        at junit.framework.TestCase.runBare(TestCase.java:128)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:228)
        at junit.framework.TestSuite.run(TestSuite.java:223)
        at junit.textui.TestRunner.doRun(TestRunner.java:115)
        at junit.textui.TestRunner.doRun(TestRunner.java:108)
        at junit.textui.TestRunner.run(TestRunner.java:76)
        at junit.textui.TestRunner.run(TestRunner.java:61)
        at eu.virtualLab.security.user.test.Main.main(Main.java:43)
Caused by: java.lang.NoSuchMethodError: org.slf4j.Logger.trace(Ljava/lang/String;)V
        at org.hibernate.cfg.annotations.PropertyBinder.make(PropertyBinder.java:184)
        at org.hibernate.cfg.AnnotationBinder.bindId(AnnotationBinder.java:1911)
        at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1279)
        at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:754)
        at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:546)
        at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:291)
        at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1148)
        at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1226)
        at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:173)
        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:854)
        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:425)
        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:131)
        at org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:183)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:482)
        ... 31 more



Looking from the output looks like Hibernate version is 3.4.0.GA, in anycase I checked the the hibernate/lib/slf4j-api.jar/MANIFEST.MF and seems to be equals to the OpenEJB library


Manifest-Version: 1.0

Archiver-Version: Plexus Archiver

Created-By: Apache Maven

Built-By: ceki

Build-Jdk: 1.5.0_06

Bundle-Description: The slf4j API

Bundle-Version: 1.3.1

Implementation-Version: 1.4.2

Implementation-Title: slf4j-api

Bundle-ManifestVersion: 2

Bundle-SymbolicName: slf4j.api

Bundle-Name: slf4j-api

Bundle-Vendor: SLF4J.ORG

Export-Package: org.slf4j;version=1.3.1, org.slf4j.spi;version=1.3.1,

 org.slf4j.helpers;version=1.3.1

Import-Package: org.slf4j.impl;version="[1.3,1.4)"






Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoSuchMethodError: org.slf4j.Logger.trace(Ljava/lang/String;)V

AlessandroIlardo
In reply to this post by AlessandroIlardo
I go back to JBoss.
thanks anyway

AlessandroIlardo wrote
Hello there,
I am using NetBeans with Junit, HIbernate and OpenEJB to test an EJB module.
On the OpenEJB log I get the following error:


2009-06-15 14:56:22,434 - INFO  - openejb.home = /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1
2009-06-15 14:56:22,435 - INFO  - openejb.base = /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1
2009-06-15 14:56:23,371 - INFO  - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service)
2009-06-15 14:56:23,384 - INFO  - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
2009-06-15 14:56:23,395 - INFO  - Configuring Service(id=My DataSource, type=Resource, provider-id=Default JDBC Database)
2009-06-15 14:56:23,413 - INFO  - Configuring Service(id=My Unmanaged DataSource, type=Resource, provider-id=Default JDBC Database)
2009-06-15 14:56:23,424 - INFO  - Configuring Service(id=My JMS Resource Adapter, type=Resource, provider-id=Default JMS Resource Adapter)
2009-06-15 14:56:23,436 - INFO  - Configuring Service(id=My JMS Connection Factory, type=Resource, provider-id=Default JMS Connection Factory)
2009-06-15 14:56:23,448 - INFO  - Configuring Service(id=UnmanagedIdentityManagerDS, type=Resource, provider-id=Default JDBC Database)
2009-06-15 14:56:23,461 - INFO  - Configuring Service(id=My CMP Container, type=Container, provider-id=Default CMP Container)
2009-06-15 14:56:23,472 - INFO  - Configuring Service(id=My BMP Container, type=Container, provider-id=Default BMP Container)
2009-06-15 14:56:23,483 - INFO  - Configuring Service(id=My Stateful Container, type=Container, provider-id=Default Stateful Container)
2009-06-15 14:56:23,495 - INFO  - Configuring Service(id=My Stateless Container, type=Container, provider-id=Default Stateless Container)
2009-06-15 14:56:23,520 - INFO  - Configuring Service(id=My MDB Container , type=Container, provider-id=Default MDB Container)
2009-06-15 14:56:23,596 - INFO  - Configuring enterprise application: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar
2009-06-15 14:56:24,986 - INFO  - Configuring PersistenceUnit(name=IdentityManager-ejbPU, provider=org.hibernate.ejb.HibernatePersistence)
2009-06-15 14:56:24,988 - INFO  - Adjusting PersistenceUnit IdentityManager-ejbPU <jta-data-source> to Resource ID 'My DataSource' from 'java:/IdentityManagerDS'
2009-06-15 14:56:24,989 - INFO  - Adjusting PersistenceUnit IdentityManager-ejbPU <non-jta-data-source> to Resource ID 'My Unmanaged DataSource' from 'null'
2009-06-15 14:56:25,037 - INFO  - Enterprise application "/home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar" loaded.
2009-06-15 14:56:25,549 - INFO  - Found ClientModule in classpath: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/lib/xml-resolver-1.2.jar
2009-06-15 14:56:25,593 - INFO  - Found ClientModule in classpath: /home/alessandro/Documents/Java/shared-lib/hibernate-entitymanager-3.4.0.GA/lib/javassist.jar
2009-06-15 14:56:25,597 - INFO  - Found EjbModule in classpath: /home/alessandro/Work-Space/NetBeansProject/IdentityManager/IdentityManager-ejb/trunk/dist/IdentityManager-ejb.jar
2009-06-15 14:56:25,682 - INFO  - Found ClientModule in classpath: /home/alessandro/.netbeans/6.1/ant/lib/ant.jar
2009-06-15 14:56:26,389 - INFO  - Found ClientModule in classpath: /home/alessandro/.netbeans/6.1/ant/lib/ant-launcher.jar
2009-06-15 14:56:26,435 - INFO  - Beginning load: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/lib/xml-resolver-1.2.jar
2009-06-15 14:56:26,441 - INFO  - Beginning load: /home/alessandro/Documents/Java/shared-lib/hibernate-entitymanager-3.4.0.GA/lib/javassist.jar
2009-06-15 14:56:26,463 - INFO  - Beginning load: /home/alessandro/Work-Space/NetBeansProject/IdentityManager/IdentityManager-ejb/trunk/dist/IdentityManager-ejb.jar
2009-06-15 14:56:26,468 - INFO  - Beginning load: /home/alessandro/.netbeans/6.1/ant/lib/ant.jar
2009-06-15 14:56:26,494 - INFO  - Beginning load: /home/alessandro/.netbeans/6.1/ant/lib/ant-launcher.jar
2009-06-15 14:56:26,513 - INFO  - Configuring enterprise application: classpath.ear
2009-06-15 14:56:26,516 - WARN  - No application-client.xml found assuming annotations present: classpath.ear, module: xml-resolver-1.2.jar
2009-06-15 14:56:26,517 - WARN  - No application-client.xml found assuming annotations present: classpath.ear, module: javassist.jar
2009-06-15 14:56:26,517 - WARN  - No application-client.xml found assuming annotations present: classpath.ear, module: ant.jar
2009-06-15 14:56:26,517 - WARN  - No application-client.xml found assuming annotations present: classpath.ear, module: ant-launcher.jar
2009-06-15 14:56:27,994 - INFO  - Configuring PersistenceUnit(name=IdentityManager-ejbPU, provider=org.hibernate.ejb.HibernatePersistence)
2009-06-15 14:56:28,005 - INFO  - Enterprise application "classpath.ear" loaded.
2009-06-15 14:56:28,006 - INFO  - Creating TransactionManager(id=Default Transaction Manager)
2009-06-15 14:56:28,122 - INFO  - Creating SecurityService(id=Default Security Service)
2009-06-15 14:56:28,183 - INFO  - Creating Resource(id=My DataSource)
2009-06-15 14:56:28,216 - INFO  - Creating Resource(id=My Unmanaged DataSource)
2009-06-15 14:56:28,239 - INFO  - Creating Resource(id=UnmanagedIdentityManagerDS)
2009-06-15 14:56:28,248 - INFO  - Creating Resource(id=My JMS Resource Adapter)
2009-06-15 14:56:28,733 - INFO  - Creating Resource(id=My JMS Connection Factory)
2009-06-15 14:56:28,741 - INFO  - Creating ConnectionManager for Resource(id=My JMS Connection Factory)
2009-06-15 14:56:28,784 - INFO  - Creating Container(id=My CMP Container)
2009-06-15 14:56:28,817 - INFO  - Creating Container(id=My BMP Container)
2009-06-15 14:56:28,835 - INFO  - Creating Container(id=My Stateful Container)
2009-06-15 14:56:28,889 - INFO  - Creating Container(id=My Stateless Container)
2009-06-15 14:56:28,901 - INFO  - Creating Container(id=My MDB Container )
2009-06-15 14:56:28,912 - INFO  - Assembling app: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar
2009-06-15 14:56:28,954 - INFO  - PersistenceUnit(name=IdentityManager-ejbPU, provider=org.hibernate.ejb.HibernatePersistence)
2009-06-15 14:56:29,575 - INFO  - Undeploying app: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar
2009-06-15 14:56:29,582 - ERROR - Application could not be deployed:  /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar
org.apache.openejb.OpenEJBException: Creating application failed: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar: org.slf4j.Logger.trace(Ljava/lang/String;)V
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:658)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:442)
        at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:360)
        at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:272)
        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
        at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
        at javax.naming.InitialContext.init(InitialContext.java:240)
        at javax.naming.InitialContext.<init>(InitialContext.java:214)
        at eu.virtualLab.security.user.test.Init.setUp(Init.java:72)
        at junit.framework.TestCase.runBare(TestCase.java:128)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:228)
        at junit.framework.TestSuite.run(TestSuite.java:223)
        at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
        at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:32)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766)
Caused by: java.lang.NoSuchMethodError: org.slf4j.Logger.trace(Ljava/lang/String;)V
        at org.hibernate.cfg.annotations.PropertyBinder.make(PropertyBinder.java:184)
        at org.hibernate.cfg.AnnotationBinder.bindId(AnnotationBinder.java:1911)
        at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1279)
        at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:754)
        at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:546)
        at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:291)
        at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1148)
        at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1226)
        at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:173)
        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:854)
        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:425)
        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:131)
        at org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:183)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:482)
        ... 31 more
2009-06-15 14:56:29,585 - INFO  - Assembling app: classpath.ear
2009-06-15 14:56:29,586 - INFO  - Undeploying app: classpath.ear
2009-06-15 14:56:29,588 - ERROR - Application could not be deployed:  classpath.ear
org.apache.openejb.OpenEJBException: Creating application failed: classpath.ear: org.apache.openejb.OpenEJBException: Could not lookup <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS' for unit 'IdentityManager-ejbPU': Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial: Could not lookup <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS' for unit 'IdentityManager-ejbPU': Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:658)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:442)
        at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:360)
        at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:272)
        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
        at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
        at javax.naming.InitialContext.init(InitialContext.java:240)
        at javax.naming.InitialContext.<init>(InitialContext.java:214)
        at eu.virtualLab.security.user.test.Init.setUp(Init.java:72)
        at junit.framework.TestCase.runBare(TestCase.java:128)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:228)
        at junit.framework.TestSuite.run(TestSuite.java:223)
        at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
        at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:32)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766)
Caused by: org.apache.openejb.OpenEJBException: org.apache.openejb.OpenEJBException: Could not lookup <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS' for unit 'IdentityManager-ejbPU': Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial: Could not lookup <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS' for unit 'IdentityManager-ejbPU': Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:487)
        ... 31 more
Caused by: org.apache.openejb.OpenEJBException: Could not lookup <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS' for unit 'IdentityManager-ejbPU': Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:122)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:482)
        ... 31 more
Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
        at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:342)
        at javax.naming.InitialContext.lookup(InitialContext.java:409)
        at org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:133)
        at org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:123)
        at org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:119)
        ... 32 more



To me it looks like a jars conflict. The OpenEJB library included into the project

-rw-r--r-- 1 alessandro alessandro   106398 2009-05-23 01:25 activeio-core-3.0.0-incubator.jar
-rw-r--r-- 1 alessandro alessandro  1683897 2009-05-23 01:25 activemq-core-4.1.1.jar
-rw-r--r-- 1 alessandro alessandro    78641 2009-05-23 01:27 activemq-ra-4.1.1.jar
-rw-r--r-- 1 alessandro alessandro   329586 2009-05-23 01:25 backport-util-concurrent-2.1.jar
-rw-r--r-- 1 alessandro alessandro  1593423 2009-05-23 01:34 bcprov-jdk15-140.jar
-rw-r--r-- 1 alessandro alessandro    36174 2009-05-23 01:27 commons-cli-1.1.jar
-rw-r--r-- 1 alessandro alessandro   571259 2009-05-20 20:35 commons-collections-3.2.jar
-rw-r--r-- 1 alessandro alessandro   202182 2009-05-28 23:23 commons-dbcp-all-1.3-r699049.jar
-rw-r--r-- 1 alessandro alessandro   207723 2009-05-20 20:35 commons-lang-2.1.jar
-rw-r--r-- 1 alessandro alessandro    52915 2009-05-20 20:37 commons-logging-1.1.jar
-rw-r--r-- 1 alessandro alessandro    62086 2009-05-23 01:27 commons-pool-1.3.jar
-rw-r--r-- 1 alessandro alessandro  2881944 2009-05-23 01:34 cxf-bundle-2.0.9.jar
lrwxrwxrwx 1 alessandro alessandro       52 2009-06-15 14:39 dom4j.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/dom4j.jar
-rw-r--r-- 1 alessandro alessandro    18843 2009-05-31 03:15 ejb31-api-experimental-3.1.1.jar
lrwxrwxrwx 1 alessandro alessandro       63 2009-06-15 14:40 ejb3-persistence.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/ejb3-persistence.jar
-rw-r--r-- 1 alessandro alessandro   100863 2009-05-23 01:27 geronimo-connector-2.1.jar
-rw-r--r-- 1 alessandro alessandro   304552 2009-05-23 01:27 geronimo-javamail_1.4_mail-1.2.jar
-rw-r--r-- 1 alessandro alessandro    51278 2009-05-23 01:27 geronimo-transaction-2.1.jar
lrwxrwxrwx 1 alessandro alessandro       68 2009-06-15 14:35 hibernate-annotations.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/hibernate-annotations.jar
lrwxrwxrwx 1 alessandro alessandro       76 2009-06-15 14:36 hibernate-commons-annotations.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/hibernate-commons-annotations.jar
lrwxrwxrwx 1 alessandro alessandro       61 2009-06-15 14:36 hibernate-core.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/hibernate-core.jar
-rw-r--r-- 1 alessandro alessandro    79981 2009-05-23 01:27 howl-1.0.1-1.jar
-rw-r--r-- 1 alessandro alessandro   643727 2009-05-23 01:27 hsqldb-1.8.0.7.jar
-rw-r--r-- 1 alessandro alessandro   753070 2009-05-31 03:15 javaee-api-5.0-2.jar
lrwxrwxrwx 1 alessandro alessandro       56 2009-06-15 14:40 javassist.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/javassist.jar
-rw-r--r-- 1 alessandro alessandro   787619 2009-05-23 01:26 jaxb-impl-2.0.5.jar
lrwxrwxrwx 1 alessandro alessandro       50 2009-06-15 14:40 jta.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/jta.jar
-rw-r--r-- 1 alessandro alessandro   358085 2009-05-23 01:25 log4j-1.2.12.jar
-rw-r--r-- 1 alessandro alessandro    32900 2009-05-23 01:34 neethi-2.0.4.jar
-rw-r--r-- 1 alessandro alessandro     8517 2009-05-31 03:17 openejb-api-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro   200563 2009-05-31 03:18 openejb-client-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro  1448855 2009-05-31 03:18 openejb-core-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    56068 2009-05-31 03:21 openejb-cxf-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    56184 2009-05-31 03:19 openejb-ejbd-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    16019 2009-05-31 03:19 openejb-hsql-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    41760 2009-05-31 03:19 openejb-http-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    12847 2009-05-31 03:17 openejb-javaagent-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro   788210 2009-05-31 03:17 openejb-jee-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    41511 2009-05-31 03:17 openejb-loader-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    27680 2009-05-31 03:19 openejb-multicast-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    74989 2009-05-31 03:18 openejb-server-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    31632 2009-05-31 03:19 openejb-telnet-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    46317 2009-05-31 03:19 openejb-webservices-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro 11712276 2009-05-23 01:27 openjpa-1.2.0.jar
-rw-r--r-- 1 alessandro alessandro   155714 2009-05-23 01:34 opensaml-1.1.jar
-rw-r--r-- 1 alessandro alessandro   388716 2009-05-23 01:28 quartz-1.5.2.jar
-rw-r--r-- 1 alessandro alessandro   278301 2009-05-23 01:30 saaj-impl-1.3.jar
-rw-r--r-- 1 alessandro alessandro   205877 2009-05-23 01:27 serp-1.13.1.jar
-rw-r--r-- 1 alessandro alessandro    12231 2009-05-23 01:34 slf4j-api-1.3.1.jar
-rw-r--r-- 1 alessandro alessandro     7515 2009-05-23 01:34 slf4j-jdk14-1.3.1.jar
-rw-r--r-- 1 alessandro alessandro    26514 2009-05-23 01:26 stax-api-1.0.1.jar
-rw-r--r-- 1 alessandro alessandro    43161 2009-05-23 01:28 swizzle-stream-1.0.1.jar
-rw-r--r-- 1 alessandro alessandro   148522 2009-05-23 01:28 wsdl4j-1.6.1.jar
-rw-r--r-- 1 alessandro alessandro   307437 2009-05-23 01:34 wss4j-1.5.4.jar
-rw-r--r-- 1 alessandro alessandro   504969 2009-05-23 01:26 wstx-asl-3.2.0.jar
-rw-r--r-- 1 alessandro alessandro   123396 2009-05-31 03:15 xbean-asm-shaded-3.6-r779512.jar
-rw-r--r-- 1 alessandro alessandro    40330 2009-05-31 03:15 xbean-finder-shaded-3.6-r779512.jar
-rw-r--r-- 1 alessandro alessandro    51495 2009-05-28 13:31 xbean-naming-3.5.jar
-rw-r--r-- 1 alessandro alessandro   150222 2009-05-31 03:15 xbean-reflect-3.6-r779512.jar
-rw-r--r-- 1 alessandro alessandro    84091 2009-05-23 01:34 xml-resolver-1.2.jar
-rw-r--r-- 1 alessandro alessandro   139721 2009-05-23 01:34 XmlSchema-1.4.2.jar
-rw-r--r-- 1 alessandro alessandro   413902 2009-05-23 01:34 xmlsec-1.4.0.jar


Thanks in advance for any help
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoSuchMethodError: org.slf4j.Logger.trace(Ljava/lang/String;)V

Jean-Louis MONTEIRO
Hi,

Sorry for the delay, I totally forgot your problem.
Do you have a simple project I can use to reproduce your problem ?

Thanks.

AlessandroIlardo wrote
I go back to JBoss.
thanks anyway

AlessandroIlardo wrote
Hello there,
I am using NetBeans with Junit, HIbernate and OpenEJB to test an EJB module.
On the OpenEJB log I get the following error:


2009-06-15 14:56:22,434 - INFO  - openejb.home = /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1
2009-06-15 14:56:22,435 - INFO  - openejb.base = /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1
2009-06-15 14:56:23,371 - INFO  - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service)
2009-06-15 14:56:23,384 - INFO  - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
2009-06-15 14:56:23,395 - INFO  - Configuring Service(id=My DataSource, type=Resource, provider-id=Default JDBC Database)
2009-06-15 14:56:23,413 - INFO  - Configuring Service(id=My Unmanaged DataSource, type=Resource, provider-id=Default JDBC Database)
2009-06-15 14:56:23,424 - INFO  - Configuring Service(id=My JMS Resource Adapter, type=Resource, provider-id=Default JMS Resource Adapter)
2009-06-15 14:56:23,436 - INFO  - Configuring Service(id=My JMS Connection Factory, type=Resource, provider-id=Default JMS Connection Factory)
2009-06-15 14:56:23,448 - INFO  - Configuring Service(id=UnmanagedIdentityManagerDS, type=Resource, provider-id=Default JDBC Database)
2009-06-15 14:56:23,461 - INFO  - Configuring Service(id=My CMP Container, type=Container, provider-id=Default CMP Container)
2009-06-15 14:56:23,472 - INFO  - Configuring Service(id=My BMP Container, type=Container, provider-id=Default BMP Container)
2009-06-15 14:56:23,483 - INFO  - Configuring Service(id=My Stateful Container, type=Container, provider-id=Default Stateful Container)
2009-06-15 14:56:23,495 - INFO  - Configuring Service(id=My Stateless Container, type=Container, provider-id=Default Stateless Container)
2009-06-15 14:56:23,520 - INFO  - Configuring Service(id=My MDB Container , type=Container, provider-id=Default MDB Container)
2009-06-15 14:56:23,596 - INFO  - Configuring enterprise application: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar
2009-06-15 14:56:24,986 - INFO  - Configuring PersistenceUnit(name=IdentityManager-ejbPU, provider=org.hibernate.ejb.HibernatePersistence)
2009-06-15 14:56:24,988 - INFO  - Adjusting PersistenceUnit IdentityManager-ejbPU <jta-data-source> to Resource ID 'My DataSource' from 'java:/IdentityManagerDS'
2009-06-15 14:56:24,989 - INFO  - Adjusting PersistenceUnit IdentityManager-ejbPU <non-jta-data-source> to Resource ID 'My Unmanaged DataSource' from 'null'
2009-06-15 14:56:25,037 - INFO  - Enterprise application "/home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar" loaded.
2009-06-15 14:56:25,549 - INFO  - Found ClientModule in classpath: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/lib/xml-resolver-1.2.jar
2009-06-15 14:56:25,593 - INFO  - Found ClientModule in classpath: /home/alessandro/Documents/Java/shared-lib/hibernate-entitymanager-3.4.0.GA/lib/javassist.jar
2009-06-15 14:56:25,597 - INFO  - Found EjbModule in classpath: /home/alessandro/Work-Space/NetBeansProject/IdentityManager/IdentityManager-ejb/trunk/dist/IdentityManager-ejb.jar
2009-06-15 14:56:25,682 - INFO  - Found ClientModule in classpath: /home/alessandro/.netbeans/6.1/ant/lib/ant.jar
2009-06-15 14:56:26,389 - INFO  - Found ClientModule in classpath: /home/alessandro/.netbeans/6.1/ant/lib/ant-launcher.jar
2009-06-15 14:56:26,435 - INFO  - Beginning load: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/lib/xml-resolver-1.2.jar
2009-06-15 14:56:26,441 - INFO  - Beginning load: /home/alessandro/Documents/Java/shared-lib/hibernate-entitymanager-3.4.0.GA/lib/javassist.jar
2009-06-15 14:56:26,463 - INFO  - Beginning load: /home/alessandro/Work-Space/NetBeansProject/IdentityManager/IdentityManager-ejb/trunk/dist/IdentityManager-ejb.jar
2009-06-15 14:56:26,468 - INFO  - Beginning load: /home/alessandro/.netbeans/6.1/ant/lib/ant.jar
2009-06-15 14:56:26,494 - INFO  - Beginning load: /home/alessandro/.netbeans/6.1/ant/lib/ant-launcher.jar
2009-06-15 14:56:26,513 - INFO  - Configuring enterprise application: classpath.ear
2009-06-15 14:56:26,516 - WARN  - No application-client.xml found assuming annotations present: classpath.ear, module: xml-resolver-1.2.jar
2009-06-15 14:56:26,517 - WARN  - No application-client.xml found assuming annotations present: classpath.ear, module: javassist.jar
2009-06-15 14:56:26,517 - WARN  - No application-client.xml found assuming annotations present: classpath.ear, module: ant.jar
2009-06-15 14:56:26,517 - WARN  - No application-client.xml found assuming annotations present: classpath.ear, module: ant-launcher.jar
2009-06-15 14:56:27,994 - INFO  - Configuring PersistenceUnit(name=IdentityManager-ejbPU, provider=org.hibernate.ejb.HibernatePersistence)
2009-06-15 14:56:28,005 - INFO  - Enterprise application "classpath.ear" loaded.
2009-06-15 14:56:28,006 - INFO  - Creating TransactionManager(id=Default Transaction Manager)
2009-06-15 14:56:28,122 - INFO  - Creating SecurityService(id=Default Security Service)
2009-06-15 14:56:28,183 - INFO  - Creating Resource(id=My DataSource)
2009-06-15 14:56:28,216 - INFO  - Creating Resource(id=My Unmanaged DataSource)
2009-06-15 14:56:28,239 - INFO  - Creating Resource(id=UnmanagedIdentityManagerDS)
2009-06-15 14:56:28,248 - INFO  - Creating Resource(id=My JMS Resource Adapter)
2009-06-15 14:56:28,733 - INFO  - Creating Resource(id=My JMS Connection Factory)
2009-06-15 14:56:28,741 - INFO  - Creating ConnectionManager for Resource(id=My JMS Connection Factory)
2009-06-15 14:56:28,784 - INFO  - Creating Container(id=My CMP Container)
2009-06-15 14:56:28,817 - INFO  - Creating Container(id=My BMP Container)
2009-06-15 14:56:28,835 - INFO  - Creating Container(id=My Stateful Container)
2009-06-15 14:56:28,889 - INFO  - Creating Container(id=My Stateless Container)
2009-06-15 14:56:28,901 - INFO  - Creating Container(id=My MDB Container )
2009-06-15 14:56:28,912 - INFO  - Assembling app: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar
2009-06-15 14:56:28,954 - INFO  - PersistenceUnit(name=IdentityManager-ejbPU, provider=org.hibernate.ejb.HibernatePersistence)
2009-06-15 14:56:29,575 - INFO  - Undeploying app: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar
2009-06-15 14:56:29,582 - ERROR - Application could not be deployed:  /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar
org.apache.openejb.OpenEJBException: Creating application failed: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar: org.slf4j.Logger.trace(Ljava/lang/String;)V
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:658)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:442)
        at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:360)
        at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:272)
        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
        at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
        at javax.naming.InitialContext.init(InitialContext.java:240)
        at javax.naming.InitialContext.<init>(InitialContext.java:214)
        at eu.virtualLab.security.user.test.Init.setUp(Init.java:72)
        at junit.framework.TestCase.runBare(TestCase.java:128)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:228)
        at junit.framework.TestSuite.run(TestSuite.java:223)
        at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
        at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:32)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766)
Caused by: java.lang.NoSuchMethodError: org.slf4j.Logger.trace(Ljava/lang/String;)V
        at org.hibernate.cfg.annotations.PropertyBinder.make(PropertyBinder.java:184)
        at org.hibernate.cfg.AnnotationBinder.bindId(AnnotationBinder.java:1911)
        at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1279)
        at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:754)
        at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:546)
        at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:291)
        at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1148)
        at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1226)
        at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:173)
        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:854)
        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:425)
        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:131)
        at org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:183)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:482)
        ... 31 more
2009-06-15 14:56:29,585 - INFO  - Assembling app: classpath.ear
2009-06-15 14:56:29,586 - INFO  - Undeploying app: classpath.ear
2009-06-15 14:56:29,588 - ERROR - Application could not be deployed:  classpath.ear
org.apache.openejb.OpenEJBException: Creating application failed: classpath.ear: org.apache.openejb.OpenEJBException: Could not lookup <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS' for unit 'IdentityManager-ejbPU': Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial: Could not lookup <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS' for unit 'IdentityManager-ejbPU': Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:658)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:442)
        at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:360)
        at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:272)
        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
        at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
        at javax.naming.InitialContext.init(InitialContext.java:240)
        at javax.naming.InitialContext.<init>(InitialContext.java:214)
        at eu.virtualLab.security.user.test.Init.setUp(Init.java:72)
        at junit.framework.TestCase.runBare(TestCase.java:128)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:228)
        at junit.framework.TestSuite.run(TestSuite.java:223)
        at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
        at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:32)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766)
Caused by: org.apache.openejb.OpenEJBException: org.apache.openejb.OpenEJBException: Could not lookup <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS' for unit 'IdentityManager-ejbPU': Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial: Could not lookup <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS' for unit 'IdentityManager-ejbPU': Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:487)
        ... 31 more
Caused by: org.apache.openejb.OpenEJBException: Could not lookup <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS' for unit 'IdentityManager-ejbPU': Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:122)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:482)
        ... 31 more
Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
        at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:342)
        at javax.naming.InitialContext.lookup(InitialContext.java:409)
        at org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:133)
        at org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:123)
        at org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:119)
        ... 32 more



To me it looks like a jars conflict. The OpenEJB library included into the project

-rw-r--r-- 1 alessandro alessandro   106398 2009-05-23 01:25 activeio-core-3.0.0-incubator.jar
-rw-r--r-- 1 alessandro alessandro  1683897 2009-05-23 01:25 activemq-core-4.1.1.jar
-rw-r--r-- 1 alessandro alessandro    78641 2009-05-23 01:27 activemq-ra-4.1.1.jar
-rw-r--r-- 1 alessandro alessandro   329586 2009-05-23 01:25 backport-util-concurrent-2.1.jar
-rw-r--r-- 1 alessandro alessandro  1593423 2009-05-23 01:34 bcprov-jdk15-140.jar
-rw-r--r-- 1 alessandro alessandro    36174 2009-05-23 01:27 commons-cli-1.1.jar
-rw-r--r-- 1 alessandro alessandro   571259 2009-05-20 20:35 commons-collections-3.2.jar
-rw-r--r-- 1 alessandro alessandro   202182 2009-05-28 23:23 commons-dbcp-all-1.3-r699049.jar
-rw-r--r-- 1 alessandro alessandro   207723 2009-05-20 20:35 commons-lang-2.1.jar
-rw-r--r-- 1 alessandro alessandro    52915 2009-05-20 20:37 commons-logging-1.1.jar
-rw-r--r-- 1 alessandro alessandro    62086 2009-05-23 01:27 commons-pool-1.3.jar
-rw-r--r-- 1 alessandro alessandro  2881944 2009-05-23 01:34 cxf-bundle-2.0.9.jar
lrwxrwxrwx 1 alessandro alessandro       52 2009-06-15 14:39 dom4j.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/dom4j.jar
-rw-r--r-- 1 alessandro alessandro    18843 2009-05-31 03:15 ejb31-api-experimental-3.1.1.jar
lrwxrwxrwx 1 alessandro alessandro       63 2009-06-15 14:40 ejb3-persistence.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/ejb3-persistence.jar
-rw-r--r-- 1 alessandro alessandro   100863 2009-05-23 01:27 geronimo-connector-2.1.jar
-rw-r--r-- 1 alessandro alessandro   304552 2009-05-23 01:27 geronimo-javamail_1.4_mail-1.2.jar
-rw-r--r-- 1 alessandro alessandro    51278 2009-05-23 01:27 geronimo-transaction-2.1.jar
lrwxrwxrwx 1 alessandro alessandro       68 2009-06-15 14:35 hibernate-annotations.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/hibernate-annotations.jar
lrwxrwxrwx 1 alessandro alessandro       76 2009-06-15 14:36 hibernate-commons-annotations.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/hibernate-commons-annotations.jar
lrwxrwxrwx 1 alessandro alessandro       61 2009-06-15 14:36 hibernate-core.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/hibernate-core.jar
-rw-r--r-- 1 alessandro alessandro    79981 2009-05-23 01:27 howl-1.0.1-1.jar
-rw-r--r-- 1 alessandro alessandro   643727 2009-05-23 01:27 hsqldb-1.8.0.7.jar
-rw-r--r-- 1 alessandro alessandro   753070 2009-05-31 03:15 javaee-api-5.0-2.jar
lrwxrwxrwx 1 alessandro alessandro       56 2009-06-15 14:40 javassist.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/javassist.jar
-rw-r--r-- 1 alessandro alessandro   787619 2009-05-23 01:26 jaxb-impl-2.0.5.jar
lrwxrwxrwx 1 alessandro alessandro       50 2009-06-15 14:40 jta.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/jta.jar
-rw-r--r-- 1 alessandro alessandro   358085 2009-05-23 01:25 log4j-1.2.12.jar
-rw-r--r-- 1 alessandro alessandro    32900 2009-05-23 01:34 neethi-2.0.4.jar
-rw-r--r-- 1 alessandro alessandro     8517 2009-05-31 03:17 openejb-api-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro   200563 2009-05-31 03:18 openejb-client-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro  1448855 2009-05-31 03:18 openejb-core-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    56068 2009-05-31 03:21 openejb-cxf-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    56184 2009-05-31 03:19 openejb-ejbd-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    16019 2009-05-31 03:19 openejb-hsql-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    41760 2009-05-31 03:19 openejb-http-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    12847 2009-05-31 03:17 openejb-javaagent-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro   788210 2009-05-31 03:17 openejb-jee-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    41511 2009-05-31 03:17 openejb-loader-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    27680 2009-05-31 03:19 openejb-multicast-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    74989 2009-05-31 03:18 openejb-server-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    31632 2009-05-31 03:19 openejb-telnet-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    46317 2009-05-31 03:19 openejb-webservices-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro 11712276 2009-05-23 01:27 openjpa-1.2.0.jar
-rw-r--r-- 1 alessandro alessandro   155714 2009-05-23 01:34 opensaml-1.1.jar
-rw-r--r-- 1 alessandro alessandro   388716 2009-05-23 01:28 quartz-1.5.2.jar
-rw-r--r-- 1 alessandro alessandro   278301 2009-05-23 01:30 saaj-impl-1.3.jar
-rw-r--r-- 1 alessandro alessandro   205877 2009-05-23 01:27 serp-1.13.1.jar
-rw-r--r-- 1 alessandro alessandro    12231 2009-05-23 01:34 slf4j-api-1.3.1.jar
-rw-r--r-- 1 alessandro alessandro     7515 2009-05-23 01:34 slf4j-jdk14-1.3.1.jar
-rw-r--r-- 1 alessandro alessandro    26514 2009-05-23 01:26 stax-api-1.0.1.jar
-rw-r--r-- 1 alessandro alessandro    43161 2009-05-23 01:28 swizzle-stream-1.0.1.jar
-rw-r--r-- 1 alessandro alessandro   148522 2009-05-23 01:28 wsdl4j-1.6.1.jar
-rw-r--r-- 1 alessandro alessandro   307437 2009-05-23 01:34 wss4j-1.5.4.jar
-rw-r--r-- 1 alessandro alessandro   504969 2009-05-23 01:26 wstx-asl-3.2.0.jar
-rw-r--r-- 1 alessandro alessandro   123396 2009-05-31 03:15 xbean-asm-shaded-3.6-r779512.jar
-rw-r--r-- 1 alessandro alessandro    40330 2009-05-31 03:15 xbean-finder-shaded-3.6-r779512.jar
-rw-r--r-- 1 alessandro alessandro    51495 2009-05-28 13:31 xbean-naming-3.5.jar
-rw-r--r-- 1 alessandro alessandro   150222 2009-05-31 03:15 xbean-reflect-3.6-r779512.jar
-rw-r--r-- 1 alessandro alessandro    84091 2009-05-23 01:34 xml-resolver-1.2.jar
-rw-r--r-- 1 alessandro alessandro   139721 2009-05-23 01:34 XmlSchema-1.4.2.jar
-rw-r--r-- 1 alessandro alessandro   413902 2009-05-23 01:34 xmlsec-1.4.0.jar


Thanks in advance for any help
   --
    Jean-Louis Monteiro
    http://twitter.com/jlouismonteiro
    http://www.tomitribe.com
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoSuchMethodError: org.slf4j.Logger.trace(Ljava/lang/String;)V

dblevins
Administrator
In reply to this post by AlessandroIlardo
Hi Alessandro,

Before you go if you could let us know the exact version of Hibernate  
you're using and the exact version of slf4j that it uses, that would  
be great.  We definitely want to make sure this is taken care of for  
future users.

This is definitely a library conflict between the version of slf4j  
used by Hibernate and the slf4j version that CXF uses (which OpenEJB  
includes).   We don't use this library in any of our openejb-*  
libraries directly, but there might be something we can do regardless.

-David


On Jun 18, 2009, at 5:40 AM, AlessandroIlardo wrote:

>
> I go back to JBoss.
> thanks anyway
>
>
> AlessandroIlardo wrote:
>>
>> Hello there,
>> I am using NetBeans with Junit, HIbernate and OpenEJB to test an EJB
>> module.
>> On the OpenEJB log I get the following error:
>>
>>
>> 2009-06-15 14:56:22,434 - INFO  - openejb.home =
>> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1
>> 2009-06-15 14:56:22,435 - INFO  - openejb.base =
>> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1
>> 2009-06-15 14:56:23,371 - INFO  - Configuring Service(id=Default  
>> Security
>> Service, type=SecurityService, provider-id=Default Security Service)
>> 2009-06-15 14:56:23,384 - INFO  - Configuring Service(id=Default
>> Transaction Manager, type=TransactionManager, provider-id=Default
>> Transaction Manager)
>> 2009-06-15 14:56:23,395 - INFO  - Configuring Service(id=My  
>> DataSource,
>> type=Resource, provider-id=Default JDBC Database)
>> 2009-06-15 14:56:23,413 - INFO  - Configuring Service(id=My Unmanaged
>> DataSource, type=Resource, provider-id=Default JDBC Database)
>> 2009-06-15 14:56:23,424 - INFO  - Configuring Service(id=My JMS  
>> Resource
>> Adapter, type=Resource, provider-id=Default JMS Resource Adapter)
>> 2009-06-15 14:56:23,436 - INFO  - Configuring Service(id=My JMS  
>> Connection
>> Factory, type=Resource, provider-id=Default JMS Connection Factory)
>> 2009-06-15 14:56:23,448 - INFO  - Configuring
>> Service(id=UnmanagedIdentityManagerDS, type=Resource, provider-
>> id=Default
>> JDBC Database)
>> 2009-06-15 14:56:23,461 - INFO  - Configuring Service(id=My CMP  
>> Container,
>> type=Container, provider-id=Default CMP Container)
>> 2009-06-15 14:56:23,472 - INFO  - Configuring Service(id=My BMP  
>> Container,
>> type=Container, provider-id=Default BMP Container)
>> 2009-06-15 14:56:23,483 - INFO  - Configuring Service(id=My Stateful
>> Container, type=Container, provider-id=Default Stateful Container)
>> 2009-06-15 14:56:23,495 - INFO  - Configuring Service(id=My Stateless
>> Container, type=Container, provider-id=Default Stateless Container)
>> 2009-06-15 14:56:23,520 - INFO  - Configuring Service(id=My MDB  
>> Container
>> , type=Container, provider-id=Default MDB Container)
>> 2009-06-15 14:56:23,596 - INFO  - Configuring enterprise application:
>> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/
>> IdentityManager-ejb.jar
>> 2009-06-15 14:56:24,986 - INFO  - Configuring
>> PersistenceUnit(name=IdentityManager-ejbPU,
>> provider=org.hibernate.ejb.HibernatePersistence)
>> 2009-06-15 14:56:24,988 - INFO  - Adjusting PersistenceUnit
>> IdentityManager-ejbPU <jta-data-source> to Resource ID 'My  
>> DataSource'
>> from 'java:/IdentityManagerDS'
>> 2009-06-15 14:56:24,989 - INFO  - Adjusting PersistenceUnit
>> IdentityManager-ejbPU <non-jta-data-source> to Resource ID 'My  
>> Unmanaged
>> DataSource' from 'null'
>> 2009-06-15 14:56:25,037 - INFO  - Enterprise application
>> "/home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/
>> IdentityManager-ejb.jar"
>> loaded.
>> 2009-06-15 14:56:25,549 - INFO  - Found ClientModule in classpath:
>> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/lib/xml-
>> resolver-1.2.jar
>> 2009-06-15 14:56:25,593 - INFO  - Found ClientModule in classpath:
>> /home/alessandro/Documents/Java/shared-lib/hibernate-
>> entitymanager-3.4.0.GA/lib/javassist.jar
>> 2009-06-15 14:56:25,597 - INFO  - Found EjbModule in classpath:
>> /home/alessandro/Work-Space/NetBeansProject/IdentityManager/
>> IdentityManager-ejb/trunk/dist/IdentityManager-ejb.jar
>> 2009-06-15 14:56:25,682 - INFO  - Found ClientModule in classpath:
>> /home/alessandro/.netbeans/6.1/ant/lib/ant.jar
>> 2009-06-15 14:56:26,389 - INFO  - Found ClientModule in classpath:
>> /home/alessandro/.netbeans/6.1/ant/lib/ant-launcher.jar
>> 2009-06-15 14:56:26,435 - INFO  - Beginning load:
>> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/lib/xml-
>> resolver-1.2.jar
>> 2009-06-15 14:56:26,441 - INFO  - Beginning load:
>> /home/alessandro/Documents/Java/shared-lib/hibernate-
>> entitymanager-3.4.0.GA/lib/javassist.jar
>> 2009-06-15 14:56:26,463 - INFO  - Beginning load:
>> /home/alessandro/Work-Space/NetBeansProject/IdentityManager/
>> IdentityManager-ejb/trunk/dist/IdentityManager-ejb.jar
>> 2009-06-15 14:56:26,468 - INFO  - Beginning load:
>> /home/alessandro/.netbeans/6.1/ant/lib/ant.jar
>> 2009-06-15 14:56:26,494 - INFO  - Beginning load:
>> /home/alessandro/.netbeans/6.1/ant/lib/ant-launcher.jar
>> 2009-06-15 14:56:26,513 - INFO  - Configuring enterprise application:
>> classpath.ear
>> 2009-06-15 14:56:26,516 - WARN  - No application-client.xml found  
>> assuming
>> annotations present: classpath.ear, module: xml-resolver-1.2.jar
>> 2009-06-15 14:56:26,517 - WARN  - No application-client.xml found  
>> assuming
>> annotations present: classpath.ear, module: javassist.jar
>> 2009-06-15 14:56:26,517 - WARN  - No application-client.xml found  
>> assuming
>> annotations present: classpath.ear, module: ant.jar
>> 2009-06-15 14:56:26,517 - WARN  - No application-client.xml found  
>> assuming
>> annotations present: classpath.ear, module: ant-launcher.jar
>> 2009-06-15 14:56:27,994 - INFO  - Configuring
>> PersistenceUnit(name=IdentityManager-ejbPU,
>> provider=org.hibernate.ejb.HibernatePersistence)
>> 2009-06-15 14:56:28,005 - INFO  - Enterprise application  
>> "classpath.ear"
>> loaded.
>> 2009-06-15 14:56:28,006 - INFO  - Creating  
>> TransactionManager(id=Default
>> Transaction Manager)
>> 2009-06-15 14:56:28,122 - INFO  - Creating SecurityService(id=Default
>> Security Service)
>> 2009-06-15 14:56:28,183 - INFO  - Creating Resource(id=My DataSource)
>> 2009-06-15 14:56:28,216 - INFO  - Creating Resource(id=My Unmanaged
>> DataSource)
>> 2009-06-15 14:56:28,239 - INFO  - Creating
>> Resource(id=UnmanagedIdentityManagerDS)
>> 2009-06-15 14:56:28,248 - INFO  - Creating Resource(id=My JMS  
>> Resource
>> Adapter)
>> 2009-06-15 14:56:28,733 - INFO  - Creating Resource(id=My JMS  
>> Connection
>> Factory)
>> 2009-06-15 14:56:28,741 - INFO  - Creating ConnectionManager for
>> Resource(id=My JMS Connection Factory)
>> 2009-06-15 14:56:28,784 - INFO  - Creating Container(id=My CMP  
>> Container)
>> 2009-06-15 14:56:28,817 - INFO  - Creating Container(id=My BMP  
>> Container)
>> 2009-06-15 14:56:28,835 - INFO  - Creating Container(id=My Stateful
>> Container)
>> 2009-06-15 14:56:28,889 - INFO  - Creating Container(id=My Stateless
>> Container)
>> 2009-06-15 14:56:28,901 - INFO  - Creating Container(id=My MDB  
>> Container )
>> 2009-06-15 14:56:28,912 - INFO  - Assembling app:
>> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/
>> IdentityManager-ejb.jar
>> 2009-06-15 14:56:28,954 - INFO  -
>> PersistenceUnit(name=IdentityManager-ejbPU,
>> provider=org.hibernate.ejb.HibernatePersistence)
>> 2009-06-15 14:56:29,575 - INFO  - Undeploying app:
>> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/
>> IdentityManager-ejb.jar
>> 2009-06-15 14:56:29,582 - ERROR - Application could not be deployed:
>> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/
>> IdentityManager-ejb.jar
>> org.apache.openejb.OpenEJBException: Creating application failed:
>> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/
>> IdentityManager-ejb.jar:
>> org.slf4j.Logger.trace(Ljava/lang/String;)V
>> at
>> org
>> .apache
>> .openejb
>> .assembler.classic.Assembler.createApplication(Assembler.java:658)
>> at
>> org
>> .apache
>> .openejb
>> .assembler.classic.Assembler.createApplication(Assembler.java:442)
>> at
>> org
>> .apache
>> .openejb
>> .assembler.classic.Assembler.buildContainerSystem(Assembler.java:360)
>> at
>> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:
>> 272)
>> at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
>> at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
>> at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun
>> .reflect
>> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>> at
>> sun
>> .reflect
>> .DelegatingMethodAccessorImpl
>> .invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:616)
>> at
>> org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:
>> 36)
>> at
>> org
>> .apache
>> .openejb
>> .client
>> .LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
>> at
>> org
>> .apache
>> .openejb
>> .client
>> .LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
>> at
>> org
>> .apache
>> .openejb
>> .client
>> .LocalInitialContextFactory
>> .getInitialContext(LocalInitialContextFactory.java:42)
>> at
>> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:
>> 684)
>> at  
>> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:
>> 305)
>> at javax.naming.InitialContext.init(InitialContext.java:240)
>> at javax.naming.InitialContext.<init>(InitialContext.java:214)
>> at eu.virtualLab.security.user.test.Init.setUp(Init.java:72)
>> at junit.framework.TestCase.runBare(TestCase.java:128)
>> at junit.framework.TestResult$1.protect(TestResult.java:110)
>> at junit.framework.TestResult.runProtected(TestResult.java:128)
>> at junit.framework.TestResult.run(TestResult.java:113)
>> at junit.framework.TestCase.run(TestCase.java:120)
>> at junit.framework.TestSuite.runTest(TestSuite.java:228)
>> at junit.framework.TestSuite.run(TestSuite.java:223)
>> at
>> org
>> .junit
>> .internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
>> at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:32)
>> at
>> org
>> .apache
>> .tools
>> .ant
>> .taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:
>> 421)
>> at
>> org
>> .apache
>> .tools
>> .ant
>> .taskdefs
>> .optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
>> at
>> org
>> .apache
>> .tools
>> .ant
>> .taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:
>> 766)
>> Caused by: java.lang.NoSuchMethodError:
>> org.slf4j.Logger.trace(Ljava/lang/String;)V
>> at
>> org
>> .hibernate.cfg.annotations.PropertyBinder.make(PropertyBinder.java:
>> 184)
>> at org.hibernate.cfg.AnnotationBinder.bindId(AnnotationBinder.java:
>> 1911)
>> at
>> org
>> .hibernate
>> .cfg
>> .AnnotationBinder.processElementAnnotations(AnnotationBinder.java:
>> 1279)
>> at
>> org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:
>> 754)
>> at
>> org
>> .hibernate
>> .cfg
>> .AnnotationConfiguration
>> .processArtifactsOfType(AnnotationConfiguration.java:546)
>> at
>> org
>> .hibernate
>> .cfg
>> .AnnotationConfiguration
>> .secondPassCompile(AnnotationConfiguration.java:291)
>> at  
>> org.hibernate.cfg.Configuration.buildMappings(Configuration.java:
>> 1148)
>> at
>> org
>> .hibernate
>> .ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1226)
>> at
>> org
>> .hibernate
>> .ejb
>> .EventListenerConfigurator.configure(EventListenerConfigurator.java:
>> 173)
>> at
>> org
>> .hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:
>> 854)
>> at
>> org
>> .hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:
>> 425)
>> at
>> org
>> .hibernate
>> .ejb
>> .HibernatePersistence
>> .createContainerEntityManagerFactory(HibernatePersistence.java:131)
>> at
>> org
>> .apache
>> .openejb
>> .assembler
>> .classic
>> .PersistenceBuilder
>> .createEntityManagerFactory(PersistenceBuilder.java:183)
>> at
>> org
>> .apache
>> .openejb
>> .assembler.classic.Assembler.createApplication(Assembler.java:482)
>> ... 31 more
>> 2009-06-15 14:56:29,585 - INFO  - Assembling app: classpath.ear
>> 2009-06-15 14:56:29,586 - INFO  - Undeploying app: classpath.ear
>> 2009-06-15 14:56:29,588 - ERROR - Application could not be deployed:
>> classpath.ear
>> org.apache.openejb.OpenEJBException: Creating application failed:
>> classpath.ear: org.apache.openejb.OpenEJBException: Could not lookup
>> <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS'  
>> for unit
>> 'IdentityManager-ejbPU': Need to specify class name in environment or
>> system property, or as an applet parameter, or in an application  
>> resource
>> file:  java.naming.factory.initial: Could not lookup <jta-data-
>> source>
>> 'java:openejb/Resource/java:/IdentityManagerDS' for unit
>> 'IdentityManager-ejbPU': Need to specify class name in environment or
>> system property, or as an applet parameter, or in an application  
>> resource
>> file:  java.naming.factory.initial
>> at
>> org
>> .apache
>> .openejb
>> .assembler.classic.Assembler.createApplication(Assembler.java:658)
>> at
>> org
>> .apache
>> .openejb
>> .assembler.classic.Assembler.createApplication(Assembler.java:442)
>> at
>> org
>> .apache
>> .openejb
>> .assembler.classic.Assembler.buildContainerSystem(Assembler.java:360)
>> at
>> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:
>> 272)
>> at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
>> at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
>> at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun
>> .reflect
>> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>> at
>> sun
>> .reflect
>> .DelegatingMethodAccessorImpl
>> .invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:616)
>> at
>> org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:
>> 36)
>> at
>> org
>> .apache
>> .openejb
>> .client
>> .LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
>> at
>> org
>> .apache
>> .openejb
>> .client
>> .LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
>> at
>> org
>> .apache
>> .openejb
>> .client
>> .LocalInitialContextFactory
>> .getInitialContext(LocalInitialContextFactory.java:42)
>> at
>> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:
>> 684)
>> at  
>> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:
>> 305)
>> at javax.naming.InitialContext.init(InitialContext.java:240)
>> at javax.naming.InitialContext.<init>(InitialContext.java:214)
>> at eu.virtualLab.security.user.test.Init.setUp(Init.java:72)
>> at junit.framework.TestCase.runBare(TestCase.java:128)
>> at junit.framework.TestResult$1.protect(TestResult.java:110)
>> at junit.framework.TestResult.runProtected(TestResult.java:128)
>> at junit.framework.TestResult.run(TestResult.java:113)
>> at junit.framework.TestCase.run(TestCase.java:120)
>> at junit.framework.TestSuite.runTest(TestSuite.java:228)
>> at junit.framework.TestSuite.run(TestSuite.java:223)
>> at
>> org
>> .junit
>> .internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
>> at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:32)
>> at
>> org
>> .apache
>> .tools
>> .ant
>> .taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:
>> 421)
>> at
>> org
>> .apache
>> .tools
>> .ant
>> .taskdefs
>> .optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
>> at
>> org
>> .apache
>> .tools
>> .ant
>> .taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:
>> 766)
>> Caused by: org.apache.openejb.OpenEJBException:
>> org.apache.openejb.OpenEJBException: Could not lookup <jta-data-
>> source>
>> 'java:openejb/Resource/java:/IdentityManagerDS' for unit
>> 'IdentityManager-ejbPU': Need to specify class name in environment or
>> system property, or as an applet parameter, or in an application  
>> resource
>> file:  java.naming.factory.initial: Could not lookup <jta-data-
>> source>
>> 'java:openejb/Resource/java:/IdentityManagerDS' for unit
>> 'IdentityManager-ejbPU': Need to specify class name in environment or
>> system property, or as an applet parameter, or in an application  
>> resource
>> file:  java.naming.factory.initial
>> at
>> org
>> .apache
>> .openejb
>> .assembler.classic.Assembler.createApplication(Assembler.java:487)
>> ... 31 more
>> Caused by: org.apache.openejb.OpenEJBException: Could not lookup
>> <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS'  
>> for unit
>> 'IdentityManager-ejbPU': Need to specify class name in environment or
>> system property, or as an applet parameter, or in an application  
>> resource
>> file:  java.naming.factory.initial
>> at
>> org
>> .apache
>> .openejb
>> .assembler
>> .classic
>> .PersistenceBuilder
>> .createEntityManagerFactory(PersistenceBuilder.java:122)
>> at
>> org
>> .apache
>> .openejb
>> .assembler.classic.Assembler.createApplication(Assembler.java:482)
>> ... 31 more
>> Caused by: javax.naming.NoInitialContextException: Need to specify  
>> class
>> name in environment or system property, or as an applet parameter,  
>> or in
>> an application resource file:  java.naming.factory.initial
>> at
>> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:
>> 662)
>> at  
>> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:
>> 305)
>> at
>> javax
>> .naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:
>> 342)
>> at javax.naming.InitialContext.lookup(InitialContext.java:409)
>> at
>> org
>> .apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:
>> 133)
>> at
>> org
>> .apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:
>> 123)
>> at
>> org
>> .apache
>> .openejb
>> .assembler
>> .classic
>> .PersistenceBuilder
>> .createEntityManagerFactory(PersistenceBuilder.java:119)
>> ... 32 more
>>
>>
>>
>> To me it looks like a jars conflict. The OpenEJB library included  
>> into the
>> project
>>
>> -rw-r--r-- 1 alessandro alessandro   106398 2009-05-23 01:25
>> activeio-core-3.0.0-incubator.jar
>> -rw-r--r-- 1 alessandro alessandro  1683897 2009-05-23 01:25
>> activemq-core-4.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    78641 2009-05-23 01:27
>> activemq-ra-4.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro   329586 2009-05-23 01:25
>> backport-util-concurrent-2.1.jar
>> -rw-r--r-- 1 alessandro alessandro  1593423 2009-05-23 01:34
>> bcprov-jdk15-140.jar
>> -rw-r--r-- 1 alessandro alessandro    36174 2009-05-23 01:27
>> commons-cli-1.1.jar
>> -rw-r--r-- 1 alessandro alessandro   571259 2009-05-20 20:35
>> commons-collections-3.2.jar
>> -rw-r--r-- 1 alessandro alessandro   202182 2009-05-28 23:23
>> commons-dbcp-all-1.3-r699049.jar
>> -rw-r--r-- 1 alessandro alessandro   207723 2009-05-20 20:35
>> commons-lang-2.1.jar
>> -rw-r--r-- 1 alessandro alessandro    52915 2009-05-20 20:37
>> commons-logging-1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    62086 2009-05-23 01:27
>> commons-pool-1.3.jar
>> -rw-r--r-- 1 alessandro alessandro  2881944 2009-05-23 01:34
>> cxf-bundle-2.0.9.jar
>> lrwxrwxrwx 1 alessandro alessandro       52 2009-06-15 14:39  
>> dom4j.jar ->
>> ../../hibernate-entitymanager-3.4.0.GA/lib/dom4j.jar
>> -rw-r--r-- 1 alessandro alessandro    18843 2009-05-31 03:15
>> ejb31-api-experimental-3.1.1.jar
>> lrwxrwxrwx 1 alessandro alessandro       63 2009-06-15 14:40
>> ejb3-persistence.jar ->
>> ../../hibernate-entitymanager-3.4.0.GA/lib/ejb3-persistence.jar
>> -rw-r--r-- 1 alessandro alessandro   100863 2009-05-23 01:27
>> geronimo-connector-2.1.jar
>> -rw-r--r-- 1 alessandro alessandro   304552 2009-05-23 01:27
>> geronimo-javamail_1.4_mail-1.2.jar
>> -rw-r--r-- 1 alessandro alessandro    51278 2009-05-23 01:27
>> geronimo-transaction-2.1.jar
>> lrwxrwxrwx 1 alessandro alessandro       68 2009-06-15 14:35
>> hibernate-annotations.jar ->
>> ../../hibernate-entitymanager-3.4.0.GA/lib/hibernate-annotations.jar
>> lrwxrwxrwx 1 alessandro alessandro       76 2009-06-15 14:36
>> hibernate-commons-annotations.jar ->
>> ../../hibernate-entitymanager-3.4.0.GA/lib/hibernate-commons-
>> annotations.jar
>> lrwxrwxrwx 1 alessandro alessandro       61 2009-06-15 14:36
>> hibernate-core.jar ->
>> ../../hibernate-entitymanager-3.4.0.GA/lib/hibernate-core.jar
>> -rw-r--r-- 1 alessandro alessandro    79981 2009-05-23 01:27
>> howl-1.0.1-1.jar
>> -rw-r--r-- 1 alessandro alessandro   643727 2009-05-23 01:27
>> hsqldb-1.8.0.7.jar
>> -rw-r--r-- 1 alessandro alessandro   753070 2009-05-31 03:15
>> javaee-api-5.0-2.jar
>> lrwxrwxrwx 1 alessandro alessandro       56 2009-06-15 14:40  
>> javassist.jar
>> -> ../../hibernate-entitymanager-3.4.0.GA/lib/javassist.jar
>> -rw-r--r-- 1 alessandro alessandro   787619 2009-05-23 01:26
>> jaxb-impl-2.0.5.jar
>> lrwxrwxrwx 1 alessandro alessandro       50 2009-06-15 14:40  
>> jta.jar ->
>> ../../hibernate-entitymanager-3.4.0.GA/lib/jta.jar
>> -rw-r--r-- 1 alessandro alessandro   358085 2009-05-23 01:25
>> log4j-1.2.12.jar
>> -rw-r--r-- 1 alessandro alessandro    32900 2009-05-23 01:34
>> neethi-2.0.4.jar
>> -rw-r--r-- 1 alessandro alessandro     8517 2009-05-31 03:17
>> openejb-api-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro   200563 2009-05-31 03:18
>> openejb-client-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro  1448855 2009-05-31 03:18
>> openejb-core-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    56068 2009-05-31 03:21
>> openejb-cxf-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    56184 2009-05-31 03:19
>> openejb-ejbd-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    16019 2009-05-31 03:19
>> openejb-hsql-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    41760 2009-05-31 03:19
>> openejb-http-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    12847 2009-05-31 03:17
>> openejb-javaagent-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro   788210 2009-05-31 03:17
>> openejb-jee-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    41511 2009-05-31 03:17
>> openejb-loader-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    27680 2009-05-31 03:19
>> openejb-multicast-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    74989 2009-05-31 03:18
>> openejb-server-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    31632 2009-05-31 03:19
>> openejb-telnet-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    46317 2009-05-31 03:19
>> openejb-webservices-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro 11712276 2009-05-23 01:27
>> openjpa-1.2.0.jar
>> -rw-r--r-- 1 alessandro alessandro   155714 2009-05-23 01:34
>> opensaml-1.1.jar
>> -rw-r--r-- 1 alessandro alessandro   388716 2009-05-23 01:28
>> quartz-1.5.2.jar
>> -rw-r--r-- 1 alessandro alessandro   278301 2009-05-23 01:30
>> saaj-impl-1.3.jar
>> -rw-r--r-- 1 alessandro alessandro   205877 2009-05-23 01:27
>> serp-1.13.1.jar
>> -rw-r--r-- 1 alessandro alessandro    12231 2009-05-23 01:34
>> slf4j-api-1.3.1.jar
>> -rw-r--r-- 1 alessandro alessandro     7515 2009-05-23 01:34
>> slf4j-jdk14-1.3.1.jar
>> -rw-r--r-- 1 alessandro alessandro    26514 2009-05-23 01:26
>> stax-api-1.0.1.jar
>> -rw-r--r-- 1 alessandro alessandro    43161 2009-05-23 01:28
>> swizzle-stream-1.0.1.jar
>> -rw-r--r-- 1 alessandro alessandro   148522 2009-05-23 01:28
>> wsdl4j-1.6.1.jar
>> -rw-r--r-- 1 alessandro alessandro   307437 2009-05-23 01:34
>> wss4j-1.5.4.jar
>> -rw-r--r-- 1 alessandro alessandro   504969 2009-05-23 01:26
>> wstx-asl-3.2.0.jar
>> -rw-r--r-- 1 alessandro alessandro   123396 2009-05-31 03:15
>> xbean-asm-shaded-3.6-r779512.jar
>> -rw-r--r-- 1 alessandro alessandro    40330 2009-05-31 03:15
>> xbean-finder-shaded-3.6-r779512.jar
>> -rw-r--r-- 1 alessandro alessandro    51495 2009-05-28 13:31
>> xbean-naming-3.5.jar
>> -rw-r--r-- 1 alessandro alessandro   150222 2009-05-31 03:15
>> xbean-reflect-3.6-r779512.jar
>> -rw-r--r-- 1 alessandro alessandro    84091 2009-05-23 01:34
>> xml-resolver-1.2.jar
>> -rw-r--r-- 1 alessandro alessandro   139721 2009-05-23 01:34
>> XmlSchema-1.4.2.jar
>> -rw-r--r-- 1 alessandro alessandro   413902 2009-05-23 01:34
>> xmlsec-1.4.0.jar
>>
>>
>> Thanks in advance for any help
>>
>
> --
> View this message in context: http://www.nabble.com/java.lang.NoSuchMethodError%3A-org.slf4j.Logger.trace%28Ljava-lang-String-%29V-tp24034248p24091827.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
>

Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoSuchMethodError: org.slf4j.Logger.trace(Ljava/lang/String;)V

AlessandroIlardo
In reply to this post by AlessandroIlardo
On the previous message I reported the version (it should be in the end) of Hibernate and its slf4j library. If you check the OpenEJB lib directory list, you can see that I added the Hibernate jars, except for slf4j which I prefered to leave the existing one included in OpenEJB.
To me looks like the slf4j required by Hibernate is the same available in the OpenEJB classpath, so the 1.3.1, but apparently I am wrong.
This is the message where you should find the version.
http://www.nabble.com/Re%3A-java.lang.NoSuchMethodError%3A-org.slf4j.Logger.trace(Ljava-lang-String-)V-p24053855.html

Thanks in advance

AlessandroIlardo wrote
Hello there,
I am using NetBeans with Junit, HIbernate and OpenEJB to test an EJB module.
On the OpenEJB log I get the following error:


2009-06-15 14:56:22,434 - INFO  - openejb.home = /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1
2009-06-15 14:56:22,435 - INFO  - openejb.base = /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1
2009-06-15 14:56:23,371 - INFO  - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service)
2009-06-15 14:56:23,384 - INFO  - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
2009-06-15 14:56:23,395 - INFO  - Configuring Service(id=My DataSource, type=Resource, provider-id=Default JDBC Database)
2009-06-15 14:56:23,413 - INFO  - Configuring Service(id=My Unmanaged DataSource, type=Resource, provider-id=Default JDBC Database)
2009-06-15 14:56:23,424 - INFO  - Configuring Service(id=My JMS Resource Adapter, type=Resource, provider-id=Default JMS Resource Adapter)
2009-06-15 14:56:23,436 - INFO  - Configuring Service(id=My JMS Connection Factory, type=Resource, provider-id=Default JMS Connection Factory)
2009-06-15 14:56:23,448 - INFO  - Configuring Service(id=UnmanagedIdentityManagerDS, type=Resource, provider-id=Default JDBC Database)
2009-06-15 14:56:23,461 - INFO  - Configuring Service(id=My CMP Container, type=Container, provider-id=Default CMP Container)
2009-06-15 14:56:23,472 - INFO  - Configuring Service(id=My BMP Container, type=Container, provider-id=Default BMP Container)
2009-06-15 14:56:23,483 - INFO  - Configuring Service(id=My Stateful Container, type=Container, provider-id=Default Stateful Container)
2009-06-15 14:56:23,495 - INFO  - Configuring Service(id=My Stateless Container, type=Container, provider-id=Default Stateless Container)
2009-06-15 14:56:23,520 - INFO  - Configuring Service(id=My MDB Container , type=Container, provider-id=Default MDB Container)
2009-06-15 14:56:23,596 - INFO  - Configuring enterprise application: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar
2009-06-15 14:56:24,986 - INFO  - Configuring PersistenceUnit(name=IdentityManager-ejbPU, provider=org.hibernate.ejb.HibernatePersistence)
2009-06-15 14:56:24,988 - INFO  - Adjusting PersistenceUnit IdentityManager-ejbPU <jta-data-source> to Resource ID 'My DataSource' from 'java:/IdentityManagerDS'
2009-06-15 14:56:24,989 - INFO  - Adjusting PersistenceUnit IdentityManager-ejbPU <non-jta-data-source> to Resource ID 'My Unmanaged DataSource' from 'null'
2009-06-15 14:56:25,037 - INFO  - Enterprise application "/home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar" loaded.
2009-06-15 14:56:25,549 - INFO  - Found ClientModule in classpath: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/lib/xml-resolver-1.2.jar
2009-06-15 14:56:25,593 - INFO  - Found ClientModule in classpath: /home/alessandro/Documents/Java/shared-lib/hibernate-entitymanager-3.4.0.GA/lib/javassist.jar
2009-06-15 14:56:25,597 - INFO  - Found EjbModule in classpath: /home/alessandro/Work-Space/NetBeansProject/IdentityManager/IdentityManager-ejb/trunk/dist/IdentityManager-ejb.jar
2009-06-15 14:56:25,682 - INFO  - Found ClientModule in classpath: /home/alessandro/.netbeans/6.1/ant/lib/ant.jar
2009-06-15 14:56:26,389 - INFO  - Found ClientModule in classpath: /home/alessandro/.netbeans/6.1/ant/lib/ant-launcher.jar
2009-06-15 14:56:26,435 - INFO  - Beginning load: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/lib/xml-resolver-1.2.jar
2009-06-15 14:56:26,441 - INFO  - Beginning load: /home/alessandro/Documents/Java/shared-lib/hibernate-entitymanager-3.4.0.GA/lib/javassist.jar
2009-06-15 14:56:26,463 - INFO  - Beginning load: /home/alessandro/Work-Space/NetBeansProject/IdentityManager/IdentityManager-ejb/trunk/dist/IdentityManager-ejb.jar
2009-06-15 14:56:26,468 - INFO  - Beginning load: /home/alessandro/.netbeans/6.1/ant/lib/ant.jar
2009-06-15 14:56:26,494 - INFO  - Beginning load: /home/alessandro/.netbeans/6.1/ant/lib/ant-launcher.jar
2009-06-15 14:56:26,513 - INFO  - Configuring enterprise application: classpath.ear
2009-06-15 14:56:26,516 - WARN  - No application-client.xml found assuming annotations present: classpath.ear, module: xml-resolver-1.2.jar
2009-06-15 14:56:26,517 - WARN  - No application-client.xml found assuming annotations present: classpath.ear, module: javassist.jar
2009-06-15 14:56:26,517 - WARN  - No application-client.xml found assuming annotations present: classpath.ear, module: ant.jar
2009-06-15 14:56:26,517 - WARN  - No application-client.xml found assuming annotations present: classpath.ear, module: ant-launcher.jar
2009-06-15 14:56:27,994 - INFO  - Configuring PersistenceUnit(name=IdentityManager-ejbPU, provider=org.hibernate.ejb.HibernatePersistence)
2009-06-15 14:56:28,005 - INFO  - Enterprise application "classpath.ear" loaded.
2009-06-15 14:56:28,006 - INFO  - Creating TransactionManager(id=Default Transaction Manager)
2009-06-15 14:56:28,122 - INFO  - Creating SecurityService(id=Default Security Service)
2009-06-15 14:56:28,183 - INFO  - Creating Resource(id=My DataSource)
2009-06-15 14:56:28,216 - INFO  - Creating Resource(id=My Unmanaged DataSource)
2009-06-15 14:56:28,239 - INFO  - Creating Resource(id=UnmanagedIdentityManagerDS)
2009-06-15 14:56:28,248 - INFO  - Creating Resource(id=My JMS Resource Adapter)
2009-06-15 14:56:28,733 - INFO  - Creating Resource(id=My JMS Connection Factory)
2009-06-15 14:56:28,741 - INFO  - Creating ConnectionManager for Resource(id=My JMS Connection Factory)
2009-06-15 14:56:28,784 - INFO  - Creating Container(id=My CMP Container)
2009-06-15 14:56:28,817 - INFO  - Creating Container(id=My BMP Container)
2009-06-15 14:56:28,835 - INFO  - Creating Container(id=My Stateful Container)
2009-06-15 14:56:28,889 - INFO  - Creating Container(id=My Stateless Container)
2009-06-15 14:56:28,901 - INFO  - Creating Container(id=My MDB Container )
2009-06-15 14:56:28,912 - INFO  - Assembling app: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar
2009-06-15 14:56:28,954 - INFO  - PersistenceUnit(name=IdentityManager-ejbPU, provider=org.hibernate.ejb.HibernatePersistence)
2009-06-15 14:56:29,575 - INFO  - Undeploying app: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar
2009-06-15 14:56:29,582 - ERROR - Application could not be deployed:  /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar
org.apache.openejb.OpenEJBException: Creating application failed: /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/IdentityManager-ejb.jar: org.slf4j.Logger.trace(Ljava/lang/String;)V
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:658)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:442)
        at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:360)
        at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:272)
        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
        at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
        at javax.naming.InitialContext.init(InitialContext.java:240)
        at javax.naming.InitialContext.<init>(InitialContext.java:214)
        at eu.virtualLab.security.user.test.Init.setUp(Init.java:72)
        at junit.framework.TestCase.runBare(TestCase.java:128)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:228)
        at junit.framework.TestSuite.run(TestSuite.java:223)
        at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
        at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:32)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766)
Caused by: java.lang.NoSuchMethodError: org.slf4j.Logger.trace(Ljava/lang/String;)V
        at org.hibernate.cfg.annotations.PropertyBinder.make(PropertyBinder.java:184)
        at org.hibernate.cfg.AnnotationBinder.bindId(AnnotationBinder.java:1911)
        at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1279)
        at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:754)
        at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:546)
        at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:291)
        at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1148)
        at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1226)
        at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:173)
        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:854)
        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:425)
        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:131)
        at org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:183)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:482)
        ... 31 more
2009-06-15 14:56:29,585 - INFO  - Assembling app: classpath.ear
2009-06-15 14:56:29,586 - INFO  - Undeploying app: classpath.ear
2009-06-15 14:56:29,588 - ERROR - Application could not be deployed:  classpath.ear
org.apache.openejb.OpenEJBException: Creating application failed: classpath.ear: org.apache.openejb.OpenEJBException: Could not lookup <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS' for unit 'IdentityManager-ejbPU': Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial: Could not lookup <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS' for unit 'IdentityManager-ejbPU': Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:658)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:442)
        at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:360)
        at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:272)
        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
        at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
        at javax.naming.InitialContext.init(InitialContext.java:240)
        at javax.naming.InitialContext.<init>(InitialContext.java:214)
        at eu.virtualLab.security.user.test.Init.setUp(Init.java:72)
        at junit.framework.TestCase.runBare(TestCase.java:128)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:228)
        at junit.framework.TestSuite.run(TestSuite.java:223)
        at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
        at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:32)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766)
Caused by: org.apache.openejb.OpenEJBException: org.apache.openejb.OpenEJBException: Could not lookup <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS' for unit 'IdentityManager-ejbPU': Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial: Could not lookup <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS' for unit 'IdentityManager-ejbPU': Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:487)
        ... 31 more
Caused by: org.apache.openejb.OpenEJBException: Could not lookup <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS' for unit 'IdentityManager-ejbPU': Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:122)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:482)
        ... 31 more
Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
        at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:342)
        at javax.naming.InitialContext.lookup(InitialContext.java:409)
        at org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:133)
        at org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:123)
        at org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:119)
        ... 32 more



To me it looks like a jars conflict. The OpenEJB library included into the project

-rw-r--r-- 1 alessandro alessandro   106398 2009-05-23 01:25 activeio-core-3.0.0-incubator.jar
-rw-r--r-- 1 alessandro alessandro  1683897 2009-05-23 01:25 activemq-core-4.1.1.jar
-rw-r--r-- 1 alessandro alessandro    78641 2009-05-23 01:27 activemq-ra-4.1.1.jar
-rw-r--r-- 1 alessandro alessandro   329586 2009-05-23 01:25 backport-util-concurrent-2.1.jar
-rw-r--r-- 1 alessandro alessandro  1593423 2009-05-23 01:34 bcprov-jdk15-140.jar
-rw-r--r-- 1 alessandro alessandro    36174 2009-05-23 01:27 commons-cli-1.1.jar
-rw-r--r-- 1 alessandro alessandro   571259 2009-05-20 20:35 commons-collections-3.2.jar
-rw-r--r-- 1 alessandro alessandro   202182 2009-05-28 23:23 commons-dbcp-all-1.3-r699049.jar
-rw-r--r-- 1 alessandro alessandro   207723 2009-05-20 20:35 commons-lang-2.1.jar
-rw-r--r-- 1 alessandro alessandro    52915 2009-05-20 20:37 commons-logging-1.1.jar
-rw-r--r-- 1 alessandro alessandro    62086 2009-05-23 01:27 commons-pool-1.3.jar
-rw-r--r-- 1 alessandro alessandro  2881944 2009-05-23 01:34 cxf-bundle-2.0.9.jar
lrwxrwxrwx 1 alessandro alessandro       52 2009-06-15 14:39 dom4j.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/dom4j.jar
-rw-r--r-- 1 alessandro alessandro    18843 2009-05-31 03:15 ejb31-api-experimental-3.1.1.jar
lrwxrwxrwx 1 alessandro alessandro       63 2009-06-15 14:40 ejb3-persistence.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/ejb3-persistence.jar
-rw-r--r-- 1 alessandro alessandro   100863 2009-05-23 01:27 geronimo-connector-2.1.jar
-rw-r--r-- 1 alessandro alessandro   304552 2009-05-23 01:27 geronimo-javamail_1.4_mail-1.2.jar
-rw-r--r-- 1 alessandro alessandro    51278 2009-05-23 01:27 geronimo-transaction-2.1.jar
lrwxrwxrwx 1 alessandro alessandro       68 2009-06-15 14:35 hibernate-annotations.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/hibernate-annotations.jar
lrwxrwxrwx 1 alessandro alessandro       76 2009-06-15 14:36 hibernate-commons-annotations.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/hibernate-commons-annotations.jar
lrwxrwxrwx 1 alessandro alessandro       61 2009-06-15 14:36 hibernate-core.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/hibernate-core.jar
-rw-r--r-- 1 alessandro alessandro    79981 2009-05-23 01:27 howl-1.0.1-1.jar
-rw-r--r-- 1 alessandro alessandro   643727 2009-05-23 01:27 hsqldb-1.8.0.7.jar
-rw-r--r-- 1 alessandro alessandro   753070 2009-05-31 03:15 javaee-api-5.0-2.jar
lrwxrwxrwx 1 alessandro alessandro       56 2009-06-15 14:40 javassist.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/javassist.jar
-rw-r--r-- 1 alessandro alessandro   787619 2009-05-23 01:26 jaxb-impl-2.0.5.jar
lrwxrwxrwx 1 alessandro alessandro       50 2009-06-15 14:40 jta.jar -> ../../hibernate-entitymanager-3.4.0.GA/lib/jta.jar
-rw-r--r-- 1 alessandro alessandro   358085 2009-05-23 01:25 log4j-1.2.12.jar
-rw-r--r-- 1 alessandro alessandro    32900 2009-05-23 01:34 neethi-2.0.4.jar
-rw-r--r-- 1 alessandro alessandro     8517 2009-05-31 03:17 openejb-api-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro   200563 2009-05-31 03:18 openejb-client-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro  1448855 2009-05-31 03:18 openejb-core-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    56068 2009-05-31 03:21 openejb-cxf-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    56184 2009-05-31 03:19 openejb-ejbd-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    16019 2009-05-31 03:19 openejb-hsql-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    41760 2009-05-31 03:19 openejb-http-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    12847 2009-05-31 03:17 openejb-javaagent-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro   788210 2009-05-31 03:17 openejb-jee-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    41511 2009-05-31 03:17 openejb-loader-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    27680 2009-05-31 03:19 openejb-multicast-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    74989 2009-05-31 03:18 openejb-server-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    31632 2009-05-31 03:19 openejb-telnet-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro    46317 2009-05-31 03:19 openejb-webservices-3.1.1.jar
-rw-r--r-- 1 alessandro alessandro 11712276 2009-05-23 01:27 openjpa-1.2.0.jar
-rw-r--r-- 1 alessandro alessandro   155714 2009-05-23 01:34 opensaml-1.1.jar
-rw-r--r-- 1 alessandro alessandro   388716 2009-05-23 01:28 quartz-1.5.2.jar
-rw-r--r-- 1 alessandro alessandro   278301 2009-05-23 01:30 saaj-impl-1.3.jar
-rw-r--r-- 1 alessandro alessandro   205877 2009-05-23 01:27 serp-1.13.1.jar
-rw-r--r-- 1 alessandro alessandro    12231 2009-05-23 01:34 slf4j-api-1.3.1.jar
-rw-r--r-- 1 alessandro alessandro     7515 2009-05-23 01:34 slf4j-jdk14-1.3.1.jar
-rw-r--r-- 1 alessandro alessandro    26514 2009-05-23 01:26 stax-api-1.0.1.jar
-rw-r--r-- 1 alessandro alessandro    43161 2009-05-23 01:28 swizzle-stream-1.0.1.jar
-rw-r--r-- 1 alessandro alessandro   148522 2009-05-23 01:28 wsdl4j-1.6.1.jar
-rw-r--r-- 1 alessandro alessandro   307437 2009-05-23 01:34 wss4j-1.5.4.jar
-rw-r--r-- 1 alessandro alessandro   504969 2009-05-23 01:26 wstx-asl-3.2.0.jar
-rw-r--r-- 1 alessandro alessandro   123396 2009-05-31 03:15 xbean-asm-shaded-3.6-r779512.jar
-rw-r--r-- 1 alessandro alessandro    40330 2009-05-31 03:15 xbean-finder-shaded-3.6-r779512.jar
-rw-r--r-- 1 alessandro alessandro    51495 2009-05-28 13:31 xbean-naming-3.5.jar
-rw-r--r-- 1 alessandro alessandro   150222 2009-05-31 03:15 xbean-reflect-3.6-r779512.jar
-rw-r--r-- 1 alessandro alessandro    84091 2009-05-23 01:34 xml-resolver-1.2.jar
-rw-r--r-- 1 alessandro alessandro   139721 2009-05-23 01:34 XmlSchema-1.4.2.jar
-rw-r--r-- 1 alessandro alessandro   413902 2009-05-23 01:34 xmlsec-1.4.0.jar


Thanks in advance for any help
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoSuchMethodError: org.slf4j.Logger.trace(Ljava/lang/String;)V

dblevins
Administrator
Thanks, Alessandro,

Didn't see the details at the bottom of that first message, thanks for  
pointing them out again.

I upgraded our hibernate example so that it uses 3.4.0.GA and got it  
to run by making it use the slf4j-api-1.4.2.jar and slf4j-
jdk14-1.4.2.jar.  That example runs with maven and it seems maven  
pulls in more hibernate jars than you had in your lib dir listing, so  
here's the full list of jars that were in my test case's classpath to  
be on the safe side:

activeio-core-3.0.0-incubator.jar
activemq-core-4.1.1.jar
activemq-ra-4.1.1.jar
antlr-2.7.6.jar  (hibernate)
backport-util-concurrent-2.1.jar
commons-cli-1.1.jar
commons-collections-3.2.jar
commons-dbcp-all-1.3-r699049.jar
commons-lang-2.1.jar
commons-logging-1.1.jar
dom4j-1.6.1.jar  (hibernate)
ejb3-persistence-1.0.2.GA.jar  (hibernate)
ejb31-api-experimental-3.1.1.jar
geronimo-connector-2.1.jar
geronimo-javamail_1.4_mail-1.2.jar
geronimo-transaction-2.1.jar
hibernate-annotations-3.4.0.GA.jar  (hibernate)
hibernate-commons-annotations-3.1.0.GA.jar  (hibernate)
hibernate-core-3.3.0.SP1.jar  (hibernate)
hibernate-entitymanager-3.4.0.GA.jar  (hibernate)
howl-1.0.1-1.jar
hsqldb-1.8.0.7.jar
javaee-api-5.0-2.jar
javassist-3.4.GA.jar  (hibernate)
jaxb-impl-2.0.5.jar
log4j-1.2.12.jar
openejb-api-3.1.1.jar
openejb-core-3.1.1.jar
openejb-javaagent-3.1.1.jar
openejb-jee-3.1.1.jar
openejb-loader-3.1.1.jar
quartz-1.5.2.jar
serp-1.13.1.jar
slf4j-api-1.4.2.jar  (hibernate/cxf)
slf4j-jdk14-1.4.2.jar  (hibernate/cxf)
stax-api-1.0.1.jar
swizzle-stream-1.0.1.jar
xbean-asm-shaded-3.6-r779512.jar
xbean-finder-shaded-3.6-r779512.jar
xbean-naming-3.5.jar
xbean-reflect-3.6-r779512.jar

This is a minimal classpath without WebServices support via CXF; it's  
really CXF who is using slf4j.  If you don't need Web Services in your  
tests, this is a great classpath.  But in case you do, I verified that  
CXF will have no issues running with slfj4 1.4.2 and all was fine.  So  
here are the libraries you can add to enable Web Services support  
should you need it:

XmlSchema-1.4.2.jar
bcprov-jdk15-140.jar
commons-pool-1.3.jar
cxf-bundle-2.0.9.jar
neethi-2.0.4.jar
openejb-client-3.1.1.jar
openejb-cxf-3.1.1.jar
openejb-ejbd-3.1.1.jar
openejb-http-3.1.1.jar
openejb-server-3.1.1.jar
openejb-webservices-3.1.1.jar
opensaml-1.1.jar
saaj-impl-1.3.jar
wss4j-1.5.4.jar
wstx-asl-3.2.0.jar
xml-resolver-1.2.jar
xmlsec-1.4.0.jar

For simplicity sake, you really can include all the openejb-3.1.1/lib/
* jars as long as you delete the slfj4 jars we ship with and replace  
them with the slfj4 1.4.2 jars that Hibernate needs.

The long and short is that slfj4 1.4.2 api has some new method  
signatures that Hibernate uses, so with only the slf4j 1.3.1 jars in  
the classpath the VM throws the NoSuchMethodError when loading  
Hibernate as the vm is unable to find all the slf4j methods that  
Hibernate needs.

Hope that helps.


-David


On Jun 19, 2009, at 7:05 AM, AlessandroIlardo wrote:

>
> On the previous message I reported the version (it should be in the  
> end) of
> Hibernate and its slf4j library. If you check the OpenEJB lib  
> directory
> list, you can see that I added the Hibernate jars, except for slf4j  
> which I
> prefered to leave the existing one included in OpenEJB.
> To me looks like the slf4j required by Hibernate is the same  
> available in
> the OpenEJB classpath, so the 1.3.1, but apparently I am wrong.
> This is the message where you should find the version.
> http://www.nabble.com/Re%3A-java.lang.NoSuchMethodError%3A-org.slf4j.Logger.trace(Ljava-lang-String-)V-p24053855.html
>
> Thanks in advance
>
>
> AlessandroIlardo wrote:
>>
>> Hello there,
>> I am using NetBeans with Junit, HIbernate and OpenEJB to test an EJB
>> module.
>> On the OpenEJB log I get the following error:
>>
>>
>> 2009-06-15 14:56:22,434 - INFO  - openejb.home =
>> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1
>> 2009-06-15 14:56:22,435 - INFO  - openejb.base =
>> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1
>> 2009-06-15 14:56:23,371 - INFO  - Configuring Service(id=Default  
>> Security
>> Service, type=SecurityService, provider-id=Default Security Service)
>> 2009-06-15 14:56:23,384 - INFO  - Configuring Service(id=Default
>> Transaction Manager, type=TransactionManager, provider-id=Default
>> Transaction Manager)
>> 2009-06-15 14:56:23,395 - INFO  - Configuring Service(id=My  
>> DataSource,
>> type=Resource, provider-id=Default JDBC Database)
>> 2009-06-15 14:56:23,413 - INFO  - Configuring Service(id=My Unmanaged
>> DataSource, type=Resource, provider-id=Default JDBC Database)
>> 2009-06-15 14:56:23,424 - INFO  - Configuring Service(id=My JMS  
>> Resource
>> Adapter, type=Resource, provider-id=Default JMS Resource Adapter)
>> 2009-06-15 14:56:23,436 - INFO  - Configuring Service(id=My JMS  
>> Connection
>> Factory, type=Resource, provider-id=Default JMS Connection Factory)
>> 2009-06-15 14:56:23,448 - INFO  - Configuring
>> Service(id=UnmanagedIdentityManagerDS, type=Resource, provider-
>> id=Default
>> JDBC Database)
>> 2009-06-15 14:56:23,461 - INFO  - Configuring Service(id=My CMP  
>> Container,
>> type=Container, provider-id=Default CMP Container)
>> 2009-06-15 14:56:23,472 - INFO  - Configuring Service(id=My BMP  
>> Container,
>> type=Container, provider-id=Default BMP Container)
>> 2009-06-15 14:56:23,483 - INFO  - Configuring Service(id=My Stateful
>> Container, type=Container, provider-id=Default Stateful Container)
>> 2009-06-15 14:56:23,495 - INFO  - Configuring Service(id=My Stateless
>> Container, type=Container, provider-id=Default Stateless Container)
>> 2009-06-15 14:56:23,520 - INFO  - Configuring Service(id=My MDB  
>> Container
>> , type=Container, provider-id=Default MDB Container)
>> 2009-06-15 14:56:23,596 - INFO  - Configuring enterprise application:
>> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/
>> IdentityManager-ejb.jar
>> 2009-06-15 14:56:24,986 - INFO  - Configuring
>> PersistenceUnit(name=IdentityManager-ejbPU,
>> provider=org.hibernate.ejb.HibernatePersistence)
>> 2009-06-15 14:56:24,988 - INFO  - Adjusting PersistenceUnit
>> IdentityManager-ejbPU <jta-data-source> to Resource ID 'My  
>> DataSource'
>> from 'java:/IdentityManagerDS'
>> 2009-06-15 14:56:24,989 - INFO  - Adjusting PersistenceUnit
>> IdentityManager-ejbPU <non-jta-data-source> to Resource ID 'My  
>> Unmanaged
>> DataSource' from 'null'
>> 2009-06-15 14:56:25,037 - INFO  - Enterprise application
>> "/home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/
>> IdentityManager-ejb.jar"
>> loaded.
>> 2009-06-15 14:56:25,549 - INFO  - Found ClientModule in classpath:
>> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/lib/xml-
>> resolver-1.2.jar
>> 2009-06-15 14:56:25,593 - INFO  - Found ClientModule in classpath:
>> /home/alessandro/Documents/Java/shared-lib/hibernate-
>> entitymanager-3.4.0.GA/lib/javassist.jar
>> 2009-06-15 14:56:25,597 - INFO  - Found EjbModule in classpath:
>> /home/alessandro/Work-Space/NetBeansProject/IdentityManager/
>> IdentityManager-ejb/trunk/dist/IdentityManager-ejb.jar
>> 2009-06-15 14:56:25,682 - INFO  - Found ClientModule in classpath:
>> /home/alessandro/.netbeans/6.1/ant/lib/ant.jar
>> 2009-06-15 14:56:26,389 - INFO  - Found ClientModule in classpath:
>> /home/alessandro/.netbeans/6.1/ant/lib/ant-launcher.jar
>> 2009-06-15 14:56:26,435 - INFO  - Beginning load:
>> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/lib/xml-
>> resolver-1.2.jar
>> 2009-06-15 14:56:26,441 - INFO  - Beginning load:
>> /home/alessandro/Documents/Java/shared-lib/hibernate-
>> entitymanager-3.4.0.GA/lib/javassist.jar
>> 2009-06-15 14:56:26,463 - INFO  - Beginning load:
>> /home/alessandro/Work-Space/NetBeansProject/IdentityManager/
>> IdentityManager-ejb/trunk/dist/IdentityManager-ejb.jar
>> 2009-06-15 14:56:26,468 - INFO  - Beginning load:
>> /home/alessandro/.netbeans/6.1/ant/lib/ant.jar
>> 2009-06-15 14:56:26,494 - INFO  - Beginning load:
>> /home/alessandro/.netbeans/6.1/ant/lib/ant-launcher.jar
>> 2009-06-15 14:56:26,513 - INFO  - Configuring enterprise application:
>> classpath.ear
>> 2009-06-15 14:56:26,516 - WARN  - No application-client.xml found  
>> assuming
>> annotations present: classpath.ear, module: xml-resolver-1.2.jar
>> 2009-06-15 14:56:26,517 - WARN  - No application-client.xml found  
>> assuming
>> annotations present: classpath.ear, module: javassist.jar
>> 2009-06-15 14:56:26,517 - WARN  - No application-client.xml found  
>> assuming
>> annotations present: classpath.ear, module: ant.jar
>> 2009-06-15 14:56:26,517 - WARN  - No application-client.xml found  
>> assuming
>> annotations present: classpath.ear, module: ant-launcher.jar
>> 2009-06-15 14:56:27,994 - INFO  - Configuring
>> PersistenceUnit(name=IdentityManager-ejbPU,
>> provider=org.hibernate.ejb.HibernatePersistence)
>> 2009-06-15 14:56:28,005 - INFO  - Enterprise application  
>> "classpath.ear"
>> loaded.
>> 2009-06-15 14:56:28,006 - INFO  - Creating  
>> TransactionManager(id=Default
>> Transaction Manager)
>> 2009-06-15 14:56:28,122 - INFO  - Creating SecurityService(id=Default
>> Security Service)
>> 2009-06-15 14:56:28,183 - INFO  - Creating Resource(id=My DataSource)
>> 2009-06-15 14:56:28,216 - INFO  - Creating Resource(id=My Unmanaged
>> DataSource)
>> 2009-06-15 14:56:28,239 - INFO  - Creating
>> Resource(id=UnmanagedIdentityManagerDS)
>> 2009-06-15 14:56:28,248 - INFO  - Creating Resource(id=My JMS  
>> Resource
>> Adapter)
>> 2009-06-15 14:56:28,733 - INFO  - Creating Resource(id=My JMS  
>> Connection
>> Factory)
>> 2009-06-15 14:56:28,741 - INFO  - Creating ConnectionManager for
>> Resource(id=My JMS Connection Factory)
>> 2009-06-15 14:56:28,784 - INFO  - Creating Container(id=My CMP  
>> Container)
>> 2009-06-15 14:56:28,817 - INFO  - Creating Container(id=My BMP  
>> Container)
>> 2009-06-15 14:56:28,835 - INFO  - Creating Container(id=My Stateful
>> Container)
>> 2009-06-15 14:56:28,889 - INFO  - Creating Container(id=My Stateless
>> Container)
>> 2009-06-15 14:56:28,901 - INFO  - Creating Container(id=My MDB  
>> Container )
>> 2009-06-15 14:56:28,912 - INFO  - Assembling app:
>> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/
>> IdentityManager-ejb.jar
>> 2009-06-15 14:56:28,954 - INFO  -
>> PersistenceUnit(name=IdentityManager-ejbPU,
>> provider=org.hibernate.ejb.HibernatePersistence)
>> 2009-06-15 14:56:29,575 - INFO  - Undeploying app:
>> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/
>> IdentityManager-ejb.jar
>> 2009-06-15 14:56:29,582 - ERROR - Application could not be deployed:
>> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/
>> IdentityManager-ejb.jar
>> org.apache.openejb.OpenEJBException: Creating application failed:
>> /home/alessandro/Documents/Java/shared-lib/openejb-3.1.1/apps/
>> IdentityManager-ejb.jar:
>> org.slf4j.Logger.trace(Ljava/lang/String;)V
>> at
>> org
>> .apache
>> .openejb
>> .assembler.classic.Assembler.createApplication(Assembler.java:658)
>> at
>> org
>> .apache
>> .openejb
>> .assembler.classic.Assembler.createApplication(Assembler.java:442)
>> at
>> org
>> .apache
>> .openejb
>> .assembler.classic.Assembler.buildContainerSystem(Assembler.java:360)
>> at
>> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:
>> 272)
>> at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
>> at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
>> at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun
>> .reflect
>> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>> at
>> sun
>> .reflect
>> .DelegatingMethodAccessorImpl
>> .invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:616)
>> at
>> org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:
>> 36)
>> at
>> org
>> .apache
>> .openejb
>> .client
>> .LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
>> at
>> org
>> .apache
>> .openejb
>> .client
>> .LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
>> at
>> org
>> .apache
>> .openejb
>> .client
>> .LocalInitialContextFactory
>> .getInitialContext(LocalInitialContextFactory.java:42)
>> at
>> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:
>> 684)
>> at  
>> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:
>> 305)
>> at javax.naming.InitialContext.init(InitialContext.java:240)
>> at javax.naming.InitialContext.<init>(InitialContext.java:214)
>> at eu.virtualLab.security.user.test.Init.setUp(Init.java:72)
>> at junit.framework.TestCase.runBare(TestCase.java:128)
>> at junit.framework.TestResult$1.protect(TestResult.java:110)
>> at junit.framework.TestResult.runProtected(TestResult.java:128)
>> at junit.framework.TestResult.run(TestResult.java:113)
>> at junit.framework.TestCase.run(TestCase.java:120)
>> at junit.framework.TestSuite.runTest(TestSuite.java:228)
>> at junit.framework.TestSuite.run(TestSuite.java:223)
>> at
>> org
>> .junit
>> .internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
>> at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:32)
>> at
>> org
>> .apache
>> .tools
>> .ant
>> .taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:
>> 421)
>> at
>> org
>> .apache
>> .tools
>> .ant
>> .taskdefs
>> .optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
>> at
>> org
>> .apache
>> .tools
>> .ant
>> .taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:
>> 766)
>> Caused by: java.lang.NoSuchMethodError:
>> org.slf4j.Logger.trace(Ljava/lang/String;)V
>> at
>> org
>> .hibernate.cfg.annotations.PropertyBinder.make(PropertyBinder.java:
>> 184)
>> at org.hibernate.cfg.AnnotationBinder.bindId(AnnotationBinder.java:
>> 1911)
>> at
>> org
>> .hibernate
>> .cfg
>> .AnnotationBinder.processElementAnnotations(AnnotationBinder.java:
>> 1279)
>> at
>> org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:
>> 754)
>> at
>> org
>> .hibernate
>> .cfg
>> .AnnotationConfiguration
>> .processArtifactsOfType(AnnotationConfiguration.java:546)
>> at
>> org
>> .hibernate
>> .cfg
>> .AnnotationConfiguration
>> .secondPassCompile(AnnotationConfiguration.java:291)
>> at  
>> org.hibernate.cfg.Configuration.buildMappings(Configuration.java:
>> 1148)
>> at
>> org
>> .hibernate
>> .ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1226)
>> at
>> org
>> .hibernate
>> .ejb
>> .EventListenerConfigurator.configure(EventListenerConfigurator.java:
>> 173)
>> at
>> org
>> .hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:
>> 854)
>> at
>> org
>> .hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:
>> 425)
>> at
>> org
>> .hibernate
>> .ejb
>> .HibernatePersistence
>> .createContainerEntityManagerFactory(HibernatePersistence.java:131)
>> at
>> org
>> .apache
>> .openejb
>> .assembler
>> .classic
>> .PersistenceBuilder
>> .createEntityManagerFactory(PersistenceBuilder.java:183)
>> at
>> org
>> .apache
>> .openejb
>> .assembler.classic.Assembler.createApplication(Assembler.java:482)
>> ... 31 more
>> 2009-06-15 14:56:29,585 - INFO  - Assembling app: classpath.ear
>> 2009-06-15 14:56:29,586 - INFO  - Undeploying app: classpath.ear
>> 2009-06-15 14:56:29,588 - ERROR - Application could not be deployed:
>> classpath.ear
>> org.apache.openejb.OpenEJBException: Creating application failed:
>> classpath.ear: org.apache.openejb.OpenEJBException: Could not lookup
>> <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS'  
>> for unit
>> 'IdentityManager-ejbPU': Need to specify class name in environment or
>> system property, or as an applet parameter, or in an application  
>> resource
>> file:  java.naming.factory.initial: Could not lookup <jta-data-
>> source>
>> 'java:openejb/Resource/java:/IdentityManagerDS' for unit
>> 'IdentityManager-ejbPU': Need to specify class name in environment or
>> system property, or as an applet parameter, or in an application  
>> resource
>> file:  java.naming.factory.initial
>> at
>> org
>> .apache
>> .openejb
>> .assembler.classic.Assembler.createApplication(Assembler.java:658)
>> at
>> org
>> .apache
>> .openejb
>> .assembler.classic.Assembler.createApplication(Assembler.java:442)
>> at
>> org
>> .apache
>> .openejb
>> .assembler.classic.Assembler.buildContainerSystem(Assembler.java:360)
>> at
>> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:
>> 272)
>> at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
>> at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
>> at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun
>> .reflect
>> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>> at
>> sun
>> .reflect
>> .DelegatingMethodAccessorImpl
>> .invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:616)
>> at
>> org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:
>> 36)
>> at
>> org
>> .apache
>> .openejb
>> .client
>> .LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
>> at
>> org
>> .apache
>> .openejb
>> .client
>> .LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
>> at
>> org
>> .apache
>> .openejb
>> .client
>> .LocalInitialContextFactory
>> .getInitialContext(LocalInitialContextFactory.java:42)
>> at
>> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:
>> 684)
>> at  
>> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:
>> 305)
>> at javax.naming.InitialContext.init(InitialContext.java:240)
>> at javax.naming.InitialContext.<init>(InitialContext.java:214)
>> at eu.virtualLab.security.user.test.Init.setUp(Init.java:72)
>> at junit.framework.TestCase.runBare(TestCase.java:128)
>> at junit.framework.TestResult$1.protect(TestResult.java:110)
>> at junit.framework.TestResult.runProtected(TestResult.java:128)
>> at junit.framework.TestResult.run(TestResult.java:113)
>> at junit.framework.TestCase.run(TestCase.java:120)
>> at junit.framework.TestSuite.runTest(TestSuite.java:228)
>> at junit.framework.TestSuite.run(TestSuite.java:223)
>> at
>> org
>> .junit
>> .internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
>> at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:32)
>> at
>> org
>> .apache
>> .tools
>> .ant
>> .taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:
>> 421)
>> at
>> org
>> .apache
>> .tools
>> .ant
>> .taskdefs
>> .optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
>> at
>> org
>> .apache
>> .tools
>> .ant
>> .taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:
>> 766)
>> Caused by: org.apache.openejb.OpenEJBException:
>> org.apache.openejb.OpenEJBException: Could not lookup <jta-data-
>> source>
>> 'java:openejb/Resource/java:/IdentityManagerDS' for unit
>> 'IdentityManager-ejbPU': Need to specify class name in environment or
>> system property, or as an applet parameter, or in an application  
>> resource
>> file:  java.naming.factory.initial: Could not lookup <jta-data-
>> source>
>> 'java:openejb/Resource/java:/IdentityManagerDS' for unit
>> 'IdentityManager-ejbPU': Need to specify class name in environment or
>> system property, or as an applet parameter, or in an application  
>> resource
>> file:  java.naming.factory.initial
>> at
>> org
>> .apache
>> .openejb
>> .assembler.classic.Assembler.createApplication(Assembler.java:487)
>> ... 31 more
>> Caused by: org.apache.openejb.OpenEJBException: Could not lookup
>> <jta-data-source> 'java:openejb/Resource/java:/IdentityManagerDS'  
>> for unit
>> 'IdentityManager-ejbPU': Need to specify class name in environment or
>> system property, or as an applet parameter, or in an application  
>> resource
>> file:  java.naming.factory.initial
>> at
>> org
>> .apache
>> .openejb
>> .assembler
>> .classic
>> .PersistenceBuilder
>> .createEntityManagerFactory(PersistenceBuilder.java:122)
>> at
>> org
>> .apache
>> .openejb
>> .assembler.classic.Assembler.createApplication(Assembler.java:482)
>> ... 31 more
>> Caused by: javax.naming.NoInitialContextException: Need to specify  
>> class
>> name in environment or system property, or as an applet parameter,  
>> or in
>> an application resource file:  java.naming.factory.initial
>> at
>> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:
>> 662)
>> at  
>> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:
>> 305)
>> at
>> javax
>> .naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:
>> 342)
>> at javax.naming.InitialContext.lookup(InitialContext.java:409)
>> at
>> org
>> .apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:
>> 133)
>> at
>> org
>> .apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:
>> 123)
>> at
>> org
>> .apache
>> .openejb
>> .assembler
>> .classic
>> .PersistenceBuilder
>> .createEntityManagerFactory(PersistenceBuilder.java:119)
>> ... 32 more
>>
>>
>>
>> To me it looks like a jars conflict. The OpenEJB library included  
>> into the
>> project
>>
>> -rw-r--r-- 1 alessandro alessandro   106398 2009-05-23 01:25
>> activeio-core-3.0.0-incubator.jar
>> -rw-r--r-- 1 alessandro alessandro  1683897 2009-05-23 01:25
>> activemq-core-4.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    78641 2009-05-23 01:27
>> activemq-ra-4.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro   329586 2009-05-23 01:25
>> backport-util-concurrent-2.1.jar
>> -rw-r--r-- 1 alessandro alessandro  1593423 2009-05-23 01:34
>> bcprov-jdk15-140.jar
>> -rw-r--r-- 1 alessandro alessandro    36174 2009-05-23 01:27
>> commons-cli-1.1.jar
>> -rw-r--r-- 1 alessandro alessandro   571259 2009-05-20 20:35
>> commons-collections-3.2.jar
>> -rw-r--r-- 1 alessandro alessandro   202182 2009-05-28 23:23
>> commons-dbcp-all-1.3-r699049.jar
>> -rw-r--r-- 1 alessandro alessandro   207723 2009-05-20 20:35
>> commons-lang-2.1.jar
>> -rw-r--r-- 1 alessandro alessandro    52915 2009-05-20 20:37
>> commons-logging-1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    62086 2009-05-23 01:27
>> commons-pool-1.3.jar
>> -rw-r--r-- 1 alessandro alessandro  2881944 2009-05-23 01:34
>> cxf-bundle-2.0.9.jar
>> lrwxrwxrwx 1 alessandro alessandro       52 2009-06-15 14:39  
>> dom4j.jar ->
>> ../../hibernate-entitymanager-3.4.0.GA/lib/dom4j.jar
>> -rw-r--r-- 1 alessandro alessandro    18843 2009-05-31 03:15
>> ejb31-api-experimental-3.1.1.jar
>> lrwxrwxrwx 1 alessandro alessandro       63 2009-06-15 14:40
>> ejb3-persistence.jar ->
>> ../../hibernate-entitymanager-3.4.0.GA/lib/ejb3-persistence.jar
>> -rw-r--r-- 1 alessandro alessandro   100863 2009-05-23 01:27
>> geronimo-connector-2.1.jar
>> -rw-r--r-- 1 alessandro alessandro   304552 2009-05-23 01:27
>> geronimo-javamail_1.4_mail-1.2.jar
>> -rw-r--r-- 1 alessandro alessandro    51278 2009-05-23 01:27
>> geronimo-transaction-2.1.jar
>> lrwxrwxrwx 1 alessandro alessandro       68 2009-06-15 14:35
>> hibernate-annotations.jar ->
>> ../../hibernate-entitymanager-3.4.0.GA/lib/hibernate-annotations.jar
>> lrwxrwxrwx 1 alessandro alessandro       76 2009-06-15 14:36
>> hibernate-commons-annotations.jar ->
>> ../../hibernate-entitymanager-3.4.0.GA/lib/hibernate-commons-
>> annotations.jar
>> lrwxrwxrwx 1 alessandro alessandro       61 2009-06-15 14:36
>> hibernate-core.jar ->
>> ../../hibernate-entitymanager-3.4.0.GA/lib/hibernate-core.jar
>> -rw-r--r-- 1 alessandro alessandro    79981 2009-05-23 01:27
>> howl-1.0.1-1.jar
>> -rw-r--r-- 1 alessandro alessandro   643727 2009-05-23 01:27
>> hsqldb-1.8.0.7.jar
>> -rw-r--r-- 1 alessandro alessandro   753070 2009-05-31 03:15
>> javaee-api-5.0-2.jar
>> lrwxrwxrwx 1 alessandro alessandro       56 2009-06-15 14:40  
>> javassist.jar
>> -> ../../hibernate-entitymanager-3.4.0.GA/lib/javassist.jar
>> -rw-r--r-- 1 alessandro alessandro   787619 2009-05-23 01:26
>> jaxb-impl-2.0.5.jar
>> lrwxrwxrwx 1 alessandro alessandro       50 2009-06-15 14:40  
>> jta.jar ->
>> ../../hibernate-entitymanager-3.4.0.GA/lib/jta.jar
>> -rw-r--r-- 1 alessandro alessandro   358085 2009-05-23 01:25
>> log4j-1.2.12.jar
>> -rw-r--r-- 1 alessandro alessandro    32900 2009-05-23 01:34
>> neethi-2.0.4.jar
>> -rw-r--r-- 1 alessandro alessandro     8517 2009-05-31 03:17
>> openejb-api-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro   200563 2009-05-31 03:18
>> openejb-client-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro  1448855 2009-05-31 03:18
>> openejb-core-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    56068 2009-05-31 03:21
>> openejb-cxf-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    56184 2009-05-31 03:19
>> openejb-ejbd-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    16019 2009-05-31 03:19
>> openejb-hsql-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    41760 2009-05-31 03:19
>> openejb-http-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    12847 2009-05-31 03:17
>> openejb-javaagent-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro   788210 2009-05-31 03:17
>> openejb-jee-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    41511 2009-05-31 03:17
>> openejb-loader-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    27680 2009-05-31 03:19
>> openejb-multicast-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    74989 2009-05-31 03:18
>> openejb-server-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    31632 2009-05-31 03:19
>> openejb-telnet-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro    46317 2009-05-31 03:19
>> openejb-webservices-3.1.1.jar
>> -rw-r--r-- 1 alessandro alessandro 11712276 2009-05-23 01:27
>> openjpa-1.2.0.jar
>> -rw-r--r-- 1 alessandro alessandro   155714 2009-05-23 01:34
>> opensaml-1.1.jar
>> -rw-r--r-- 1 alessandro alessandro   388716 2009-05-23 01:28
>> quartz-1.5.2.jar
>> -rw-r--r-- 1 alessandro alessandro   278301 2009-05-23 01:30
>> saaj-impl-1.3.jar
>> -rw-r--r-- 1 alessandro alessandro   205877 2009-05-23 01:27
>> serp-1.13.1.jar
>> -rw-r--r-- 1 alessandro alessandro    12231 2009-05-23 01:34
>> slf4j-api-1.3.1.jar
>> -rw-r--r-- 1 alessandro alessandro     7515 2009-05-23 01:34
>> slf4j-jdk14-1.3.1.jar
>> -rw-r--r-- 1 alessandro alessandro    26514 2009-05-23 01:26
>> stax-api-1.0.1.jar
>> -rw-r--r-- 1 alessandro alessandro    43161 2009-05-23 01:28
>> swizzle-stream-1.0.1.jar
>> -rw-r--r-- 1 alessandro alessandro   148522 2009-05-23 01:28
>> wsdl4j-1.6.1.jar
>> -rw-r--r-- 1 alessandro alessandro   307437 2009-05-23 01:34
>> wss4j-1.5.4.jar
>> -rw-r--r-- 1 alessandro alessandro   504969 2009-05-23 01:26
>> wstx-asl-3.2.0.jar
>> -rw-r--r-- 1 alessandro alessandro   123396 2009-05-31 03:15
>> xbean-asm-shaded-3.6-r779512.jar
>> -rw-r--r-- 1 alessandro alessandro    40330 2009-05-31 03:15
>> xbean-finder-shaded-3.6-r779512.jar
>> -rw-r--r-- 1 alessandro alessandro    51495 2009-05-28 13:31
>> xbean-naming-3.5.jar
>> -rw-r--r-- 1 alessandro alessandro   150222 2009-05-31 03:15
>> xbean-reflect-3.6-r779512.jar
>> -rw-r--r-- 1 alessandro alessandro    84091 2009-05-23 01:34
>> xml-resolver-1.2.jar
>> -rw-r--r-- 1 alessandro alessandro   139721 2009-05-23 01:34
>> XmlSchema-1.4.2.jar
>> -rw-r--r-- 1 alessandro alessandro   413902 2009-05-23 01:34
>> xmlsec-1.4.0.jar
>>
>>
>> Thanks in advance for any help
>>
>
> --
> View this message in context: http://www.nabble.com/java.lang.NoSuchMethodError%3A-org.slf4j.Logger.trace%28Ljava-lang-String-%29V-tp24034248p24112201.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
>