DoorsOauthSample : ResourseNotFoundException OSLCC004 [message #1408323] |
Thu, 14 August 2014 15:39  |
Eclipse User |
|
|
|
I've started experimenting with DOORS/DWA/OSLC/Eclipse Lyo but I've hit a roadblock.
I've installed DOORS/DWA 9.6 and think I've configured it properly to support OSLC consumers. Now I'm trying to use the Lyo DoorsOauthSample. When I run the sample, some of it works but ultimately I'm getting this error and I've spent the entire day trying to figure it out...
log4j:WARN No appenders could be found for logger (org.apache.wink.common.internal.registry.metadata.ProviderMetadataCollector).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See ://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Enter this URL in a browser and run again: ://localhost:1971/dwa/oauth-authorize-token?oauth_token=7b49dc0f-3038-46ec-bc95-b1909c9c1436
Services for Car :: Services for Car
Project Found
Aug 13, 2014 11:51:56 PM org.eclipse.lyo.client.oslc.samples.DoorsOauthSample main
-----
SEVERE: OSLCC004: The requested resource could not be found. Resource: ://localhost:1971/dwa/rm/discovery/service/urn:rational::1-53eaead14ded2c9c-P-00000001 Value: CreationFactory.
org.eclipse.lyo.client.exception.ResourceNotFoundException: OSLCC004: The requested resource could not be found. Resource: ://localhost:1971/dwa/rm/discovery/service/urn:rational::1-53eaead14ded2c9c-P-00000001 Value: CreationFactory.
at org.eclipse.lyo.client.oslc.OslcClient.lookupCreationFactoryResource(OslcClient.java:525)
at org.eclipse.lyo.client.oslc.OslcClient.lookupCreationFactory(OslcClient.java:563)
at org.eclipse.lyo.client.oslc.OslcClient.lookupCreationFactory(OslcClient.java:544)
at org.eclipse.lyo.client.oslc.samples.DoorsOauthSample.main(DoorsOauthSample.java:162)
I'm not sure what I'm missing. I wonder if I've missed something when it comes to the installation and configuration of DOORS/DWA for OSLC.
Oh! It's worth mentioning I just downloaded all the latest stable Lyo code Monday night.
|
|
|
|
|
|
|
|
Re: DoorsOauthSample : ResourseNotFoundException OSLCC004 [message #1408702 is a reply to message #1408608] |
Fri, 15 August 2014 17:03   |
Eclipse User |
|
|
|
Hi Matt,
the dateTime issue is a defect logged in DOORS. But there is no easy fix for that, we have no choice but to workaround around it in the lyo Sample. The ampersand issue is news to me though. And it would break stuff, I'd be surprised that isn't already known. I just tested creating a link from one app to a view in DOORS 9.6 called 'view & view' and it worked fine, a GET and PUT. I haven't tested with lyo, I might try to make time for that next week. Are you sure DOORS has the XML malformed?
But I do see your point re. the providers responsibilities and yes, that is the ideal. But I have yet to see an OSLC integration that just works with another tool with no changes. I'm not trying to knock them, they are better than the point-2-point ones. They free us from the hell of synchronizations getting out of sync and needing exact version matches. It is rare for upgrading to impact an OSLC based integration, so maintenance is dramatically easier. And maybe they are a bit easier to create in the first place and hopefully don't need major hacks to work with other providers, or maybe the provider can fix the issue. But no silver bullet...
Maeve
|
|
|
|
Re: DoorsOauthSample : ResourseNotFoundException OSLCC004 [message #1409259 is a reply to message #1408702] |
Sun, 17 August 2014 11:48   |
Eclipse User |
|
|
|
Here's the XML for the view containing an ampersand...
It appears that dcterms:title and dcterms:description do not escape the ampersand but dcterms:label does.
<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:oslc="http://open-services.net/ns/core#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:doors="http://jazz.net/doors/xmlns/prod/jazz/doors/2.0/">
<oslc:ServiceProvider rdf:about="http://localhost:1971/dwa/rm/discovery/service/urn:rational::1-53eaead14ded2c9c-M-00000020/view:00000005">
<oslc:prefixDefinition>
<oslc:PrefixDefinition>
<oslc:prefixBase rdf:resource="http://xmlns.com/foaf/0.1/"/>
<oslc:prefix>foaf</oslc:prefix>
</oslc:PrefixDefinition>
</oslc:prefixDefinition>
<dcterms:title rdf:parseType="Literal">Services for URD: Document, ID & Explorer</dcterms:title>
<oslc:prefixDefinition>
<oslc:PrefixDefinition>
<oslc:prefixBase rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
<oslc:prefix>rdf</oslc:prefix>
</oslc:PrefixDefinition>
</oslc:prefixDefinition>
<oslc:service>
<oslc:Service>
<oslc:domain rdf:resource="http://open-services.net/ns/rm#"/>
<oslc:queryCapability>
<oslc:QueryCapability>
<oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
<oslc:queryBase rdf:resource="http://localhost:1971/dwa/rm/oslc/query/urn:rational::1-53eaead14ded2c9c-M-00000020/view:00000005"/>
<dcterms:title rdf:parseType="Literal">Query in URD: Document, ID & Explorer</dcterms:title>
<oslc:label>URD: Document, ID & Explorer</oslc:label>
<oslc:resourceShape rdf:resource="http://localhost:1971/dwa/rm/oslc/shape/requirement/urn:rational::1-53eaead14ded2c9c-M-00000020"/>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
</oslc:QueryCapability>
</oslc:queryCapability>
<oslc:selectionDialog>
<oslc:Dialog>
<dcterms:title rdf:parseType="Literal">Select requirement from URD: Document, ID & Explorer</dcterms:title>
<oslc:label>URD: Document, ID & Explorer</oslc:label>
<oslc:dialog rdf:resource="http://localhost:1971/dwa/rm/calm/v2/selectRequirement/urn:rational::1-53eaead14ded2c9c-M-00000020/view:00000005"/>
<oslc:hintWidth>600px</oslc:hintWidth>
<oslc:hintHeight>500px</oslc:hintHeight>
<oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
</oslc:Dialog>
</oslc:selectionDialog>
<oslc:creationDialog>
<oslc:Dialog>
<dcterms:title rdf:parseType="Literal">Create requirement in URD: Document, ID & Explorer</dcterms:title>
<oslc:label>URD: Document, ID & Explorer</oslc:label>
<oslc:dialog rdf:resource="http://localhost:1971/dwa/rm/calm/v2/createRequirement/urn:rational::1-53eaead14ded2c9c-M-00000020/view:00000005"/>
<oslc:hintWidth>600px</oslc:hintWidth>
<oslc:hintHeight>500px</oslc:hintHeight>
<oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
</oslc:Dialog>
</oslc:creationDialog>
<oslc:creationFactory>
<oslc:CreationFactory>
<dcterms:title rdf:parseType="Literal">Create requirement in URD: Document, ID & Explorer</dcterms:title>
<oslc:label>URD: Document, ID & Explorer</oslc:label>
<oslc:creation rdf:resource="http://localhost:1971/dwa/rm/rest/requirementFactory/urn:rational::1-53eaead14ded2c9c-M-00000020"/>
<oslc:hintWidth>600px</oslc:hintWidth>
<oslc:hintHeight>500px</oslc:hintHeight>
<oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
<oslc:resourceShape rdf:resource="http://localhost:1971/dwa/rm/oslc/shape/requirement/urn:rational::1-53eaead14ded2c9c-M-00000020"/>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
</oslc:CreationFactory>
</oslc:creationFactory>
</oslc:Service>
</oslc:service>
<oslc:oauthConfiguration>
<oslc:OAuthConfiguration>
<oslc:oauthAccessTokenURI>http://localhost:1971/dwa/oauth-access-token</oslc:oauthAccessTokenURI>
<oslc:authorizationURI>http://localhost:1971/dwa/oauth-authorize-token</oslc:authorizationURI>
<oslc:oauthRequestTokenURI>http://localhost:1971/dwa/oauth-request-token</oslc:oauthRequestTokenURI>
</oslc:OAuthConfiguration>
</oslc:oauthConfiguration>
<oslc:prefixDefinition>
<oslc:PrefixDefinition>
<oslc:prefixBase rdf:resource="http://purl.org/dc/terms/"/>
<oslc:prefix>dcterms</oslc:prefix>
</oslc:PrefixDefinition>
</oslc:prefixDefinition>
<oslc:prefixDefinition>
<oslc:PrefixDefinition>
<oslc:prefixBase rdf:resource="http://open-services.net/ns/rm#"/>
<oslc:prefix>oslc_rm</oslc:prefix>
</oslc:PrefixDefinition>
</oslc:prefixDefinition>
<oslc:details rdf:resource="http://localhost:1971/dwa"/>
<dcterms:description rdf:parseType="Literal">DOORS Web Access OSLC RM services for URD: Document, ID & Explorer</dcterms:description>
<dcterms:publisher>
<oslc:Publisher>
<dcterms:title rdf:parseType="Literal">IBM Rational DOORS Web Access</dcterms:title>
<oslc:label>IBM Rational DOORS Web Access</oslc:label>
<dcterms:identifier>http://localhost:1971/dwa</dcterms:identifier>
<oslc:icon rdf:resource="http://localhost:1971/dwa/images/RDOORS.gif"/>
</oslc:Publisher>
</dcterms:publisher>
<oslc:prefixDefinition>
<oslc:PrefixDefinition>
<oslc:prefixBase rdf:resource="http://open-services.net/ns/core#"/>
<oslc:prefix>oslc</oslc:prefix>
</oslc:PrefixDefinition>
</oslc:prefixDefinition>
</oslc:ServiceProvider>
</rdf:RDF>
|
|
|
|
|
Re: DoorsOauthSample : ResourseNotFoundException OSLCC004 [message #1409999 is a reply to message #1408514] |
Tue, 19 August 2014 10:26  |
Eclipse User |
|
|
|
Maeve,
Regarding the dateTime fix you mentioned...
https://bugs.eclipse.org/bugs/show_bug.cgi?id=438163
I don't think it helps. From what I can determine, I have that code already. My git client says my codebase is up to date.
If I change the boolean processAsJavaObjects to true in the main() method I get the following exception...
Aug 19, 2014 10:21:32 AM org.eclipse.lyo.client.oslc.samples.DoorsOauthSample processCurrentPage
SEVERE: Unable to process artfiact at url: http://localhost:1971/dwa/rm/urn:rational::1-53eaead14ded2c9c-O-3-00000022
org.apache.wink.client.ClientRuntimeException: javax.ws.rs.WebApplicationException: com.hp.hpl.jena.datatypes.DatatypeFormatException: Lexical form '2014-08-15' is not a legal instance of Datatype[http://www.w3.org/2001/XMLSchema#dateTime -> class com.hp.hpl.jena.datatypes.xsd.XSDDateTime] Lexical form '2014-08-15' is not a legal instance of Datatype[http://www.w3.org/2001/XMLSchema#dateTime -> class com.hp.hpl.jena.datatypes.xsd.XSDDateTime] during parse -org.apache.xerces.impl.dv.InvalidDatatypeValueException: cvc-datatype-valid.1.2.1: '2014-08-15' is not a valid value for 'dateTime'.
at org.apache.wink.client.internal.handlers.ClientResponseImpl.readEntity(ClientResponseImpl.java:129)
at org.apache.wink.client.internal.handlers.ClientResponseImpl.getEntity(ClientResponseImpl.java:65)
at org.apache.wink.client.internal.handlers.ClientResponseImpl.getEntity(ClientResponseImpl.java:52)
at org.eclipse.lyo.client.oslc.samples.DoorsOauthSample.processCurrentPage(DoorsOauthSample.java:334)
at org.eclipse.lyo.client.oslc.samples.DoorsOauthSample.processPagedQueryResults(DoorsOauthSample.java:310)
at org.eclipse.lyo.client.oslc.samples.DoorsOauthSample.main(DoorsOauthSample.java:202)
Caused by: javax.ws.rs.WebApplicationException: com.hp.hpl.jena.datatypes.DatatypeFormatException: Lexical form '2014-08-15' is not a legal instance of Datatype[http://www.w3.org/2001/XMLSchema#dateTime -> class com.hp.hpl.jena.datatypes.xsd.XSDDateTime] Lexical form '2014-08-15' is not a legal instance of Datatype[http://www.w3.org/2001/XMLSchema#dateTime -> class com.hp.hpl.jena.datatypes.xsd.XSDDateTime] during parse -org.apache.xerces.impl.dv.InvalidDatatypeValueException: cvc-datatype-valid.1.2.1: '2014-08-15' is not a valid value for 'dateTime'.
at org.eclipse.lyo.oslc4j.provider.jena.AbstractOslcRdfXmlProvider.readFrom(AbstractOslcRdfXmlProvider.java:357)
at org.eclipse.lyo.oslc4j.provider.jena.OslcRdfXmlProvider.readFrom(OslcRdfXmlProvider.java:270)
at org.apache.wink.client.internal.handlers.ClientResponseImpl.readEntity(ClientResponseImpl.java:126)
... 5 more
Caused by: com.hp.hpl.jena.datatypes.DatatypeFormatException: Lexical form '2014-08-15' is not a legal instance of Datatype[http://www.w3.org/2001/XMLSchema#dateTime -> class com.hp.hpl.jena.datatypes.xsd.XSDDateTime] Lexical form '2014-08-15' is not a legal instance of Datatype[http://www.w3.org/2001/XMLSchema#dateTime -> class com.hp.hpl.jena.datatypes.xsd.XSDDateTime] during parse -org.apache.xerces.impl.dv.InvalidDatatypeValueException: cvc-datatype-valid.1.2.1: '2014-08-15' is not a valid value for 'dateTime'.
at com.hp.hpl.jena.graph.impl.LiteralLabelImpl.getValue(LiteralLabelImpl.java:326)
at com.hp.hpl.jena.graph.Node_Literal.getLiteralValue(Node_Literal.java:40)
at com.hp.hpl.jena.rdf.model.impl.LiteralImpl.getValue(LiteralImpl.java:101)
at org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper.handleExtendedPropertyValue(JenaModelHelper.java:1080)
at org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper.fromResource(JenaModelHelper.java:585)
at org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper.createObjectResultList(JenaModelHelper.java:458)
at org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper.fromJenaModel(JenaModelHelper.java:396)
at org.eclipse.lyo.oslc4j.provider.jena.AbstractOslcRdfXmlProvider.readFrom(AbstractOslcRdfXmlProvider.java:352)
|
|
|
Powered by
FUDForum. Page generated in 0.04734 seconds