Details
Description
1.add the following to the top of bin/catalina.sh:
CATALINA_OPTS="${CATALINA_OPTS} -Djava.security.manager"
CATALINA_OPTS="${CATALINA_OPTS} -Djava.security.policy=/apache-tomee-webprofile-1.5.0/conf/catalina.policy"
2.$ sh bin/catalina.sh run
3.errors:
INFO: Creating SecurityService(id=Tomcat Security Service)
Jul 3, 2014 7:52:04 PM org.apache.openejb.OpenEJB$Instance <init>
SEVERE: OpenEJB has encountered a fatal error and cannot be started: The Assembler encountered an unexpected error while attempting to build the container system.
java.lang.ClassCircularityError: javax/security/jacc/PolicyContext
at org.apache.openejb.core.security.jacc.BasicJaccProvider.implies(BasicJaccProvider.java:74)
at org.apache.openejb.core.security.JaccProvider$Policy.implies(JaccProvider.java:122)
at java.security.ProtectionDomain.implies(ProtectionDomain.java:224)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:352)
at java.security.AccessController.checkPermission(AccessController.java:549)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
at java.io.File.exists(File.java:731)
at sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java:999)
at sun.misc.URLClassPath.getResource(URLClassPath.java:169)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:353)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:144)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:290)
at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:231)
at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:131)
at org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:113)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
at org.apache.catalina.startup.Catalina.load(Catalina.java:633)
at org.apache.catalina.startup.Catalina.load(Catalina.java:658)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
....
SEVERE: TomEE Listener can't start OpenEJB
org.apache.openejb.OpenEJBException: OpenEJB has encountered a fatal error and cannot be started: The Assembler encountered an unexpected error while attempting to build the container system.: javax/security/jacc/PolicyContext
....
Caused by: java.lang.ClassCircularityError: javax/security/jacc/PolicyContext
....
Attachments
Issue Links
- is duplicated by
-
TOMEE-1267 Can not start tomee with : $ sh catalina.sh run -security
- Resolved