Groovy
  1. Groovy
  2. GROOVY-1386

command line tools fail with SecurityException on OSX

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.0-JSR-6
    • Fix Version/s: 1.0-RC-1
    • Component/s: None
    • Labels:
      None
    • Environment:
      mac os x 10.4.7, java 1.5.0_06

      Description

      running groovy, groovysh or groovyc results in
      java.lang.SecurityException: Prohibited package name: java.lang
      at java.lang.ClassLoader.preDefineClass(ClassLoader.java:479)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:614)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
      at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:143)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
      at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:143)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:121)
      at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:160)

        Activity

        Andy Fyfe created issue -
        Hide
        Jochen Theodorou added a comment -

        is it possible that you have the rt.jar or any other class containing a java.lang class in your classpath?

        Show
        Jochen Theodorou added a comment - is it possible that you have the rt.jar or any other class containing a java.lang class in your classpath?
        Hide
        Andy Fyfe added a comment -

        I have nothing in my classpath.

        If I change the startGroovy script to set TOOLS_JAR to the empty string, then I can run the various scripts. The darwin variant for TOOLS_JAR, /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes/classes.jar, has many classes in java.lang.

        Show
        Andy Fyfe added a comment - I have nothing in my classpath. If I change the startGroovy script to set TOOLS_JAR to the empty string, then I can run the various scripts. The darwin variant for TOOLS_JAR, /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes/classes.jar, has many classes in java.lang.
        Hide
        Auston McReynolds added a comment -

        I'm experiencing the exact same problem with groovy-1.0-jsr-06, groovy-1.0-jsr-05 works great.
        OS: Windows 2000

        java.lang.SecurityException: java.lang.Object - protected system package 'java.lang'
        at java.lang.ClassLoader.checkClassName(ClassLoader.java:163)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:205)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:146)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:555)
        at java.net.URLClassLoader.access$400(URLClassLoader.java:118)
        at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:958)
        at java.security.AccessController.doPrivileged(AccessController.java:270)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:486)
        at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:143)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:517)
        at java.lang.ClassLoader.defineClassImpl(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:218)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:146)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:555)
        at java.net.URLClassLoader.access$400(URLClassLoader.java:118)
        at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:958)
        at java.security.AccessController.doPrivileged(AccessController.java:270)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:486)
        at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:143)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:517)
        at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:121)
        at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:160)

        Show
        Auston McReynolds added a comment - I'm experiencing the exact same problem with groovy-1.0-jsr-06, groovy-1.0-jsr-05 works great. OS: Windows 2000 java.lang.SecurityException: java.lang.Object - protected system package 'java.lang' at java.lang.ClassLoader.checkClassName(ClassLoader.java:163) at java.lang.ClassLoader.defineClass(ClassLoader.java:205) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:146) at java.net.URLClassLoader.defineClass(URLClassLoader.java:555) at java.net.URLClassLoader.access$400(URLClassLoader.java:118) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:958) at java.security.AccessController.doPrivileged(AccessController.java:270) at java.net.URLClassLoader.findClass(URLClassLoader.java:486) at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:143) at java.lang.ClassLoader.loadClass(ClassLoader.java:517) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:218) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:146) at java.net.URLClassLoader.defineClass(URLClassLoader.java:555) at java.net.URLClassLoader.access$400(URLClassLoader.java:118) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:958) at java.security.AccessController.doPrivileged(AccessController.java:270) at java.net.URLClassLoader.findClass(URLClassLoader.java:486) at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:143) at java.lang.ClassLoader.loadClass(ClassLoader.java:517) at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:121) at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:160)
        Hide
        Daniel Sadilek added a comment -

        I encountered the same error. When I changed these lines in startGroovy

        1. For Darwin, use classes.jar for TOOLS_JAR
          TOOLS_JAR="$JAVA_HOME/lib/tools.jar"
          if $darwin; then
          TOOLS_JAR="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes/classes.jar"
          fi

        to

        TOOLS_JAR="$JAVA_HOME/lib/tools.jar"

        i.e. deleted the darwin-specific part, it worked fine.

        For what reason has this darwin-specific part been added? Perhaps it just can be deleted!?

        Show
        Daniel Sadilek added a comment - I encountered the same error. When I changed these lines in startGroovy For Darwin, use classes.jar for TOOLS_JAR TOOLS_JAR="$JAVA_HOME/lib/tools.jar" if $darwin; then TOOLS_JAR="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes/classes.jar" fi to TOOLS_JAR="$JAVA_HOME/lib/tools.jar" i.e. deleted the darwin-specific part, it worked fine. For what reason has this darwin-specific part been added? Perhaps it just can be deleted!?
        Hide
        Marc Palmer added a comment -

        Argh I am on OSX and have the same problem. I don't recall having these problems before with JSR-05

        Show
        Marc Palmer added a comment - Argh I am on OSX and have the same problem. I don't recall having these problems before with JSR-05
        Hide
        Marc Palmer added a comment -

        On the mailing list David Budworth suggest this - and it works:

        You need to remove rt.jar from the classpath. The groovy shell script "startGroovy" has around line 158 a line that says
        if $darwin; then
        TOOLS_JAR="/path/to/jdk/classes.jar"
        fi

        just comment out those 3 lines. they don't apply to Apple's JDK 1.5 (which is what is default on new macs)

        So it looks like just an issue with the startGroovy script

        Show
        Marc Palmer added a comment - On the mailing list David Budworth suggest this - and it works: You need to remove rt.jar from the classpath. The groovy shell script "startGroovy" has around line 158 a line that says if $darwin; then TOOLS_JAR="/path/to/jdk/classes.jar" fi just comment out those 3 lines. they don't apply to Apple's JDK 1.5 (which is what is default on new macs) So it looks like just an issue with the startGroovy script
        Hide
        Marc Palmer added a comment -

        The issue is now, is this only an issue with JDK 1.5 on Macs, or does it apply to JDK 1.4 also? If it's only 1.5 we need to detect the 1.5 VM and only set TOOLS_JAR to a value if it is not 1.5

        Show
        Marc Palmer added a comment - The issue is now, is this only an issue with JDK 1.5 on Macs, or does it apply to JDK 1.4 also? If it's only 1.5 we need to detect the 1.5 VM and only set TOOLS_JAR to a value if it is not 1.5
        Hide
        Marc Palmer added a comment -

        I would suggest this is raised to blocker as it prevents use of Groovy out of the box on Macs

        Show
        Marc Palmer added a comment - I would suggest this is raised to blocker as it prevents use of Groovy out of the box on Macs
        Jochen Theodorou made changes -
        Field Original Value New Value
        Priority Major [ 3 ] Blocker [ 1 ]
        Jochen Theodorou made changes -
        Fix Version/s 1.0-RC-1 [ 12104 ]
        Hide
        Jochen Theodorou added a comment -

        it mades me think... why do we insert the tools.jar? We don't use it in the command line based groovy. And even if, the system loader should load it for us. And RootLoader needs a check to not to load classes from the rt.jar.. We could do this by looking into the jar and if there is a java.lang.Object or such, then we could remove the jar from the path... That would work. But the best approach would be to not to put so many things into the Rootlaoder and especially not to load the classpath blindly into the RootLoader. jsut asking the SystemLoader to load a class first is no option, since the system loader may have an jar we don't want to have. If you think back, that was the reason for using that class.

        Show
        Jochen Theodorou added a comment - it mades me think... why do we insert the tools.jar? We don't use it in the command line based groovy. And even if, the system loader should load it for us. And RootLoader needs a check to not to load classes from the rt.jar.. We could do this by looking into the jar and if there is a java.lang.Object or such, then we could remove the jar from the path... That would work. But the best approach would be to not to put so many things into the Rootlaoder and especially not to load the classpath blindly into the RootLoader. jsut asking the SystemLoader to load a class first is no option, since the system loader may have an jar we don't want to have. If you think back, that was the reason for using that class.
        Hide
        Andy Fyfe added a comment -

        This does not appear to be specific to jse 5.0 on the mac.

        If I change startGroovy to set TOOLS_JAR="$JAVA_HOME/../Classes/classes.jar", I get the same error regardless of whether JAVA_HOME is pointing to 1.4.2 or 1.5.0. Pointing JAVA_HOME at 1.3.1 gives me an UnsupportedClassVersionError, which is not unexpected since groovy requires jdk 1.4.

        Setting TOOLS_JAR= (ie setting it to nothing) and running groovysh shows either Version: 1.0-JSR-06 JVM: 1.5.0_06-64 or Version: 1.0-JSR-06 JVM: 1.4.2-54.

        Show
        Andy Fyfe added a comment - This does not appear to be specific to jse 5.0 on the mac. If I change startGroovy to set TOOLS_JAR="$JAVA_HOME/../Classes/classes.jar", I get the same error regardless of whether JAVA_HOME is pointing to 1.4.2 or 1.5.0. Pointing JAVA_HOME at 1.3.1 gives me an UnsupportedClassVersionError, which is not unexpected since groovy requires jdk 1.4. Setting TOOLS_JAR= (ie setting it to nothing) and running groovysh shows either Version: 1.0-JSR-06 JVM: 1.5.0_06-64 or Version: 1.0-JSR-06 JVM: 1.4.2-54.
        Hide
        Jason Dillon added a comment -

        Any idea when this will be fixed?

        Show
        Jason Dillon added a comment - Any idea when this will be fixed?
        Hide
        Jochen Theodorou added a comment -

        could you please try a current version? I think the problem is basically fixed

        Show
        Jochen Theodorou added a comment - could you please try a current version? I think the problem is basically fixed
        Hide
        Hugo Solis added a comment -

        Well, I have just douwload the latest version and the problem persist. What so we do?

        Show
        Hugo Solis added a comment - Well, I have just douwload the latest version and the problem persist. What so we do?
        Jochen Theodorou made changes -
        Assignee Guillaume Laforge [ guillaume ] Jochen Theodorou [ blackdrag ]
        Hide
        Jochen Theodorou added a comment -

        ok, one more try. Could someone test this new http://svn.codehaus.org/groovy/trunk/groovy/groovy-core/src/bin/startGroovy ?

        it would still not work if the rt.jar is in the classpath, but if that is not the case, then it should work now out of the box. I expect that the classes.zip is loaded automatically through the system loader without being present in the classpath

        Show
        Jochen Theodorou added a comment - ok, one more try. Could someone test this new http://svn.codehaus.org/groovy/trunk/groovy/groovy-core/src/bin/startGroovy ? it would still not work if the rt.jar is in the classpath, but if that is not the case, then it should work now out of the box. I expect that the classes.zip is loaded automatically through the system loader without being present in the classpath
        Hide
        Alex Plotitsa added a comment -

        I tested and it seems to work

        Show
        Alex Plotitsa added a comment - I tested and it seems to work
        Hide
        Jochen Theodorou added a comment -

        I close the bug as fixed, if there are still problems we will reopen the bug

        Show
        Jochen Theodorou added a comment - I close the bug as fixed, if there are still problems we will reopen the bug
        Jochen Theodorou made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]
        Hide
        Alex Wouda added a comment -

        I get a similar error again on Groovy Version: 1.5.7 JVM: 1.5.0_16 and Win2000.

        I have a script and a WSDL that's causing the problems. How do I attach these?

        Show
        Alex Wouda added a comment - I get a similar error again on Groovy Version: 1.5.7 JVM: 1.5.0_16 and Win2000. I have a script and a WSDL that's causing the problems. How do I attach these?
        Hide
        Travis Wellman added a comment -
        ~$ groovysh
        java.lang.SecurityException: Prohibited package name: java.lang
        	at java.lang.ClassLoader.preDefineClass(ClassLoader.java:476)
        	at java.lang.ClassLoader.defineClass(ClassLoader.java:610)
        	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        	at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
        	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        	at java.security.AccessController.doPrivileged(Native Method)
        	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        	at org.codehaus.groovy.tools.RootLoader.oldFindClass(RootLoader.java:152)
        	at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:124)
        	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
        	at java.lang.ClassLoader.defineClass1(Native Method)
        	at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
        	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        	at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
        	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        	at java.security.AccessController.doPrivileged(Native Method)
        	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        	at org.codehaus.groovy.tools.RootLoader.oldFindClass(RootLoader.java:152)
        	at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:124)
        	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
        	at java.lang.ClassLoader.defineClass1(Native Method)
        	at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
        	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        	at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
        	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        	at java.security.AccessController.doPrivileged(Native Method)
        	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        	at org.codehaus.groovy.tools.RootLoader.oldFindClass(RootLoader.java:152)
        	at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:124)
        	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        	at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:98)
        	at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:130)
        ~$ echo "$CLASSPATH"
        /usr/share/java/*:./lib/*:./*
        ~$ export CLASSPATH='./lib/*:./*'
        ~$ groovysh
        Groovy Shell (1.7.2, JVM: 1.6.0_17)
        Type 'help' or '\h' for help.
        -----------------------------------------------------------------------------------------------------------------------------------------------
        groovy:000> 
        
        ~$ java -version
        java version "1.6.0_17"
        Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
        Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)
        ~$ lsb_release -d
        Description:	Ubuntu 9.04
        ~$ date
        Wed Apr 21 10:31:34 PDT 2010
        
        Show
        Travis Wellman added a comment - ~$ groovysh java.lang.SecurityException: Prohibited package name: java.lang at java.lang.ClassLoader.preDefineClass(ClassLoader.java:476) at java.lang.ClassLoader.defineClass(ClassLoader.java:610) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$000(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at org.codehaus.groovy.tools.RootLoader.oldFindClass(RootLoader.java:152) at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:124) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:616) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$000(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at org.codehaus.groovy.tools.RootLoader.oldFindClass(RootLoader.java:152) at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:124) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:616) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$000(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at org.codehaus.groovy.tools.RootLoader.oldFindClass(RootLoader.java:152) at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:124) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:98) at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:130) ~$ echo "$CLASSPATH" /usr/share/java/*:./lib/*:./* ~$ export CLASSPATH='./lib/*:./*' ~$ groovysh Groovy Shell (1.7.2, JVM: 1.6.0_17) Type 'help' or '\h' for help. ----------------------------------------------------------------------------------------------------------------------------------------------- groovy:000> ~$ java -version java version "1.6.0_17" Java(TM) SE Runtime Environment (build 1.6.0_17-b04) Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing) ~$ lsb_release -d Description: Ubuntu 9.04 ~$ date Wed Apr 21 10:31:34 PDT 2010
        Hide
        Jochen Theodorou added a comment -

        what version of Groovy are you using and is it a fresh installationfrom our zip distribution?

        Show
        Jochen Theodorou added a comment - what version of Groovy are you using and is it a fresh installationfrom our zip distribution?
        Hide
        Daniel McQuillen added a comment -

        I installed groovy-1.8.0 on mac osx 10.6.7 and get the following error when typing "groovy" in the command shell. When I type in "sudo groovy" it works fine.
        Any thoughts or suggestions? Thanks!

        java.lang.SecurityException: Prohibited package name: java.lang
        at java.lang.ClassLoader.preDefineClass(ClassLoader.java:480)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:626)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at org.codehaus.groovy.tools.RootLoader.oldFindClass(RootLoader.java:152)
        at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:124)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at org.codehaus.groovy.tools.RootLoader.oldFindClass(RootLoader.java:152)
        at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:124)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:98)
        at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:130)

        Show
        Daniel McQuillen added a comment - I installed groovy-1.8.0 on mac osx 10.6.7 and get the following error when typing "groovy" in the command shell. When I type in "sudo groovy" it works fine. Any thoughts or suggestions? Thanks! java.lang.SecurityException: Prohibited package name: java.lang at java.lang.ClassLoader.preDefineClass(ClassLoader.java:480) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:626) at java.lang.ClassLoader.defineClass(ClassLoader.java:616) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at org.codehaus.groovy.tools.RootLoader.oldFindClass(RootLoader.java:152) at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:124) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) at java.lang.ClassLoader.defineClass(ClassLoader.java:616) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at org.codehaus.groovy.tools.RootLoader.oldFindClass(RootLoader.java:152) at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:124) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:98) at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:130)
        Hide
        Jochen Theodorou added a comment -

        is it possible for you to find the startGroovy script and the line

        TOOLS_JAR="$JAVA_HOME/lib/tools.jar"

        and replace it by:

        TOOLS_JAR=""

        to see if that fixes the problem?

        Show
        Jochen Theodorou added a comment - is it possible for you to find the startGroovy script and the line TOOLS_JAR="$JAVA_HOME/lib/tools.jar" and replace it by: TOOLS_JAR="" to see if that fixes the problem?
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12730526 ] Default workflow, editable Closed status [ 12742518 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12972260 ] Default workflow, editable Closed status [ 12980065 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        148d 14h 22m 1 Jochen Theodorou 25/Nov/06 05:21

          People

          • Assignee:
            Jochen Theodorou
            Reporter:
            Andy Fyfe
          • Votes:
            6 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development