Unable to build distributable from svn trunk

Help
2008-06-05
2013-04-23
  • Darshan M S
    Darshan M S
    2008-06-05

    Hi,
    I did a checkout of the latest retroweaver code from svn trunk.I tried building the distributable but the build process failed with the following error:

    test14:
        [junit] Testsuite: net.sourceforge.retroweaver.tests.RetroweaverTestSuite
        [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
        [junit]
        [junit] Null Test:  Caused an ERROR
        [junit] null
        [junit] java.lang.reflect.InvocationTargetException
        [junit] Caused by: java.lang.UnsupportedClassVersionError: net/sourceforge/r
    etroweaver/runtime/java/lang/Enum (Unsupported major.minor version 49.0)
        [junit]     at java.lang.ClassLoader.defineClass0(Native Method)
        [junit]     at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
        [junit]     at java.security.SecureClassLoader.defineClass(SecureClassLoader
    .java:123)
        [junit]     at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
        [junit]     at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
        [junit]     at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
        [junit]     at java.security.AccessController.doPrivileged(Native Method)
        [junit]     at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
        [junit]     at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        [junit]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)

        [junit]     at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        [junit]     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)

        [junit]     at java.lang.Class.getDeclaredConstructors0(Native Method)
        [junit]     at java.lang.Class.privateGetDeclaredConstructors(Class.java:161

        [junit]     at java.lang.Class.getConstructor0(Class.java:1930)
        [junit]     at java.lang.Class.getConstructor(Class.java:1027)
        [junit]     at net.sourceforge.retroweaver.tests.RetroweaverTestSuite.<init>
    (RetroweaverTestSuite.java:13)
        [junit]     at net.sourceforge.retroweaver.tests.RetroweaverTestSuite.suite(
    RetroweaverTestSuite.java:79)
        [junit]
        [junit]

    BUILD FAILED
    C:\Retroweaver\tags\retroweaver-2.0\build.xml:320: Test net.source
    forge.retroweaver.tests.RetroweaverTestSuite failed

    I am using Sun JDK 1.4.2_17 and 1.5.0_06.Could anyone let me know the possible cause for this and recommend a solution?

    Thanks in advance,
    Darshan

     
    • That's weird. Are you using the latest code from the svn trunk or the 2.0 version as the output seems to indicate?

      You could use "ant dist" to build from scratch. This will call "clean" to delete old artifacts to make sure you have a clean slate to start from.

      Finally, what changes did you do in build.properties to point to your java jdks?

      Please post the local changes you made and the output from a clean build.

      Thanks,

      Xavier

       
    • Darshan M S
      Darshan M S
      2008-06-06

      Hi,

      I tried building from both the 2.0 version and also the latest code from trunk. Both give me the same error. Below is the build.properties file that i'm using:

      # Windows properties

      jre14.home=C:/j2sdk1.4.2_17
      jre14.jvm=${jre14.home}/bin/java.exe
      jre14.runtime=${jre14.home}/jre/lib/rt.jar

      jdk14.home=C:/j2sdk1.4.2_17
      jdk14.rmic=${jdk14.home}/bin/rmic.exe

      jre15.home=C:/Softwares/Sun Java/Sun jdk1.5/jdk1.5.0_06
      jre15.jvm=${jre15.home}/bin/java.exe

      # end Windows properties

      I am doing the build as "ant -f build.xml dist" and I get the following error. And when I do the build on 2.0 version (with the same build.properties file) I get a retroweaver-rt-dev.jar which has a smaller size compared to the released retroweaver-rt-2.0.jar.

      test14:

      test-execute:
          [junit] Running net.sourceforge.retroweaver.tests.RetroweaverTestSuite
          [junit] Testsuite: net.sourceforge.retroweaver.tests.RetroweaverTestSuite
          [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
          [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
          [junit]
          [junit] Null Test:  Caused an ERROR
          [junit] null
          [junit] java.lang.reflect.InvocationTargetException
          [junit] Caused by: java.lang.UnsupportedClassVersionError: net/sourceforge/r
      etroweaver/runtime/java/lang/Enum (Unsupported major.minor version 49.0)
          [junit]     at java.lang.ClassLoader.defineClass0(Native Method)
          [junit]     at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
          [junit]     at java.security.SecureClassLoader.defineClass(SecureClassLoader
      .java:123)
          [junit]     at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
          [junit]     at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
          [junit]     at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
          [junit]     at java.security.AccessController.doPrivileged(Native Method)
          [junit]     at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
          [junit]     at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
          [junit]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)

          [junit]     at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
          [junit]     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)

          [junit]     at java.lang.Class.getDeclaredConstructors0(Native Method)
          [junit]     at java.lang.Class.privateGetDeclaredConstructors(Class.java:161
      8)
          [junit]     at java.lang.Class.getConstructor0(Class.java:1930)
          [junit]     at java.lang.Class.getConstructor(Class.java:1027)
          [junit]     at net.sourceforge.retroweaver.tests.RetroweaverTestSuite.<init>
      (RetroweaverTestSuite.java:13)
          [junit]     at net.sourceforge.retroweaver.tests.RetroweaverTestSuite.suite(
      RetroweaverTestSuite.java:87)
          [junit]
          [junit]

      BUILD FAILED
      C:\Retroweaver\trunk\retroweaver\build.xml:360: The following erro
      r occurred while executing this line:
      C:\Retroweaver\trunk\retroweaver\build.xml:351: Test net.sourcefor
      ge.retroweaver.tests.RetroweaverTestSuite failed