KnowledgeCaptureAndDiscovery / wings

Wings workflow system
http://www.wings-workflows.org
Apache License 2.0
48 stars 21 forks source link

When the wings instance doesn't contain workflows, it sends an empty response and breaks ont-api #143

Open mosoriob opened 2 years ago

mosoriob commented 2 years ago

When the wings instance doesn't contain workflows, it sends an empty response. This is breaking the disk code

            KBAPI kb = fac.getKB(liburi, OntSpec.PLAIN);

The error output is:

disk-web-backend-1   | org.apache.jena.riot.RiotException: Premature end of file.
disk-web-backend-1   |  at org.apache.jena.riot.system.ErrorHandlerFactory$ErrorHandlerStd.fatal(ErrorHandlerFactory.java:147)
disk-web-backend-1   |  at org.apache.jena.riot.lang.ReaderRIOTRDFXML$ErrorHandlerBridge.fatalError(ReaderRIOTRDFXML.java:313)
disk-web-backend-1   |  at org.apache.jena.rdfxml.xmlinput.impl.ARPSaxErrorHandler.fatalError(ARPSaxErrorHandler.java:47)
disk-web-backend-1   |  at org.apache.jena.rdfxml.xmlinput.impl.XMLHandler.warning(XMLHandler.java:199)
disk-web-backend-1   |  at org.apache.jena.rdfxml.xmlinput.impl.XMLHandler.fatalError(XMLHandler.java:229)
disk-web-backend-1   |  at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
disk-web-backend-1   |  at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
disk-web-backend-1   |  at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
disk-web-backend-1   |  at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
disk-web-backend-1   |  at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
disk-web-backend-1   |  at org.apache.xerces.impl.XMLDocumentScannerImpl$XMLDeclDispatcher.dispatch(Unknown Source)
disk-web-backend-1   |  at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
disk-web-backend-1   |  at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)

cc: @varunratnakar

Originally posted by @mosoriob in https://github.com/KnowledgeCaptureAndDiscovery/DISK-WEB/issues/23#issuecomment-1151398065

mosoriob commented 2 years ago
➜  ~ curl  https://wings.dev.disk.isi.edu/wings-portal/export/users/admin/bikes_rent/workflows/library.owl 
# create a workflow
➜  ~ curl  https://wings.dev.disk.isi.edu/wings-portal/export/users/admin/bikes_rent/workflows/library.owl
<?xml version="1.0"?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:j.0="http://www.wings-workflows.org/ontology/workflow.owl#"
      xml:base="http://localhost:8080/wings-portal/export/users/admin/bikes_rent/workflows/library.owl">
      <j.0:WorkflowTemplate rdf:about="bikes-rent.owl#bikes-rent"/>
</rdf:RDF>