3 Replies Latest reply on Dec 6, 2012 6:20 AM by Darryl Miles

    Deployment error: java.lang.SecurityException: Prohibited package name

    bjansen Newbie

      Hi all,

       

      I am trying to deploy a Java EE 6 webapp on JBoss AS 7, but I am stuck with a strange exception. I have a stateless EJB which implements java.util.concurrent.Executor (as described here: http://www.adam-bien.com/roller/abien/entry/conveniently_transactionally_and_legally_starting). I get the following exception:

       

      15:38:18,502 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."stackhunter-webapp-2.0-SNAPSHOT-war.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."stackhunter-webapp-2.0-SNAPSHOT-war.war".INSTALL: Failed to process phase INSTALL of deployment "stackhunter-webapp-2.0-SNAPSHOT-war.war"

                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_33]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_33]

                at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_33]

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011030: Could not configure component TransactionalExecutor

                at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:92)

                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                ... 5 more

      Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

                at org.jboss.classfilewriter.ClassFile.define(ClassFile.java:280)

                at org.jboss.invocation.proxy.AbstractClassFactory.defineClass(AbstractClassFactory.java:164)

                at org.jboss.invocation.proxy.AbstractProxyFactory.getCachedMethods(AbstractProxyFactory.java:145)

                at org.jboss.as.ejb3.component.stateless.StatelessComponentDescription$3.configure(StatelessComponentDescription.java:138)

                at org.jboss.as.ee.component.ComponentDescription$DefaultComponentConfigurator.configure(ComponentDescription.java:921)

                at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:81)

                ... 6 more

      Caused by: java.lang.reflect.InvocationTargetException

                at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) [:1.6.0_33]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_33]

                at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_33]

                at org.jboss.classfilewriter.ClassFile.define(ClassFile.java:275)

                ... 11 more

      Caused by: java.lang.SecurityException: Prohibited package name: java.util.concurrent

                at java.lang.ClassLoader.preDefineClass(ClassLoader.java:479) [rt.jar:1.6.0_33]

                at java.lang.ClassLoader.defineClassCond(ClassLoader.java:625) [rt.jar:1.6.0_33]

                at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [rt.jar:1.6.0_33]

                ... 15 more

       

       

      I get the same kind of error if I implement Comparable instead of Executor. But if I don't implement any interface coming from the JDK it works.

      Also, I can successfully deploy my app on glassfish.

       

      (None of my class is located in a java.* package)

       

      Thanks for your help.