Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 4.0_dev
    • Fix Version/s: None
    • Component/s: ejb_container
    • Labels:
      None
    • Environment:

      OS
      Windows 7 Enterprise (Service Pack 1)

      JDK
      java version "1.7.0_11"
      Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
      Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

      Description

      Reproducible operational steps:

      1) deployment of j2eesample.ear with name as "j2eesample1" works
      asadmin deploy --name j2eesample1 j2eesample.ear

      2) deployment of j2eesample.ear with a name as "j2eesample1:1" works
      asadmin deploy --name j2eesample1:1 j2eesample.ear

      3) deployment of j2eesample.ear with a different name as "j2eesample2" failed
      asadmin deploy --name j2eesample2 j2eesample.ear

      C:\GF_Feedback>asadmin deploy --name j2eesample2 j2eesample.ear
      remote failure: Error occurred during deployment: Exception while loading the app :
      EJB Container initialization error. Please see server.log for more details.
      Command deploy failed.

      Below are loggings from server.log

      [2013-07-16T15:42:02.481+1000] [glassfish 4.0] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=37 _ThreadName=admin-listener(5)] [timeMillis: 1373953322481] [levelValue: 800] [[
      visiting unvisited references]]

      [2013-07-16T15:42:02.591+1000] [glassfish 4.0] [INFO] [AS-EJB-00036] [javax.enterprise.ejb.container] [tid: _ThreadID=37 _ThreadName=admin-listener(5)] [timeMillis: 1373953322591] [levelValue: 800] [[
      TopLevel AvailabilityService.getAvailabilityEnabled: [true]]]

      [2013-07-16T15:42:02.591+1000] [glassfish 4.0] [INFO] [AS-EJB-00037] [javax.enterprise.ejb.container] [tid: _ThreadID=37 _ThreadName=admin-listener(5)] [timeMillis: 1373953322591] [levelValue: 800] [[
      TopLevel EjbAvailabilityService.getAvailabilityEnabled: [true]]]

      [2013-07-16T15:42:02.591+1000] [glassfish 4.0] [INFO] [AS-EJB-00038] [javax.enterprise.ejb.container] [tid: _ThreadID=37 _ThreadName=admin-listener(5)] [timeMillis: 1373953322591] [levelValue: 800] [[
      Global AvailabilityEnabled: [true], application AvailabilityEnabled: [false]]]

      [2013-07-16T15:42:02.591+1000] [glassfish 4.0] [INFO] [AS-EJB-00040] [javax.enterprise.ejb.container] [tid: _ThreadID=37 _ThreadName=admin-listener(5)] [timeMillis: 1373953322591] [levelValue: 800] [[
      StatefulContainerBuilder AvailabilityEnabled [false] for this application]]

      [2013-07-16T15:42:02.591+1000] [glassfish 4.0] [INFO] [AS-EJB-00041] [javax.enterprise.ejb.container] [tid: _ThreadID=37 _ThreadName=admin-listener(5)] [timeMillis: 1373953322591] [levelValue: 800] [[
      StatefulContainerBuilder.buildStoreManager() storeName: [CartBean-90043015745306624-BackingStore]]]

      [2013-07-16T15:42:02.591+1000] [glassfish 4.0] [INFO] [] [org.glassfish.ha.store.adapter.file.FileBackingStore] [tid: _ThreadID=37 _ThreadName=admin-listener(5)] [timeMillis: 1373953322591] [levelValue: 800] [[
      [FileBackingStore::initialize] Successfully Created and initialized store. Working dir: C:\glassfish-4.0-b89\glassfish4\glassfish\domains\domain1\session-store\CartBean-90043015745306624; Configuration: BackingStoreConfiguration{clusterName='null', instanceName='null', storeName='CartBean-90043015745306624-BackingStore', shortUniqueName='90043015745306624', storeType='file', maxIdleTimeInSeconds=-1, relaxVersionCheck='null', maxLoadWaitTimeInSeconds=0, baseDirectoryName='C:\glassfish-4.0-b89\glassfish4\glassfish\domains\domain1\session-store\CartBean-90043015745306624', keyClazz=interface java.io.Serializable, valueClazz=class org.glassfish.ha.store.util.SimpleMetadata, synchronousSave=false, typicalPayloadSizeInKiloBytes=0, vendorSpecificSettings={start.gms=false, async.replication=true, key.transformer=com.sun.ejb.base.sfsb.util.SimpleKeyGenerator@f3fac9c, local.caching=true, value.class.is.thread.safe=true, broadcast.remove.expired=false}}]]

      [2013-07-16T15:42:02.591+1000] [glassfish 4.0] [INFO] [AS-EJB-00043] [javax.enterprise.ejb.container] [tid: _ThreadID=37 _ThreadName=admin-listener(5)] [timeMillis: 1373953322591] [levelValue: 800] [[
      StatefulContainerbuilder instantiated store: org.glassfish.ha.store.adapter.file.FileBackingStore@1d5d3d96, with ha-enabled [false], and backing store configuration: BackingStoreConfiguration{clusterName='null', instanceName='null', storeName='CartBean-90043015745306624-BackingStore', shortUniqueName='90043015745306624', storeType='file', maxIdleTimeInSeconds=-1, relaxVersionCheck='null', maxLoadWaitTimeInSeconds=0, baseDirectoryName='C:\glassfish-4.0-b89\glassfish4\glassfish\domains\domain1\session-store\CartBean-90043015745306624', keyClazz=interface java.io.Serializable, valueClazz=class org.glassfish.ha.store.util.SimpleMetadata, synchronousSave=false, typicalPayloadSizeInKiloBytes=0, vendorSpecificSettings={start.gms=false, async.replication=true, key.transformer=com.sun.ejb.base.sfsb.util.SimpleKeyGenerator@f3fac9c, local.caching=true, value.class.is.thread.safe=true, broadcast.remove.expired=false}}]]

      [2013-07-16T15:42:02.606+1000] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=37 _ThreadName=admin-listener(5)] [timeMillis: 1373953322606] [levelValue: 1000] [[
      Exception while invoking class org.glassfish.ejb.startup.EjbDeployer load method
      java.lang.RuntimeException: EJB Container initialization error
      at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:234)
      at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
      at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
      at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
      at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:493)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
      at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:356)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
      at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:396)
      at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandSimpInMultOut(CommandResource.java:234)
      at sun.reflect.GeneratedMethodAccessor289.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
      at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:125)
      at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
      at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:91)
      at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:346)
      at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:341)
      at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:101)
      at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:224)
      at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
      at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
      at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
      at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:198)
      at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:946)
      at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:331)
      at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:165)
      at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:181)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
      at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
      at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
      at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
      at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
      at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
      at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
      at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
      at java.lang.Thread.run(Thread.java:722)
      Caused by: java.lang.RuntimeException: Error while binding JNDI name pkgCartBean.CartBeanHome for EJB CartBean
      at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.java:1552)
      at com.sun.ejb.containers.StatefulSessionContainer.initializeHome(StatefulSessionContainer.java:385)
      at com.sun.ejb.containers.StatefulContainerFactory.createContainer(StatefulContainerFactory.java:489)
      at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
      ... 59 more
      Caused by: javax.naming.NameAlreadyBoundException [Root exception is org.omg.CosNaming.NamingContextPackage.AlreadyBound: IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0]
      at com.sun.jndi.cosnaming.ExceptionMapper.mapException(ExceptionMapper.java:92)
      at com.sun.jndi.cosnaming.CNCtx.callBindOrRebind(CNCtx.java:611)
      at com.sun.jndi.cosnaming.CNCtx.bind(CNCtx.java:636)
      at com.sun.jndi.cosnaming.CNCtx.bind(CNCtx.java:674)
      at javax.naming.InitialContext.bind(InitialContext.java:419)
      at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.publishCosNamingObject(GlassfishNamingManagerImpl.java:230)
      at com.sun.ejb.containers.BaseContainer$JndiInfo.publish(BaseContainer.java:4857)
      at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.java:1539)
      ... 62 more
      Caused by: org.omg.CosNaming.NamingContextPackage.AlreadyBound: IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0
      at org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read(AlreadyBoundHelper.java:60)
      at org.omg.CosNaming._NamingContextStub.bind(_NamingContextStub.java:67)
      at com.sun.jndi.cosnaming.CNCtx.callBindOrRebind(CNCtx.java:600)
      ... 68 more
      ]]

      [2013-07-16T15:42:02.606+1000] [glassfish 4.0] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=37 _ThreadName=admin-listener(5)] [timeMillis: 1373953322606] [levelValue: 1000] [[
      Exception during lifecycle processing
      java.lang.RuntimeException: EJB Container initialization error
      at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:234)
      at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
      at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
      at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
      at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:493)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
      at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:356)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
      at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:396)
      at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandSimpInMultOut(CommandResource.java:234)
      at sun.reflect.GeneratedMethodAccessor289.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
      at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:125)
      at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
      at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:91)
      at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:346)
      at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:341)
      at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:101)
      at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:224)
      at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
      at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
      at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
      at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:198)
      at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:946)
      at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:331)
      at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:165)
      at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:181)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
      at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
      at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
      at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
      at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
      at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
      at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
      at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
      at java.lang.Thread.run(Thread.java:722)
      Caused by: java.lang.RuntimeException: Error while binding JNDI name pkgCartBean.CartBeanHome for EJB CartBean
      at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.java:1552)
      at com.sun.ejb.containers.StatefulSessionContainer.initializeHome(StatefulSessionContainer.java:385)
      at com.sun.ejb.containers.StatefulContainerFactory.createContainer(StatefulContainerFactory.java:489)
      at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
      ... 59 more
      Caused by: javax.naming.NameAlreadyBoundException [Root exception is org.omg.CosNaming.NamingContextPackage.AlreadyBound: IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0]
      at com.sun.jndi.cosnaming.ExceptionMapper.mapException(ExceptionMapper.java:92)
      at com.sun.jndi.cosnaming.CNCtx.callBindOrRebind(CNCtx.java:611)
      at com.sun.jndi.cosnaming.CNCtx.bind(CNCtx.java:636)
      at com.sun.jndi.cosnaming.CNCtx.bind(CNCtx.java:674)
      at javax.naming.InitialContext.bind(InitialContext.java:419)
      at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.publishCosNamingObject(GlassfishNamingManagerImpl.java:230)
      at com.sun.ejb.containers.BaseContainer$JndiInfo.publish(BaseContainer.java:4857)
      at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.java:1539)
      ... 62 more
      Caused by: org.omg.CosNaming.NamingContextPackage.AlreadyBound: IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0
      at org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read(AlreadyBoundHelper.java:60)
      at org.omg.CosNaming._NamingContextStub.bind(_NamingContextStub.java:67)
      at com.sun.jndi.cosnaming.CNCtx.callBindOrRebind(CNCtx.java:600)
      ... 68 more
      ]]

      [2013-07-16T15:42:02.606+1000] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=37 _ThreadName=admin-listener(5)] [timeMillis: 1373953322606] [levelValue: 1000] [[
      Exception while loading the app]]

      [2013-07-16T15:42:02.622+1000] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=37 _ThreadName=admin-listener(5)] [timeMillis: 1373953322622] [levelValue: 1000] [[
      Exception while loading the app : EJB Container initialization error
      java.lang.RuntimeException: Error while binding JNDI name pkgCartBean.CartBeanHome for EJB CartBean
      at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.java:1552)
      at com.sun.ejb.containers.StatefulSessionContainer.initializeHome(StatefulSessionContainer.java:385)
      at com.sun.ejb.containers.StatefulContainerFactory.createContainer(StatefulContainerFactory.java:489)
      at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
      at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
      at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
      at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
      at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:493)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
      at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:356)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
      at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:396)
      at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandSimpInMultOut(CommandResource.java:234)
      at sun.reflect.GeneratedMethodAccessor289.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
      at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:125)
      at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
      at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:91)
      at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:346)
      at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:341)
      at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:101)
      at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:224)
      at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
      at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
      at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
      at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:198)
      at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:946)
      at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:331)
      at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:165)
      at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:181)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
      at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
      at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
      at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
      at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
      at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
      at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
      at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
      at java.lang.Thread.run(Thread.java:722)
      Caused by: javax.naming.NameAlreadyBoundException [Root exception is org.omg.CosNaming.NamingContextPackage.AlreadyBound: IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0]
      at com.sun.jndi.cosnaming.ExceptionMapper.mapException(ExceptionMapper.java:92)
      at com.sun.jndi.cosnaming.CNCtx.callBindOrRebind(CNCtx.java:611)
      at com.sun.jndi.cosnaming.CNCtx.bind(CNCtx.java:636)
      at com.sun.jndi.cosnaming.CNCtx.bind(CNCtx.java:674)
      at javax.naming.InitialContext.bind(InitialContext.java:419)
      at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.publishCosNamingObject(GlassfishNamingManagerImpl.java:230)
      at com.sun.ejb.containers.BaseContainer$JndiInfo.publish(BaseContainer.java:4857)
      at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.java:1539)
      ... 62 more
      Caused by: org.omg.CosNaming.NamingContextPackage.AlreadyBound: IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0
      at org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read(AlreadyBoundHelper.java:60)
      at org.omg.CosNaming._NamingContextStub.bind(_NamingContextStub.java:67)
      at com.sun.jndi.cosnaming.CNCtx.callBindOrRebind(CNCtx.java:600)
      ... 68 more
      ]]

        Activity

        Hide
        kumara added a comment -

        AFAIK, this is expected. Deploy with a name of the form <name>:<number> creates a new version of the application that was named <name>. At any one point, only one version is active and therefore there is no conflict in JNDI. However, deploying with another name results in an attempt to load two copies of the application and results in JNDI name conflict leading to deployment failure.

        Show
        kumara added a comment - AFAIK, this is expected. Deploy with a name of the form <name>:<number> creates a new version of the application that was named <name>. At any one point, only one version is active and therefore there is no conflict in JNDI. However, deploying with another name results in an attempt to load two copies of the application and results in JNDI name conflict leading to deployment failure.
        Hide
        xianwu added a comment -
        Show
        xianwu added a comment - I have uploaded the sample application at https://github.com/xianwum/GLASSFISH-20703/blob/master/j2eesample.ear
        Hide
        xianwu added a comment -

        Hi Kumara

        Thanks for your comments.

        Here are two issues.

        First, in asadmin deploy manual, the description on "--name" option did not clearly address the format of <name>

        --name
        Name of the deployable component.

        The name can include an optional version identifier, which follows the name and is separated from the name by a colon (. The version identifier must begin with a letter or number. It can contain alphanumeric characters plus underscore (_), dash , and period (.) characters. For more information about module and application versions, see the Module and Application Versions in Oracle GlassFish Server 3.1 Application Deployment Guide.

        Second, the error message from asadmin command line below
        "remote failure: Error occurred during deployment: Exception while loading the app :
        EJB Container initialization error. Please see server.log for more details.
        Command deploy failed."

        does not tell user what exactly the problem is about.

        I think GlassFish team should improve both the manual page and error message this this.

        Show
        xianwu added a comment - Hi Kumara Thanks for your comments. Here are two issues. First, in asadmin deploy manual, the description on "--name" option did not clearly address the format of <name> --name Name of the deployable component. The name can include an optional version identifier, which follows the name and is separated from the name by a colon ( . The version identifier must begin with a letter or number. It can contain alphanumeric characters plus underscore (_), dash , and period (.) characters. For more information about module and application versions, see the Module and Application Versions in Oracle GlassFish Server 3.1 Application Deployment Guide. Second, the error message from asadmin command line below "remote failure: Error occurred during deployment: Exception while loading the app : EJB Container initialization error. Please see server.log for more details. Command deploy failed." does not tell user what exactly the problem is about. I think GlassFish team should improve both the manual page and error message this this.
        Hide
        marina vatkina added a comment -

        Note that the actual error is covered by https://java.net/jira/browse/GLASSFISH-19036

        Show
        marina vatkina added a comment - Note that the actual error is covered by https://java.net/jira/browse/GLASSFISH-19036
        Hide
        xianwu added a comment -

        Hi Kumara,

        I have found that the usage of "--name" option is very confusing.

        I have two more samples of deployment with <name>, CartBean.jar and web_ejb_ok.jar. The first failed if the second <name> is different from initial <name> but the second accepts different <name> without error. See details below.

        1) Deployment of CartBean.jar (https://github.com/xianwum/GLASSFISH-20703/blob/master/CartBean.jar?raw=true) with a second <name> failed
        asadmin deploy --name cart CartBean.jar
        Application deployed with name cart.
        Command deploy executed successfully.

        asadmin deploy --name cart1 CartBean.jar
        remote failure: Error occurred during deployment: Exception while loading the app : EJB Container initialization error. Please see server.log for more details.
        Command deploy failed.

        Here is the server.log
        [2013-07-17T09:23:08.565+1000] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=54 _ThreadName=admin-listener(3)] [timeMillis: 1374016988565] [levelValue: 1000] [[
        Exception while loading the app : EJB Container initialization error
        java.lang.RuntimeException: Error while binding JNDI name pkgCartBean.CartBeanHome for EJB CartBean
        at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.java:1552)
        at com.sun.ejb.containers.StatefulSessionContainer.initializeHome(StatefulSessionContainer.java:385)
        at com.sun.ejb.containers.StatefulContainerFactory.createContainer(StatefulContainerFactory.java:489)
        at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
        at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
        at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)

        2) Deployment of web_ejb_ok.jar (https://github.com/xianwum/GLASSFISH-20703/blob/master/web_ejb_ok.jar?raw=true) with a second <name> is successful

        asadmin deploy --name webejb web_ejb_ok.jar
        Application deployed with name webejb.
        Command deploy executed successfully.

        asadmin deploy --name webejb1 web_ejb_ok.jar
        Application deployed with name webejb1.
        Command deploy executed successfully.

        It looks to me that a different <name> is acceptable at certain conditions.

        I hope GlassFish team should add descriptions in deploy manual to details of how to use <name>.
        In addition, if an invalid <name> is provided, the command line should provide accurate
        error messages to tell user what is wrong.

        Can you please help to further investigate?

        Regards, Xianwu

        Show
        xianwu added a comment - Hi Kumara, I have found that the usage of "--name" option is very confusing. I have two more samples of deployment with <name>, CartBean.jar and web_ejb_ok.jar. The first failed if the second <name> is different from initial <name> but the second accepts different <name> without error. See details below. 1) Deployment of CartBean.jar ( https://github.com/xianwum/GLASSFISH-20703/blob/master/CartBean.jar?raw=true ) with a second <name> failed asadmin deploy --name cart CartBean.jar Application deployed with name cart. Command deploy executed successfully. asadmin deploy --name cart1 CartBean.jar remote failure: Error occurred during deployment: Exception while loading the app : EJB Container initialization error. Please see server.log for more details. Command deploy failed. Here is the server.log [2013-07-17T09:23:08.565+1000] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=54 _ThreadName=admin-listener(3)] [timeMillis: 1374016988565] [levelValue: 1000] [[ Exception while loading the app : EJB Container initialization error java.lang.RuntimeException: Error while binding JNDI name pkgCartBean.CartBeanHome for EJB CartBean at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.java:1552) at com.sun.ejb.containers.StatefulSessionContainer.initializeHome(StatefulSessionContainer.java:385) at com.sun.ejb.containers.StatefulContainerFactory.createContainer(StatefulContainerFactory.java:489) at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221) at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291) at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99) 2) Deployment of web_ejb_ok.jar ( https://github.com/xianwum/GLASSFISH-20703/blob/master/web_ejb_ok.jar?raw=true ) with a second <name> is successful asadmin deploy --name webejb web_ejb_ok.jar Application deployed with name webejb. Command deploy executed successfully. asadmin deploy --name webejb1 web_ejb_ok.jar Application deployed with name webejb1. Command deploy executed successfully. It looks to me that a different <name> is acceptable at certain conditions. I hope GlassFish team should add descriptions in deploy manual to details of how to use <name>. In addition, if an invalid <name> is provided, the command line should provide accurate error messages to tell user what is wrong. Can you please help to further investigate? Regards, Xianwu
        Hide
        Hong Zhang added a comment -

        xianwu: there is nothing in the server code to prevent a user from deploying the same application bits multiple times with different names as this could be a useful use case for some users. There is really no "invalid" name here as far as the deployment infrastructure is concerned. The users need to make sure these multiple deployments don't cause conflicts if they want to do this kind of multiple deployments. If they cause conflicts, in the case of your example 1), the error message would tell you why they cause conflict, in this case, the JNDI names.

        Show
        Hong Zhang added a comment - xianwu: there is nothing in the server code to prevent a user from deploying the same application bits multiple times with different names as this could be a useful use case for some users. There is really no "invalid" name here as far as the deployment infrastructure is concerned. The users need to make sure these multiple deployments don't cause conflicts if they want to do this kind of multiple deployments. If they cause conflicts, in the case of your example 1), the error message would tell you why they cause conflict, in this case, the JNDI names.
        Hide
        xianwu added a comment -

        Hi Hong

        I understand the complexity of handling multiple deployments.
        What I tried to say is to provide informative error messages from command line if the deployment failed.

        See a sample from the deployment of war file.

        asadmin deploy --name cart cart.war
        Application deployed with name cart.
        Command deploy executed successfully.

        asadmin deploy --name cart1 cart.war
        remote failure: Error occurred during deployment: Exception while loading the app :
        java.lang.Exception: Virtual server server already has a web module cart loaded
        at /cart therefore web module cart1 cannot be loaded at this context path on
        this virtual server. Please see server.log for more details.
        Command deploy failed.

        Obviously, user will know what is wrong from the errors above.

        In case of deployment failure of a jar or ear due to a conflict of JNDI names,
        the code should catch the exception and provide errors like "There is a JNDI name conflict...",
        instead of simply throwing the exception to the top caller and asking users to check server.log.

        Regards, Xianwu

        Show
        xianwu added a comment - Hi Hong I understand the complexity of handling multiple deployments. What I tried to say is to provide informative error messages from command line if the deployment failed. See a sample from the deployment of war file. asadmin deploy --name cart cart.war Application deployed with name cart. Command deploy executed successfully. asadmin deploy --name cart1 cart.war remote failure: Error occurred during deployment: Exception while loading the app : java.lang.Exception: Virtual server server already has a web module cart loaded at /cart therefore web module cart1 cannot be loaded at this context path on this virtual server. Please see server.log for more details. Command deploy failed. Obviously, user will know what is wrong from the errors above. In case of deployment failure of a jar or ear due to a conflict of JNDI names, the code should catch the exception and provide errors like "There is a JNDI name conflict...", instead of simply throwing the exception to the top caller and asking users to check server.log. Regards, Xianwu
        Hide
        Hong Zhang added a comment -

        I see your point. The deployment code is just displaying what's propagated from the container code where the error happens and it's not always easy for the container to propagate the root cause back depending on the involved method stacks (so the error message would always point user to look at the server.log for more details). I will let ejb team take a look to see if it's possible to propagate the JNDI error as part of EJB container initialization error in this case.

        Show
        Hong Zhang added a comment - I see your point. The deployment code is just displaying what's propagated from the container code where the error happens and it's not always easy for the container to propagate the root cause back depending on the involved method stacks (so the error message would always point user to look at the server.log for more details). I will let ejb team take a look to see if it's possible to propagate the JNDI error as part of EJB container initialization error in this case.

          People

          • Assignee:
            marina vatkina
            Reporter:
            xianwu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: