play-project / play

The main repository, used for website and issues
2 stars 0 forks source link

DCEP: error from Rdf parsing of Recom by DCEP #28

Closed antonioaversa closed 11 years ago

antonioaversa commented 12 years ago

Hello Roland, this is what I received from DCEP a few tens of minutes ago:

@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix : <http://events.event-processing.org/types/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix uctelco: <http://events.event-processing.org/uc/telco/> .
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
@prefix e: <http://events.event-processing.org/ids/> .
@prefix s: <http://streams.event-processing.org/ids/> .
@prefix uccrisis: <http://www.mines-albi.fr/nuclearcrisisevent/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix src: <http://sources.event-processing.org/ids/> .
@prefix user: <http://graph.facebook.com/schema/user#> .
{
}

<http://events.event-processing.org/ids/4541328>  {
    <http://events.event-processing.org/ids/4541328>
            <urn:ec:event:nbquads>  "16"^^<http://www.w3.org/2001/XMLSchema#integer> .

    <http://events.event-processing.org/ids/4541328#event>
            <http://events.event-processing.org/uc/telco/action>
                    <blank://action1> ;
            a       <http://events.event-processing.org/types/UcTelcoEsrRecom> ;
            <http://events.event-processing.org/types/endTime>
                    "2012-11-07T18:48:57.001+01:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
            <http://events.event-processing.org/types/startTime>
                    "2012-11-07T18:45:49.001+01:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
            <http://events.event-processing.org/uc/telco/ackRequired>
                    "true^^http://www.w3.org/2001/XMLSchema#boolean" ;
            <http://events.event-processing.org/types/eventPattern>
                    <example1> ;
            <http://events.event-processing.org/types/source>
                    <http://sources.event-processing.org/ids/Dcep#source> ;
            <http://events.event-processing.org/uc/telco/calleePhoneNumber>
                    <49123456789> ;
            <http://events.event-processing.org/types/stream>
                    <http://streams.event-processing.org/ids/TaxiUCESRRecomDcep#stream> ;
            <http://events.event-processing.org/uc/telco/direction>
                    <ncomin> ;
            <http://events.event-processing.org/uc/telco/answerRequired>
                    "true^^http://www.w3.org/2001/XMLSchema#boolean" ;
            <http://events.event-processing.org/uc/telco/callerPhoneNumber>
                    <49123498765> ;
            <http://events.event-processing.org/types/message>
                    "You missed three calls, we recommend you to contact the caller e.g. via Facebook.^^http://www.w3.org/2001/XMLSchema#string" .

    <blank://action1>
            <http://graph.facebook.com/schema/user#id>
                    <100004102810379> ;
            a       <http://events.event-processing.org/uc/telco/OpenFacebook> .

}
    targetTopic
        Dialect = http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete
        namespaces = [{http://streams.event-processing.org/ids}s]
        content = s:TaxiUCESRRecomDcep
    type: recommendation
    RDF parsing...
    RDF parsing ok
    Extracting event...
    Event extracted = http://events.event-processing.org/ids/4541328#event

org.ontoware.rdfreactor.runtime.RDFDataException: Cannot convert from class org.ontoware.rdf2go.model.node.impl.URIImpl to Float
    at org.ontoware.rdfreactor.runtime.converter.StringConverter.node2string(StringConverter.java:44)
    at org.ontoware.rdfreactor.runtime.converter.StringConverter.toJava(StringConverter.java:16)
    at org.ontoware.rdfreactor.runtime.converter.StringConverter.toJava(StringConverter.java:1)
    at org.ontoware.rdfreactor.runtime.RDFReactorRuntime.node2javatype(RDFReactorRuntime.java:107)
    at org.ontoware.rdfreactor.runtime.Base.get(Base.java:166)
    at org.event_processing.events.types.UcTelcoEsrRecom.getUcTelcoCalleePhoneNumber(UcTelcoEsrRecom.java:1403)
    at org.petalslink.wsn.webservices.service.NotificationConsumerImpl.handleRecommendation(NotificationConsumerImpl.java:151)
    at org.petalslink.wsn.webservices.service.NotificationConsumerImpl.notify(NotificationConsumerImpl.java:92)
    at org.petalslink.wsn.webservices.service.dom.NotificationConsumerService.invoke(NotificationConsumerService.java:75)
    at org.petalslink.wsn.webservices.service.dom.NotificationConsumerService.invoke(NotificationConsumerService.java:1)
    at sun.reflect.GeneratedMethodAccessor117.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:173)
    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)
    at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:61)
    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75)
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
    at org.apache.cxf.phase.PhaseInterceptorChain.resume(PhaseInterceptorChain.java:232)
    at org.apache.cxf.interceptor.OneWayProcessorInterceptor$1.run(OneWayProcessorInterceptor.java:130)
    at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$3.run(AutomaticWorkQueueImpl.java:371)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:636)
antonioaversa commented 12 years ago

@stuehmer just a hint: the issue could be in the calleePhoneNumber. Your recoms contains URIs (e.g. file:///root/49123456789) instead of strings (just "49123456789"). WDYT?

stuehmer commented 12 years ago

Thanks for the pointer... where exactly did you find the file:/// ? I checked your snippet above (from DCEP) and my artificial events (from the WebApp button), they don't show this.

antonioaversa commented 12 years ago

In the unstable Web Portal, tab TaxiUCESRRecomDcep. For example here: UcTelcoEsrRecom

<blank://action1>
     a     uctelco:OpenFacebook ;
     user:id <file:///root/100004102810379> .

<http://events.event-processing.org/ids/8732388>
     <urn:ec:event:nbquads>
             16 .

<http://events.event-processing.org/ids/8732388#event>
     a     :UcTelcoEsrRecom ;
     :endTime "2012-11-07T19:59:00.001+01:00"^^xsd:dateTime ;
     :eventPattern <file:///root/example1> ;
     :message "You missed three calls, we recommend you to contact the caller e.g. via Facebook.^^http://www.w3.org/2001/XMLSchema#string" ;
     :source <http://sources.event-processing.org/ids/Dcep#source> ;
     :startTime "2012-11-07T19:45:26.001+01:00"^^xsd:dateTime ;
     :stream <http://streams.event-processing.org/ids/TaxiUCESRRecomDcep#stream> ;
     uctelco:ackRequired "true^^http://www.w3.org/2001/XMLSchema#boolean" ;
     uctelco:action <blank://action1> ;
     uctelco:answerRequired
             "true^^http://www.w3.org/2001/XMLSchema#boolean" ;
     uctelco:calleePhoneNumber
             <file:///root/49123456789> ;
     uctelco:callerPhoneNumber
             <file:///root/49123498765> ;
     uctelco:direction <file:///root/ncomin> .

I've just noticed that the dummy recom is not affected by this bug.

stuehmer commented 12 years ago

Ok, I will check DCEP for a bug.

stuehmer commented 12 years ago

Fixed! Let's hope it is gone!

antonioaversa commented 12 years ago

Yes, perfect! I can confirm this bug was generating the RDF Parsing exception on the Orange WS. As soon as you sent the first right calleePhoneNumber, everything started to be ok:

--------------------------- Notification received --------------------------
    xmlDocument = <?xml version="1.0" encoding="UTF-8"?><wsnt:Notify xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"><wsnt:NotificationMessage><wsnt:SubscriptionReference><wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://161.105.138.98:8089/playOrangeWS/services/NotificationConsumerService</wsa:Address><wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing"/></wsnt:SubscriptionReference><wsnt:Topic xmlns:s="http://streams.event-processing.org/ids" Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete">s:TaxiUCESRRecomDcep</wsnt:Topic><wsnt:ProducerReference><wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">petals://Endpoint</wsa:Address><wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing"/></wsnt:ProducerReference><wsnt:Message><mt:nativeMessage xmlns:mt="http://www.event-processing.org/wsn/msgtype/" xmlns:ns2="http://docs.oasis-open.org/wsn/b-2" xmlns="http://www.w3.org/2005/08/addressing" xmlns:ns4="http://docs.oasis-open.org/wsrf/rp-2" xmlns:ns3="http://docs.oasis-open.org/wsrf/bf-2" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns5="http://docs.oasis-open.org/wsn/t-1" xmlns:ns6="http://docs.oasis-open.org/wsn/br-2" xmlns:ns7="http://docs.oasis-open.org/wsrf/r-2" mt:syntax="application/x-trig">@prefix sioc: &lt;http://rdfs.org/sioc/ns#&gt; .
@prefix : &lt;http://events.event-processing.org/types/&gt; .
@prefix rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; .
@prefix uctelco: &lt;http://events.event-processing.org/uc/telco/&gt; .
@prefix geo: &lt;http://www.w3.org/2003/01/geo/wgs84_pos#&gt; .
@prefix e: &lt;http://events.event-processing.org/ids/&gt; .
@prefix s: &lt;http://streams.event-processing.org/ids/&gt; .
@prefix uccrisis: &lt;http://www.mines-albi.fr/nuclearcrisisevent/&gt; .
@prefix xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt; .
@prefix rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .
@prefix src: &lt;http://sources.event-processing.org/ids/&gt; .
@prefix user: &lt;http://graph.facebook.com/schema/user#&gt; .
{
}

&lt;http://events.event-processing.org/ids/7583536&gt;  {
    &lt;blank://action1&gt;
            &lt;http://graph.facebook.com/schema/user#id&gt;
                    "100004102810379" ;
            a       &lt;http://events.event-processing.org/uc/telco/OpenFacebook&gt; .

    &lt;http://events.event-processing.org/ids/7583536&gt;
            &lt;urn:ec:event:nbquads&gt;  "16"^^&lt;http://www.w3.org/2001/XMLSchema#integer&gt; .

    &lt;http://events.event-processing.org/ids/7583536#event&gt;
            &lt;http://events.event-processing.org/uc/telco/calleePhoneNumber&gt;
                    "49123456789" ;
            &lt;http://events.event-processing.org/uc/telco/ackRequired&gt;
                    "true^^http://www.w3.org/2001/XMLSchema#boolean" ;
            a       &lt;http://events.event-processing.org/types/UcTelcoEsrRecom&gt; ;
            &lt;http://events.event-processing.org/types/stream&gt;
                    &lt;http://streams.event-processing.org/ids/TaxiUCESRRecomDcep#stream&gt; ;
            &lt;http://events.event-processing.org/uc/telco/answerRequired&gt;
                    "true^^http://www.w3.org/2001/XMLSchema#boolean" ;
            &lt;http://events.event-processing.org/types/startTime&gt;
                    "2012-11-08T00:00:55.001+01:00"^^&lt;http://www.w3.org/2001/XMLSchema#dateTime&gt; ;
            &lt;http://events.event-processing.org/uc/telco/direction&gt;
                    "ncomin" ;
            &lt;http://events.event-processing.org/uc/telco/callerPhoneNumber&gt;
                    "49123498765" ;
            &lt;http://events.event-processing.org/types/source&gt;
                    &lt;http://sources.event-processing.org/ids/Dcep#source&gt; ;
            &lt;http://events.event-processing.org/types/eventPattern&gt;
                    &lt;example1&gt; ;
            &lt;http://events.event-processing.org/types/endTime&gt;
                    "2012-11-08T00:01:02.001+01:00"^^&lt;http://www.w3.org/2001/XMLSchema#dateTime&gt; ;
            &lt;http://events.event-processing.org/uc/telco/action&gt;
                    &lt;blank://action1&gt; ;
            &lt;http://events.event-processing.org/types/message&gt;
                    "You missed three calls, we recommend you to contact the caller e.g. via Facebook.^^http://www.w3.org/2001/XMLSchema#string" .

}
</mt:nativeMessage></wsnt:Message></wsnt:NotificationMessage></wsnt:Notify>

    targetTopic
        Dialect = http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete
        namespaces = [{http://streams.event-processing.org/ids}s]
        content = s:TaxiUCESRRecomDcep
    type: recommendation
    RDF parsing...
    RDF parsing ok
    Extracting event...
    Event extracted = http://events.event-processing.org/ids/7583536#event
        uctelco_calleePhoneNumber = 49123456789
    Building the JSON Object...
        adding action: <blank://action1>
        action added: {"rdf_type":"http://events.event-processing.org/uc/telco/OpenFacebook","user_id":"100004102810379"}
    JSON Object built
    UcTelcoEsrRecom = {"endTime":1352329262001,"message":"You missed three calls, we recommend you to contact the caller e.g. via Facebook.^^http://www.w3.org/2001/XMLSchema#string","startTime":1352329255001,"rdf_type":"http://events.event-processing.org/types/UcTelcoEsrRecom","uctelco_action":[{"rdf_type":"http://events.event-processing.org/uc/telco/OpenFacebook","user_id":"100004102810379"}],"uctelco_calleePhoneNumber":"49123456789","uctelco_callerPhoneNumber":"49123498765","uctelco_answerRequired":false,"uctelco_ackRequired":false}
         => related registrationID = null
         => Sending

Thank you very much!

antonioaversa commented 11 years ago

Hello @stuehmer reopening this bug because I've just noticied the "file:root" issue before the phone number. ... sometimes they come back :D

antonioaversa commented 11 years ago

The screenName field in OpenTwitter actions (recoms) seems to be affected by this issue too.

:screenName <file:///root/ntonio_avers> .
stuehmer commented 11 years ago

Solved (and closed once more) That was a regression from our refactoring :)