Skip to content
This repository has been archived by the owner on Oct 12, 2021. It is now read-only.

json-ld support fails if server also includes the OSLC client library #85

Closed
jadelkhoury opened this issue Apr 8, 2020 · 2 comments · Fixed by #84
Closed

json-ld support fails if server also includes the OSLC client library #85

jadelkhoury opened this issue Apr 8, 2020 · 2 comments · Fixed by #84
Assignees

Comments

@jadelkhoury
Copy link
Contributor

I have an adaptor that also includes the latest oslc-client library oslc4j-client (the one for jax-rs 2.0).

If I do a GET JSON-LD, I will get the exception below!
Why? As soon as I include the oslc4j-client library, I end up using the Apache httpclient version 4.0 (due to the old oauth library). Without oslc4j-client, I use the needed httpclient version 4.5.10.

Dependency Hierarchy for an adaptor without oslc4j-client

withoutOSLCClient

Dependency Hierarchy for an adaptor with oslc4j-client

withOSLCClient

Exception

javax.servlet.ServletException: javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: java.lang.NoClassDefFoundError: org/apache/http/client/RedirectStrategy
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:168)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.Server.handle(Server.java:505)
@jadelkhoury
Copy link
Contributor Author

@jamsden @berezovskyi
I need your help with maven here. We will have this problem if we want to have both oauth and JSON-lD at the same time.

I can solve the problem by directly adding the httpclient 4.5.10 dependency to the adaptor. But that is of course not a good solution.

Can we somehow limit the use of the 4.0 library to oauth library?

@jadelkhoury
Copy link
Contributor Author

This issue can be solved by changes in the Lyo-client. See #84

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants