oslc-op / sysml-oslc-server

Sample code to demonstrate how to use Lyo Designer to create an OSLC server for the SysML v2 REST API.
Apache License 2.0
10 stars 2 forks source link

multiple versions of jsonldjava seem to be used when using Lyo 5.0.0-SNAPSHOT #22

Closed jadelkhoury closed 2 years ago

jadelkhoury commented 2 years ago

When running the sysml server, many warnings relating to jsonld library appear in the log. for example, Checking the dependencies, it seems that jsonld 0.13.4 is used through the Jena 4.0.0 library. But where does jsonld 0.12.5 come from?

[WARNING] com.github.jsonldjava.shaded.com.google.common.util.concurrent.WrappingExecutorService scanned from multiple locations: jar:file:///C:/Users/jad/git/sysml/sysml-oslc-server/org.oasis.oslcop.sysml.oslc-server/target/sysml_oslc_server/WEB-INF/lib/jsonld-java-0.12.5.jar!/com/github/jsonldjava/shaded/com/google/common/util/concurrent/WrappingExecutorService.class, jar:file:///C:/Users/jad/git/sysml/sysml-oslc-server/org.oasis.oslcop.sysml.oslc-server/target/sysml_oslc_server/WEB-INF/lib/jsonld-java-0.13.4.jar!/com/github/jsonldjava/shaded/com/google/common/util/concurrent/WrappingExecutorService.class
[WARNING] com.github.jsonldjava.shaded.com.google.common.util.concurrent.WrappingScheduledExecutorService scanned from multiple locations: jar:file:///C:/Users/jad/git/sysml/sysml-oslc-server/org.oasis.oslcop.sysml.oslc-server/target/sysml_oslc_server/WEB-INF/lib/jsonld-java-0.12.5.jar!/com/github/jsonldjava/shaded/com/google/common/util/concurrent/WrappingScheduledExecutorService.class, jar:file:///C:/Users/jad/git/sysml/sysml-oslc-server/org.oasis.oslcop.sysml.oslc-server/target/sysml_oslc_server/WEB-INF/lib/jsonld-java-0.13.4.jar!/com/github/jsonldjava/shaded/com/google/common/util/concurrent/WrappingScheduledExecutorService.class
jadelkhoury commented 2 years ago

unfortunatly, this is more serious than just a "warning". No Json-ld package seems to be available in the end. With the following call leading to an exception RDFReaderI reader = model.getReader("JSON-LD");

The workaround is to avoid the warnings by running jetty:run instead of jetty:run-war.

berezovskyi commented 2 years ago

I updated Lyo 5.0.0-SNAPSHOT from Jena 4.3.2 to Jena 4.4.0 yesterday. Few days ago it seemed to work without these warnings. Maybe one of the projects is still using earlier version of Jena or Lyo?

berezovskyi commented 2 years ago

Could it be that you have an old oauth-webapp that did not get refreshed or some other overlay project? Are you sure you always run mvn CLEAN package jetty:run-war?

jadelkhoury commented 2 years ago

I updated Lyo 5.0.0-SNAPSHOT from Jena 4.3.2 to Jena 4.4.0 yesterday. Few days ago it seemed to work without these warnings. Maybe one of the projects is still using earlier version of Jena or Lyo?

You mean the SysML projects, or internally with lyo? From what I Checked, both org.oasis.oslcop.sysml.oslc-server & org.oasis.oslcop.sysml.oslc-domains uses Lyo 5.

and yes, I have done mvn clean on both domain (first) and then server.

You mean you cannot reproduce? Another (probably unrelated) Jena issue is that insertModel takes a very long time. The request/response to the store is fast. But Jena takes many seconds to process the response stream from the store.

berezovskyi commented 2 years ago

internally with lyo

internally, but obviously an update to the SNAPSHOT propagates to everything using it in the next build

You mean you cannot reproduce?

I will try tomorrow.

Another (probably unrelated) Jena issue is that insertModel takes a very long time. The request/response to the store is fast. But Jena takes many seconds to process the response stream from the store.

Really waiting for Jena 4.5.0 release. Their Jira is a total bloodbath now, so many bug reports and performance regressions (and has been roughly since 3.15 or so but got a bit worse since 4.0.0). We can consider rolling back for now as well, the question is to where -- I guess 4.3.2? But maybe worth investigating this bug first and if it's on their side, reporting to Jena to make sure it gets fixed in Jena 4.5.0.

jadelkhoury commented 2 years ago

How about we just revert this Sysml code to use some alpha version of Lyo 5 for now? Instead of rolling back all of Lyo. How serious are these Jena problems? Should we warn Lyo users about potential problems with using the 5.0.0-SNAPSHOT?

berezovskyi commented 2 years ago

cannot reproduce