tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: Loading jar from OpenEJB Classpath
Date Wed, 22 Jul 2009 00:24:17 GMT
On Jul 21, 2009, at 4:53 PM, felix_hack wrote:

>
> Is there a way to stop OpenEJB from loading arbitary jar files as
> ClientModules. I am trying to run JUnit tests using the EclEmma  
> coverage
> plugin in Eclipse however it keeps failing to collect coverage data.  
> The
> error message states that I need to ensure the emma.jar is not  
> loaded by the
> tests. When I looked at the OpenEJB output I noticed it loading the
> emma.jar.

If you set the "openejb.deployments.classpath.exclude" property to  
".*emma.jar.*" that should take care it.

Let us know if that doesn't work.

-David


>
> Any help would be much appreciated. Here is the log output...
>
> Apache OpenEJB 3.1.1    build: 20090530-06:18
> http://openejb.apache.org/
> INFO - openejb.home = C:\dev\workspaces\servicezone\servicezone- 
> business
> INFO - openejb.base = C:\dev\workspaces\servicezone\servicezone- 
> business
> INFO - Configuring Service(id=Default Security Service,
> type=SecurityService, provider-id=Default Security Service)
> INFO - Configuring Service(id=Default Transaction Manager,
> type=TransactionManager, provider-id=Default Transaction Manager)
> INFO - Configuring Service(id=jdbc/servicezone, type=Resource,
> provider-id=Default JDBC Database)
> INFO - Using 'openejb.deployments.classpath.exclude=.*'
> INFO - Found ClientModule in classpath:
> C:\dev\tools\ides\eclipses\ganymede-javaee-sr2\configuration 
> \org.eclipse.osgi\bundles\588\1\.cp\emma.jar
> INFO - Found ClientModule in classpath: C:\Documents and
> Settings\Administrator\My Documents\My Downloads\Tools\Web
> Stack\openejb-3.1.1\lib\xml-resolver-1.2.jar
> INFO - Found EjbModule in classpath:
> C:\dev\workspaces\servicezone\servicezone-business\bin
> INFO - Found PersistenceModule in classpath:
> C:\dev\workspaces\servicezone\servicezone-domain\bin
> INFO - Beginning load:
> C:\dev\tools\ides\eclipses\ganymede-javaee-sr2\configuration 
> \org.eclipse.osgi\bundles\588\1\.cp\emma.jar
> INFO - Beginning load: C:\Documents and Settings\Administrator\My
> Documents\My Downloads\Tools\Web
> Stack\openejb-3.1.1\lib\xml-resolver-1.2.jar
> INFO - Beginning load:
> C:\dev\workspaces\servicezone\servicezone-business\bin
> INFO - Beginning load: C:\dev\workspaces\servicezone\servicezone- 
> domain\bin
> INFO - Configuring enterprise application: classpath.ear
> WARN - No application-client.xml found assuming annotations present:
> classpath.ear, module: emma.jar
> WARN - No application-client.xml found assuming annotations present:
> classpath.ear, module: xml-resolver-1.2.jar
> WARN - Jar not loaded. classpath.ear.  Unable to load Client main- 
> class:
> emmarun: emmarun
> org.apache.openejb.OpenEJBException: Unable to load Client main-class:
> emmarun: emmarun
> 	at
> org.apache.openejb.config.AnnotationDeployer 
> $ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:668)
> 	at
> org.apache.openejb.config.AnnotationDeployer 
> $ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:624)
> 	at
> org 
> .apache 
> .openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:186)
> 	at
> org.apache.openejb.config.ConfigurationFactory 
> $Chain.deploy(ConfigurationFactory.java:247)
> 	at
> org 
> .apache 
> .openejb 
> .config 
> .ConfigurationFactory.configureApplication(ConfigurationFactory.java: 
> 601)
> 	at
> org 
> .apache 
> .openejb 
> .config 
> .ConfigurationFactory.configureApplication(ConfigurationFactory.java: 
> 551)
> 	at
> org 
> .apache 
> .openejb 
> .config 
> .ConfigurationFactory 
> .getOpenEjbConfiguration(ConfigurationFactory.java:380)
> 	at
> org 
> .apache 
> .openejb 
> .assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java: 
> 292)
> 	at  
> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java: 
> 271)
> 	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:39)
> 	at
> sun 
> .reflect 
> .DelegatingMethodAccessorImpl 
> .invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	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: 
> 667)
> 	at  
> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
> 	at javax.naming.InitialContext.init(InitialContext.java:223)
> 	at javax.naming.InitialContext.<init>(InitialContext.java:197)
> 	at
> org 
> .springframework 
> .jndi.JndiTemplate.createInitialContext(JndiTemplate.java:114)
> 	at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java: 
> 86)
> 	at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java: 
> 130)
> 	at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java: 
> 155)
> 	at
> org 
> .springframework 
> .jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95)
> 	at
> org 
> .springframework 
> .jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105)
> 	at
> org 
> .springframework 
> .jndi 
> .JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java: 
> 193)
> 	at
> org 
> .springframework 
> .jndi 
> .JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java: 
> 179)
> 	at
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .AbstractAutowireCapableBeanFactory 
> .invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1367)
> 	at
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .AbstractAutowireCapableBeanFactory 
> .initializeBean(AbstractAutowireCapableBeanFactory.java:1333)
> 	at
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .AbstractAutowireCapableBeanFactory 
> .doCreateBean(AbstractAutowireCapableBeanFactory.java:471)
> 	at
> org 
> .springframework 
> .beans.factory.support.AbstractAutowireCapableBeanFactory 
> $1.run(AbstractAutowireCapableBeanFactory.java:409)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .AbstractAutowireCapableBeanFactory 
> .createBean(AbstractAutowireCapableBeanFactory.java:380)
> 	at
> org.springframework.beans.factory.support.AbstractBeanFactory 
> $1.getObject(AbstractBeanFactory.java:264)
> 	at
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .DefaultSingletonBeanRegistry 
> .getSingleton(DefaultSingletonBeanRegistry.java:220)
> 	at
> org 
> .springframework 
> .beans 
> .factory 
> .support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
> 	at
> org 
> .springframework 
> .beans 
> .factory 
> .support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
> 	at
> org 
> .springframework 
> .beans 
> .factory 
> .support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
> 	at
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .DefaultListableBeanFactory 
> .preInstantiateSingletons(DefaultListableBeanFactory.java:423)
> 	at
> org 
> .springframework 
> .context 
> .support 
> .AbstractApplicationContext 
> .finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
> 	at
> org 
> .springframework 
> .context 
> .support 
> .AbstractApplicationContext.refresh(AbstractApplicationContext.java: 
> 381)
> 	at
> org 
> .springframework 
> .test 
> .AbstractSingleSpringContextTests 
> .createApplicationContext(AbstractSingleSpringContextTests.java:243)
> 	at
> org 
> .springframework 
> .test 
> .AbstractSingleSpringContextTests 
> .loadContextLocations(AbstractSingleSpringContextTests.java:212)
> 	at
> org 
> .springframework 
> .test 
> .AbstractSingleSpringContextTests 
> .loadContext(AbstractSingleSpringContextTests.java:187)
> 	at
> org 
> .springframework 
> .test 
> .AbstractSpringContextTests 
> .getContext(AbstractSpringContextTests.java:140)
> 	at
> org 
> .springframework 
> .test 
> .AbstractSingleSpringContextTests 
> .setUp(AbstractSingleSpringContextTests.java:100)
> 	at junit.framework.TestCase.runBare(TestCase.java:128)
> 	at
> org 
> .springframework 
> .test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
> 	at
> org 
> .springframework 
> .test.annotation.AbstractAnnotationAwareTransactionalTests.access 
> $001(AbstractAnnotationAwareTransactionalTests.java:71)
> 	at
> org 
> .springframework 
> .test.annotation.AbstractAnnotationAwareTransactionalTests 
> $1.run(AbstractAnnotationAwareTransactionalTests.java:175)
> 	at
> org 
> .springframework 
> .test 
> .annotation 
> .AbstractAnnotationAwareTransactionalTests 
> .runTest(AbstractAnnotationAwareTransactionalTests.java:283)
> 	at
> org 
> .springframework 
> .test 
> .annotation 
> .AbstractAnnotationAwareTransactionalTests 
> .runTestTimed(AbstractAnnotationAwareTransactionalTests.java:254)
> 	at
> org 
> .springframework 
> .test 
> .annotation 
> .AbstractAnnotationAwareTransactionalTests 
> .runBare(AbstractAnnotationAwareTransactionalTests.java:172)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:120)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:230)
> 	at junit.framework.TestSuite.run(TestSuite.java:225)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:230)
> 	at junit.framework.TestSuite.run(TestSuite.java:225)
> 	at
> org 
> .eclipse 
> .jdt 
> .internal 
> .junit 
> .runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> 	at
> org 
> .eclipse 
> .jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at
> org 
> .eclipse 
> .jdt 
> .internal 
> .junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at
> org 
> .eclipse 
> .jdt 
> .internal 
> .junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at
> org 
> .eclipse 
> .jdt 
> .internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at
> org 
> .eclipse 
> .jdt 
> .internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java: 
> 196)
> Caused by: java.lang.ClassNotFoundException: emmarun
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> 	at
> org.apache.openejb.config.AnnotationDeployer 
> $ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:665)
> 	... 71 more
>
> -- 
> View this message in context: http://www.nabble.com/Loading-jar-from-OpenEJB-Classpath-tp24597804p24597804.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
>


Mime
View raw message