Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Lyo » unable to get Resourceshape in 9.6.1 doors version(Resourceshape entity is not found)
unable to get Resourceshape in 9.6.1 doors version [message #1817082] Fri, 15 November 2019 09:44 Go to next message
shan p is currently offline shan pFriend
Messages: 3
Registered: November 2019
Junior Member
Hello Team,

I had used DoorsOauthSample example to get the requirements from doors 9.5.1 version and I can perform other operations like create/update successfully.

But when I start using this example for 9.6.1 doors version its failing at

RmUtil -> lookupRequirementsInstanceShapes method

ResourceShape resourceShape = response.getEntity(ResourceShape.class);

The above line returns null.

I had compared the xml responses for 9.5.1 & 9.6.1 versions but could not see much differences.

Why this getEntity failed to get the response in ResourceShape pojo format even though the responses looks similar.

I have pasted first few lines of xml responses below for both versions,

in doors 9.5.1 :
------------------

<?xml version="1.0"?>
<rdf:RDF
xmlns:dcterms="http: //purl.org/dc/terms/"
xmlns:rdf="http: //www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:oslc="http: //open-services.net/ns/core#"
xmlns:oslc_rm="http: //open-services.net/ns/rm#">
<oslc:ResourceShape rdf:about="http: //brt6-107-192:8080/dwa/rm/oslc/shape/requirement/urn:rational:ers-5cac4c35148b45a3:1-5cac4c35148b45a3-M-00000042">
<oslc:property>
<oslc:Property>
<oslc:readOnly rdf:datatype="http: //www.w3.org/2001/XMLSchema#boolean"
>true</oslc:readOnly>
<dcterms:title rdf:parseType="Literal">Last Modified Time</dcterms:title>
<oslc:valueType rdf:resource="http: //www.w3.org/2001/XMLSchema#dateTime"/>
<oslc:occurs rdf:resource="http: //open-services.net/ns/core#Exactly-one"/>
<oslc:propertyDefinition rdf:resource="http: //brt6-107-192:8080/dwa/rm/urn:rational::1-5cac4c35148b45a3-M-00000042/types/attrDef-8"/>
<oslc:name rdf:datatype="http: //www.w3.org/2001/XMLSchema#string"
>attrDef-8</oslc:name>
</oslc:Property>
</oslc:property>
.......

In Doors 9.6.1:
------------------
<?xml version="1.0"?>
<rdf:RDF
xmlns:dcterms="http: //purl.org/dc/terms/"
xmlns:rdf="http: //www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:oslc="http: //open-services.net/ns/core#"
xmlns:oslc_rm="http: //open-services.net/ns/rm#"
xmlns:doorsAttribute="http: //jazz.net/ns/rm/doors/attribute#">
<oslc:ResourceShape rdf:about="http: //abc.com:8080/dwa/rm/oslc/shape/requirement/urn:rational::1-5da752e716151945-M-00000082">
<oslc:property>
<oslc:Property>
<oslc:readOnly rdf:datatype="http: //www.w3.org/2001/XMLSchema#boolean"
>true</oslc:readOnly>
<dcterms:title rdf:parseType="Literal">Last Modified Time</dcterms:title>
<oslc:valueType rdf:resource="http: //www.w3.org/2001/XMLSchema#dateTime"/>
<oslc:occurs rdf:resource="http: //open-services.net/ns/core#Exactly-one"/>
<oslc:propertyDefinition rdf:resource="http: //abc.com:8080/dwa/rm/urn:rational::1-5da752e716151945-M-00000082/types/attrDef-8"/>
<oslc:name rdf:datatype="http: //www.w3.org/2001/XMLSchema#string"
>attrDef-8</oslc:name>
</oslc:Property>
</oslc:property>
<oslc:property>
..........

If you see the above response only addition in 9.6.1 version is
xmlns:doorsAttribute="http: //jazz.net/ns/rm/doors/attribute#">
<oslc:ResourceShape

But is this causing the issue or is there any property do i need to set for fixing this issue?

Please help me to fix this issue.

Thanks in advance.
Re: unable to get Resourceshape in 9.6.1 doors version [message #1817116 is a reply to message #1817082] Fri, 15 November 2019 15:48 Go to previous messageGo to next message
Jad El-khoury is currently offline Jad El-khouryFriend
Messages: 61
Registered: August 2015
Member
Since you have the code, try to first print out the response to be really sure of what you are getting back.
For example, replace

response.getEntity(ResourceShape.class);

With
response.getEntity(String.class);

And read the content.

This will break the code after it, but it's a debugging step
Re: unable to get Resourceshape in 9.6.1 doors version [message #1817240 is a reply to message #1817116] Tue, 19 November 2019 04:55 Go to previous messageGo to next message
shan p is currently offline shan pFriend
Messages: 3
Registered: November 2019
Junior Member
Hi,
Thanks for your response.

In the above question I had mentioned the partial responses of the different versions as well. and the differences.

i.e I had already printed out the contents using getEntity(String.class).

P.S - Even though the responses looks almost similar but still the API unable to parse it.

Is there any other possibilities to resolve this issue.

[Updated on: Tue, 19 November 2019 07:12]

Report message to a moderator

Re: unable to get Resourceshape in 9.6.1 doors version [message #1817271 is a reply to message #1817240] Tue, 19 November 2019 17:09 Go to previous messageGo to next message
Andrii BerezovskyiFriend
Messages: 24
Registered: May 2016
Junior Member
I don't see any big change in https://www.diffchecker.com/NCxkDPIf

We don't have experience with the exact same type of error. Please make sure Lyo logging is configured properly (ie there is no error messages like "Defaulting to no-operation (NOP) logger implementation" or "SLF4J: Class path contains multiple SLF4J bindings"). Also, please set the level to DEBUG or TRACE until you figure out the problem.

I would actually pay more attention to the Doors log files because that's the component you changed.


Best regards,
Andrew
Eclipse Lyo project lead & OSLC Core TC voting member

[Updated on: Tue, 19 November 2019 17:09]

Report message to a moderator

Re: unable to get Resourceshape in 9.6.1 doors version [message #1817572 is a reply to message #1817271] Tue, 26 November 2019 06:31 Go to previous messageGo to next message
shan p is currently offline shan pFriend
Messages: 3
Registered: November 2019
Junior Member
Hello All,

I have tried using oslc4j-core 2.4.0 and 4.0.0 libraries. But still the same issue persists.

It looks like the JenaModelHelper class from oslc4j-jena-provider is unable to unmarshal the response to ResourceShape class.

Is there any alternative is available?

Did anyone find same issue?

Please help me to resolve this issue.

Thanks
Re: unable to get Resourceshape in 9.6.1 doors version [message #1817577 is a reply to message #1817572] Tue, 26 November 2019 07:03 Go to previous message
Jad El-khoury is currently offline Jad El-khouryFriend
Messages: 61
Registered: August 2015
Member
How is it unable to unmarshall? Are you getting an error? Please give some details.
Previous Topic:How to get\to set a workflow state value using OSLC Java API in DNG
Next Topic:OSLC DXL services example
Goto Forum:
  


Current Time: Sat Nov 09 00:43:09 GMT 2024

Powered by FUDForum. Page generated in 0.03146 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top