Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-4080

NPE when limiting to project and importing descriptor from dependency

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.0SDK
    • Fix Version/s: 2.7.0SDK
    • Component/s: jcasgen-maven-plugin
    • Labels:
      None

      Description

      When a project has limitToProject enabled and a type system descriptor imports another descriptor from a JAR file that is a dependency of the project, then an NPE is triggered:

      Caused by: java.lang.NullPointerException
      	at org.apache.uima.tools.jcasgen.Jg.isOutOfScope(Jg.java:723)
      	at org.apache.uima.tools.jcasgen.Jg.generateAllTypesFromTemplates(Jg.java:630)
      	at org.apache.uima.tools.jcasgen.Jg.main1(Jg.java:565)
      	at org.apache.uima.tools.jcasgen.Jg.main0(Jg.java:418)
      	at org.apache.uima.tools.jcasgen.maven.JCasGenMojo.execute(JCasGenMojo.java:198)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
      	... 20 more
      

      The reason is that the imported type system has a URI like "jar:file:.../third-party.jar!/desc/type/ImportedTypeSystem.xml" which translates to a path value of "null" because it does not reside on the file system.

      In such a case, the TSD should simply be considered to be out-of-project.

        Attachments

          Activity

            People

            • Assignee:
              rec Richard Eckart de Castilho
              Reporter:
              rec Richard Eckart de Castilho
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: