# SOLVED OSLC Lyo API fails to authenticate in ELM system with Jazz Authorization Server enabled

**URL:** <https://forum.open-services.net/t/solved-oslc-lyo-api-fails-to-authenticate-in-elm-system-with-jazz-authorization-server-enabled/903>\
**Category:** Uncategorized\
**Created:** [May 8, 2025, 11:33pm UTC](https://forum.open-services.net/t/solved-oslc-lyo-api-fails-to-authenticate-in-elm-system-with-jazz-authorization-server-enabled/903 "2025-05-08T23:33:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jay999g](https://forum.open-services.net/letter_avatar_proxy/v4/letter/j/c68b51/32.png) [@jay999g](https://forum.open-services.net/u/jay999g)\
**Post date:** [May 8, 2025, 11:33pm UTC](https://forum.open-services.net/t/solved-oslc-lyo-api-fails-to-authenticate-in-elm-system-with-jazz-authorization-server-enabled/903/1 "2025-05-08T23:33:54Z")

</div>

Hi,

I’m trying to execute the lyo-client-sample located at ‘[lyo-samples/lyo-client-samples at master · OSLC/lyo-samples · GitHub](https://github.com/OSLC/lyo-samples/tree/master/lyo-client-samples)’ with my IBM ELM System which has Jazz Authorization Server enabled for authentication.  
Java version: 17  
ELM system 7.0.2 SR1, Authentication on JAS and has ERM, EWM , ETM registered.  
Execution Arguments: -url [https://xxx.xxx.com/rm](https://xxx.xxx.com/rm) -user testuser -password testpassword -project “JKE Banking (RM)”

It throws following exception in the method RootServicesHelper.processRootServices().  
Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/jena/util/Metadata  
at org.apache.jena.query.ARQ.(ARQ.java:607)  
at org.apache.jena.sparql.system.InitARQ.start(InitARQ.java:29)  
at org.apache.jena.base.module.Subsystem.lambda$initialize$1(Subsystem.java:117)  
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)  
at org.apache.jena.base.module.Subsystem.forEach(Subsystem.java:193)  
at org.apache.jena.base.module.Subsystem.forEach(Subsystem.java:169)  
at org.apache.jena.base.module.Subsystem.initialize(Subsystem.java:115)  
at org.apache.jena.sys.JenaSystem.init(JenaSystem.java:89)  
at org.apache.jena.rdf.model.ModelFactory.(ModelFactory.java:48)  
at org.eclipse.lyo.client.RootServicesHelper.processRootServices(RootServicesHelper.java:145)  
at org.eclipse.lyo.client.RootServicesHelper.(RootServicesHelper.java:127)  
at org.eclipse.lyo.samples.client.ERMSample.main(ERMSample.java:154)  
Caused by: java.lang.ClassNotFoundException: org.apache.jena.util.Metadata  
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)  
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)  
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)  
… 12 more

I would appreciate any insights or pointers that could help identify the possible root cause of this exception.

Note: I also tried these samples on Jazz sandbox ELM 7.1 iFix003, However came across same error.

Thanks in advance for any support on this .

Best Regards,  
elmUser

---

<div class="post-metadata">

**Author:** ![jad](https://forum.open-services.net/user_avatar/forum.open-services.net/jad/32/42_2.png) [@jad](https://forum.open-services.net/u/jad)\
**Post date:** [May 9, 2025, 4:48pm UTC](https://forum.open-services.net/t/solved-oslc-lyo-api-fails-to-authenticate-in-elm-system-with-jazz-authorization-server-enabled/903/2 "2025-05-09T16:48:32Z")

</div>

Hi

Seems that you are missing a class from the Jena library. Or it could also be because the result from your requests are confusing the Jena logic.

Are you executing the code as instructed in the readme file? that is, using maven?

> **[lyo-samples/lyo-client-samples at master · OSLC/lyo-samples](https://github.com/OSLC/lyo-samples/tree/master/lyo-client-samples)**
>
> Contribute to OSLC/lyo-samples development by creating an account on GitHub.

The url you share may not be correct or complete.  
[https://xxx.xxx.com/rm](https://xxx.xxx.com/rm)

Can you put a breakpoint at/before this point to see what URL you have for the rootservices?  
org.eclipse.lyo.client.RootServicesHelper.processRootServices(RootServicesHelper.java:145)

Try then to paste that url in your browser or using Postman. Can you get some xml file?

---

<div class="post-metadata">

**Author:** ![jay999g](https://forum.open-services.net/letter_avatar_proxy/v4/letter/j/c68b51/32.png) [@jay999g](https://forum.open-services.net/u/jay999g)\
**Post date:** [May 9, 2025, 5:56pm UTC](https://forum.open-services.net/t/solved-oslc-lyo-api-fails-to-authenticate-in-elm-system-with-jazz-authorization-server-enabled/903/3 "2025-05-09T17:56:41Z")

</div>

Hi Jad,

For the execution, I’ve been closely following the instructions provided in the README file. The project uses Maven, and I’ve verified that all dependencies are being pulled in correctly.

Although I’ve masked the actual URL in my earlier message, here’s an example using the Jazz Sandbox: `https://jazz.net/sandbox01-ccm/web/rootservices`

This Root Services URL is accessible, and I can see the project area name listed in the returned XML.

That said, I’m still encountering a `NoClassDefFoundError` related to a missing Jena class. According to the `pom.xml`, the project uses Jena version 4.8.0.

This exception occurs consistently at the same line of code—regardless of whether I use my on-prem ELM setup or the Jazz Sandbox. I wonder if JAS base authentication has anything to do with it.

Any further guidance or suggestions would be greatly appreciated.

Thanks & Regards,  
Jay

---

<div class="post-metadata">

**Author:** ![andrew](https://forum.open-services.net/user_avatar/forum.open-services.net/andrew/32/28_2.png) [@andrew](https://forum.open-services.net/u/andrew)\
**Post date:** [May 9, 2025, 10:02pm UTC](https://forum.open-services.net/t/solved-oslc-lyo-api-fails-to-authenticate-in-elm-system-with-jazz-authorization-server-enabled/903/4 "2025-05-09T22:02:07Z")

</div>

Hello Jay @jay999g,

Eclipse Foundation has been having serious issues with their disk arrays ([https://www.eclipsestatus.io](https://www.eclipsestatus.io)) and the snapshot builds restored are significantly outdated in some cases.

I just pushed an update to [refimpl](https://github.com/oslc-op/refimpl) and [lyo-client-samples](https://github.com/OSLC/lyo-samples/tree/master/lyo-client-samples) to pin Lyo to `7.0.0.Alpha2` instead of the floating SNAPSHOT. If you pull the latest changes, you should be able to get rid of the errors you have experienced.

Cheers,  
Andrew

---

<div class="post-metadata">

**Author:** ![jay999g](https://forum.open-services.net/letter_avatar_proxy/v4/letter/j/c68b51/32.png) [@jay999g](https://forum.open-services.net/u/jay999g)\
**Post date:** [May 12, 2025, 8:21pm UTC](https://forum.open-services.net/t/solved-oslc-lyo-api-fails-to-authenticate-in-elm-system-with-jazz-authorization-server-enabled/903/5 "2025-05-12T20:21:12Z")

</div>

Hi Andrew,

Thank you for your feedback and pushing new updates on [lyo-client-samples](https://github.com/OSLC/lyo-samples/tree/master/lyo-client-samples)!

I went ahead and tried this sample code on jazz sandbox and it worked on CCM and RM (I updated code to support BASIC authentication) project areas.  
I’ll go ahead and try it on my on-prem environment.

I’ll keep you updated on it.

Best Regards,  
Jay

---

<div class="post-metadata">

**Author:** ![andrew](https://forum.open-services.net/user_avatar/forum.open-services.net/andrew/32/28_2.png) [@andrew](https://forum.open-services.net/u/andrew)\
**Post date:** [May 12, 2025, 10:29pm UTC](https://forum.open-services.net/t/solved-oslc-lyo-api-fails-to-authenticate-in-elm-system-with-jazz-authorization-server-enabled/903/7 "2025-05-12T22:29:06Z")

</div>

Hi Jay,

Glad to hear you’re making progress. Would appreciate a PR for the Basic auth in the RM sample if possible - has been on the TODO list for a while. In an on-prem environment, you may need to use JFS auth instead of Basic - cf.[test-jazz\_kth.sh](https://github.com/OSLC/lyo-samples/blob/master/bin/test-jazz_kth.sh) vs [test-jazz\_net.sh](https://github.com/OSLC/lyo-samples/blob/master/bin/test-jazz_net.sh).

All the best,  
Andrew

---

<div class="post-metadata">

**Author:** ![jay999g](https://forum.open-services.net/letter_avatar_proxy/v4/letter/j/c68b51/32.png) [@jay999g](https://forum.open-services.net/u/jay999g)\
**Post date:** [May 20, 2025, 2:48pm UTC](https://forum.open-services.net/t/solved-oslc-lyo-api-fails-to-authenticate-in-elm-system-with-jazz-authorization-server-enabled/903/8 "2025-05-20T14:48:14Z")

</div>

Hi Everyone,

Thank you for your valuable inputs on this post!  
o far, I’ve been able to proceed using Basic Authentication in the on-premises environment. However, Form-based authentication is still not functioning as expected. It appears that the authentication request is not being correctly redirected from the ELM applications to JAS.

Due to time constraints, I will continue with Basic Authentication for now. I plan to revisit and resolve this issue once I refactor the entire codebase to ensure compatibility with Java 17.

Thanks once again for supporting on this.

Warm Regards,  
Jay

---

<div class="post-metadata">

**Author:** ![andrew](https://forum.open-services.net/user_avatar/forum.open-services.net/andrew/32/28_2.png) [@andrew](https://forum.open-services.net/u/andrew)\
**Post date:** [May 20, 2025, 3:47pm UTC](https://forum.open-services.net/t/solved-oslc-lyo-api-fails-to-authenticate-in-elm-system-with-jazz-authorization-server-enabled/903/9 "2025-05-20T15:47:58Z")

</div>

Hello Jay, great to hear that Basic auth is working for your local deployment - it did not for us OOB.

In your case, you may want to give OAuth 2 a try at a later point in time - check your JAS configuration to be sure. See two OAuth samples under [GitHub - OSLC/lyo-samples](https://github.com/OSLC/lyo-samples/tree/master)

Best regards,  
Andrew
