Trying to get a Lyo 4.0 TRS up and running and I am faling

I try to follow https://oslc.github.io/developing-oslc-applications/eclipse_lyo/setup-an-oslc-provider-consumer-application#provide-trs-support

The application works http://localhost:8080/adaptor-sample - the index shows, but I can’t figure out where the TRS service is. Calling the URL adaptor-sample/trs does not work, other options either. There seems to be something missing. I had to create a servlet listener class, which is never mentioned, otherwise I had errors in the web Project. That listener is called. How would the code for this example look like?

I have tried it several times and ran into different issues that I was able to overcome, but the last bit is missing. Any help would be appreciated.

Hi

I see now that there is a big gap in the instructions, since these were originally focused on setting up the project, with no explanation on how to develop the actual code. the TRS part of the instructions assume one has that missing code developed.

One option is to look at a running example of a fake requirements tool that uses this TRS server.
Have a look at the project “adaptor-rm-webapp”.

  1. clone it from https://github.com/OSLC/lyo-adaptor-sample-modelling/
  2. Switch to the TRS branch
  3. Import the maven project adaptor-rm-webapp
  4. Once you run it (using mvn jetty:run), you can access the trs base from localhost:8081/adaptor-rm/services/trs

To see TRS in action, try to create/update some requirements using the Creation DUI
http://localhost:8086/adaptor-rm/com/sample/rm/creationdialogsampleclient.jsp?creationUri=http%3A%2F%2Flocalhost%3A8086%2Fadaptor-rm%2Fservices%2Frequirements%2Fcreator

  • You can create requirements by setting identifier to something unique
  • You can update a requirement by setting identifier to an id of an existing requirement

Please note that this a hack application used for testing and illustration purposes.

If you are interested in developing an adaptor from scratch, the only pointer I can give you at the moment is to use LyoDesigner (https://oslc.github.io/developing-oslc-applications/eclipse_lyo/toolchain-modelling-workshop) to create a simple adaptor and generate the skeleton code from it.

Or you can simply copy the projects from https://github.com/OSLC/lyo-adaptor-sample-modelling

Thanks Jad, I will try to follow that.

So there is a lot of code missing.I am glad on the one hand. I did not fail due to my incapability 8).

Unfortunately I was hoping to be able to start with 4.0.0-SNAPSHOT and not the old 2.4. Let me see where I can get. to. If you have the result of the workshop for 4.0.0. and could share that, I would be glad. I will try to contribute back, if I can.

Hi

It is actually 4.0.0-SNAPSHOT that is most active, and not the old 2.4.
I was wondering why you referred 2.4, but now I think I know.

Switch to the branch “4.0.0-SNAPSHOT” for the samples. This is the most up to date.
“master” is still pointing to 2.4.0 because that’s officially what is released under Lyo. But I hope we soon can release 4.0.0 and have all repos up to date.

Thanks Jad, I will give it a try!

I tried to load the latest from https://github.com/OSLC/lyo-adaptor-sample-modelling using “4.0.0-SNAPSHOT”
I had to do the usual, create the missing folders for src/main/java. I was left with a number of problems
‘Can not find the tag library descriptor for “http://java.sun.com/jsp/jstl/core”’

Not sure if that is expected. Searching the internet, I found adding

[dependency]
[groupId]taglibs[/groupId]
[artifactId]standard[/artifactId]
[version]1.1.2[/version]
[scope]compile[/scope]
[/dependency]

Should get rid of it, which it does. Not sure if that is the correct approach/or version.

I went to the branch TRS as suggested and I now have a working environment. I added the dependency above to get rid of compiler errors.

Thanks Jad.