Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Lyo » DoorsOauthSample : ResourseNotFoundException OSLCC004
DoorsOauthSample : ResourseNotFoundException OSLCC004 [message #1408323] Thu, 14 August 2014 19:39 Go to next message
Matt Stone is currently offline Matt StoneFriend
Messages: 46
Registered: August 2014
Member
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 #1408329 is a reply to message #1408323] Thu, 14 August 2014 20:02 Go to previous messageGo to next message
Matt Stone is currently offline Matt StoneFriend
Messages: 46
Registered: August 2014
Member
Note that this exception occurs when I pass in a DOORS Project which I'm pretty sure is wrong. I've attempted passing in a Module name too. That produces a different exception which I'll post in a little while.
Re: DoorsOauthSample : ResourseNotFoundException OSLCC004 [message #1408335 is a reply to message #1408329] Thu, 14 August 2014 20:24 Go to previous messageGo to next message
Matt Stone is currently offline Matt StoneFriend
Messages: 46
Registered: August 2014
Member
Here's the exception I get when I initially passed in a DOORS Module...

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=84b2f7e2-5529-41a7-91b0-2d1ae94826ae
Services for URD :: Services for Car
Services for URD :: Services for DOORS ERS Repository
Services for URD :: Services for URD: Document and ID
Services for URD :: Services for URD: Document Only
Aug 14, 2014 4:14:18 PM org.eclipse.lyo.client.oslc.samples.DoorsOauthSample main
SEVERE: org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.
com.hp.hpl.jena.shared.JenaException: org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.
	at com.hp.hpl.jena.rdf.model.impl.RDFDefaultErrorHandler.fatalError(RDFDefaultErrorHandler.java:60)
	at com.hp.hpl.jena.rdf.arp.impl.ARPSaxErrorHandler.fatalError(ARPSaxErrorHandler.java:51)
	at com.hp.hpl.jena.rdf.arp.impl.XMLHandler.warning(XMLHandler.java:211)
	at com.hp.hpl.jena.rdf.arp.impl.XMLHandler.fatalError(XMLHandler.java:241)
	at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
	at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at com.hp.hpl.jena.rdf.arp.impl.RDFXMLParser.parse(RDFXMLParser.java:155)
	at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:173)
	at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:160)
	at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:232)
	at com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:235)
	at org.eclipse.lyo.client.oslc.samples.DoorsOauthSample.lookupServiceProviderUrl(DoorsOauthSample.java:484)
	at org.eclipse.lyo.client.oslc.samples.DoorsOauthSample.lookupServiceProviderUrl(DoorsOauthSample.java:517)
	at org.eclipse.lyo.client.oslc.samples.DoorsOauthSample.lookupServiceProviderUrl(DoorsOauthSample.java:540)
	at org.eclipse.lyo.client.oslc.samples.DoorsOauthSample.main(DoorsOauthSample.java:153)
Caused by: org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.
	at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
	... 21 more


I know this is because that module had a view named "Document, ID & Explorer". I changed that view name and now I get the exception below.

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=207b4d26-8d5d-4816-9ec3-fe4f7115bc90
Services for URD :: Services for Car
Services for URD :: Services for DOORS ERS Repository
Services for URD :: Services for URD: Document and ID
Services for URD :: Services for URD: Document Only
Services for URD :: Services for URD: Document, ID and Explorer
Services for URD :: Services for URD
Project Found
Aug 14, 2014 4:17:29 PM org.eclipse.lyo.client.oslc.samples.DoorsOauthSample main
SEVERE: javax.ws.rs.WebApplicationException: com.hp.hpl.jena.datatypes.DatatypeFormatException: Lexical form '2011-05-04' is not a legal instance of Datatype[://www.w3.org/2001/XMLSchema#dateTime -> class com.hp.hpl.jena.datatypes.xsd.XSDDateTime] Lexical form '2011-05-04' is not a legal instance of Datatype[://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: '2011-05-04' is not a valid value for 'dateTime'.
org.apache.wink.client.ClientRuntimeException: javax.ws.rs.WebApplicationException: com.hp.hpl.jena.datatypes.DatatypeFormatException: Lexical form '2011-05-04' is not a legal instance of Datatype[://www.w3.org/2001/XMLSchema#dateTime -> class com.hp.hpl.jena.datatypes.xsd.XSDDateTime] Lexical form '2011-05-04' is not a legal instance of Datatype[://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: '2011-05-04' 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.resources.RmUtil.lookupRequirementsInstanceShapes(RmUtil.java:61)
	at org.eclipse.lyo.client.oslc.samples.DoorsOauthSample.main(DoorsOauthSample.java:167)
Caused by: javax.ws.rs.WebApplicationException: com.hp.hpl.jena.datatypes.DatatypeFormatException: Lexical form '2011-05-04' is not a legal instance of Datatype[://www.w3.org/2001/XMLSchema#dateTime -> class com.hp.hpl.jena.datatypes.xsd.XSDDateTime] Lexical form '2011-05-04' is not a legal instance of Datatype[://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: '2011-05-04' 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)
	... 4 more
Caused by: com.hp.hpl.jena.datatypes.DatatypeFormatException: Lexical form '2011-05-04' is not a legal instance of Datatype[://www.w3.org/2001/XMLSchema#dateTime -> class com.hp.hpl.jena.datatypes.xsd.XSDDateTime] Lexical form '2011-05-04' is not a legal instance of Datatype[://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: '2011-05-04' 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.fromResource(JenaModelHelper.java:813)
	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)
	... 6 more


So how do I fix the date-time exception? And is the View exception a bug in the DOORS provider since it didn't escape the ampersand?
Re: DoorsOauthSample : ResourseNotFoundException OSLCC004 [message #1408359 is a reply to message #1408335] Thu, 14 August 2014 21:54 Go to previous messageGo to next message
Matt Stone is currently offline Matt StoneFriend
Messages: 46
Registered: August 2014
Member
I found that if I create a new Module from scratch the sample works. I've attached the original Module I was attempting to experiment with. That Module was added to the DOORS database via a archive.

Can someone tell me how to fix the dates for the attached Module per the Exception above? I suspect the ampersand related exception above is a bug in DOORS/DWA. Thoughts?
  • Attachment: URD.dma
    (Size: 51.13KB, Downloaded 231 times)
Re: DoorsOauthSample : ResourseNotFoundException OSLCC004 [message #1408514 is a reply to message #1408323] Fri, 15 August 2014 08:55 Go to previous messageGo to next message
Maeve OReilly is currently offline Maeve OReillyFriend
Messages: 13
Registered: October 2013
Junior Member
Hi Matt,

You must pass in a module, not a project or folder. This is as documented - https://wiki.eclipse.org/Lyo/BuildClient#DoorsOauthSample
The date!=dateTime issue is an issue, I understand basically as OSLC doesn't cover date types but in DOORS you can have attributes of only type date. There is a client fix in the works you could try.
See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=438163

The ampersand issue I would say is an issue in the sample, not DOORS/DWA. Maybe it needs to be escaped somewhere. It would need to be debugged to see where exactly it is failing. On the DWA side, if you look in server/festival/logs you will see more details. Swapping server/festival/conf/log4j.properties with log4j.properties.support and restarting DWA will result in much more detailed logging.

HTH
Maeve
Re: DoorsOauthSample : ResourseNotFoundException OSLCC004 [message #1408608 is a reply to message #1408514] Fri, 15 August 2014 14:56 Go to previous messageGo to next message
Matt Stone is currently offline Matt StoneFriend
Messages: 46
Registered: August 2014
Member
Maeve,

Thank you for the response. I'm curious, it seems to me that the solutions you suggesting are work-arounds to bugs in the DOORS/DWA OSLC provider. The ampersand issue is a result of the generated XML not being well formed. And they're producing a date format that is not part of the specification. Is it a best practice for consumers to work around provider specific oversights?

Please note, I'm not trying to be difficult. I'd just like to understand. Is it really the consumers responsibility to ensure the provider is producing well formed/conforming XML? Meaning, should we preparse/clean every XML reponse before we actually parse it for operation? Then, wouldn't we end up with a lot of tool provider specific hacks in our consumers?

Matt
Re: DoorsOauthSample : ResourseNotFoundException OSLCC004 [message #1408702 is a reply to message #1408608] Fri, 15 August 2014 21:03 Go to previous messageGo to next message
Maeve OReilly is currently offline Maeve OReillyFriend
Messages: 13
Registered: October 2013
Junior Member
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 #1408969 is a reply to message #1408702] Sat, 16 August 2014 17:16 Go to previous messageGo to next message
Matt Stone is currently offline Matt StoneFriend
Messages: 46
Registered: August 2014
Member
Maeve,

Thank you for the clarification on consumer based work arounds. That's exactly what I expected the rational to be. Just wanted to be sure.

As for the ampersand, I can reproduce the problem using DOORS 9.6 and my DMA restored Module. As well as a new testing Module I just created. Both Modules contain a "Module" View with a view name containing a "&". For example "Document, ID & Explorer".

Both Modules produce the same exception while the DoorsOauthSample is attempting the read the response InputStream via a SAX parser. The exception below is common when an XML parser is parsing an input source containing an "&". Where the "&" should be escaped as &.

I haven't looked at the raw XML source generated by DOORS but I'm confident they're passing the view name as entered. If I create a view called "Document, ID & Explorer", I get the exception below. If I rename to view to "Document, ID & Explorer" then it works.

Aug 16, 2014 12:47:10 PM org.eclipse.lyo.client.oslc.samples.DoorsOauthSample main
SEVERE: org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.
com.hp.hpl.jena.shared.JenaException: org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.
	at com.hp.hpl.jena.rdf.model.impl.RDFDefaultErrorHandler.fatalError(RDFDefaultErrorHandler.java:60)
	at com.hp.hpl.jena.rdf.arp.impl.ARPSaxErrorHandler.fatalError(ARPSaxErrorHandler.java:51)
	at com.hp.hpl.jena.rdf.arp.impl.XMLHandler.warning(XMLHandler.java:211)
	at com.hp.hpl.jena.rdf.arp.impl.XMLHandler.fatalError(XMLHandler.java:241)
	at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
	at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at com.hp.hpl.jena.rdf.arp.impl.RDFXMLParser.parse(RDFXMLParser.java:155)
	at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:173)
	at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:160)
	at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:232)
	at com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:235)
	at org.eclipse.lyo.client.oslc.samples.DoorsOauthSample.lookupServiceProviderUrl(DoorsOauthSample.java:484)
	at org.eclipse.lyo.client.oslc.samples.DoorsOauthSample.lookupServiceProviderUrl(DoorsOauthSample.java:517)
	at org.eclipse.lyo.client.oslc.samples.DoorsOauthSample.lookupServiceProviderUrl(DoorsOauthSample.java:540)
	at org.eclipse.lyo.client.oslc.samples.DoorsOauthSample.main(DoorsOauthSample.java:153)


Thanks,
Matt
Re: DoorsOauthSample : ResourseNotFoundException OSLCC004 [message #1409259 is a reply to message #1408702] Sun, 17 August 2014 15:48 Go to previous messageGo to next message
Matt Stone is currently offline Matt StoneFriend
Messages: 46
Registered: August 2014
Member
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 &amp; 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 &amp; 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 &amp; 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 &amp; 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 #1409652 is a reply to message #1409259] Mon, 18 August 2014 16:15 Go to previous messageGo to next message
Maeve OReilly is currently offline Maeve OReillyFriend
Messages: 13
Registered: October 2013
Junior Member
Hi Matt,

OK, I see and I talked to Samuel who sees this as a DOORS defect also. Also I tested with lyo, broke. Then I tried a bit harder and broke another consumer as well.
I'll log this ampersand issue with DOORS.

Maeve

Re: DoorsOauthSample : ResourseNotFoundException OSLCC004 [message #1409653 is a reply to message #1409652] Mon, 18 August 2014 16:18 Go to previous messageGo to next message
Matt Stone is currently offline Matt StoneFriend
Messages: 46
Registered: August 2014
Member
Maeve,

Thanks for your effort & time.

Matt
Re: DoorsOauthSample : ResourseNotFoundException OSLCC004 [message #1409999 is a reply to message #1408514] Tue, 19 August 2014 14:26 Go to previous message
Matt Stone is currently offline Matt StoneFriend
Messages: 46
Registered: August 2014
Member
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)
Previous Topic:Does ClearQuest supports OSLC CM 1.0 or OSLC CM 2.0 Specification?
Next Topic:StockQuote SelectionDialogs
Goto Forum:
  


Current Time: Tue Mar 19 05:38:24 GMT 2024

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

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

Back to the top