Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.1
    • Fix Version/s: JRuby 1.1.1
    • Component/s: None
    • Labels:
      None
    • Environment:
    • Number of attachments :
      2

      Description

      JRuby 1.1 can be compiled with IBM JDK 5. 0 or 6.0 with command "ant" (with warning), but "ant test" failed and was terminated at the very beginning without any test case being executed.

      JRuby 1.0.3 is working fine with IBM JDK. The problem can be reproduced on Linux distros SuSE, Red Had Enterprise Release and Gentoo.

      The IBM JDK is released at http://www.ibm.com/developerworks/java/jdk/

      Please refer to the attached "ant test" log file for more details. The file was collected on Gentoo platform.

      1. ant_test_SuSE_10_1.log
        177 kB
        Song Ma
      2. ant_test.log
        3 kB
        Song Ma

        Activity

        Hide
        Song Ma added a comment -

        I reproduced the "ant test" error on SuSE Linux 10.1 platform with IBM JDK 5.0, but the print out is different, I'd like to upload the file for your reference.

        Environment:
        Linux SUSE-sma 2.6.16.54-0.2.5-bigsmp #1 SMP Mon Jan 21 13:29:51 UTC 2008 i686 i686 i386 GNU/Linux
        java version "1.5.0"
        Java(TM) 2 Runtime Environment, Standard Edition (build pxi32devifx-20071025 (SR6b))
        IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223-20071005 (JIT enabled)
        J9VM - 20071004_14218_lHdSMR
        JIT - 20070820_1846ifx1_r8
        GC - 200708_10)
        JCL - 20071025

        Show
        Song Ma added a comment - I reproduced the "ant test" error on SuSE Linux 10.1 platform with IBM JDK 5.0, but the print out is different, I'd like to upload the file for your reference. Environment: Linux SUSE-sma 2.6.16.54-0.2.5-bigsmp #1 SMP Mon Jan 21 13:29:51 UTC 2008 i686 i686 i386 GNU/Linux java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build pxi32devifx-20071025 (SR6b)) IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223-20071005 (JIT enabled) J9VM - 20071004_14218_lHdSMR JIT - 20070820_1846ifx1_r8 GC - 200708_10) JCL - 20071025
        Hide
        Damian Steer added a comment -

        Not working for me either, but I seem to get a different error:

        pldms@kessel:~/Development/CVS-Other/jruby$ uname -a
        Linux kessel 2.6.22-14-generic #1 SMP Tue Feb 12 07:42:25 UTC 2008 i686 GNU/Linux
        pldms@kessel:~/Development/CVS-Other/jruby$ java -version
        java version "1.6.0"
        Java(TM) SE Runtime Environment (build pxi3260-20071123_01)
        IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Linux x86-32 jvmxi3260-20071121_15015 (JIT enabled)
        J9VM - 20071121_015015_lHdSMR
        JIT  - r9_20071121_1330
        GC   - 20071031_AA)
        JCL  - 20071118_01
        pldms@kessel:~/Development/CVS-Other/jruby$ echo $JAVA_HOME
        /home/pldms/Applications/ibm-java-i386-60
        pldms@kessel:~/Development/CVS-Other/jruby$ ant clean jar
        Buildfile: build.xml
        
        init:
        
        clean:
           [delete] Deleting directory /home/pldms/Development/CVS-Other/jruby/docs/api
        
        init:
        
        jar:
        
        jar-jruby:
        
        init:
        
        extract-rdocs:
        
        prepare:
            [mkdir] Created dir: /home/pldms/Development/CVS-Other/jruby/build/classes
            [mkdir] Created dir: /home/pldms/Development/CVS-Other/jruby/build/classes/jruby
            [mkdir] Created dir: /home/pldms/Development/CVS-Other/jruby/build/classes/test
            [mkdir] Created dir: /home/pldms/Development/CVS-Other/jruby/build/test-results
            [mkdir] Created dir: /home/pldms/Development/CVS-Other/jruby/build/test-results/html
            [mkdir] Created dir: /home/pldms/Development/CVS-Other/jruby/docs/api
        
        compile.tasks:
             [copy] Copying 8 files to /home/pldms/Development/CVS-Other/jruby/build/classes/jruby
             [copy] Copying 21 files to /home/pldms/Development/CVS-Other/jruby/build/classes/jruby/builtin
             [copy] Copying 1 file to /home/pldms/Development/CVS-Other/jruby/build/classes/jruby
        
        check-for-optional-java4-packages:
        
        check-for-optional-packages:
        
        compile-jruby:
            [javac] Compiling 636 source files to /home/pldms/Development/CVS-Other/jruby/build/classes/jruby
            [javac] Note: Some input files use unchecked or unsafe operations.
            [javac] Note: Recompile with -Xlint:unchecked for details.
        
        compile:
        
        generate-method-classes:
            [touch] Creating /home/pldms/Development/CVS-Other/jruby/build/__empty.rb
             [java] Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Array index out of range: -1
             [java]     at org.jruby.runtime.ThreadContext.getCurrentFrame(ThreadContext.java:350)
             [java]     at org.jruby.runtime.ThreadContext.getFrameSelf(ThreadContext.java:372)
             [java]     at org.jruby.RubyClass.invoke(RubyClass.java:234)
             [java]     at org.jruby.javasupport.util.RuntimeHelpers.invokeAs(RuntimeHelpers.java:331)
             [java]     at org.jruby.runtime.Dispatcher$DefaultDispatcher.callMethod(Dispatcher.java:17)
             [java]     at org.jruby.RubyClass.invoke(RubyClass.java:224)
             [java]     at org.jruby.javasupport.util.RuntimeHelpers.invoke(RuntimeHelpers.java:339)
             [java]     at org.jruby.RubyObject.callMethod(RubyObject.java:485)
             [java]     at org.jruby.RubyObject.equals(RubyObject.java:273)
             [java]     at java.util.WeakHashMap.put(Unknown Source)
             [java]     at org.jruby.util.collections.WeakHashSet.add(WeakHashSet.java:44)
             [java]     at org.jruby.RubyClass.addSubclass(RubyClass.java:357)
             [java]     at org.jruby.RubyClass.<init>(RubyClass.java:175)
             [java]     at org.jruby.RubyClass.newClass(RubyClass.java:186)
             [java]     at org.jruby.RubyClass.newClass(RubyClass.java:193)
             [java]     at org.jruby.Ruby.defineClassUnder(Ruby.java:656)
             [java]     at org.jruby.Ruby.defineClass(Ruby.java:612)
             [java]     at org.jruby.RubyThread.createThreadClass(RubyThread.java:119)
             [java]     at org.jruby.Ruby.initCore(Ruby.java:907)
             [java]     at org.jruby.Ruby.bootstrap(Ruby.java:852)
             [java]     at org.jruby.Ruby.init(Ruby.java:828)
             [java]     at org.jruby.Ruby.newInstance(Ruby.java:158)
             [java]     at org.jruby.Main.run(Main.java:121)
             [java]     at org.jruby.Main.run(Main.java:88)
             [java]     at org.jruby.Main.main(Main.java:79)
        
        BUILD FAILED
        /home/pldms/Development/CVS-Other/jruby/build.xml:290: The following error occurred while executing this line:
        /home/pldms/Development/CVS-Other/jruby/build.xml:185: The following error occurred while executing this line:
        /home/pldms/Development/CVS-Other/jruby/build.xml:156: Java returned: 1
        
        Total time: 23 seconds
        
        Show
        Damian Steer added a comment - Not working for me either, but I seem to get a different error: pldms@kessel:~/Development/CVS-Other/jruby$ uname -a Linux kessel 2.6.22-14-generic #1 SMP Tue Feb 12 07:42:25 UTC 2008 i686 GNU/Linux pldms@kessel:~/Development/CVS-Other/jruby$ java -version java version "1.6.0" Java(TM) SE Runtime Environment (build pxi3260-20071123_01) IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Linux x86-32 jvmxi3260-20071121_15015 (JIT enabled) J9VM - 20071121_015015_lHdSMR JIT - r9_20071121_1330 GC - 20071031_AA) JCL - 20071118_01 pldms@kessel:~/Development/CVS-Other/jruby$ echo $JAVA_HOME /home/pldms/Applications/ibm-java-i386-60 pldms@kessel:~/Development/CVS-Other/jruby$ ant clean jar Buildfile: build.xml init: clean: [delete] Deleting directory /home/pldms/Development/CVS-Other/jruby/docs/api init: jar: jar-jruby: init: extract-rdocs: prepare: [mkdir] Created dir: /home/pldms/Development/CVS-Other/jruby/build/classes [mkdir] Created dir: /home/pldms/Development/CVS-Other/jruby/build/classes/jruby [mkdir] Created dir: /home/pldms/Development/CVS-Other/jruby/build/classes/test [mkdir] Created dir: /home/pldms/Development/CVS-Other/jruby/build/test-results [mkdir] Created dir: /home/pldms/Development/CVS-Other/jruby/build/test-results/html [mkdir] Created dir: /home/pldms/Development/CVS-Other/jruby/docs/api compile.tasks: [copy] Copying 8 files to /home/pldms/Development/CVS-Other/jruby/build/classes/jruby [copy] Copying 21 files to /home/pldms/Development/CVS-Other/jruby/build/classes/jruby/builtin [copy] Copying 1 file to /home/pldms/Development/CVS-Other/jruby/build/classes/jruby check-for-optional-java4-packages: check-for-optional-packages: compile-jruby: [javac] Compiling 636 source files to /home/pldms/Development/CVS-Other/jruby/build/classes/jruby [javac] Note: Some input files use unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. compile: generate-method-classes: [touch] Creating /home/pldms/Development/CVS-Other/jruby/build/__empty.rb [java] Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Array index out of range: -1 [java] at org.jruby.runtime.ThreadContext.getCurrentFrame(ThreadContext.java:350) [java] at org.jruby.runtime.ThreadContext.getFrameSelf(ThreadContext.java:372) [java] at org.jruby.RubyClass.invoke(RubyClass.java:234) [java] at org.jruby.javasupport.util.RuntimeHelpers.invokeAs(RuntimeHelpers.java:331) [java] at org.jruby.runtime.Dispatcher$DefaultDispatcher.callMethod(Dispatcher.java:17) [java] at org.jruby.RubyClass.invoke(RubyClass.java:224) [java] at org.jruby.javasupport.util.RuntimeHelpers.invoke(RuntimeHelpers.java:339) [java] at org.jruby.RubyObject.callMethod(RubyObject.java:485) [java] at org.jruby.RubyObject.equals(RubyObject.java:273) [java] at java.util.WeakHashMap.put(Unknown Source) [java] at org.jruby.util.collections.WeakHashSet.add(WeakHashSet.java:44) [java] at org.jruby.RubyClass.addSubclass(RubyClass.java:357) [java] at org.jruby.RubyClass.<init>(RubyClass.java:175) [java] at org.jruby.RubyClass.newClass(RubyClass.java:186) [java] at org.jruby.RubyClass.newClass(RubyClass.java:193) [java] at org.jruby.Ruby.defineClassUnder(Ruby.java:656) [java] at org.jruby.Ruby.defineClass(Ruby.java:612) [java] at org.jruby.RubyThread.createThreadClass(RubyThread.java:119) [java] at org.jruby.Ruby.initCore(Ruby.java:907) [java] at org.jruby.Ruby.bootstrap(Ruby.java:852) [java] at org.jruby.Ruby.init(Ruby.java:828) [java] at org.jruby.Ruby.newInstance(Ruby.java:158) [java] at org.jruby.Main.run(Main.java:121) [java] at org.jruby.Main.run(Main.java:88) [java] at org.jruby.Main.main(Main.java:79) BUILD FAILED /home/pldms/Development/CVS-Other/jruby/build.xml:290: The following error occurred while executing this line: /home/pldms/Development/CVS-Other/jruby/build.xml:185: The following error occurred while executing this line: /home/pldms/Development/CVS-Other/jruby/build.xml:156: Java returned: 1 Total time: 23 seconds
        Hide
        Charles Oliver Nutter added a comment -

        Fix for 1.1.1.

        Show
        Charles Oliver Nutter added a comment - Fix for 1.1.1.
        Hide
        Charles Oliver Nutter added a comment -

        I made a change that got this working on IBM JDKs...could you retry? There were other reasons the tests didn't pass, but I didn't look into those yet.

        Show
        Charles Oliver Nutter added a comment - I made a change that got this working on IBM JDKs...could you retry? There were other reasons the tests didn't pass, but I didn't look into those yet.
        Hide
        Charles Oliver Nutter added a comment -

        The fix I made appears to let JRuby start up and run under IBM's JDKs. If there are additional issues running under IBM JDK (and there certainly are, since ant test does not pass) they should be filed separately.

        Show
        Charles Oliver Nutter added a comment - The fix I made appears to let JRuby start up and run under IBM's JDKs. If there are additional issues running under IBM JDK (and there certainly are, since ant test does not pass) they should be filed separately.
        Hide
        Lex Sheehan added a comment -

        I got the same "BUILD FAILED" error message when running ant test from the trunk I just checked out from http://svn.codehaus.org/jruby/trunk/jruby

        I was running eclipse v3.4.1 with jdk1.6.0_10.

        When I reset the eclipse (Window | Preferences... | Java | Installed JREs) to the version used by my Rational Software Architect v7.5 (J2RE 1.6.0 IBM J9 2.4 Windows 2000 x86-32 jvmwi3260-20080816_22093) it worked:

        <pre>
        Buildfile: C:\DATA\PROJECTS\Saleskit\eclipse\jruby\build.xml
        init:
        jar:
        init:
        extract-rdocs:
        prepare:
        compile-tasks:
        [copy] Copying 18 files to C:\DATA\PROJECTS\Saleskit\eclipse\jruby\build\classes\jruby\builtin
        [copy] Copying 1 file to C:\DATA\PROJECTS\Saleskit\eclipse\jruby\build\classes\jruby
        compile-annotation-binder:
        check-for-optional-java4-packages:
        check-for-optional-packages:
        compile-jruby:
        compile:
        generate-method-classes:
        gmc_internal:
        generate-unsafe:
        gu_internal:
        [echo] Generating Unsafe impl...
        jar-jruby:
        [exec] Result: 1
        [jar] Building jar: C:\DATA\PROJECTS\Saleskit\eclipse\jruby\lib\jruby.jar
        init:
        jar:
        init:
        extract-rdocs:
        prepare:
        compile-tasks:
        [copy] Copying 1 file to C:\DATA\PROJECTS\Saleskit\eclipse\jruby\build\classes\jruby
        compile-annotation-binder:
        check-for-optional-java4-packages:
        check-for-optional-packages:
        compile-jruby:
        compile:
        generate-method-classes:
        gmc_internal:
        generate-unsafe:
        gu_internal:
        jar-jruby:
        [exec] Result: 1
        [jar] Building jar: C:\DATA\PROJECTS\Saleskit\eclipse\jruby\lib\jruby.jar
        compile-test:
        [javac] Compiling 124 source files to C:\DATA\PROJECTS\Saleskit\eclipse\jruby\build\classes\test
        [javac] Note: Some input files use unchecked or unsafe operations.
        [javac] Note: Recompile with -Xlint:unchecked for details.
        copy-test-files:
        [copy] Copying 1 file to C:\DATA\PROJECTS\Saleskit\eclipse\jruby\build\classes\test
        instrument:
        run-junit-compiled:
        [echo] compile=JIT, jit.threshold=0, jit.max=-1, objectspace=true threadpool=false reflection=false version=ruby1_8
        [junit] Testsuite: org.jruby.test.ScriptTestSuite
        [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
        [junit] Null Test: Caused an ERROR
        [junit] null
        [junit] java.lang.reflect.InvocationTargetException
        [junit] Caused by: java.lang.Error: Unresolved compilation problem:
        [junit] at org.jruby.Ruby.newInstance(Ruby.java:150)
        [junit] at org.jruby.test.ScriptTestSuite.setupInterpreter(ScriptTestSuite.java:101)
        [junit] at org.jruby.test.ScriptTestSuite.suite(ScriptTestSuite.java:92)

        BUILD FAILED
        C:\DATA\PROJECTS\Saleskit\eclipse\jruby\build.xml:583: The following error occurred while executing this line:
        C:\DATA\PROJECTS\Saleskit\eclipse\jruby\build.xml:670: The following error occurred while executing this line:
        C:\DATA\PROJECTS\Saleskit\eclipse\jruby\build.xml:623: Tests failed

        Total time: 45 seconds
        </pre>

        Hope that helps somebody.

        Show
        Lex Sheehan added a comment - I got the same "BUILD FAILED" error message when running ant test from the trunk I just checked out from http://svn.codehaus.org/jruby/trunk/jruby I was running eclipse v3.4.1 with jdk1.6.0_10. When I reset the eclipse (Window | Preferences... | Java | Installed JREs) to the version used by my Rational Software Architect v7.5 (J2RE 1.6.0 IBM J9 2.4 Windows 2000 x86-32 jvmwi3260-20080816_22093) it worked: <pre> Buildfile: C:\DATA\PROJECTS\Saleskit\eclipse\jruby\build.xml init: jar: init: extract-rdocs: prepare: compile-tasks: [copy] Copying 18 files to C:\DATA\PROJECTS\Saleskit\eclipse\jruby\build\classes\jruby\builtin [copy] Copying 1 file to C:\DATA\PROJECTS\Saleskit\eclipse\jruby\build\classes\jruby compile-annotation-binder: check-for-optional-java4-packages: check-for-optional-packages: compile-jruby: compile: generate-method-classes: gmc_internal : generate-unsafe: gu_internal : [echo] Generating Unsafe impl... jar-jruby: [exec] Result: 1 [jar] Building jar: C:\DATA\PROJECTS\Saleskit\eclipse\jruby\lib\jruby.jar init: jar: init: extract-rdocs: prepare: compile-tasks: [copy] Copying 1 file to C:\DATA\PROJECTS\Saleskit\eclipse\jruby\build\classes\jruby compile-annotation-binder: check-for-optional-java4-packages: check-for-optional-packages: compile-jruby: compile: generate-method-classes: gmc_internal : generate-unsafe: gu_internal : jar-jruby: [exec] Result: 1 [jar] Building jar: C:\DATA\PROJECTS\Saleskit\eclipse\jruby\lib\jruby.jar compile-test: [javac] Compiling 124 source files to C:\DATA\PROJECTS\Saleskit\eclipse\jruby\build\classes\test [javac] Note: Some input files use unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. copy-test-files: [copy] Copying 1 file to C:\DATA\PROJECTS\Saleskit\eclipse\jruby\build\classes\test instrument: run-junit-compiled: [echo] compile=JIT, jit.threshold=0, jit.max=-1, objectspace=true threadpool=false reflection=false version=ruby1_8 [junit] Testsuite: org.jruby.test.ScriptTestSuite [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec [junit] Null Test: Caused an ERROR [junit] null [junit] java.lang.reflect.InvocationTargetException [junit] Caused by: java.lang.Error: Unresolved compilation problem: [junit] at org.jruby.Ruby.newInstance(Ruby.java:150) [junit] at org.jruby.test.ScriptTestSuite.setupInterpreter(ScriptTestSuite.java:101) [junit] at org.jruby.test.ScriptTestSuite.suite(ScriptTestSuite.java:92) BUILD FAILED C:\DATA\PROJECTS\Saleskit\eclipse\jruby\build.xml:583: The following error occurred while executing this line: C:\DATA\PROJECTS\Saleskit\eclipse\jruby\build.xml:670: The following error occurred while executing this line: C:\DATA\PROJECTS\Saleskit\eclipse\jruby\build.xml:623: Tests failed Total time: 45 seconds </pre> Hope that helps somebody.
        Hide
        Lex Sheehan added a comment -

        Actually...even though the jruby project compiles, if fails the ant test.

        I'll try my luck with jruby 1.0.3 with the IBM WebSphere v6.1 JRE: IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows 2000 x86-32 j9vmwi3223ifx-20080811 (JIT enabled)...

        Show
        Lex Sheehan added a comment - Actually...even though the jruby project compiles, if fails the ant test. I'll try my luck with jruby 1.0.3 with the IBM WebSphere v6.1 JRE: IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows 2000 x86-32 j9vmwi3223ifx-20080811 (JIT enabled)...
        Hide
        Charles Oliver Nutter added a comment -

        This appears to be an error coming out of the Eclipse compiler, which allows bad code to compile and inserts error messages where there's syntax problems. We do have a continuous build running against J9 (Java 6) and it works just fine. Can you try to do this from a command line to ensure it's not using the Eclipse compiler?

        If you're still having issues, please file a separate bug, since the ones reported here were already resolved.

        Show
        Charles Oliver Nutter added a comment - This appears to be an error coming out of the Eclipse compiler, which allows bad code to compile and inserts error messages where there's syntax problems. We do have a continuous build running against J9 (Java 6) and it works just fine. Can you try to do this from a command line to ensure it's not using the Eclipse compiler? If you're still having issues, please file a separate bug, since the ones reported here were already resolved.

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            Song Ma
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: