Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lyo-dev] Exception Running DoorsOAuthSample

Issue resolved.

Regards,

Daniel Chirillo
Rational Lab Services
1-720-395-0914 (voice)
1-646-349-1956 (fax)
chirillo@xxxxxxxxxx



From:        Daniel Chirillo/New York/IBM
To:        "Lyo project developer discussions" <lyo-dev@xxxxxxxxxxx>
Date:        04/04/2015 07:32 PM
Subject:        Re: Exception Running DoorsOAuthSample



Pulled updated code from GIT...noticed a change in the sample code that gave me great hope:

// to handle datatype format exception (some system datetime
// attributes in doors, empty value in some attributes,...)
// Those attributes will not be parse and not be add in the
// requirement class

System.setProperty( AbstractOslcRdfXmlProvider.OSLC4J_STRICT_DATATYPES, "false");


getEntity is still failing at step 12, but with a different exception:

Apr 4, 2015 7:20:13 PM org.eclipse.lyo.client.oslc.samples.DoorsOauthSample main
SEVERE: javax.ws.rs.WebApplicationException: com.hp.hpl.jena.shared.JenaException: org.xml.sax.SAXParseException: Content is not allowed in prolog.
org.apache.wink.client.ClientRuntimeException: javax.ws.rs.WebApplicationException: com.hp.hpl.jena.shared.JenaException: org.xml.sax.SAXParseException: Content is not allowed in prolog.
        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.main(DoorsOauthSample.java:278)


Regards,

Daniel Chirillo
Rational Lab Services
1-720-395-0914 (voice)
1-646-349-1956 (fax)
chirillo@xxxxxxxxxx




From:        Daniel Chirillo/New York/IBM
To:        "Lyo project developer discussions" <lyo-dev@xxxxxxxxxxx>
Date:        04/04/2015 12:39 PM
Subject:        Exception Running DoorsOAuthSample



In Step 12, when getEntity it called, a com.hp.hpl.jena.datatypes.DatatypeFormatException is thrown:



SEVERE: javax.ws.rs.WebApplicationException: com.hp.hpl.jena.datatypes.DatatypeFormatException: Lexical form '2015-04-04' is not a legal instance of Datatype[http://www.w3.org/2001/XMLSchema#dateTime-> class com.hp.hpl.jena.datatypes.xsd.XSDDateTime] Lexical form '2015-04-04' 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: '2015-04-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 '2015-04-04' is not a legal instance of Datatype[http://www.w3.org/2001/XMLSchema#dateTime-> class com.hp.hpl.jena.datatypes.xsd.XSDDateTime] Lexical form '2015-04-04' 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: '2015-04-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.samples.DoorsOauthSample.main(DoorsOauthSample.java:261)
Caused by: javax.ws.rs.WebApplicationException: com.hp.hpl.jena.datatypes.DatatypeFormatException: Lexical form '2015-04-04' is not a legal instance of Datatype[http://www.w3.org/2001/XMLSchema#dateTime-> class com.hp.hpl.jena.datatypes.xsd.XSDDateTime] Lexical form '2015-04-04' 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: '2015-04-04' is not a valid value for 'dateTime'.
        at org.eclipse.lyo.oslc4j.provider.jena.AbstractOslcRdfXmlProvider.readFrom(AbstractOslcRdfXmlProvider.java:350)
        at org.eclipse.lyo.oslc4j.provider.jena.OslcRdfXmlProvider.readFrom(OslcRdfXmlProvider.java:270)
        at org.apache.wink.client.internal.handlers.ClientResponseImpl.readEntity(ClientResponseImpl.java:126)
        ... 3 more
Caused by: com.hp.hpl.jena.datatypes.DatatypeFormatException: Lexical form '2015-04-04' is not a legal instance of Datatype[http://www.w3.org/2001/XMLSchema#dateTime-> class com.hp.hpl.jena.datatypes.xsd.XSDDateTime] Lexical form '2015-04-04' 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: '2015-04-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:1074)
        at org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper.fromResource(JenaModelHelper.java:582)
        at org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper.createObjectResultList(JenaModelHelper.java:455)
        at org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper.fromJenaModel(JenaModelHelper.java:393)
        at org.eclipse.lyo.oslc4j.provider.jena.AbstractOslcRdfXmlProvider.readFrom(AbstractOslcRdfXmlProvider.java:345)
        ... 5 more


Regards,

Daniel Chirillo
Rational Lab Services
1-720-395-0914 (voice)
1-646-349-1956 (fax)
chirillo@xxxxxxxxxx


Back to the top