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

Java.net JIRA | xianwu | 3 years ago
  1. 0

    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]]

    Java.net JIRA | 3 years ago | xianwu
    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
  2. 0

    JPA, EJB with error HHH000262: Table not found: employee

    Stack Overflow | 1 year ago | Meo Beo
    org.glassfish.deployment.common.DeploymentException: Error in linking security policy for autoIdGeneration -- Inconsistent Module State
  3. 0

    Inconsistent Module State after multiple redeployments of ear types

    GitHub | 2 years ago | davewinters
    org.glassfish.deployment.common.DeploymentException: Error in linking security policy for Profit-ear-8.13.0.10 -- Inconsistent Module State
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    What makes it impossible to use EJB injection in my WAB?

    Stack Overflow | 5 years ago | iXĂ´
    org.glassfish.osgijavaeebase.DeploymentException: Deployment of WABPluginToto [366] failed because of following reason: Failed while deploying bundle WABPluginToto [366] : java.lang.RuntimeException: Failed to deploy bundle [ WABPluginToto [366] ], root cause: Exception while loading the app
  6. 0

    OSGI wab deploy fails with "Inconsistent Module State" exception (glassfish 3.1) | Java.net

    java.net | 1 year ago
    org.glassfish.osgijavaeebase.DeploymentException: Deployment of com.mywar [257] failed because of following reason: Failed while deploying bundle com.mywar [257] : java.lang.RuntimeException: Failed to deploy bundle [ com.mywar [257] ], root cause: Exception while loading the app

    2 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. 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()
    2. Java EE Security Core Classes
      SecurityDeployer$AppDeployEventListener.event
      1. com.sun.enterprise.security.ee.SecurityUtil.generatePolicyFile(SecurityUtil.java:250)
      2. com.sun.enterprise.security.ee.SecurityDeployer.commitEjbs(SecurityDeployer.java:284)
      3. com.sun.enterprise.security.ee.SecurityDeployer.access$200(SecurityDeployer.java:87)
      4. com.sun.enterprise.security.ee.SecurityDeployer$AppDeployEventListener.event(SecurityDeployer.java:146)
      4 frames
    3. Kernel Classes
      EventsImpl.send
      1. org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
      1 frame
    4. Private APIs of Glassfish
      ApplicationInfo.load
      1. org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:328)
      1 frame
    5. Kernel Classes
      ApplicationLifecycle.deploy
      1. com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:493)
      2. com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
      2 frames
    6. Embedded GlassFish Web
      DeployCommand.execute
      1. org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
      1 frame
    7. Kernel Classes
      CommandRunnerImpl$2$1.run
      1. com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
      2. com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
      2 frames
    8. Java RT
      Subject.doAs
      1. java.security.AccessController.doPrivileged(Native Method)
      2. javax.security.auth.Subject.doAs(Subject.java:356)
      2 frames
    9. Kernel Classes
      CommandRunnerImpl$ExecutionContext.execute
      1. com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
      2. com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
      3. com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
      4. com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
      5. com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
      6. com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
      6 frames
    10. org.glassfish.admin
      CommandResource.execCommandSimpInMultOut
      1. org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:396)
      2. org.glassfish.admin.rest.resources.admin.CommandResource.execCommandSimpInMultOut(CommandResource.java:234)
      2 frames
    11. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor289.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:601)
      3 frames
    12. jersey-core-server
      ServerRuntime$1.run
      1. org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
      2. org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:125)
      3. org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
      4. org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:91)
      5. org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:346)
      6. org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:341)
      7. org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:101)
      8. org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:224)
      8 frames
    13. Jersey Core
      RequestScope.runInScope
      1. org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
      2. org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
      3. org.glassfish.jersey.internal.Errors.process(Errors.java:315)
      4. org.glassfish.jersey.internal.Errors.process(Errors.java:297)
      5. org.glassfish.jersey.internal.Errors.process(Errors.java:267)
      6. org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
      6 frames
    14. jersey-core-server
      ApplicationHandler.handle
      1. org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:198)
      2. org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:946)
      2 frames
    15. jersey-container-grizzly2-http
      GrizzlyHttpContainer.service
      1. org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:331)
      1 frame
    16. GlassFish Admin
      RestAdapter.service
      1. org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:165)
      2. org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:181)
      2 frames
    17. Kernel Classes
      ContainerMapper.service
      1. com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
      1 frame
    18. Grizzly Server
      HttpServerFilter.handleRead
      1. org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
      2. org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
      3. org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
      3 frames
    19. Grizzly
      AbstractThreadPool$Worker.run
      1. org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
      2. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
      3. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
      4. org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
      5. org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
      6. org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
      7. org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
      8. org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
      9. org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
      10. org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
      11. org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
      12. org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
      13. org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
      13 frames
    20. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:722)
      1 frame