It's all about the answers!

Ask a question

Not able to run OSLC lyo sample code for RTC in Spring boot framework environment


Debayan De (132) | asked Nov 08 '21, 8:12 a.m.

 I am trying to create a connector for RTC using the sample code provided in the link 'https://github.com/OSLC/lyo-samples/blob/master/oslc-java-samples/src/main/java/org/eclipse/lyo/client/oslc/samples/RTCFormSample.java' in Spring Boot framework using STS 4 IDE.
My pom.xml contains all the dependencies which are there in the sample pom.xml provided in the above link, and it works fine when I invoke the method from Test class containing the main method.
But after deploying the jar and all the dependent jars under Maven Dependencies to my deployment folder, I can see that my code is not working when the call comes to the following line:

JazzRootServicesHelper helper = new JazzRootServicesHelper(webContextUrl,OSLCConstants.OSLC_CM_V2);

Need help running this code from a deployed jar, which I am not able to do at the moment, which I am guessing, is due to the absence of one or many dependent jars inside the deployed folder.

3 answers



permanent link
David Honey (7606) | answered Nov 08 '21, 8:42 a.m.
JAZZ DEVELOPER

You should probably ask that question on the OSLC Forum at https://forum.open-services.net/ since OSLC Lyo is part of OSLC code, not Jazz code.


permanent link
Daniel Chirillo (111) | answered Nov 08 '21, 2:56 p.m.
I recently started developing a Spring Boot app that uses Lyo. Haven't had Lyo-issues so far. 
You don't make it easy for others to help you when the only detail about your problem you share is, "it doesn't work."

Comments
Debayan De commented Nov 09 '21, 12:48 a.m.

I just want to know what all dependencies are required to successfully initialize an object of class 'JazzRootServicesHelper'..maybe I need that jar to be present in my deployment folder, as every time the call goes to the method's finally block after executing the line JazzRootServicesHelper helper = new JazzRootServicesHelper(webContextUrl,OSLCConstants.OSLC_CM_V2);.


David Honey commented Nov 09 '21, 12:44 p.m.
JAZZ DEVELOPER

I think you're asking on the wrong forum. It looks like JazzRootServicesHelper is not Jazz code but Eclipse Lyo code. Please ask your question on the OSLC Forum at https://forum.open-services.net/.


permanent link
Ralph Schoon (60.5k33643) | answered Nov 09 '21, 1:48 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Nov 09 '21, 2:14 p.m.

 As David has rightly pointed out, this is the wrong forum for the question. Moreover, the JazzRootservicesHelper is from an old Eclise Lyo version and deprecated. See https://github.com/OSLC/lyo-samples/blob/master/oslc4j-client-samples/src/main/java/org/eclipse/lyo/oslc4j/client/samples/EWMSample.java for the current version. The new class is called RootServicesHelper.


In addition to that, Lyo uses Maven and you would only have to look into the POM file in the Eclipse project containing the class above to understand the dependencies (or you try to figure it out using the imports). 

I have no idea how you get Spring and Maven to work together. There are likely other forums that are better suited for those questions.  

Your answer


Register or to post your answer.