Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java Error when Running jar-with-dependencies #164

Open
michaelrowe01 opened this issue Jul 5, 2022 · 6 comments
Open

Java Error when Running jar-with-dependencies #164

michaelrowe01 opened this issue Jul 5, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@michaelrowe01
Copy link

I am trying to generate a OAS Schema based on a rdf/xml definition. I am getting the following error when running the command line.
target % java -jar oba-3.6.0-jar-with-dependencies.jar -c config.yaml SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. outputs/rqm-test/ontology0.owl <http://jazz.net/ns/qm/rqm#Category> <http://jazz.net/ns/qm/rqm#CategoryType> <http://jazz.net/xmlns/prod/jazz/rqm/process/1.0/Priority> <http://jazz.net/xmlns/prod/jazz/rqm/process/1.0/WorkflowState> <http://open-services.net/ns/core#Property> <http://open-services.net/ns/core#ResourceShape> [2022-07-05 10:37:34] [SEVERE ] Error while creating the API specification: null java.lang.NullPointerException at edu.isi.oba.Mapper.add_owlclass_to_openapi(Mapper.java:156) at edu.isi.oba.Mapper.createSchemas(Mapper.java:126) at edu.isi.oba.Oba.main(Oba.java:71)

I am attaching both the config.yaml and the qm.xml files in the attached ZIP file - files.zip

@mosoriob mosoriob self-assigned this Jul 5, 2022
@dgarijo
Copy link
Contributor

dgarijo commented Jul 5, 2022

Thanks, I will have a look. It may be due to a wrong path in the config.yaml. The OpenAPI creation should at least work if the ontology provided is valid.

@dgarijo dgarijo self-assigned this Jul 5, 2022
@dgarijo dgarijo added the bug Something isn't working label Jul 5, 2022
@mosoriob
Copy link
Contributor

mosoriob commented Jul 8, 2022

The code couldn't contain the default prefix

format.asPrefixOWLDocumentFormat().getDefaultPrefix()
null

@dgarijo
Copy link
Contributor

dgarijo commented Jul 8, 2022

Thanks @mosoriob,
I have merged your PR addressing this issue. @michaelrowe01, you need to add a prefix for your ontology (at least a default one) so we know which is the main artifact on top of which we build the API.

@michaelrowe01
Copy link
Author

Thanks @dgarijo Will update and confirm.

@michaelrowe01
Copy link
Author

michaelrowe01 commented Jul 8, 2022

adding the additional "root" prefix worked...; however the output that was created in the yaml doesn't really provide what I was expecting..
output.zip
there is no schema defined in the yaml --- perhaps I am using this incorrectly

@dgarijo
Copy link
Contributor

dgarijo commented Jul 8, 2022

The output is indeed incorrect.
However, from what I see in the qm.xml file, there are no owl:Classes.
OBA expects OWL ontologies, and this one looks like it's defining its own terms for categories and properties. This is not supported at the moment (we support OWL/RDFs vocabularies)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants