Closed grigobog closed 2 years ago
The error is:
cz.cvut.kbss.jopa.exceptions.RollbackException: cz.cvut.kbss.jopa.exceptions.CardinalityConstraintViolatedException: At least 1 values of attribute FlowElement.has_container expected in instance _3M86QLqlEeq4RbAg2SWqZQ, but got only 0
@grigobog Your assumptions are ok to assume that you will have
FlowElement.has_container
inferred from has_flowElements
property
This can be seen if you take ontiky.owl
file in protege and start reasoner as can be seen here :
However to see inferences in protege you had to do use a reasoner:
Same way you have to do it within your code. See my pull request which is failing but i guess you can continue from this point:
In case you are not able to fix it like that, try instead of that writing a test to load ontiky.owl
that you have created (if i uncomment all failing violations you can generate ontiky.owl
file). But remember that before loading the ontiky.owl
you need to include import triple in there (of course :) :
<Ontology>
<imports rdf:resource="http://BPMNbasedOntology"/>
</Ontology>
Reopened. Issue was only reasolved for reading case: Steps to verify:
Issue is still present for saving (persisting) case: Steps to reproduce:
Following the reading case 1.-4. i got into this issue while runnig the test:
I tried remove java.xml but had no success ... I'll try later.
Hm, seems like the problem is somehow related to JAXB library, which is used to read files with bpmn and organization structure. Most likely it's caused by different Java version, I'm using Amazon Corretto 11, which can be downloaded right from Intellij Idea. If you are using Eclipse and java version is ok, the error may be caused by unnecessary external libraries in modulepath. This is all I could find in google for now.
readTest_whenObjectExists_inferredFieldsShouldBeSet()
does not make sense to me. It is not executable by itself :( as some other tests generates files that this test uses. Anyway, even if i let other tests to generate input files for this test, i get invalid input file and actualElement
within this test is null:
The generated file resources/jednani-sag-bpmn.ttl
is invalid turtle format file:
{
<http://onto.fel.cvut.cz/ontologies/ucl/example/jednani-sag-bpmn> a owl:Ontology .
<http://onto.fel.cvut.cz/ontologies/ucl/example/jednani-sag-bpmn> owl:imports <http://onto.fel.cvut.cz/ontologies/ucl/example/jednani-sag-organization-structure> .
}
Even if I fix the file and make it parsable, it does not help. Thus I am switching to mapAndWriteTest
but I am not sure if I will be able to help ....
Fixed in: https://github.com/kbss-cvut/jopa/issues/98 (0.18.1)
will close after tests.
Viz Meeting notes (BG) - 2021-12-01 commit 761b35bf6e32150dbcc47583a3c52c27591aef38 Kroky pro reprodukci: