Hello,
sorry for posting a Lyo question into the general SDKs category, but I was unable to select the Lyo category (does not show up in the list). Please feel free to move or relabel this topic.
When I send a POST request to any of the generated resource creation factories, I receive this error in the response: (for all resources, not just the AutomationPlan)
<oslc:Error> <oslc:message rdf:datatype="http://www.w3.org/2001/XMLSchema#string">OSLC011: Missing corresponding set method for method getSubject of class org.eclipse.lyo.oslc.domains.auto.AutomationPlan</oslc:message> <oslc:statusCode rdf:datatype="http://www.w3.org/2001/XMLSchema#string">400</oslc:statusCode> </oslc:Error>
The error occurs only when the resource created by the creation factory contains a property that has an occurrence of x-many (as opposed to x-1 or 1).
And at the same time the error occurs only when I send a non-empty POST request.
- An empty request works fine
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf=“http://www.w3.org/1999/02/22-rdf-syntax-ns#”>
</rdf:RDF> - Request with any element inside causes the error
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf=“http://www.w3.org/1999/02/22-rdf-syntax-ns#”
xmlns:j.0=“OSLC Automation Vocabulary | Automation - Open Services for Lifecycle Collaboration”>
<j.0:AutomationPlan />
</rdf:RDF>
I am using Lyo Designer 2.4 and Lyo Generator 2.4 in Eclipse 2018-09 (4.9.0), and my adapter uses OSLC core version 2.4 (or 2.4.0.M1). I followed the Toolchain modeling manual from the Lyo wiki (User Manual for Toolchain Modelling · eclipse/lyo.designer Wiki · GitHub) to model an OSLC adapter for the Automation domain. I have used predefined domain specifications (GitHub - eclipse/lyo.domains: POJOs that implement resources in OSLC domains).
I think the error might be caused by the adapter using different versions of OSLC core and Lyo in some parts of it, because I have seen the same error on adapter startup when I was using OSLC core 2.2 with Lyo 2.4 (error was fixed by changing the OSLC core version in the adapters pom file).
Can you, please, help with this issue? Maybe providing a sample pom file for OSLC core 2.4, because the OSLC4J project creation guide (Lyo/creating OSLC4J project - Eclipsepedia) uses OSLC core 2.2, and I didnt find any project in Lyo samples (GitHub - OSLC/lyo-samples) that uses 2.4.
If you need more info, let me know (project pom, toolchain diagram, etc.)
Ondřej Vašíček