Uploaded image for project: 'Buildr (Retired)'
  1. Buildr (Retired)
  2. BUILDR-27

java_test_frameworks.rb failingto run JUnit on JRuby

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3
    • 1.3
    • JRuby, Test frameworks
    • None

    Description

      Assaf, does jruby -S spec spec/java_test_frameworks.rb goes green for you?

      java_test_frameworks.rb was failing for me when running with JRuby, printing the following stacktrace for each spec example:

      org.apache.tools.ant.BuildException: Errors while applying transformations: Fatal error during transformation
      AggregateTransformer.java:266:in `org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer.transform'
      XMLResultAggregator.java:158:in `org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator.execute'
      UnknownElement.java:288:in `org.apache.tools.ant.UnknownElement.execute'
      NativeMethodAccessorImpl.java:-2:in `sun.reflect.NativeMethodAccessorImpl.invoke0'
      NativeMethodAccessorImpl.java:39:in `sun.reflect.NativeMethodAccessorImpl.invoke'
      DelegatingMethodAccessorImpl.java:25:in `sun.reflect.DelegatingMethodAccessorImpl.invoke'
      Method.java:597:in `java.lang.reflect.Method.invoke'
      JavaMethod.java:199:in `org.jruby.javasupport.JavaMethod.invokeWithExceptionHandling'
      JavaMethod.java:175:in `org.jruby.javasupport.JavaMethod.invoke'
      JavaClass.java:405:in `org.jruby.javasupport.JavaClass$InstanceMethodInvoker.execute'
      SimpleCallbackMethod.java:70:in `org.jruby.internal.runtime.methods.SimpleCallbackMethod.call'
      CallSite.java:167:in `org.jruby.runtime.CallSite$ICNonBlockCallSite.call'

      I managed to get it working by adding the classpath jars to the systemClassLoader instead of using the jrubyClassLoader, I don't know if this is the best solution, anyway I've attached the patch that makes it work for me.

      Attachments

        Activity

          People

            assafarkin Assaf Arkin
            vic Victor Hugo Borja
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: