Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6548418

Fatal Error: Unable to find method initCause

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P5 P5
    • None
    • 6
    • tools
    • x86
    • windows_xp

      FULL PRODUCT VERSION :
      I've tested with a couple of different versions:

      java version "1.4.2"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
      Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)

      java version "1.5.0_11"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
      Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode)

      java version "1.6.0"
      Java(TM) SE Runtime Environment (build 1.6.0-b105)
      Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode)

      java version "1.6.0_01"
      Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
      Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)


      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      I'm trying to upgrade from j2sdk1.4.2_08 to jdk1.6.0_01.

      When running with j2sdk1.4.2_08:

      javac -J-Xmx512M -g -deprecation -bootclasspath <cldc11 jar file> -extdirs "" -classpath <class output folder> -d <class output folder> -sourcepath <generated source code> @<java filelist>

      it compiles.

      When running with jdk1.6.0_01:

      javac -J-Xmx512M -g -deprecation -bootclasspath <cldc11 jar file> -extdirs "" -classpath <class output folder> -d <class output folder> -sourcepath <generated source code> @<java filelist>

      javac complains about "cannot access java.lang.Void".

      I've tried adding "-source 1.4 -target 1.4" as javac arguments but that gives me the following output from javac:

      cannot find symbol
      symbol : method initCause(java.lang.ClassNotFoundException)

      Fatal Error: Unable to find method initCause

      I've discovered that executing j2sdk1.4.2_08 with "-source 1.4 -target 1.4" arguments gives the same error. However, a workaround with j2sdk1.4.2_08 is to remove "-source 1.4 -target 1.4" which is not possible with jdk1.5.0_11, jdk1.6.0 and jdk1.6.0_01.

      initCause is a method in Throwable in Java SE since 1.4. The method is not included in the Throwable class in the cldc 1.1 jar that I use.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the following javac command:

      javac -J-Xmx512M -g -deprecation -source 1.4 -target 1.4 -bootclasspath <cldc11 jar file> -extdirs "" -classpath <class output folder> -d <class output folder> -sourcepath <generated source code> @<java filelist>


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The compilation should work.
      ACTUAL -
      The compilation fails.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      cannot find symbol
      symbol : method initCause(java.lang.ClassNotFoundException)

      Fatal Error: Unable to find method initCause

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      No known workaround.

      Release Regression From : 1.4.2
      The above release value was the last known release where this
      bug was not reproducible. Since then there has been a regression.

            wtaosunw Wei Tao (Inactive)
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: