Open Kira-Cesonia opened 4 years ago
Hi
Have you considered using the latest oslcClient packages instead of org.eclipse.lyo.clients:oslc-java-client:2.4.0
? namely, oslc4j-client
, by adding the following dependency.
<dependency>
<groupId>org.eclipse.lyo.clients</groupId>
<artifactId>oslc4j-client</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
Is that an option? if so, you'll be using the latest versions of LyoClient, which we are in a better situation to solve problems.
I suspect your problem is a result of the few changes you have made (setting OSLC4J_STRICT_DATATYPES, removing xml-apis). Maybe they are hding a more underlying problem with the setup. But let's start with ysing the latest LyoClient.
Is there some sort of documentation for how to do that? I have been using this sample to build everything from here: https://github.com/OSLC/lyo-samples/blob/master/oslc-java-samples/src/main/java/org/eclipse/lyo/client/oslc/samples/DoorsOauthSample.java
And that sample apparently depends on me using org.eclipse.lyo.clients:oslc-java-client:2.4.0
. If I switch the dependency to org.eclipse.lyo.clients:oslc4j-client:4.0.0-SNAPSHOT
, I get errors like The import org.eclipse cannot be resolved
in the line import org.eclipse.lyo.oslc4j.provider.jena.AbstractOslcRdfXmlProvider
The documentations are unfortunately always not up to date in such open-source projects.
I have recently this sample to demonstrate how to connect using oauth, with the latest client. https://github.com/OSLC/lyo-samples/tree/master/client-oauth-discovery-dui
https://github.com/OSLC/lyo-samples/tree/master/oslc4j-client-samples also is a subset of the samples that were also migrated.
And I assume you have seen our documentation on how to setup a client/server with Lyo? https://oslc.github.io/developing-oslc-applications/eclipse_lyo/setup-an-oslc-provider-consumer-application.html
I get errors like The import org.eclipse cannot be resolved in the line import org.eclipse.lyo.oslc4j.provider.jena.AbstractOslcRdfXmlProvider
Strange, https://github.com/eclipse/lyo/blob/master/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/AbstractOslcRdfXmlProvider.java is still there in 4.0.0
excluding xml-apis because otherwise Java complains about it being already on the project path.
thank you, we will try to fix it for 4.0.0
Is there some sort of documentation for how to do that?
For now, these are the two best pointers:
I will be very glad if you collect notes and help me will update https://oslc.github.io/developing-oslc-applications/eclipse_lyo/eclipse-lyo.html
Just to be clear, @jadelkhoury, xml-apis are not the culprit, it's a package needed before Java 5 when XML support was added natively to the JDK. We will try to remove it or at least switch it's mode to provided.
I have a slight issue when trying to read requirements from DOORS via DWA via OSLC via LYO. For most attribute values this works. However, for the dates, the following error is shown:
I am using
org.eclipse.lyo.clients:oslc-java-client:2.4.0
, excludingxml-apis
because otherwise Java complains about it being already on the project path.My main problem is that I don't see myself as having a lot of influence options on this error. In DOORS, the attribute value in question is of its native "Date" format and displays to me the value "Monday, 10th of August 2020".
Now, here's the environment of this error in my code:
So, what can I do about this?