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

java.lang.NoClassDefFoundError

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2.0
    • Component/s: None
    • Labels:
      None

      Description

      We have been doing a POC to call java code from ECL code.

      Our java code uses multiple open source / third party java libraries. At some point during this integration, our ECL code stated throwing - java.lang.NoClassDefFoundError. We spent weeks trying to figure out what the heck is going on. It turns out that the contextClassLoader is null.

      This error showed up while creating an instance of Jboss Drool's specific classes.

      The following code fixed it.
      if(Thread.currentThread().getContextClassLoader() == null)

      { Thread.currentThread().setContextClassLoader(String.class.getClassLoader()); }

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            hpccrp Raj
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: