nilsreiter / CorefAnnotator

Annotation tool for coreference
Apache License 2.0
32 stars 6 forks source link

de.unistuttgart.ims.coref.annotator.tools.ExportMultipleFiles does not work in 1.15.x and 2.0.0-beta4 #366

Open pagelj opened 3 years ago

pagelj commented 3 years ago

In 1.15.x, the class is not found at all.

In 2.0.0-beta4, the class is found, but I don't get any output when giving a directory as input and the following error when giving a single file as input:

Exception in thread "main" java.util.concurrent.ExecutionException: java.net.MalformedURLException: Cannot invoke "String.length()" because "spec" is null
        at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
        at java.desktop/javax.swing.SwingWorker.get(SwingWorker.java:613)
        at de.unistuttgart.ims.coref.annotator.tools.ExportMultipleFiles.convertFile(ExportMultipleFiles.java:104)
        at de.unistuttgart.ims.coref.annotator.tools.ExportMultipleFiles.main(ExportMultipleFiles.java:77)
Caused by: java.net.MalformedURLException: Cannot invoke "String.length()" because "spec" is null
        at java.base/java.net.URL.<init>(URL.java:706)
        at java.base/java.net.URL.<init>(URL.java:568)
        at java.base/java.net.URL.<init>(URL.java:515)
        at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
        at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.uima.cas.impl.XmiCasDeserializer.deserialize(XmiCasDeserializer.java:2305)
        at org.apache.uima.cas.impl.XmiCasDeserializer.deserialize(XmiCasDeserializer.java:2222)
        at de.unistuttgart.ims.coref.annotator.plugins.DefaultImportPlugin.getJCas(DefaultImportPlugin.java:84)
        at de.unistuttgart.ims.coref.annotator.worker.JCasLoader.readFile(JCasLoader.java:103)
        at de.unistuttgart.ims.coref.annotator.worker.JCasLoader.doInBackground(JCasLoader.java:136)
        at de.unistuttgart.ims.coref.annotator.worker.JCasLoader.doInBackground(JCasLoader.java:32)
        at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:304)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:343)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
        at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.lang.NullPointerException: Cannot invoke "String.length()" because "spec" is null
        at java.base/java.net.URL.<init>(URL.java:612)
        ... 20 more

In 1.14.x, it is working fine with the same commands

nilsreiter commented 3 years ago

For 1.15.x, I cannot reproduce the problem. The class is there and found. Which command did you use exactly?

pagelj commented 3 years ago

I also cannot reproduce it now... I think I might have used version 1.15 in the command while being on a different version branch in git, sorry! 1.15 works for me now

nilsreiter commented 3 years ago

Cool, that's the kind of issue I like :-)

nilsreiter commented 3 years ago

For 2.0.x, one issue could be that the file format has changed, and the Export tool only iterates over files with the new ending .ca2 oder ca2z.

bkis commented 2 years ago

For 2.0.x, one issue could be that the file format has changed, and the Export tool only iterates over files with the new ending .ca2 oder ca2z.

Is this intended behavior because the app only reads the new file format or can/should any old formats be processed by the export tool? If the former, could this issue be closed?