groovy

groovysh not working with JVM 1.4.2_06-b03

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.5
  • Fix Version/s: 1.5.5, 1.6-beta-1
  • Component/s: Groovysh
  • Labels:
    None
  • Environment:
    Groovy Version: 1.5.0
    JVM: 1.4.2_06-b03
    Linux 2.6.11.4-20a-default, x86_64 GNU/Linux

  • Number of attachments :
    0

Description

groovysh doesn't seem to work with JVM 1.4.2. It looks for java/lang/Appendable which is an Interface since JVM 1.5.

Stack trace generated:

linux-server:~ # groovysh
FATAL: java.lang.NoClassDefFoundError: java/lang/Appendable
java.lang.NoClassDefFoundError: java/lang/Appendable
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at org.codehaus.groovy.tools.RootLoader.oldFindClass(RootLoader.java:142)
at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:114)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at jline.ConsoleReader.<init>(ConsoleReader.java:140)
at jline.ConsoleReader.<init>(ConsoleReader.java:188)
at jline.ConsoleReader.<init>(ConsoleReader.java:183)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at org.codehaus.groovy.runtime.MetaClassHelper.doConstructorInvoke(MetaClassHelper.java:526)
at groovy.lang.MetaClassImpl.doConstructorInvoke(MetaClassImpl.java:2284)
at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1179)
at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1109)
at org.codehaus.groovy.runtime.Invoker.invokeConstructorOf(Invoker.java:127)
at org.codehaus.groovy.runtime.InvokerHelper.invokeConstructorOf(InvokerHelper.java:95)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNewN(ScriptBytecodeAdapter.java:225)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.<init>(InteractiveShellRunner.groovy:48)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at org.codehaus.groovy.runtime.MetaClassHelper.doConstructorInvoke(MetaClassHelper.java:526)
at groovy.lang.MetaClassImpl.doConstructorInvoke(MetaClassImpl.java:2284)
at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1179)
at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1109)
at org.codehaus.groovy.runtime.Invoker.invokeConstructorOf(Invoker.java:127)
at org.codehaus.groovy.runtime.InvokerHelper.invokeConstructorOf(InvokerHelper.java:95)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNewN(ScriptBytecodeAdapter.java:225)
at org.codehaus.groovy.tools.shell.Groovysh.run(Groovysh.groovy:513)
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:324)
at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke(ReflectionMetaMethod.java:56)
at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:599)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:903)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:75)
at org.codehaus.groovy.tools.shell.Groovysh.run(Groovysh.groovy:482)
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:324)
at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke(ReflectionMetaMethod.java:56)
at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:599)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:903)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:742)
at org.codehaus.groovy.runtime.Invoker.invokePogoMethod(Invoker.java:99)
at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:79)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:66)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:165)
at org.codehaus.groovy.tools.shell.Main.main(Main.groovy:119)
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:324)
at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:101)
at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:130)

Issue Links

Activity

Hide
Guillaume Laforge added a comment -

Is the problem still present with Groovy 1.5.1?

Show
Guillaume Laforge added a comment - Is the problem still present with Groovy 1.5.1?
Hide
Armin Heinzer added a comment -

Yes, I still have the same problem with version 1.5.1:

linux-server:/opt # groovy -v
Groovy Version: 1.5.1 JVM: 1.4.2_06-b03
linux-server:/opt # groovysh
FATAL: java.lang.NoClassDefFoundError: java/lang/Appendable
java.lang.NoClassDefFoundError: java/lang/Appendable
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)

Show
Armin Heinzer added a comment - Yes, I still have the same problem with version 1.5.1: linux-server:/opt # groovy -v Groovy Version: 1.5.1 JVM: 1.4.2_06-b03 linux-server:/opt # groovysh FATAL: java.lang.NoClassDefFoundError: java/lang/Appendable java.lang.NoClassDefFoundError: java/lang/Appendable at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
Hide
Paul King added a comment -

Looks like jline has had a dependency on Java 1.5 (in jline.JLineBuffer) for about 4 months. So this affects Windows and other platforms too, not just linux.
More info:
http://sourceforge.net/tracker/index.php?func=detail&aid=1824839&group_id=64033&atid=506056

Show
Paul King added a comment - Looks like jline has had a dependency on Java 1.5 (in jline.JLineBuffer) for about 4 months. So this affects Windows and other platforms too, not just linux. More info: http://sourceforge.net/tracker/index.php?func=detail&aid=1824839&group_id=64033&atid=506056
Hide
Jason Dillon added a comment -

Will address when I get back from Thailand.

Show
Jason Dillon added a comment - Will address when I get back from Thailand.
Hide
Guillaume Laforge added a comment -

Jason, any news on the JLine release schedule with a fix for this issue?

Show
Guillaume Laforge added a comment - Jason, any news on the JLine release schedule with a fix for this issue?
Hide
Jim White added a comment -

They've patched their CVS a little over a week ago to fix the problem.

http://jline.cvs.sourceforge.net/jline/jline/src/main/java/jline/CursorBuffer.java?revision=1.5&view=markup

I was thinking of trying it out myself to see if it is indeed fixed so we can get this issue closed.

If it does work then a message to mprudhom (JLine project owner) would be in order to see how soon an updated release will be done.

Show
Jim White added a comment - They've patched their CVS a little over a week ago to fix the problem. http://jline.cvs.sourceforge.net/jline/jline/src/main/java/jline/CursorBuffer.java?revision=1.5&view=markup I was thinking of trying it out myself to see if it is indeed fixed so we can get this issue closed. If it does work then a message to mprudhom (JLine project owner) would be in order to see how soon an updated release will be done.
Hide
Jason Dillon added a comment -

Sorry, I dropped the ball on this one... Marc left it to me to make the release and I kept getting distracted.

Show
Jason Dillon added a comment - Sorry, I dropped the ball on this one... Marc left it to me to make the release and I kept getting distracted.
Hide
Paul King added a comment -

Any news?

Show
Paul King added a comment - Any news?
Hide
Jason Dillon added a comment -

Release of JLine 0.9.94 is done (finally, sorry for the lag)... pending upload MAVENUPLOAD-1942

I will see if I can get JvZ to fast track this for me...

Anyways, sorry for the lag. I'm moving back to Thailand, and the last few weeks have been crazy (planning, moving, packing, shipping, blah, blah, blah).

Show
Jason Dillon added a comment - Release of JLine 0.9.94 is done (finally, sorry for the lag)... pending upload MAVENUPLOAD-1942 I will see if I can get JvZ to fast track this for me... Anyways, sorry for the lag. I'm moving back to Thailand, and the last few weeks have been crazy (planning, moving, packing, shipping, blah, blah, blah).
Hide
Paul King added a comment - - edited

Since Jason is possibly still in transit, I updated the pom. After some additional testing we should be able to close off this issue.

Show
Paul King added a comment - - edited Since Jason is possibly still in transit, I updated the pom. After some additional testing we should be able to close off this issue.
Hide
Jason Dillon added a comment -

Thanks Paul. I'm here now at my home in Bangkok and online. I'll double check and close this issue today.

Show
Jason Dillon added a comment - Thanks Paul. I'm here now at my home in Bangkok and online. I'll double check and close this issue today.
Hide
Jason Dillon added a comment -

Looks like this is fixed now. Sorry for the delay folks.

Show
Jason Dillon added a comment - Looks like this is fixed now. Sorry for the delay folks.

People

Vote (3)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: