Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-3715

Zipkiemodule nullpointerexception

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.16.0.Final, 7.17.0.Final
    • Fix Version/s: 7.20.0.Final
    • Component/s: None
    • Labels:
      None
    • Sprint:
      2019 Week 11-13
    • Story Points:
      2
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      o During ZipKieModule loading in “org.drools.compiler.kie.builder.impl.ZipKieModule:142” nullpointerexception is thrown:

      urlPath = urlPath.substring( urlPath.lastIndexOf( '!' ) + 1 );

      ArrayList<ZipEntry> entries = new ArrayList<>();

      // read jar file from uber-jar

      InputStream in = this.getClass().getResourceAsStream(urlPath); // nullpointerexception

      For example full UrlPath on windows to internal .jar is:

      C:\Users\xbbnv0c\IdeaProjects\ais-data-exchange\data-exchange-app\target\data-exchange-app-1.0.1-SNAPSHOT.jar!\BOOT-INF\lib\data-exchange-brms-1.0.1-SNAPSHOT.jar

      So the result of this first line will be:

      \BOOT-INF\lib\data-exchange-brms-1.0.1-SNAPSHOT.jar

      It will be perfect, but during accessing internal resource file separator should be “/” not “\”. So InputStream in = null.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                tzimanyi Tibor Zimanyi
                Reporter:
                lukaszkrot Łukasz Szmolke
                Tester:
                Jiri Petrlik
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: