GEGlobalResearch / DARPA-ASKE-TA1

ANSWER Project to demonstrate knowledge-driven extraction of scientific models from code and texts
Other
8 stars 5 forks source link

Error: Only well-formed absolute URIrefs can be included in RDF/XML output with broken AST #11

Open kittaakos opened 5 years ago

kittaakos commented 5 years ago

With 6f05572 from the master.

Model:

uri"baseUri"

Error:

1368 [Worker-2: Xtext validation] ERROR org.eclipse.xtext.validation.ResourceValidatorImpl  - Only well-formed absolute URIrefs can be included in RDF/XML output: <baseUri#> Code: 57/REQUIRED_COMPONENT_MISSING in SCHEME: A component that is required by the scheme is missing.
com.hp.hpl.jena.shared.BadURIException: Only well-formed absolute URIrefs can be included in RDF/XML output: <baseUri#> Code: 57/REQUIRED_COMPONENT_MISSING in SCHEME: A component that is required by the scheme is missing.
    at com.hp.hpl.jena.rdfxml.xmloutput.impl.BaseXMLWriter.checkURI(BaseXMLWriter.java:835)
    at com.hp.hpl.jena.rdfxml.xmloutput.impl.BaseXMLWriter.xmlnsDecl(BaseXMLWriter.java:350)
    at com.hp.hpl.jena.rdfxml.xmloutput.impl.Unparser.printNameSpaceDefn(Unparser.java:1080)
    at com.hp.hpl.jena.rdfxml.xmloutput.impl.Unparser.wRDF(Unparser.java:338)
    at com.hp.hpl.jena.rdfxml.xmloutput.impl.Unparser.write(Unparser.java:247)
    at com.hp.hpl.jena.rdfxml.xmloutput.impl.Abbreviated.writeBody(Abbreviated.java:142)
    at com.hp.hpl.jena.rdfxml.xmloutput.impl.BaseXMLWriter.writeXMLBody(BaseXMLWriter.java:505)
    at com.hp.hpl.jena.rdfxml.xmloutput.impl.BaseXMLWriter.write(BaseXMLWriter.java:474)
    at com.hp.hpl.jena.rdfxml.xmloutput.impl.Abbreviated.write(Abbreviated.java:127)
    at com.hp.hpl.jena.rdfxml.xmloutput.impl.BaseXMLWriter.write(BaseXMLWriter.java:461)
    at com.ge.research.sadl.darpa.aske.processing.JenaBasedDialogModelProcessor.autoSaveModel(JenaBasedDialogModelProcessor.java:300)
    at com.ge.research.sadl.darpa.aske.processing.JenaBasedDialogModelProcessor.onValidate(JenaBasedDialogModelProcessor.java:273)
    at com.ge.research.sadl.validation.ResourceValidator.doValidate(ResourceValidator.java:76)
    at com.ge.research.sadl.validation.ResourceValidator.validate(ResourceValidator.java:72)
    at org.eclipse.xtext.validation.ResourceValidatorImpl.validate(ResourceValidatorImpl.java:90)
    at com.ge.research.sadl.validation.ResourceValidator.lambda$0(ResourceValidator.java:56)
    at org.eclipse.xtext.util.OnChangeEvictingCache.get(OnChangeEvictingCache.java:76)
    at com.ge.research.sadl.validation.ResourceValidator.validate(ResourceValidator.java:58)
    at org.eclipse.xtext.ui.editor.validation.ValidationJob$1.exec(ValidationJob.java:91)
    at org.eclipse.xtext.ui.editor.validation.ValidationJob$1.exec(ValidationJob.java:1)
    at org.eclipse.xtext.util.concurrent.CancelableUnitOfWork.exec(CancelableUnitOfWork.java:26)
    at org.eclipse.xtext.resource.OutdatedStateManager.exec(OutdatedStateManager.java:91)
    at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.internalReadOnly(XtextDocument.java:527)
    at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.readOnly(XtextDocument.java:499)
    at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:137)
    at org.eclipse.xtext.ui.editor.validation.ValidationJob.createIssues(ValidationJob.java:86)
    at org.eclipse.xtext.ui.editor.validation.ValidationJob.run(ValidationJob.java:67)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
kittaakos commented 4 years ago

This was a side-effect to of the non-working CA for the URIs. See: #14 Although we fixed the CA for imports, I propose adding another check to the onValidate method, and if the model has an invalid URL, we stop the validation. Otherwise, this error is logged every time to the console.