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: Singletons don't have transactions?
Date Thu, 15 Oct 2009 01:33:10 GMT
Not a bug, but just a reflection of the spec requirements at the time  
we implemented Singleton beans.  Singleton lifecycle methods were  
originally not allowed to use transactions.  We changed this on the  
spec side some time after.

-David


On Oct 13, 2009, at 7:47 AM, Quintin Beukes wrote:

> Hey,
>
> I have an odd problem. I created a singleton bean, gave it @Startup
> and want to initialize the database. Though, when I tried to use the
> entity manager in the @PostConstruct method, I get the errors listed
> at the below. This is even if I specified
> @TransactionAttribute(TransactionAttributeType.REQUIRED), which
> according to the spec means the transaction HAS to be started. So I
> would think this is a bug?
>
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running net.kunye.platform.init.InitializeKMSPlatformTest
> Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed:  
> 0.026 sec
> Running net.kunye.test.TestBeanTest
> Apache OpenEJB 3.1.2-SNAPSHOT    build: 20091009-07:14
> http://openejb.apache.org/
> INFO - openejb.home = /home/quintin/dev/kms/KMSPlatform/KMSPlatform- 
> ejb
> INFO - openejb.base = /home/quintin/dev/kms/KMSPlatform/KMSPlatform- 
> ejb
> 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_kmsPool, type=Resource,
> provider-id=Default JDBC Database)
> INFO - Found EjbModule in classpath:
> /home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb/target/classes
> INFO - Found EjbModule in classpath:
> /home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb/target/test-classes
> INFO - Found ClientModule in classpath:
> /home/mavenrepo/org/hibernate/hibernate-core/3.3.2.GA/hibernate- 
> core-3.3.2.GA.jar
> INFO - Found EjbModule in classpath:
> /home/mavenrepo/net/kunye/UnitTesting/1.0/UnitTesting-1.0.jar
> INFO - Found ClientModule in classpath:
> /home/mavenrepo/javassist/javassist/3.4.GA/javassist-3.4.GA.jar
> INFO - Beginning load:
> /home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb/target/classes
> INFO - Beginning load:
> /home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb/target/test-classes
> INFO - Beginning load:
> /home/mavenrepo/org/hibernate/hibernate-core/3.3.2.GA/hibernate- 
> core-3.3.2.GA.jar
> INFO - Beginning load:
> /home/mavenrepo/net/kunye/UnitTesting/1.0/UnitTesting-1.0.jar
> INFO - Beginning load:
> /home/mavenrepo/javassist/javassist/3.4.GA/javassist-3.4.GA.jar
> INFO - Configuring enterprise application: classpath.ear
> INFO - Configuring Service(id=Default Singleton Container,
> type=Container, provider-id=Default Singleton Container)
> INFO - Auto-creating a container for bean SiteBean:
> Container(type=SINGLETON, id=Default Singleton Container)
> INFO - Configuring Service(id=Default Stateless Container,
> type=Container, provider-id=Default Stateless Container)
> INFO - Auto-creating a container for bean TestBean:
> Container(type=STATELESS, id=Default Stateless Container)
> INFO - Configuring PersistenceUnit(name=KMSPlatform-PU,
> provider=org.hibernate.ejb.HibernatePersistence)
> INFO - Auto-creating a Resource with id 'jdbc_kmsPoolNonJta' of type
> 'DataSource for 'KMSPlatform-PU'.
> INFO - Configuring Service(id=jdbc_kmsPoolNonJta, type=Resource,
> provider-id=jdbc_kmsPool)
> INFO - Adjusting PersistenceUnit KMSPlatform-PU <jta-data-source> to
> Resource ID 'jdbc_kmsPool' from 'jdbc/kmsPool'
> INFO - Adjusting PersistenceUnit KMSPlatform-PU <non-jta-data-source>
> to Resource ID 'jdbc_kmsPoolNonJta' from 'null'
> INFO - Enterprise application "classpath.ear" loaded.
> INFO - Assembling app: classpath.ear
> INFO - PersistenceUnit(name=KMSPlatform-PU,
> provider=org.hibernate.ejb.HibernatePersistence)
> INFO - Jndi(name=SiteBeanLocal) --> Ejb(deployment-id=SiteBean)
> INFO - Jndi(name=SiteBeanRemote) --> Ejb(deployment-id=SiteBean)
> INFO - Jndi(name=InitializeKMSPlatformLocal) -->
> Ejb(deployment-id=InitializeKMSPlatform)
> INFO - Jndi(name=SpringContextBeanLocal) -->
> Ejb(deployment-id=SpringContextBean)
> INFO - Jndi(name=TestBeanLocal) --> Ejb(deployment-id=TestBean)
> INFO - Jndi(name=TestBeanRemote) --> Ejb(deployment-id=TestBean)
> INFO - Jndi(name=UnauthenticatedUserBeanLocal) -->
> Ejb(deployment-id=UnauthenticatedUserBean)
> INFO - Jndi(name=StandardUserBeanLocal) --> Ejb(deployment- 
> id=StandardUserBean)
> INFO - Jndi(name=AdminBeanLocal) --> Ejb(deployment-id=AdminBean)
> INFO - Jndi(name=LampRoomBeanLocal) --> Ejb(deployment- 
> id=LampRoomBean)
> INFO - Jndi(name=VdsAdminBeanLocal) --> Ejb(deployment- 
> id=VdsAdminBean)
> INFO - Jndi(name=PersonnelAdminBeanLocal) -->
> Ejb(deployment-id=PersonnelAdminBean)
> INFO - Jndi(name=LampRepairBeanLocal) --> Ejb(deployment- 
> id=LampRepairBean)
> INFO - Jndi(name=ServerComponentsBeanLocal) -->
> Ejb(deployment-id=ServerComponentsBean)
> INFO - Created Ejb(deployment-id=UnauthenticatedUserBean,
> ejb-name=UnauthenticatedUserBean, container=Default Stateless
> Container)
> INFO - Created Ejb(deployment-id=PersonnelAdminBean,
> ejb-name=PersonnelAdminBean, container=Default Stateless Container)
> INFO - Created Ejb(deployment-id=VdsAdminBean, ejb-name=VdsAdminBean,
> container=Default Stateless Container)
> INFO - Created Ejb(deployment-id=LampRepairBean,
> ejb-name=LampRepairBean, container=Default Stateless Container)
> INFO - Created Ejb(deployment-id=StandardUserBean,
> ejb-name=StandardUserBean, container=Default Stateless Container)
> INFO - Created Ejb(deployment-id=LampRoomBean, ejb-name=LampRoomBean,
> container=Default Stateless Container)
> INFO - Created Ejb(deployment-id=ServerComponentsBean,
> ejb-name=ServerComponentsBean, container=Default Stateless Container)
> INFO - Created Ejb(deployment-id=AdminBean, ejb-name=AdminBean,
> container=Default Stateless Container)
> INFO - Created Ejb(deployment-id=TestBean, ejb-name=TestBean,
> container=Default Stateless Container)
> INFO - Created Ejb(deployment-id=SpringContextBean,
> ejb-name=SpringContextBean, container=Default Singleton Container)
> INFO - Created Ejb(deployment-id=SiteBean, ejb-name=SiteBean,
> container=Default Singleton Container)
> SINGLETON STARTUP
> Created NEW Spring App Context
> Persisting entity: net.kunye.security.auth.Role
> ERROR - The bean instance threw a system
> exception:javax.persistence.TransactionRequiredException
> javax.persistence.TransactionRequiredException
>        at  
> org 
> .apache 
> .openejb 
> .persistence 
> .JtaEntityManager.assertTransactionActive(JtaEntityManager.java:75)
>        at  
> org 
> .apache 
> .openejb.persistence.JtaEntityManager.persist(JtaEntityManager.java: 
> 96)
>        at  
> net 
> .kunye 
> .platform 
> .init.InitializeKMSPlatform.initialize(InitializeKMSPlatform.java:63)
>        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.core.interceptor.ReflectionInvocationContext 
> $Invocation.invoke(ReflectionInvocationContext.java:158)
>        at  
> org.apache.openejb.core.interceptor.ReflectionInvocationContext 
> $LifecycleInvocation.invoke(ReflectionInvocationContext.java:189)
>        at  
> org 
> .apache 
> .openejb 
> .core 
> .interceptor 
> .ReflectionInvocationContext 
> .proceed(ReflectionInvocationContext.java:141)
>        at  
> org 
> .apache 
> .openejb 
> .core.interceptor.InterceptorStack.invoke(InterceptorStack.java:122)
>        at  
> org 
> .apache 
> .openejb 
> .core 
> .singleton 
> .SingletonInstanceManager 
> .createInstance(SingletonInstanceManager.java:204)
>        at  
> org.apache.openejb.core.singleton.SingletonInstanceManager.access 
> $100(SingletonInstanceManager.java:60)
>        at org.apache.openejb.core.singleton.SingletonInstanceManager 
> $1.call(SingletonInstanceManager.java:86)
>        at org.apache.openejb.core.singleton.SingletonInstanceManager 
> $1.call(SingletonInstanceManager.java:84)
>        at java.util.concurrent.FutureTask 
> $Sync.innerRun(FutureTask.java:303)
>        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>        at  
> org 
> .apache 
> .openejb 
> .core 
> .singleton 
> .SingletonInstanceManager.getInstance(SingletonInstanceManager.java: 
> 96)
>        at  
> org 
> .apache 
> .openejb 
> .core.singleton.SingletonContainer.deploy(SingletonContainer.java:128)
>        at  
> org 
> .apache 
> .openejb 
> .assembler.classic.Assembler.createApplication(Assembler.java:598)
>        at  
> org 
> .apache 
> .openejb 
> .assembler.classic.Assembler.createApplication(Assembler.java:449)
>        at  
> org 
> .apache 
> .openejb 
> .assembler.classic.Assembler.buildContainerSystem(Assembler.java:367)
>        at  
> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java: 
> 279)
>        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 
> .apache 
> .openejb 
> .junit 
> .context 
> .OpenEjbTestContext.getInitialContext(OpenEjbTestContext.java:162)
>        at  
> org 
> .apache 
> .openejb 
> .junit 
> .context.OpenEjbTestContext.configureTest(OpenEjbTestContext.java:125)
>        at  
> org 
> .apache 
> .openejb 
> .junit 
> .context 
> .ContextWrapperStatement.evaluate(ContextWrapperStatement.java:44)
>        at  
> org 
> .apache 
> .openejb 
> .junit 
> .model.MultiStatementExecutor.evaluate(MultiStatementExecutor.java:45)
>        at  
> org 
> .junit 
> .runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java: 
> 73)
>        at  
> org 
> .junit 
> .runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java: 
> 46)
>        at  
> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
>        at org.junit.runners.ParentRunner.access 
> $000(ParentRunner.java:41)
>        at org.junit.runners.ParentRunner 
> $1.evaluate(ParentRunner.java:173)
>        at  
> org 
> .junit 
> .internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>        at  
> org 
> .junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java: 
> 31)
>        at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
>        at  
> org.apache.openejb.junit.OpenEjbRunner.run(OpenEjbRunner.java:169)
>        at  
> org 
> .apache 
> .maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>        at  
> org 
> .apache 
> .maven 
> .surefire 
> .suite 
> .AbstractDirectoryTestSuite 
> .executeTestSet(AbstractDirectoryTestSuite.java:140)
>        at  
> org 
> .apache 
> .maven 
> .surefire 
> .suite 
> .AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java: 
> 127)
>        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>        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 
> .maven 
> .surefire 
> .booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
>        at  
> org 
> .apache 
> .maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
> INFO - Undeploying app: classpath.ear
> ERROR - Singleton shutdown failed: InitializeKMSPlatform
> java.lang.NullPointerException
>        at  
> org 
> .apache 
> .openejb 
> .core 
> .singleton 
> .SingletonInstanceManager.freeInstance(SingletonInstanceManager.java: 
> 311)
>        at  
> org 
> .apache 
> .openejb 
> .core.singleton.SingletonContainer.undeploy(SingletonContainer.java: 
> 146)
>        at  
> org 
> .apache 
> .openejb 
> .core.singleton.SingletonContainer.undeploy(SingletonContainer.java: 
> 139)
>        at  
> org 
> .apache 
> .openejb 
> .assembler.classic.Assembler.destroyApplication(Assembler.java:844)
>        at  
> org 
> .apache 
> .openejb 
> .assembler.classic.Assembler.createApplication(Assembler.java:662)
>        at  
> org 
> .apache 
> .openejb 
> .assembler.classic.Assembler.createApplication(Assembler.java:449)
>        at  
> org 
> .apache 
> .openejb 
> .assembler.classic.Assembler.buildContainerSystem(Assembler.java:367)
>        at  
> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java: 
> 279)
>        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 
> .apache 
> .openejb 
> .junit 
> .context 
> .OpenEjbTestContext.getInitialContext(OpenEjbTestContext.java:162)
>        at  
> org 
> .apache 
> .openejb 
> .junit 
> .context.OpenEjbTestContext.configureTest(OpenEjbTestContext.java:125)
>        at  
> org 
> .apache 
> .openejb 
> .junit 
> .context 
> .ContextWrapperStatement.evaluate(ContextWrapperStatement.java:44)
>        at  
> org 
> .apache 
> .openejb 
> .junit 
> .model.MultiStatementExecutor.evaluate(MultiStatementExecutor.java:45)
>        at  
> org 
> .junit 
> .runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java: 
> 73)
>        at  
> org 
> .junit 
> .runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java: 
> 46)
>        at  
> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
>        at org.junit.runners.ParentRunner.access 
> $000(ParentRunner.java:41)
>        at org.junit.runners.ParentRunner 
> $1.evaluate(ParentRunner.java:173)
>        at  
> org 
> .junit 
> .internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>        at  
> org 
> .junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java: 
> 31)
>        at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
>        at  
> org.apache.openejb.junit.OpenEjbRunner.run(OpenEjbRunner.java:169)
>        at  
> org 
> .apache 
> .maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>        at  
> org 
> .apache 
> .maven 
> .surefire 
> .suite 
> .AbstractDirectoryTestSuite 
> .executeTestSet(AbstractDirectoryTestSuite.java:140)
>        at  
> org 
> .apache 
> .maven 
> .surefire 
> .suite 
> .AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java: 
> 127)
>        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>        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 
> .maven 
> .surefire 
> .booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
>        at  
> org 
> .apache 
> .maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
> ERROR - Application could not be deployed:  classpath.ear
> org.apache.openejb.OpenEJBException: Creating application failed:
> classpath.ear: Error deploying 'InitializeKMSPlatform'.  Exception:
> class org.apache.openejb.OpenEJBException: Singleton startup failed:
> InitializeKMSPlatform: javax.ejb.NoSuchEJBException: Singleton failed
> to initialize: Singleton failed to initialize: Singleton startup
> failed: InitializeKMSPlatform: javax.ejb.NoSuchEJBException: Singleton
> failed to initialize: Singleton failed to initialize
>        at  
> org 
> .apache 
> .openejb 
> .assembler.classic.Assembler.createApplication(Assembler.java:666)
>        at  
> org 
> .apache 
> .openejb 
> .assembler.classic.Assembler.createApplication(Assembler.java:449)
>        at  
> org 
> .apache 
> .openejb 
> .assembler.classic.Assembler.buildContainerSystem(Assembler.java:367)
>        at  
> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java: 
> 279)
>        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 
> .apache 
> .openejb 
> .junit 
> .context 
> .OpenEjbTestContext.getInitialContext(OpenEjbTestContext.java:162)
>        at  
> org 
> .apache 
> .openejb 
> .junit 
> .context.OpenEjbTestContext.configureTest(OpenEjbTestContext.java:125)
>        at  
> org 
> .apache 
> .openejb 
> .junit 
> .context 
> .ContextWrapperStatement.evaluate(ContextWrapperStatement.java:44)
>        at  
> org 
> .apache 
> .openejb 
> .junit 
> .model.MultiStatementExecutor.evaluate(MultiStatementExecutor.java:45)
>        at  
> org 
> .junit 
> .runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java: 
> 73)
>        at  
> org 
> .junit 
> .runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java: 
> 46)
>        at  
> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
>        at org.junit.runners.ParentRunner.access 
> $000(ParentRunner.java:41)
>        at org.junit.runners.ParentRunner 
> $1.evaluate(ParentRunner.java:173)
>        at  
> org 
> .junit 
> .internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>        at  
> org 
> .junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java: 
> 31)
>        at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
>        at  
> org.apache.openejb.junit.OpenEjbRunner.run(OpenEjbRunner.java:169)
>        at  
> org 
> .apache 
> .maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>        at  
> org 
> .apache 
> .maven 
> .surefire 
> .suite 
> .AbstractDirectoryTestSuite 
> .executeTestSet(AbstractDirectoryTestSuite.java:140)
>        at  
> org 
> .apache 
> .maven 
> .surefire 
> .suite 
> .AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java: 
> 127)
>        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>        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 
> .maven 
> .surefire 
> .booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
>        at  
> org 
> .apache 
> .maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
> Caused by: org.apache.openejb.OpenEJBException: Error deploying
> 'InitializeKMSPlatform'.  Exception: class
> org.apache.openejb.OpenEJBException: Singleton startup failed:
> InitializeKMSPlatform: javax.ejb.NoSuchEJBException: Singleton failed
> to initialize: Singleton failed to initialize: Singleton startup
> failed: InitializeKMSPlatform: javax.ejb.NoSuchEJBException: Singleton
> failed to initialize: Singleton failed to initialize
>        at  
> org 
> .apache 
> .openejb 
> .assembler.classic.Assembler.createApplication(Assembler.java:601)
>        ... 41 more
> Caused by: org.apache.openejb.OpenEJBException: Singleton startup
> failed: InitializeKMSPlatform: javax.ejb.NoSuchEJBException: Singleton
> failed to initialize: Singleton failed to initialize
>        at  
> org 
> .apache 
> .openejb 
> .core.singleton.SingletonContainer.deploy(SingletonContainer.java:133)
>        at  
> org 
> .apache 
> .openejb 
> .assembler.classic.Assembler.createApplication(Assembler.java:598)
>        ... 41 more
> Caused by: org.apache.openejb.ApplicationException:
> javax.ejb.NoSuchEJBException: Singleton failed to initialize:
> Singleton failed to initialize
>        at  
> org 
> .apache 
> .openejb 
> .core 
> .singleton 
> .SingletonInstanceManager 
> .createInstance(SingletonInstanceManager.java:230)
>        at  
> org.apache.openejb.core.singleton.SingletonInstanceManager.access 
> $100(SingletonInstanceManager.java:60)
>        at org.apache.openejb.core.singleton.SingletonInstanceManager 
> $1.call(SingletonInstanceManager.java:86)
>        at org.apache.openejb.core.singleton.SingletonInstanceManager 
> $1.call(SingletonInstanceManager.java:84)
>        at java.util.concurrent.FutureTask 
> $Sync.innerRun(FutureTask.java:303)
>        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>        at  
> org 
> .apache 
> .openejb 
> .core 
> .singleton 
> .SingletonInstanceManager.getInstance(SingletonInstanceManager.java: 
> 96)
>        at  
> org 
> .apache 
> .openejb 
> .core.singleton.SingletonContainer.deploy(SingletonContainer.java:128)
>        ... 42 more
> Caused by: javax.ejb.NoSuchEJBException: Singleton failed to  
> initialize
>        ... 50 more
> Caused by: javax.persistence.TransactionRequiredException
>        at  
> org 
> .apache 
> .openejb 
> .persistence 
> .JtaEntityManager.assertTransactionActive(JtaEntityManager.java:75)
>        at  
> org 
> .apache 
> .openejb.persistence.JtaEntityManager.persist(JtaEntityManager.java: 
> 96)
>        at  
> net 
> .kunye 
> .platform 
> .init.InitializeKMSPlatform.initialize(InitializeKMSPlatform.java:63)
>        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.core.interceptor.ReflectionInvocationContext 
> $Invocation.invoke(ReflectionInvocationContext.java:158)
>        at  
> org.apache.openejb.core.interceptor.ReflectionInvocationContext 
> $LifecycleInvocation.invoke(ReflectionInvocationContext.java:189)
>        at  
> org 
> .apache 
> .openejb 
> .core 
> .interceptor 
> .ReflectionInvocationContext 
> .proceed(ReflectionInvocationContext.java:141)
>        at  
> org 
> .apache 
> .openejb 
> .core.interceptor.InterceptorStack.invoke(InterceptorStack.java:122)
>        at  
> org 
> .apache 
> .openejb 
> .core 
> .singleton 
> .SingletonInstanceManager 
> .createInstance(SingletonInstanceManager.java:204)
>        ... 49 more
> INFO - Logging in
> INFO - Logging in
>
> Quintin Beukes
>


Mime
View raw message