Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-45894

PACL - Unable to compile java security manager

    Details

    • Fix Priority:
      5

      Description

      Steps to reproduce:
      1. Unzip a tomcat bundle from source using this command:

      ant -f build-dist.xml unzip-tomcat -Djava.security=true

      2. Set this in the portal-ext.properties:

      portal.security.manager.strategy=liferay

      3. Ant all

      Expected result:
      Successful compile.

      Actual result:
      Errors on compile.

      build-db:
           [java] JVM args ignored when same JVM is used.
           [java] Loading file:/D:/github/private/master-portal/portal-impl/classes/system.properties
           [java] Loading file:/D:/github/private/master-portal/portal-impl/classes/system-ext.properties
           [java] Loading file:/D:/github/private/master-portal/portal-impl/classes/portal.properties
           [java] Loading file:/D:/github/private/master-portal/portal-impl/classes/portal-ext.properties
           [java] java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "setContextClassLoader")
           [java]     at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372)
           [java]     at java.security.AccessController.checkPermission(AccessController.java:559)
           [java]     at com.liferay.portal.security.pacl.PortalSecurityManagerImpl.checkPermission(PortalSecurityManagerImpl.java:299)
           [java]     at java.lang.Thread.setContextClassLoader(Thread.java:1503)
           [java]     at org.apache.tools.ant.util.LoaderUtils.setContextClassLoader(LoaderUtils.java:43)
           [java]     at org.apache.tools.ant.AntClassLoader.resetThreadContextLoader(AntClassLoader.java:428)
           [java]     at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:197)
           [java]     at org.apache.tools.ant.taskdefs.Java.run(Java.java:771)
           [java]     at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:221)
           [java]     at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
           [java]     at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
           [java]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
           [java]     at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
           [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           [java]     at java.lang.reflect.Method.invoke(Method.java:606)
           [java]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
           [java]     at org.apache.tools.ant.Task.perform(Task.java:348)
           [java]     at org.apache.tools.ant.Target.execute(Target.java:435)
           [java]     at org.apache.tools.ant.Target.performTasks(Target.java:456)
           [java]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
           [java]     at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
           [java]     at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
           [java]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:440)
           [java]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
           [java]     at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
           [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           [java]     at java.lang.reflect.Method.invoke(Method.java:606)
           [java]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
           [java]     at org.apache.tools.ant.Task.perform(Task.java:348)
           [java]     at org.apache.tools.ant.Target.execute(Target.java:435)
           [java]     at org.apache.tools.ant.Target.performTasks(Target.java:456)
           [java]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
           [java]     at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
           [java]     at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
           [java]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:440)
           [java]     at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
           [java]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
           [java]     at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
           [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           [java]     at java.lang.reflect.Method.invoke(Method.java:606)
           [java]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
           [java]     at org.apache.tools.ant.Task.perform(Task.java:348)
           [java]     at org.apache.tools.ant.Target.execute(Target.java:435)
           [java]     at org.apache.tools.ant.Target.performTasks(Target.java:456)
           [java]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
           [java]     at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
           [java]     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
           [java]     at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
           [java]     at org.apache.tools.ant.Main.runBuild(Main.java:851)
           [java]     at org.apache.tools.ant.Main.startAnt(Main.java:235)
           [java]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
           [java]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
           [java] Java Result: -1
       
      BUILD FAILED
      java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "setIO")
              at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372)
              at java.security.AccessController.checkPermission(AccessController.java:559)
              at com.liferay.portal.security.pacl.PortalSecurityManagerImpl.checkPermission(PortalSecurityManagerImpl.java:299)
              at java.lang.System.checkIO(System.java:250)
              at java.lang.System.setOut(System.java:172)
              at org.apache.tools.ant.Main.runBuild(Main.java:859)
              at org.apache.tools.ant.Main.startAnt(Main.java:235)
              at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
              at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
       
      Total time: 1 minute 33 seconds
       
      Exception: java.security.AccessControlException thrown from the UncaughtExceptionHandler in thread "main"
       
      Exception: java.security.AccessControlException thrown from the UncaughtExceptionHandler in thread "Thread-14"

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                5 years, 27 weeks, 5 days ago

                Packages

                Version Package
                7.0.0 M3