Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-14463

Embedded Java plugin producess misleading error when targeting wrong JVM

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 5.4.2
    • Fix Version/s: 6.4.0
    • Component/s: Embedded Languages
    • Labels:
      None

      Description

      Experienced the following error when attempting to execute embedded java:

      Error: System error: 0: javaembed: Failed to resolve class name JavaClassPathTester (0, 0), 0,

      This error led me to investigate a classpath issue, but it turns out the target class was bulit using open-jdk 1.7 JVM. The libjavaembed library on this environment seems to link to a different JVM ( libjvm.so => /usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server/libjvm.so). This mismatch seems to cause the above error.

      I was able to resolve this error by re-building with a 1.6 target, either with a javac 1.6, or with a higher compiler with a 1.6 target:
      /usr/lib/jvm/java-7-openjdk-amd64/bin/javac JavaClassPathTester.java -target 1.6 -source 1.6

      as an FYI, we can determine the target java version with the javap tool:
      javap -verbose <classname> | grep "major"

      Lorraine Chapman this might be something we can document in the redbook and/or known issues

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mayx Yanrui Ma (Inactive)
              Reporter:
              rpastrana Rodrigo Pastrana
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: