glassfish
  1. glassfish
  2. GLASSFISH-20704

deployment failed with "--name" option for web application (*.war)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 4.0_b89_RC5
    • Fix Version/s: 4.1
    • Component/s: deployment
    • 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.war with a name as "j2eesample" works
      asadmin deploy --name j2eesample j2eesample.war

      2) deployment of j2eesample.war with a name and version as "j2eesample:1" failed
      asadmin deploy --name j2eesample:1 j2eesample.war

      C:\GF_Feedback>asadmin deploy --name j2eesample:1 j2eesample.war
      remote failure: Error occurred during deployment: Exception while loading the app :
      Error in committing security policy for ejbs of j2eesample:1 – javax.security.jacc.PolicyContextException: java.lang.RuntimeException:
      unable to create policy context directory. Please see server.log for more details.
      Command deploy failed.

      Below are loggings from server.log

      [2013-07-16T16:33:22.070+1000] [glassfish 4.0] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=34 _ThreadName=admin-listener(2)] [timeMillis: 1373956402070] [levelValue: 800] [[
      visiting unvisited references]]

      [2013-07-16T16:33:22.102+1000] [glassfish 4.0] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=34 _ThreadName=admin-listener(2)] [timeMillis: 1373956402102] [levelValue: 800] [[
      visiting unvisited references]]

      [2013-07-16T16:33:22.102+1000] [glassfish 4.0] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=34 _ThreadName=admin-listener(2)] [timeMillis: 1373956402102] [levelValue: 800] [[
      visiting unvisited references]]

      [2013-07-16T16:33:22.117+1000] [glassfish 4.0] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=34 _ThreadName=admin-listener(2)] [timeMillis: 1373956402117] [levelValue: 800] [[
      visiting unvisited references]]

      [2013-07-16T16:33:22.226+1000] [glassfish 4.0] [WARNING] [] [com.sun.xml.ws.transport.http.servlet.ServletAdapter] [tid: _ThreadID=34 _ThreadName=admin-listener(2)] [timeMillis: 1373956402226] [levelValue: 900] [[
      Container org.glassfish.webservices.JAXWSContainer@58a3f61e doesn't support class com.sun.xml.ws.api.server.Module]]

      [2013-07-16T16:33:22.226+1000] [glassfish 4.0] [INFO] [ejb.portable_jndi_names] [javax.enterprise.system.container.ejb.com.sun.ejb.containers] [tid: _ThreadID=34 _ThreadName=admin-listener(2)] [timeMillis: 1373956402226] [levelValue: 800] [[
      EJB5181:Portable JNDI names for EJB HelloEJBa: [java:global/j2eesample/HelloEJBa!endpoint.Hello, java:global/j2eesample/HelloEJBa]]]

      [2013-07-16T16:33:22.226+1000] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=34 _ThreadName=admin-listener(2)] [timeMillis: 1373956402226] [levelValue: 1000] [[
      Unable to directory for policy context: [C:\glassfish-4.0-b89\glassfish4\glassfish\domains\domain1/generated/policy\j2eesample:1/j2eesample_1_internal]]]

      [2013-07-16T16:33:22.242+1000] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=34 _ThreadName=admin-listener(2)] [timeMillis: 1373956402242] [levelValue: 1000] [[
      "commit failed for policy context [j2eesample:1/j2eesample_1_internal] caught java.lang.RuntimeException: unable to create policy context directory.]]

      [2013-07-16T16:33:22.242+1000] [glassfish 4.0] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=34 _ThreadName=admin-listener(2)] [timeMillis: 1373956402242] [levelValue: 1000] [[
      Exception during lifecycle processing
      org.glassfish.deployment.common.DeploymentException: Error in committing security policy for ejbs of j2eesample:1 – javax.security.jacc.PolicyContextException: java.lang.RuntimeException: unable to create policy context directory
      at com.sun.enterprise.security.ee.SecurityUtil.generatePolicyFile(SecurityUtil.java:250)
      at com.sun.enterprise.security.ee.SecurityDeployer.commitEjbs(SecurityDeployer.java:284)
      at com.sun.enterprise.security.ee.SecurityDeployer.access$200(SecurityDeployer.java:87)
      at com.sun.enterprise.security.ee.SecurityDeployer$AppDeployEventListener.event(SecurityDeployer.java:146)
      at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
      at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:328)
      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)
      ]]

      [2013-07-16T16:33:22.242+1000] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=34 _ThreadName=admin-listener(2)] [timeMillis: 1373956402242] [levelValue: 1000] [[
      Exception while loading the app]]

      [2013-07-16T16:33:22.242+1000] [glassfish 4.0] [SEVERE] [AS-WEB-GLUE-00192] [javax.enterprise.web] [tid: _ThreadID=34 _ThreadName=admin-listener(2)] [timeMillis: 1373956402242] [levelValue: 1000] [[
      Undeployment failed for context /helloweb]]

      [2013-07-16T16:33:22.242+1000] [glassfish 4.0] [SEVERE] [] [org.jboss.weld.Bootstrap] [tid: _ThreadID=519 _ThreadName=pool-368-thread-1] [timeMillis: 1373956402242] [levelValue: 1000] [[
      Exception(s) thrown during observer of BeforeShutdown]]

      [2013-07-16T16:33:22.242+1000] [glassfish 4.0] [SEVERE] [] [org.jboss.weld.Bootstrap] [tid: _ThreadID=519 _ThreadName=pool-368-thread-1] [timeMillis: 1373956402242] [levelValue: 1000] [[

      java.lang.NullPointerException
      at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:63)
      at org.jboss.weld.bootstrap.events.BeforeShutdownImpl.fire(BeforeShutdownImpl.java:48)
      at org.jboss.weld.bootstrap.events.BeforeShutdownImpl.fire(BeforeShutdownImpl.java:39)
      at org.jboss.weld.bootstrap.WeldBootstrap.shutdown(WeldBootstrap.java:642)
      at org.glassfish.weld.WeldDeployer.doBootstrapShutdown(WeldDeployer.java:309)
      at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:276)
      at org.glassfish.kernel.event.EventsImpl$1.run(EventsImpl.java:123)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)
      ]]

      [2013-07-16T16:33:22.242+1000] [glassfish 4.0] [WARNING] [] [org.glassfish.weld.WeldDeployer] [tid: _ThreadID=519 _ThreadName=pool-368-thread-1] [timeMillis: 1373956402242] [levelValue: 900] [[
      AS-CDI-036]]

      [2013-07-16T16:33:22.242+1000] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=34 _ThreadName=admin-listener(2)] [timeMillis: 1373956402242] [levelValue: 1000] [[
      Exception while loading the app : Error in committing security policy for ejbs of j2eesample:1 – javax.security.jacc.PolicyContextException: java.lang.RuntimeException: unable to create policy context directory]]

        Issue Links

          Activity

          Hide
          Jeremy_Lv added a comment -

          Hi, xianwu:

          Pls take a look about the issue GLASSFISH-18789, I think the similar bug can't be reproduced in the latest trunk of the glassfish after I have fix the GLASSFISH-18789

          Thanks

          Show
          Jeremy_Lv added a comment - Hi, xianwu: Pls take a look about the issue GLASSFISH-18789 , I think the similar bug can't be reproduced in the latest trunk of the glassfish after I have fix the GLASSFISH-18789 Thanks
          Hide
          xianwu added a comment -

          Hi Jeremy,

          Thanks for your advice.

          I have tried it at the latest glassfish build (glassfish-4.0.1-b02-07_15_2013.zip) and the issue is resolved.

          Regards, Xianwu

          Show
          xianwu added a comment - Hi Jeremy, Thanks for your advice. I have tried it at the latest glassfish build (glassfish-4.0.1-b02-07_15_2013.zip) and the issue is resolved. Regards, Xianwu
          Hide
          Hong Zhang added a comment -

          Resolving this issue as duplicate of 18789 based on Jeremy and xianwu's comments.

          Show
          Hong Zhang added a comment - Resolving this issue as duplicate of 18789 based on Jeremy and xianwu's comments.

            People

            • Assignee:
              Hong Zhang
              Reporter:
              xianwu
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: