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

NPE when limiting to project and importing descriptor from dependency

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.6.0SDK
    • 2.7.0SDK
    • jcasgen-maven-plugin
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: