ResourceInitializationException when looking for Type system descriptor in JAR

7 views
Skip to first unread message

Martin Wunderlich

unread,
Sep 12, 2015, 10:38:10 AM9/12/15
to dkpro-l...@googlegroups.com
Hi all, 

I am getting an error during the execution of a BatchTask that I don’t quite understand, see stack trace below. The root cause it that the type system descriptor XML file for the Similarity module is not found in the JAR file. However, when I check the jar with 

jar -tfv /home/w/wunderlichm/.m2/repository/dkpro/similarity/dkpro.similarity.uima.api-asl/2.2.0-SNAPSHOT/dkpro.similarity.uima.api-asl-2.2.0-SNAPSHOT.jar

then I can clearly see that the XML is present: 

   […]
   679 Fri Sep 11 14:17:16 CEST 2015 desc/type/EntailmentClassificationOutcome.xml
  1102 Fri Sep 11 14:17:16 CEST 2015 desc/type/Similarity.xml
   [...]

So, what might be the cause for the file not being found when running the batch task? 
(running DKPro Lab 0.12.0-SNAPSHOT, Similarity-2.2.0-SNAPSHOT, Java 1.8.0_25 on Ubuntu 4.8.2-19)

Thanks a lot. 

Cheers, 

Martin
 


2015-09-12 13:34:05 ERROR root:335 - Lab run failed for experiment AIFdbClassificationFE2_PvNP_2015-09-11_08-39-34
de.tudarmstadt.ukp.dkpro.lab.engine.ExecutionException: de.tudarmstadt.ukp.dkpro.lab.engine.ExecutionException: org.apache.uima.resource.ResourceInitializationException
        at de.tudarmstadt.ukp.dkpro.lab.engine.impl.BatchTaskEngine.run(BatchTaskEngine.java:155)
        at de.tudarmstadt.ukp.dkpro.lab.engine.impl.DefaultTaskExecutionService.run(DefaultTaskExecutionService.java:53)
        at de.tudarmstadt.ukp.dkpro.lab.Lab.run(Lab.java:108)
       [...]
Caused by: de.tudarmstadt.ukp.dkpro.lab.engine.ExecutionException: org.apache.uima.resource.ResourceInitializationException
        at de.tudarmstadt.ukp.dkpro.lab.uima.engine.simple.SimpleExecutionEngine.run(SimpleExecutionEngine.java:176)
        at de.tudarmstadt.ukp.dkpro.lab.engine.impl.BatchTaskEngine.runNewExecution(BatchTaskEngine.java:330)
        at de.tudarmstadt.ukp.dkpro.lab.engine.impl.BatchTaskEngine.executeConfiguration(BatchTaskEngine.java:235)
        at de.tudarmstadt.ukp.dkpro.lab.engine.impl.BatchTaskEngine.run(BatchTaskEngine.java:134)
        ... 12 more
Caused by: org.apache.uima.resource.ResourceInitializationException
        at org.apache.uima.fit.factory.TypeSystemDescriptionFactory.createTypeSystemDescription(TypeSystemDescriptionFactory.java:109)
        at org.apache.uima.fit.factory.AnalysisEngineFactory.createEngineDescription(AnalysisEngineFactory.java:967)
        at de.tudarmstadt.ukp.dkpro.tc.core.util.TaskUtils.getFeatureExtractorConnector(TaskUtils.java:326)
        at de.tudarmstadt.ukp.dkpro.tc.core.task.ExtractFeaturesTask.getAnalysisEngineDescription(ExtractFeaturesTask.java:167)
        at de.tudarmstadt.ukp.dkpro.lab.uima.engine.simple.SimpleExecutionEngine.run(SimpleExecutionEngine.java:85)
        ... 15 more
Caused by: java.io.FileNotFoundException: JAR entry desc/type/Similarity.xml not found in /home/w/wunderlichm/.m2/repository/dkpro/similarity/dkpro.similarity.uima.api-asl/2.2.0-SNAPSHOT/dkpro.similarity.uima.api-asl-2.2.0-SNAPSHOT.jar
        at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:142)
        at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:150)
        at java.net.URL.openStream(URL.java:1038)
        at org.apache.uima.util.XMLInputSource.<init>(XMLInputSource.java:84)
        at org.apache.uima.fit.factory.TypeSystemDescriptionFactory.createTypeSystemDescription(TypeSystemDescriptionFactory.java:104)
        ... 19 more

Richard Eckart de Castilho

unread,
Sep 13, 2015, 7:33:12 AM9/13/15
to dkpro-l...@googlegroups.com
Hi Martin,

I have never seen this kind of error (Java unable to access a file inside a JAR that clearly appears to be there.

If Java were unable to read the JAR e.g. due to permissions, it would also not know that the descriptors are inside.
So obviously the scanning works but then the extraction does not work.

It also looks like the JAR is ok, otherwise "-t" should fail I guess.

I do not think this is a DKPro/Lab/UIMA etc. problem.

Maybe the file permissions changed *while* your code was running or the file was modified/locked/moved/etc.
after your experiment had started? uimaFIT scans the descriptor locations only once and then keeps them in
a cache assuming that the stuff on the classpath doesn't change at runtime. That might explain why it found
the file but later cannot access it.

Cheers,

-- Richard
> --
> You received this message because you are subscribed to the Google Groups "dkpro-lab-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dkpro-lab-use...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

mar...@wunderlich.com

unread,
Sep 14, 2015, 3:54:55 AM9/14/15
to dkpro-l...@googlegroups.com, Richard Eckart de Castilho

Hi Richard,

 

ok, thanks a lot for sharing your thoughts on this. I am currently re-running this experiment to see, if it was only temporary glitch.

 

Cheers,

Martin
 

 

 

Am 2015-09-13 13:33, schrieb Richard Eckart de Castilho:

Hi Martin,

I have never seen this kind of error (Java unable to access a file inside a JAR that clearly appears to be there.

If Java were unable to read the JAR e.g. due to permissions, it would also not know that the descriptors are inside.
So obviously the scanning works but then the extraction does not work.

It also looks like the JAR is ok, otherwise "-t" should fail I guess.

I do not think this is a DKPro/Lab/UIMA etc. problem. 

Maybe the file permissions changed *while* your code was running or the file was modified/locked/moved/etc.
after your experiment had started? uimaFIT scans the descriptor locations only once and then keeps them in
a cache assuming that the stuff on the classpath doesn't change at runtime. That might explain why it found
the file but later cannot access it.

Cheers,

-- Richard

On 12.09.2015, at 16:38, Martin Wunderlich <mar...@wunderlich.com> wrote:
Hi all, I am getting an error during the execution of a BatchTask that I don't quite understand, see stack trace below. The root cause it that the type system descriptor XML file for the Similarity module is not found in the JAR file. However, when I check the jar with jar -tfv /home/w/wunderlichm/.m2/repository/dkpro/similarity/dkpro.similarity.uima.api-asl/2.2.0-SNAPSHOT/dkpro.similarity.uima.api-asl-2.2.0-SNAPSHOT.jar then I can clearly see that the XML is present: [...] 679 Fri Sep 11 14:17:16 CEST 2015 desc/type/EntailmentClassificationOutcome.xml 1102 Fri Sep 11 14:17:16 CEST 2015 desc/type/Similarity.xml [...] So, what might be the cause for the file not being found when running the batch task? (running DKPro Lab 0.12.0-SNAPSHOT, Similarity-2.2.0-SNAPSHOT, Java 1.8.0_25 on Ubuntu 4.8.2-19) Thanks a lot. Cheers, Martin 2015-09-12 13:34:05 ERROR root:335 - Lab run failed for experiment AIFdbClassificationFE2_PvNP_2015-09-11_08-39-34 de.tudarmstadt.ukp.dkpro.lab.engine.ExecutionException: de.tudarmstadt.ukp.dkpro.lab.engine.ExecutionException: org.apache.uima.resource.ResourceInitializationException at de.tudarmstadt.ukp.dkpro.lab.engine.impl.BatchTaskEngine.run(BatchTaskEngine.java:155) at de.tudarmstadt.ukp.dkpro.lab.engine.impl.DefaultTaskExecutionService.run(DefaultTaskExecutionService.java:53) at de.tudarmstadt.ukp.dkpro.lab.Lab.run(Lab.java:108) [...] Caused by: de.tudarmstadt.ukp.dkpro.lab.engine.ExecutionException: org.apache.uima.resource.ResourceInitializationException at de.tudarmstadt.ukp.dkpro.lab.uima.engine.simple.SimpleExecutionEngine.run(SimpleExecutionEngine.java:176) at de.tudarmstadt.ukp.dkpro.lab.engine.impl.BatchTaskEngine.runNewExecution(BatchTaskEngine.java:330) at de.tudarmstadt.ukp.dkpro.lab.engine.impl.BatchTaskEngine.executeConfiguration(BatchTaskEngine.java:235) at de.tudarmstadt.ukp.dkpro.lab.engine.impl.BatchTaskEngine.run(BatchTaskEngine.java:134) ... 12 more Caused by: org.apache.uima.resource.ResourceInitializationException at org.apache.uima.fit.factory.TypeSystemDescriptionFactory.createTypeSystemDescription(TypeSystemDescriptionFactory.java:109) at org.apache.uima.fit.factory.AnalysisEngineFactory.createEngineDescription(AnalysisEngineFactory.java:967) at de.tudarmstadt.ukp.dkpro.tc.core.util.TaskUtils.getFeatureExtractorConnector(TaskUtils.java:326) at de.tudarmstadt.ukp.dkpro.tc.core.task.ExtractFeaturesTask.getAnalysisEngineDescription(ExtractFeaturesTask.java:167) at de.tudarmstadt.ukp.dkpro.lab.uima.engine.simple.SimpleExecutionEngine.run(SimpleExecutionEngine.java:85) ... 15 more Caused by: java.io.FileNotFoundException: JAR entry desc/type/Similarity.xml not found in /home/w/wunderlichm/.m2/repository/dkpro/similarity/dkpro.similarity.uima.api-asl/2.2.0-SNAPSHOT/dkpro.similarity.uima.api-asl-2.2.0-SNAPSHOT.jar at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:142) at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:150) at java.net.URL.openStream(URL.java:1038) at org.apache.uima.util.XMLInputSource.<init>(XMLInputSource.java:84) at org.apache.uima.fit.factory.TypeSystemDescriptionFactory.createTypeSystemDescription(TypeSystemDescriptionFactory.java:104) ... 19 more -- You received this message because you are subscribed to the Google Groups "dkpro-lab-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to dkpro-lab-use...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages