无法使用 Glassfish Embedded v3.1 两次部署应用程序
我遇到以下情况的问题:
- 启动 JVM。
- 启动 GlassFish Embedded v3.1。
- 部署我的应用程序 EAR。
- 取消部署我的应用程序。
- 重新启动 GlassFish Embedded v3.1,即停止并启动。
- 部署我的应用程序 EAR。 -- 崩溃
我尝试过不重新启动内嵌的 glassfish,即仅使用取消部署和部署命令,但它仍然崩溃。
目标是自动化一些最终产品测试。涉及glassfish的生命周期和配置。
查看活动线程,我发现即使在调用 GlassFish.stop()
或 GlassFish.dispose()
之后,仍然有守护线程不会在 JVM 之前消失关闭。
再次启动 glassfish 一切正常,但在第二次部署时,当它尝试启动 EJBContainer 时,我得到的地址已在使用中,可能是其中一些守护进程线程持有它......
我搜索了很多,几乎每个教程和/或有关 GlassFish 嵌入式的文档将其与 Maven 一起使用,并在 JVM 生命周期内与单个服务器实例一起使用。
有没有办法可以在嵌入的 GlassFish v3.1 上重新部署应用程序?
在尝试第二次部署之前重新启动 GlassFish 嵌入式实例,我收到此堆栈跟踪,并且 JVM 被卡住:
SEVERE: Exception while loading the app : EJB Container initialization error
java.lang.RuntimeException: IIOP Protocol Manager initialization failed. Possible cause is that ORB is not available in this container
at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:821)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:566)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:155)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:149)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:105)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:234)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:290)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:101)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:186)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:249)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:460)
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:360)
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.admin.cli.embeddable.CommandExecutorImpl.executeCommand(CommandExecutorImpl.java:118)
at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:97)
at com.senior.testes.automacao.junit.minilang.servico.ServicoServidorAplicacao.deploy(ServicoServidorAplicacao.java:119)
at com.senior.testes.automacao.junit.minilang.servico.ServicoCsmCenter.iniciar(ServicoCsmCenter.java:34)
at asdioha.Main.main(Main.java:15)
Caused by: java.lang.RuntimeException: Orb initialization erorr
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:148)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getProtocolManager(GlassFishORBHelper.java:187)
at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:818)
... 23 more
Caused by: java.lang.RuntimeException: org.omg.CORBA.OBJ_ADAPTER: WARNING: IOP02310002: Error in connecting servant to ORB vmcid: OMG minor code: 2 completed: No
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:622)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.getORB(GlassFishORBManager.java:263)
at org.glassfish.enterprise.iiop.impl.GlassFishORBFactoryImpl.createORB(GlassFishORBFactoryImpl.java:93)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:120)
... 25 more
Caused by: org.omg.CORBA.OBJ_ADAPTER: WARNING: IOP02310002: Error in connecting servant to ORB vmcid: OMG minor code: 2 completed: No
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:248)
at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:95)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.handleFullLogging(WrapperGenerator.java:387)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.access$400(WrapperGenerator.java:107)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator$2.invoke(WrapperGenerator.java:511)
at com.sun.corba.ee.spi.orbutil.proxy.CompositeInvocationHandlerImpl.invoke(CompositeInvocationHandlerImpl.java:99)
at $Proxy145.orbConnectError(Unknown Source)
at com.sun.corba.ee.impl.orb.ORBImpl.connect(ORBImpl.java:1698)
at com.sun.corba.ee.spi.presentation.rmi.StubAdapter.connect(StubAdapter.java:216)
at com.sun.corba.ee.impl.orb.ORBImpl.getIOR(ORBImpl.java:2088)
at com.sun.corba.ee.impl.orb.ORBImpl.getFVDCodeBaseIOR(ORBImpl.java:988)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.addServiceContexts(CorbaClientRequestDispatcherImpl.java:802)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:273)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:228)
at com.sun.corba.ee.impl.resolver.BootstrapResolverImpl.invoke(BootstrapResolverImpl.java:111)
at com.sun.corba.ee.impl.resolver.BootstrapResolverImpl.resolve(BootstrapResolverImpl.java:144)
at com.sun.corba.ee.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:61)
at com.sun.corba.ee.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:61)
at com.sun.corba.ee.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:61)
at com.sun.corba.ee.impl.orb.ORBImpl.resolve_initial_references(ORBImpl.java:1266)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:586)
... 28 more
Caused by: org.omg.CORBA.COMM_FAILURE: SEVERE: IOP00410016: Unable to create IIOP listener on the specified host all interfaces and port 3,700 vmcid: OMG minor code: 16 completed: No
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:248)
at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:95)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.handleFullLogging(WrapperGenerator.java:387)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.access$400(WrapperGenerator.java:107)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator$2.invoke(WrapperGenerator.java:511)
at com.sun.corba.ee.spi.orbutil.proxy.CompositeInvocationHandlerImpl.invoke(CompositeInvocationHandlerImpl.java:99)
at $Proxy145.createListenerFailed(Unknown Source)
at com.sun.corba.ee.impl.transport.SocketOrChannelAcceptorImpl.initialize(SocketOrChannelAcceptorImpl.java:98)
at com.sun.corba.ee.impl.transport.CorbaTransportManagerImpl.getAcceptors(CorbaTransportManagerImpl.java:243)
at com.sun.corba.ee.impl.transport.CorbaTransportManagerImpl.addToIORTemplate(CorbaTransportManagerImpl.java:262)
at com.sun.corba.ee.spi.oa.ObjectAdapterBase.initializeTemplate(ObjectAdapterBase.java:103)
at com.sun.corba.ee.impl.oa.toa.TOAImpl.<init>(TOAImpl.java:134)
at com.sun.corba.ee.impl.oa.toa.TOAFactory.getTOA(TOAFactory.java:118)
at com.sun.corba.ee.impl.orb.ORBImpl.connect(ORBImpl.java:1696)
... 41 more
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:126)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52)
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.createServerSocket(IIOPSSLSocketFactory.java:293)
at com.sun.corba.ee.impl.transport.SocketOrChannelAcceptorImpl.initialize(SocketOrChannelAcceptorImpl.java:91)
... 47 more
顺便说一句,如果我不重新启动 GlassFish,部署将在第二次工作,但在第三次时失败:
17/03/2011 08:07:07 org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class com.senior.seguranca.csmcenter.CsmCenterContextListener
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5271)
at com.sun.enterprise.web.WebModule.start(WebModule.java:500)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:755)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1980)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1630)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:100)
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:360)
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.admin.cli.embeddable.CommandExecutorImpl.executeCommand(CommandExecutorImpl.java:118)
at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:97)
at com.senior.testes.automacao.junit.minilang.servico.ServicoServidorAplicacao.deploy(ServicoServidorAplicacao.java:119)
at com.senior.testes.automacao.junit.minilang.servico.ServicoCsmCenter.iniciar(ServicoCsmCenter.java:34)
at asdioha.Main.main(Main.java:22)
Caused by: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class com.senior.seguranca.csmcenter.CsmCenterContextListener
at org.apache.catalina.core.StandardContext.addListener(StandardContext.java:2688)
at org.apache.catalina.core.StandardContext.addApplicationListener(StandardContext.java:1932)
at com.sun.enterprise.web.TomcatDeploymentConfig.configureApplicationListener(TomcatDeploymentConfig.java:234)
at com.sun.enterprise.web.TomcatDeploymentConfig.configureWebModule(TomcatDeploymentConfig.java:93)
at com.sun.enterprise.web.WebModuleContextConfig.start(WebModuleContextConfig.java:274)
at com.sun.enterprise.web.WebModuleContextConfig.lifecycleEvent(WebModuleContextConfig.java:172)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:149)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5268)
... 24 more
Caused by: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class com.senior.seguranca.csmcenter.CsmCenterContextListener
at org.apache.catalina.core.StandardContext.createListener(StandardContext.java:2798)
at org.apache.catalina.core.StandardContext.loadListener(StandardContext.java:4745)
at com.sun.enterprise.web.WebModule.loadListener(WebModule.java:1603)
at org.apache.catalina.core.StandardContext.addListener(StandardContext.java:2685)
... 31 more
Caused by: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class com.senior.seguranca.csmcenter.CsmCenterContextListener
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.createManagedObject(InjectionManagerImpl.java:317)
at com.sun.enterprise.web.WebContainer.createListenerInstance(WebContainer.java:734)
at com.sun.enterprise.web.WebModule.createListenerInstance(WebModule.java:1981)
at org.apache.catalina.core.StandardContext.createListener(StandardContext.java:2796)
... 34 more
Caused by: com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Remote ejb-ref name=com.senior.seguranca.csmcenter.CsmCenterContextListener/timerAccessEvent,Remote 3.x interface =com.senior.seguranca.csmcenter.event.IAccessEventVerifier resolved to intra-app EJB AccessEventVerifier in module csm-center-ejb.jar,ejb-link=csm-center-ejb.jar#AccessEventVerifier,lookup=,mappedName=,jndi-name=com.senior.seguranca.csmcenter.event.IAccessEventVerifier,refType=Session into class com.senior.seguranca.csmcenter.CsmCenterContextListener
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:698)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:468)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectInstance(InjectionManagerImpl.java:146)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectInstance(InjectionManagerImpl.java:132)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.createManagedObject(InjectionManagerImpl.java:311)
... 37 more
Caused by: javax.naming.NamingException: Lookup failed for 'java:comp/env/com.senior.seguranca.csmcenter.CsmCenterContextListener/timerAccessEvent' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NamingException: Exception resolving Ejb for 'Remote ejb-ref name=com.senior.seguranca.csmcenter.CsmCenterContextListener/timerAccessEvent,Remote 3.x interface =com.senior.seguranca.csmcenter.event.IAccessEventVerifier resolved to intra-app EJB AccessEventVerifier in module csm-center-ejb.jar,ejb-link=csm-center-ejb.jar#AccessEventVerifier,lookup=,mappedName=,jndi-name=com.senior.seguranca.csmcenter.event.IAccessEventVerifier,refType=Session' . Actual (possibly internal) Remote JNDI name used for lookup is 'com.senior.seguranca.csmcenter.event.IAccessEventVerifier#com.senior.seguranca.csmcenter.event.IAccessEventVerifier' [Root exception is javax.naming.NamingException: Lookup failed for 'com.senior.seguranca.csmcenter.event.IAccessEventVerifier#com.senior.seguranca.csmcenter.event.IAccessEventVerifier' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NamingException: ejb ref resolution error for remote business interfacecom.senior.seguranca.csmcenter.event.IAccessEventVerifier [Root exception is java.lang.IllegalArgumentException: argument type mismatch]]]]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:518)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:597)
... 41 more
Caused by: javax.naming.NamingException: Exception resolving Ejb for 'Remote ejb-ref name=com.senior.seguranca.csmcenter.CsmCenterContextListener/timerAccessEvent,Remote 3.x interface =com.senior.seguranca.csmcenter.event.IAccessEventVerifier resolved to intra-app EJB AccessEventVerifier in module csm-center-ejb.jar,ejb-link=csm-center-ejb.jar#AccessEventVerifier,lookup=,mappedName=,jndi-name=com.senior.seguranca.csmcenter.event.IAccessEventVerifier,refType=Session' . Actual (possibly internal) Remote JNDI name used for lookup is 'com.senior.seguranca.csmcenter.event.IAccessEventVerifier#com.senior.seguranca.csmcenter.event.IAccessEventVerifier' [Root exception is javax.naming.NamingException: Lookup failed for 'com.senior.seguranca.csmcenter.event.IAccessEventVerifier#com.senior.seguranca.csmcenter.event.IAccessEventVerifier' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NamingException: ejb ref resolution error for remote business interfacecom.senior.seguranca.csmcenter.event.IAccessEventVerifier [Root exception is java.lang.IllegalArgumentException: argument type mismatch]]]
at com.sun.ejb.EjbNamingReferenceManagerImpl.resolveEjbReference(EjbNamingReferenceManagerImpl.java:178)
at com.sun.enterprise.container.common.impl.ComponentEnvManagerImpl$EjbReferenceProxy.create(ComponentEnvManagerImpl.java:1097)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:772)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:740)
at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:172)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:498)
... 44 more
Caused by: javax.naming.NamingException: Lookup failed for 'com.senior.seguranca.csmcenter.event.IAccessEventVerifier#com.senior.seguranca.csmcenter.event.IAccessEventVerifier' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NamingException: ejb ref resolution error for remote business interfacecom.senior.seguranca.csmcenter.event.IAccessEventVerifier [Root exception is java.lang.IllegalArgumentException: argument type mismatch]]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:518)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.sun.ejb.EjbNamingReferenceManagerImpl.resolveEjbReference(EjbNamingReferenceManagerImpl.java:173)
... 49 more
Caused by: javax.naming.NamingException: ejb ref resolution error for remote business interfacecom.senior.seguranca.csmcenter.event.IAccessEventVerifier [Root exception is java.lang.IllegalArgumentException: argument type mismatch]
at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:434)
at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:75)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at com.sun.enterprise.naming.impl.SerialContext.getObjectInstance(SerialContext.java:556)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:514)
... 52 more
Caused by: java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.sun.ejb.EJBUtils.createRemoteBusinessObject(EJBUtils.java:657)
at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:427)
... 56 more
17/03/2011 08:07:07 com.sun.enterprise.web.WebApplication start
WARNING: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class com.senior.seguranca.csmcenter.CsmCenterContextListener
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class com.senior.seguranca.csmcenter.CsmCenterContextListener
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:921)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:755)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1980)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1630)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:100)
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:360)
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.admin.cli.embeddable.CommandExecutorImpl.executeCommand(CommandExecutorImpl.java:118)
at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:97)
at com.senior.testes.automacao.junit.minilang.servico.ServicoServidorAplicacao.deploy(ServicoServidorAplicacao.java:119)
at com.senior.testes.automacao.junit.minilang.servico.ServicoCsmCenter.iniciar(ServicoCsmCenter.java:34)
at asdioha.Main.main(Main.java:22)
17/03/2011 08:07:07 org.glassfish.internal.data.ModuleInfo start
SEVERE: Exception while invoking class com.sun.enterprise.web.WebApplication start method
java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class com.senior.seguranca.csmcenter.CsmCenterContextListener
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:130)
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:360)
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.admin.cli.embeddable.CommandExecutorImpl.executeCommand(CommandExecutorImpl.java:118)
at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:97)
at com.senior.testes.automacao.junit.minilang.servico.ServicoServidorAplicacao.deploy(ServicoServidorAplicacao.java:119)
at com.senior.testes.automacao.junit.minilang.servico.ServicoCsmCenter.iniciar(ServicoCsmCenter.java:34)
at asdioha.Main.main(Main.java:22)
17/03/2011 08:07:07 org.glassfish.api.ActionReport failure
SEVERE: Exception while loading the app
17/03/2011 08:07:07 com.sun.ejb.containers.MessageBeanContainer cleanupResources
WARNING: [MDBContainer] Current thread done cleanup()...
17/03/2011 08:07:07 com.sun.ejb.containers.MessageBeanContainer cleanupResources
WARNING: [MDBContainer] Current thread done cleanup()...
17/03/2011 08:07:07 com.sun.xml.ws.server.MonitorBase closeMOM
INFO: Closing Metro monitoring root: amx:pp=/mon/server-mon[server],type=WSEndpoint,name=CsmCenterAdmService-CsmCenterAdmPort
17/03/2011 08:07:07 com.sun.ejb.containers.MessageBeanContainer cleanupResources
WARNING: [MDBContainer] Current thread done cleanup()...
17/03/2011 08:07:07 com.sun.ejb.containers.MessageBeanContainer cleanupResources
WARNING: [MDBContainer] Current thread done cleanup()...
classLoader = WebappClassLoader (delegate=true; repositories=WEB-INF/classes/)
SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@1e3c4ea4
classLoader = WebappClassLoader (delegate=true; repositories=WEB-INF/classes/)
SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@1e3c4ea4
17/03/2011 08:07:07 com.sun.ejb.containers.EJBTimerService _destroyTimers
INFO: No timers to be deleted for id: 85220387655778304
17/03/2011 08:07:07 org.glassfish.deployment.admin.DeployCommand execute
SEVERE: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class com.senior.seguranca.csmcenter.CsmCenterContextListener
PlainTextActionReporterFAILUREDescription: deploy AdminCommandError occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class com.senior.seguranca.csmcenter.CsmCenterContextListener. Please see server.log for more details.
[name=csm-center-glassfish
谢谢, 蒂亚戈·内格里.
I'm having trouble with the following scenario:
- Start JVM.
- Start GlassFish Embedded v3.1.
- Deploy my application EAR.
- Undeploy my application.
- Restart GlassFish Embedded v3.1, i.e., stop and start.
- Deploy my application EAR. -- crashes
I've tried without restarting glassfish embedded, i.e., just with undeploy and deploy commands and it still crashes.
The goal is to automate some end-product testing. Involving glassfish lifecycle and configuration.
Looking at the active Threads I see that even after calling GlassFish.stop()
or GlassFish.dispose()
, there are still Daemon Threads that won't go away before JVM shuts down.
Starting glassfish again goes ok, but on the second deploy I get address already in use when it tries to start EJBContainer, it might be some of these Daemon Threads that are holding it...
I've search a lot, almost every tutorial and/or documentation about GlassFish embedded uses it with Maven and with a single server instance thru JVM life-time.
Is there a way I can redeploy an application on GlassFish v3.1 embedded?
Restarting GlassFish embedded instance before trying the second deploy I get this stacktrace and the JVM get stuck:
SEVERE: Exception while loading the app : EJB Container initialization error
java.lang.RuntimeException: IIOP Protocol Manager initialization failed. Possible cause is that ORB is not available in this container
at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:821)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:566)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:155)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:149)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:105)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:234)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:290)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:101)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:186)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:249)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:460)
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:360)
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.admin.cli.embeddable.CommandExecutorImpl.executeCommand(CommandExecutorImpl.java:118)
at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:97)
at com.senior.testes.automacao.junit.minilang.servico.ServicoServidorAplicacao.deploy(ServicoServidorAplicacao.java:119)
at com.senior.testes.automacao.junit.minilang.servico.ServicoCsmCenter.iniciar(ServicoCsmCenter.java:34)
at asdioha.Main.main(Main.java:15)
Caused by: java.lang.RuntimeException: Orb initialization erorr
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:148)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getProtocolManager(GlassFishORBHelper.java:187)
at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:818)
... 23 more
Caused by: java.lang.RuntimeException: org.omg.CORBA.OBJ_ADAPTER: WARNING: IOP02310002: Error in connecting servant to ORB vmcid: OMG minor code: 2 completed: No
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:622)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.getORB(GlassFishORBManager.java:263)
at org.glassfish.enterprise.iiop.impl.GlassFishORBFactoryImpl.createORB(GlassFishORBFactoryImpl.java:93)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:120)
... 25 more
Caused by: org.omg.CORBA.OBJ_ADAPTER: WARNING: IOP02310002: Error in connecting servant to ORB vmcid: OMG minor code: 2 completed: No
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:248)
at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:95)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.handleFullLogging(WrapperGenerator.java:387)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.access$400(WrapperGenerator.java:107)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator$2.invoke(WrapperGenerator.java:511)
at com.sun.corba.ee.spi.orbutil.proxy.CompositeInvocationHandlerImpl.invoke(CompositeInvocationHandlerImpl.java:99)
at $Proxy145.orbConnectError(Unknown Source)
at com.sun.corba.ee.impl.orb.ORBImpl.connect(ORBImpl.java:1698)
at com.sun.corba.ee.spi.presentation.rmi.StubAdapter.connect(StubAdapter.java:216)
at com.sun.corba.ee.impl.orb.ORBImpl.getIOR(ORBImpl.java:2088)
at com.sun.corba.ee.impl.orb.ORBImpl.getFVDCodeBaseIOR(ORBImpl.java:988)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.addServiceContexts(CorbaClientRequestDispatcherImpl.java:802)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:273)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:228)
at com.sun.corba.ee.impl.resolver.BootstrapResolverImpl.invoke(BootstrapResolverImpl.java:111)
at com.sun.corba.ee.impl.resolver.BootstrapResolverImpl.resolve(BootstrapResolverImpl.java:144)
at com.sun.corba.ee.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:61)
at com.sun.corba.ee.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:61)
at com.sun.corba.ee.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:61)
at com.sun.corba.ee.impl.orb.ORBImpl.resolve_initial_references(ORBImpl.java:1266)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:586)
... 28 more
Caused by: org.omg.CORBA.COMM_FAILURE: SEVERE: IOP00410016: Unable to create IIOP listener on the specified host all interfaces and port 3,700 vmcid: OMG minor code: 16 completed: No
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:248)
at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:95)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.handleFullLogging(WrapperGenerator.java:387)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.access$400(WrapperGenerator.java:107)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator$2.invoke(WrapperGenerator.java:511)
at com.sun.corba.ee.spi.orbutil.proxy.CompositeInvocationHandlerImpl.invoke(CompositeInvocationHandlerImpl.java:99)
at $Proxy145.createListenerFailed(Unknown Source)
at com.sun.corba.ee.impl.transport.SocketOrChannelAcceptorImpl.initialize(SocketOrChannelAcceptorImpl.java:98)
at com.sun.corba.ee.impl.transport.CorbaTransportManagerImpl.getAcceptors(CorbaTransportManagerImpl.java:243)
at com.sun.corba.ee.impl.transport.CorbaTransportManagerImpl.addToIORTemplate(CorbaTransportManagerImpl.java:262)
at com.sun.corba.ee.spi.oa.ObjectAdapterBase.initializeTemplate(ObjectAdapterBase.java:103)
at com.sun.corba.ee.impl.oa.toa.TOAImpl.<init>(TOAImpl.java:134)
at com.sun.corba.ee.impl.oa.toa.TOAFactory.getTOA(TOAFactory.java:118)
at com.sun.corba.ee.impl.orb.ORBImpl.connect(ORBImpl.java:1696)
... 41 more
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:126)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52)
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.createServerSocket(IIOPSSLSocketFactory.java:293)
at com.sun.corba.ee.impl.transport.SocketOrChannelAcceptorImpl.initialize(SocketOrChannelAcceptorImpl.java:91)
... 47 more
By the way, if I do not restart GlassFish, the deploy works the second time and fails on third:
17/03/2011 08:07:07 org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class com.senior.seguranca.csmcenter.CsmCenterContextListener
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5271)
at com.sun.enterprise.web.WebModule.start(WebModule.java:500)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:755)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1980)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1630)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:100)
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:360)
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.admin.cli.embeddable.CommandExecutorImpl.executeCommand(CommandExecutorImpl.java:118)
at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:97)
at com.senior.testes.automacao.junit.minilang.servico.ServicoServidorAplicacao.deploy(ServicoServidorAplicacao.java:119)
at com.senior.testes.automacao.junit.minilang.servico.ServicoCsmCenter.iniciar(ServicoCsmCenter.java:34)
at asdioha.Main.main(Main.java:22)
Caused by: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class com.senior.seguranca.csmcenter.CsmCenterContextListener
at org.apache.catalina.core.StandardContext.addListener(StandardContext.java:2688)
at org.apache.catalina.core.StandardContext.addApplicationListener(StandardContext.java:1932)
at com.sun.enterprise.web.TomcatDeploymentConfig.configureApplicationListener(TomcatDeploymentConfig.java:234)
at com.sun.enterprise.web.TomcatDeploymentConfig.configureWebModule(TomcatDeploymentConfig.java:93)
at com.sun.enterprise.web.WebModuleContextConfig.start(WebModuleContextConfig.java:274)
at com.sun.enterprise.web.WebModuleContextConfig.lifecycleEvent(WebModuleContextConfig.java:172)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:149)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5268)
... 24 more
Caused by: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class com.senior.seguranca.csmcenter.CsmCenterContextListener
at org.apache.catalina.core.StandardContext.createListener(StandardContext.java:2798)
at org.apache.catalina.core.StandardContext.loadListener(StandardContext.java:4745)
at com.sun.enterprise.web.WebModule.loadListener(WebModule.java:1603)
at org.apache.catalina.core.StandardContext.addListener(StandardContext.java:2685)
... 31 more
Caused by: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class com.senior.seguranca.csmcenter.CsmCenterContextListener
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.createManagedObject(InjectionManagerImpl.java:317)
at com.sun.enterprise.web.WebContainer.createListenerInstance(WebContainer.java:734)
at com.sun.enterprise.web.WebModule.createListenerInstance(WebModule.java:1981)
at org.apache.catalina.core.StandardContext.createListener(StandardContext.java:2796)
... 34 more
Caused by: com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Remote ejb-ref name=com.senior.seguranca.csmcenter.CsmCenterContextListener/timerAccessEvent,Remote 3.x interface =com.senior.seguranca.csmcenter.event.IAccessEventVerifier resolved to intra-app EJB AccessEventVerifier in module csm-center-ejb.jar,ejb-link=csm-center-ejb.jar#AccessEventVerifier,lookup=,mappedName=,jndi-name=com.senior.seguranca.csmcenter.event.IAccessEventVerifier,refType=Session into class com.senior.seguranca.csmcenter.CsmCenterContextListener
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:698)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:468)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectInstance(InjectionManagerImpl.java:146)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectInstance(InjectionManagerImpl.java:132)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.createManagedObject(InjectionManagerImpl.java:311)
... 37 more
Caused by: javax.naming.NamingException: Lookup failed for 'java:comp/env/com.senior.seguranca.csmcenter.CsmCenterContextListener/timerAccessEvent' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NamingException: Exception resolving Ejb for 'Remote ejb-ref name=com.senior.seguranca.csmcenter.CsmCenterContextListener/timerAccessEvent,Remote 3.x interface =com.senior.seguranca.csmcenter.event.IAccessEventVerifier resolved to intra-app EJB AccessEventVerifier in module csm-center-ejb.jar,ejb-link=csm-center-ejb.jar#AccessEventVerifier,lookup=,mappedName=,jndi-name=com.senior.seguranca.csmcenter.event.IAccessEventVerifier,refType=Session' . Actual (possibly internal) Remote JNDI name used for lookup is 'com.senior.seguranca.csmcenter.event.IAccessEventVerifier#com.senior.seguranca.csmcenter.event.IAccessEventVerifier' [Root exception is javax.naming.NamingException: Lookup failed for 'com.senior.seguranca.csmcenter.event.IAccessEventVerifier#com.senior.seguranca.csmcenter.event.IAccessEventVerifier' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NamingException: ejb ref resolution error for remote business interfacecom.senior.seguranca.csmcenter.event.IAccessEventVerifier [Root exception is java.lang.IllegalArgumentException: argument type mismatch]]]]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:518)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:597)
... 41 more
Caused by: javax.naming.NamingException: Exception resolving Ejb for 'Remote ejb-ref name=com.senior.seguranca.csmcenter.CsmCenterContextListener/timerAccessEvent,Remote 3.x interface =com.senior.seguranca.csmcenter.event.IAccessEventVerifier resolved to intra-app EJB AccessEventVerifier in module csm-center-ejb.jar,ejb-link=csm-center-ejb.jar#AccessEventVerifier,lookup=,mappedName=,jndi-name=com.senior.seguranca.csmcenter.event.IAccessEventVerifier,refType=Session' . Actual (possibly internal) Remote JNDI name used for lookup is 'com.senior.seguranca.csmcenter.event.IAccessEventVerifier#com.senior.seguranca.csmcenter.event.IAccessEventVerifier' [Root exception is javax.naming.NamingException: Lookup failed for 'com.senior.seguranca.csmcenter.event.IAccessEventVerifier#com.senior.seguranca.csmcenter.event.IAccessEventVerifier' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NamingException: ejb ref resolution error for remote business interfacecom.senior.seguranca.csmcenter.event.IAccessEventVerifier [Root exception is java.lang.IllegalArgumentException: argument type mismatch]]]
at com.sun.ejb.EjbNamingReferenceManagerImpl.resolveEjbReference(EjbNamingReferenceManagerImpl.java:178)
at com.sun.enterprise.container.common.impl.ComponentEnvManagerImpl$EjbReferenceProxy.create(ComponentEnvManagerImpl.java:1097)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:772)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:740)
at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:172)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:498)
... 44 more
Caused by: javax.naming.NamingException: Lookup failed for 'com.senior.seguranca.csmcenter.event.IAccessEventVerifier#com.senior.seguranca.csmcenter.event.IAccessEventVerifier' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NamingException: ejb ref resolution error for remote business interfacecom.senior.seguranca.csmcenter.event.IAccessEventVerifier [Root exception is java.lang.IllegalArgumentException: argument type mismatch]]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:518)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.sun.ejb.EjbNamingReferenceManagerImpl.resolveEjbReference(EjbNamingReferenceManagerImpl.java:173)
... 49 more
Caused by: javax.naming.NamingException: ejb ref resolution error for remote business interfacecom.senior.seguranca.csmcenter.event.IAccessEventVerifier [Root exception is java.lang.IllegalArgumentException: argument type mismatch]
at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:434)
at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:75)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at com.sun.enterprise.naming.impl.SerialContext.getObjectInstance(SerialContext.java:556)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:514)
... 52 more
Caused by: java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.sun.ejb.EJBUtils.createRemoteBusinessObject(EJBUtils.java:657)
at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:427)
... 56 more
17/03/2011 08:07:07 com.sun.enterprise.web.WebApplication start
WARNING: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class com.senior.seguranca.csmcenter.CsmCenterContextListener
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class com.senior.seguranca.csmcenter.CsmCenterContextListener
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:921)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:755)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1980)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1630)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:100)
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:360)
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.admin.cli.embeddable.CommandExecutorImpl.executeCommand(CommandExecutorImpl.java:118)
at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:97)
at com.senior.testes.automacao.junit.minilang.servico.ServicoServidorAplicacao.deploy(ServicoServidorAplicacao.java:119)
at com.senior.testes.automacao.junit.minilang.servico.ServicoCsmCenter.iniciar(ServicoCsmCenter.java:34)
at asdioha.Main.main(Main.java:22)
17/03/2011 08:07:07 org.glassfish.internal.data.ModuleInfo start
SEVERE: Exception while invoking class com.sun.enterprise.web.WebApplication start method
java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class com.senior.seguranca.csmcenter.CsmCenterContextListener
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:130)
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:360)
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.admin.cli.embeddable.CommandExecutorImpl.executeCommand(CommandExecutorImpl.java:118)
at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:97)
at com.senior.testes.automacao.junit.minilang.servico.ServicoServidorAplicacao.deploy(ServicoServidorAplicacao.java:119)
at com.senior.testes.automacao.junit.minilang.servico.ServicoCsmCenter.iniciar(ServicoCsmCenter.java:34)
at asdioha.Main.main(Main.java:22)
17/03/2011 08:07:07 org.glassfish.api.ActionReport failure
SEVERE: Exception while loading the app
17/03/2011 08:07:07 com.sun.ejb.containers.MessageBeanContainer cleanupResources
WARNING: [MDBContainer] Current thread done cleanup()...
17/03/2011 08:07:07 com.sun.ejb.containers.MessageBeanContainer cleanupResources
WARNING: [MDBContainer] Current thread done cleanup()...
17/03/2011 08:07:07 com.sun.xml.ws.server.MonitorBase closeMOM
INFO: Closing Metro monitoring root: amx:pp=/mon/server-mon[server],type=WSEndpoint,name=CsmCenterAdmService-CsmCenterAdmPort
17/03/2011 08:07:07 com.sun.ejb.containers.MessageBeanContainer cleanupResources
WARNING: [MDBContainer] Current thread done cleanup()...
17/03/2011 08:07:07 com.sun.ejb.containers.MessageBeanContainer cleanupResources
WARNING: [MDBContainer] Current thread done cleanup()...
classLoader = WebappClassLoader (delegate=true; repositories=WEB-INF/classes/)
SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@1e3c4ea4
classLoader = WebappClassLoader (delegate=true; repositories=WEB-INF/classes/)
SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@1e3c4ea4
17/03/2011 08:07:07 com.sun.ejb.containers.EJBTimerService _destroyTimers
INFO: No timers to be deleted for id: 85220387655778304
17/03/2011 08:07:07 org.glassfish.deployment.admin.DeployCommand execute
SEVERE: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class com.senior.seguranca.csmcenter.CsmCenterContextListener
PlainTextActionReporterFAILUREDescription: deploy AdminCommandError occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class com.senior.seguranca.csmcenter.CsmCenterContextListener. Please see server.log for more details.
[name=csm-center-glassfish
Thanks,
Thiago Negri.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论