the code (including persistence.xml) would be useful to reproduce.
On 5 mai 2011, at 14:56, forums_at_java.net wrote:
> Here is the complete stack trace:
>
> Exception while loading the app : javax.ejb.CreateException: Initialization
> failed for Singleton TemplateServiceSingleton
> javax.ejb.CreateException: Initialization failed for Singleton
> TemplateServiceSingleton
> at
> com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:545)
> at
> com.sun.ejb.containers.AbstractSingletonContainer.access$100(AbstractSingletonContainer.java:79)
> at
> com.sun.ejb.containers.AbstractSingletonContainer$SingletonContextFactory.create(AbstractSingletonContainer.java:717)
> at
> com.sun.ejb.containers.AbstractSingletonContainer.instantiateSingletonInstance(AbstractSingletonContainer.java:449)
> at
> org.glassfish.ejb.startup.SingletonLifeCycleManager.initializeSingleton(SingletonLifeCycleManager.java:216)
> at
> org.glassfish.ejb.startup.SingletonLifeCycleManager.initializeSingleton(SingletonLifeCycleManager.java:177)
> at
> org.glassfish.ejb.startup.SingletonLifeCycleManager.doStartup(SingletonLifeCycleManager.java:155)
> at
> org.glassfish.ejb.startup.EjbApplication.start(EjbApplication.java:177)
> at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
> at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
> at
> org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:286)
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
> at
> org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:370)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1067)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1247)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
> at
> com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:465)
> at
> com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:222)
> at
> com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
> at
> com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
> at
> com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:234)
> at
> com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
> at
> com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
> at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
> at
> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
> at
> com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
> at
> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
> at
> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
> at
> com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
> at
> com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
> at
> com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
> at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
> at
> com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
> at
> com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: javax.ejb.EJBTransactionRolledbackException
> at
> com.sun.ejb.containers.BaseContainer.mapLocal3xException(BaseContainer.java:2305)
> at
> com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2088)
> at
> com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1990)
> at
> com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:222)
> at
> com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
> at $Proxy317.loadTemplateQuestionaire(Unknown Source)
> at
> de.mycompany.template.__EJB31_Generated__TemplateService__Intf____Bean__.loadTemplateQuestionaire(Unknown
> Source)
> at
> de.mycompany.template.TemplateServiceSingleton.checkDefaultQuestionaire(TemplateServiceSingleton.java:53)
> at
> de.mycompany.template.TemplateServiceSingleton.checkDefaultQuestionaires(TemplateServiceSingleton.java:46)
> at
> de.mycompany.template.TemplateServiceSingleton.applicationStartup(TemplateServiceSingleton.java:27)
> 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
> com.sun.ejb.containers.interceptors.BeanCallbackInterceptor.intercept(InterceptorManager.java:1010)
> at
> com.sun.ejb.containers.interceptors.CallbackChainImpl.invokeNext(CallbackChainImpl.java:65)
> at
> com.sun.ejb.containers.interceptors.CallbackInvocationContext.proceed(CallbackInvocationContext.java:113)
> at
> com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCallback(SystemInterceptorProxy.java:138)
> at
> com.sun.ejb.containers.interceptors.SystemInterceptorProxy.init(SystemInterceptorProxy.java:120)
> 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
> com.sun.ejb.containers.interceptors.CallbackInterceptor.intercept(InterceptorManager.java:965)
> at
> com.sun.ejb.containers.interceptors.CallbackChainImpl.invokeNext(CallbackChainImpl.java:65)
> at
> com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:394)
> at
> com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:377)
> at
> com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:536)
> ... 38 more
> Caused by: javax.ejb.TransactionRolledbackLocalException: Exception thrown
> from bean
> at
> com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:5050)
> at
> com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4885)
> at
> com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2039)
> ... 64 more
> Caused by: javax.persistence.PersistenceException: Exception
> [EclipseLink-4002] (Eclipse Persistence Services - 2.2.0.v20110202-r8913):
> org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: java.sql.SQLException
> Error Code: 0
> at
> org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:422)
> at
> org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:185)
> at
> org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:242)
> at
> org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:237)
> at
> com.sun.enterprise.container.common.impl.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:208)
> at
> com.sun.enterprise.container.common.impl.EntityManagerWrapper.find(EntityManagerWrapper.java:320)
> at
> de.mycompany.template.TemplateService.loadTemplateQuestionaire(TemplateService.java:116)
> 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.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
> at
> org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
> at
> com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5367)
> at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
> at
> com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:801)
> at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
> at
> com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
> at
> com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
> 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
> com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:862)
> at
> com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:801)
> at
> com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:371)
> at
> com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5339)
> at
> com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5327)
> at
> com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
> ... 62 more
> Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services -
> 2.2.0.v20110202-r8913): org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: java.sql.SQLException
> Error Code: 0
> at
> org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:309)
> at
> org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:138)
> at
> org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:94)
> at
> org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
> at
> org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:592)
> at
> org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:233)
> at
> org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:394)
> ... 90 more
> Caused by: java.sql.SQLException
> at
> com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getConnection(ConnectorConnectionPoolAdminServiceImpl.java:1618)
> at
> com.sun.enterprise.connectors.ConnectorRuntime.getConnection(ConnectorRuntime.java:584)
> at
> com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl$MyDataSource.getConnection(ConnectorResourceAdminServiceImpl.java:277)
> at
> org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:126)
> ... 95 more
> Caused by: java.lang.NullPointerException
> at
> com.sun.enterprise.connectors.util.ResourcesUtil.isJdbcPoolReferredInServerInstance(ResourcesUtil.java:1028)
> at
> com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.isPoolReferredByResource(ConnectorConnectionPoolAdminServiceImpl.java:730)
> at
> com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getUnpooledConnection(ConnectorConnectionPoolAdminServiceImpl.java:624)
> at
> com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getConnection(ConnectorConnectionPoolAdminServiceImpl.java:1602)
> ... 98 more
>
>
> --
>
> [Message sent by forum member 'MohamzJava']
>
> View Post: http://forums.java.net/node/798500
>
>