uima-uimaj icon indicating copy to clipboard operation
uima-uimaj copied to clipboard

Opening CAS editor sometimes fails

Open reckart opened this issue 2 years ago • 0 comments

Describe the bug Opening a CAS (XMI or BCAS - does not matter) in the CAS editor sometimes fails with an exception.

To Reproduce Steps to reproduce the behavior - works sometimes, sometimes not...

  1. Open Eclipse
  2. Copy an XMI file into a project
  3. Copy a type system file into the project, but do not name it TypeSystem.xml
  4. Open the XMI
  5. From the open editor select to load the CAS using the type system file
  6. Poof

Expected behavior CAS should open.

Screenshots

With XMI

ava.lang.NullPointerException: Cannot load from object array because "this.svd.generators" is null
	at org.apache.uima.cas.impl.CASImpl.createFSAnnotCheck(CASImpl.java:1473)
	at org.apache.uima.cas.impl.CASImpl.createFS(CASImpl.java:1455)
	at org.apache.uima.cas.impl.XmiCasDeserializer$XmiCasDeserializerHandler.readFS(XmiCasDeserializer.java:614)
	at org.apache.uima.cas.impl.XmiCasDeserializer$XmiCasDeserializerHandler.processDeferredFSs(XmiCasDeserializer.java:2096)
	at org.apache.uima.cas.impl.XmiCasDeserializer$XmiCasDeserializerHandler.readFS(XmiCasDeserializer.java:514)
	at org.apache.uima.cas.impl.XmiCasDeserializer$XmiCasDeserializerHandler.startElement(XmiCasDeserializer.java:440)
	at org.apache.uima.util.XmlCasDeserializer$XmlCasDeserializerHandler.startElement(XmlCasDeserializer.java:149)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:518)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:183)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:351)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2726)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:542)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:889)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:825)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1224)
	at org.apache.uima.util.XmlCasDeserializer.deserializeR(XmlCasDeserializer.java:109)
	at org.apache.uima.util.CasIOUtils.load(CasIOUtils.java:439)
	at org.apache.uima.util.CasIOUtils.load(CasIOUtils.java:380)
	at org.apache.uima.util.CasIOUtils.load(CasIOUtils.java:242)
	at org.apache.uima.util.CasIOUtils.load(CasIOUtils.java:265)
	at org.apache.uima.caseditor.editor.DocumentUimaImpl.setContent(DocumentUimaImpl.java:306)
	at org.apache.uima.caseditor.editor.DocumentUimaImpl.<init>(DocumentUimaImpl.java:108)
	at org.apache.uima.caseditor.ide.DefaultCasDocumentProvider.createDocument(DefaultCasDocumentProvider.java:395)
	at org.apache.uima.caseditor.editor.TextDocumentProvider.createDocument(TextDocumentProvider.java:105)
	at org.eclipse.ui.texteditor.AbstractDocumentProvider.createElementInfo(AbstractDocumentProvider.java:330)
	at org.apache.uima.caseditor.editor.TextDocumentProvider.createElementInfo(TextDocumentProvider.java:137)
	at org.eclipse.ui.texteditor.AbstractDocumentProvider.connect(AbstractDocumentProvider.java:395)
	at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4177)
	at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:262)
	at org.apache.uima.caseditor.editor.AnnotationEditor.doSetInput(AnnotationEditor.java:934)
	at org.eclipse.ui.texteditor.AbstractTextEditor.setInputWithNotify(AbstractTextEditor.java:4238)
	at org.eclipse.ui.texteditor.AbstractTextEditor.setInput(AbstractTextEditor.java:4258)
	at org.apache.uima.caseditor.editor.AnnotationEditor.reopenEditorWithNewTypeSystem(AnnotationEditor.java:1178)
	at org.apache.uima.caseditor.ide.DefaultCasDocumentProvider$1.widgetSelected(DefaultCasDocumentProvider.java:551)

With BCAS

java.lang.NullPointerException: Cannot load from object array because "this.svd.generators" is null
	at org.apache.uima.cas.impl.CASImpl.createFSAnnotCheck(CASImpl.java:1473)
	at org.apache.uima.cas.impl.CASImpl.createFS(CASImpl.java:1455)
	at org.apache.uima.cas.impl.BinaryCasSerDes6.createCurrentFs(BinaryCasSerDes6.java:2130)
	at org.apache.uima.cas.impl.BinaryCasSerDes6.deserializeAfterVersion(BinaryCasSerDes6.java:2075)
	at org.apache.uima.cas.impl.BinaryCasSerDes.reinit(BinaryCasSerDes.java:586)
	at org.apache.uima.util.CasIOUtils.load(CasIOUtils.java:454)
	at org.apache.uima.util.CasIOUtils.load(CasIOUtils.java:380)
	at org.apache.uima.util.CasIOUtils.load(CasIOUtils.java:242)
	at org.apache.uima.util.CasIOUtils.load(CasIOUtils.java:265)
	at org.apache.uima.caseditor.editor.DocumentUimaImpl.setContent(DocumentUimaImpl.java:306)
	at org.apache.uima.caseditor.editor.DocumentUimaImpl.<init>(DocumentUimaImpl.java:108)
	at org.apache.uima.caseditor.ide.DefaultCasDocumentProvider.createDocument(DefaultCasDocumentProvider.java:395)
	at org.apache.uima.caseditor.editor.TextDocumentProvider.createDocument(TextDocumentProvider.java:105)
	at org.eclipse.ui.texteditor.AbstractDocumentProvider.createElementInfo(AbstractDocumentProvider.java:330)
	at org.apache.uima.caseditor.editor.TextDocumentProvider.createElementInfo(TextDocumentProvider.java:137)
	at org.eclipse.ui.texteditor.AbstractDocumentProvider.connect(AbstractDocumentProvider.java:395)
	at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4177)
	at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:262)
	at org.apache.uima.caseditor.editor.AnnotationEditor.doSetInput(AnnotationEditor.java:934)
	at org.eclipse.ui.texteditor.AbstractTextEditor.setInputWithNotify(AbstractTextEditor.java:4238)
	at org.eclipse.ui.texteditor.AbstractTextEditor.setInput(AbstractTextEditor.java:4258)
	at org.apache.uima.caseditor.editor.AnnotationEditor.reopenEditorWithNewTypeSystem(AnnotationEditor.java:1178)
	at org.apache.uima.caseditor.ide.DefaultCasDocumentProvider$1.widgetSelected(DefaultCasDocumentProvider.java:551)

Please complete the following information:

  • Version: 3.5.0-SNAPSHOT
  • OS: OS X

reckart avatar Nov 01 '23 07:11 reckart