0

The post seems long but is is only because of data (samples and errors).

I am trying to make a bucket mocking the buildFailed sample in cep 2.1.0. (This sample works).

I have created my own stream and my own sample data.

Yet it seams that the input handler of cep his having trouble with my events.

So far I have not found the issue.

The stream def :

    {
    "name":"eu.ima.event.stream",
    "version": "1.2.0",
    "nickName": "poc sample",
    "description": "poc sample stream",
    "metaData":[
    {
        "name":"host",
        "type":"string"
    }
    ], 
   "correlationData":[
    {
        "name":"processus",
        "type":"string"
    },
    {
        "name":"flux",
        "type":"string"
    },
    {   
        "name":"reference",
        "type":"string"
    }
    ],   
 "payloadData":[
        {
                "name":"timestamp",
                "type":"string"
        },
        {       "name":"code",
                "type":"string"
        },
        {
                "name":"category",
                "type":"string"
        },
        {
                "name":"msg",
                "type":"string"
        }
    ]
}

The events data :

[
{
 "metaData" : ["192.168.1.2"] , 
 "correlationData" : ["PSOR", "Appli2", "Ref-1"] , 
 "payloadData" : ["1363700128138496600", "6", "BIZ", "6"] 
 }
 ,
{
 "metaData" : ["192.168.1.2"] , 
 "correlationData" : ["PSOR", "Appli2", "Ref-0"] , 
 "payloadData" : ["1363700126353394500", "6", "BIZ", "6"] 
 }
 ,
{
 "metaData" : ["192.168.1.2"] , 
 "correlationData" : ["PSOR", "Appli2", "Ref-3"] , 
 "payloadData" : ["1363700131731702100", "6", "BIZ", "6"] 
 }
 ,
{
 "metaData" : ["192.168.1.2"] , 
 "correlationData" : ["PSOR", "Appli2", "Ref-2"] , 
 "payloadData" : ["1363700129894597000", "6", "BIZ", "6"] 
 }
 ,
{
 "metaData" : ["192.168.1.2"] , 
 "correlationData" : ["PSOR", "Appli2", "Ref-4"] , 
 "payloadData" : ["1363700133472801700", "6", "BIZ", "6"] 
 }
]

When I send the streamdef, no error and no log except the admin connected We might need more feedback here. I use the curl post command.

When I send the events I have errors :

[2013-03-19 14:58:00,586] ERROR {org.wso2.carbon.databridge.core.internal.queue.QueueWorker} -  Error in passing event eventList [
Event{
  streamId='eu.ima.event.stream:1.2.0',
  timeStamp=0,
  metaData=[192.168.1.2],
  correlationData=[PSOR, Appli2, Ref-1],
  payloadData=[1363700128138496600, 6, BIZ, 6],
  arbitraryDataMap=null,
}
,
Event{
  streamId='eu.ima.event.stream:1.2.0',
  timeStamp=0,
  metaData=[192.168.1.2],
  correlationData=[PSOR, Appli2, Ref-0],
  payloadData=[1363700126353394500, 6, BIZ, 6],
  arbitraryDataMap=null,
}
,
Event{
  streamId='eu.ima.event.stream:1.2.0',
  timeStamp=0,
  metaData=[192.168.1.2],
  correlationData=[PSOR, Appli2, Ref-3],
  payloadData=[1363700131731702100, 6, BIZ, 6],
  arbitraryDataMap=null,
}
,
Event{
  streamId='eu.ima.event.stream:1.2.0',
  timeStamp=0,
  metaData=[192.168.1.2],
  correlationData=[PSOR, Appli2, Ref-2],
  payloadData=[1363700129894597000, 6, BIZ, 6],
  arbitraryDataMap=null,
}
,
Event{
  streamId='eu.ima.event.stream:1.2.0',
  timeStamp=0,
  metaData=[192.168.1.2],
  correlationData=[PSOR, Appli2, Ref-4],
  payloadData=[1363700133472801700, 6, BIZ, 6],
  arbitraryDataMap=null,
}
] to subscriber org.wso2.carbon.broker.core.internal.brokers.agent.AgentBrokerType$AgentBrokerCallback@2d7fbbd6
java.lang.NullPointerException
        at org.wso2.carbon.cep.core.mapping.input.mapping.TupleInputMapping.getValue(TupleInputMapping.java:126)
        at org.wso2.carbon.cep.core.mapping.input.mapping.TupleInputMapping.convertToEventTuple(TupleInputMapping.java:97)
        at org.wso2.carbon.cep.core.mapping.input.mapping.InputMapping.convert(InputMapping.java:42)
        at org.wso2.carbon.cep.core.listener.TopicEventListener.onEvent(TopicEventListener.java:50)
        at org.wso2.carbon.cep.core.listener.BrokerEventListener.onEvent(BrokerEventListener.java:58)
        at org.wso2.carbon.broker.core.internal.brokers.agent.AgentBrokerType$AgentBrokerCallback.receive(AgentBrokerType.java:176)
        at org.wso2.carbon.databridge.core.internal.queue.QueueWorker.run(QueueWorker.java:80)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)

Please anyone, do you have any hints ? I really need this to keep on with my Proof of concept CEP Project.

Best regards, Cyril

cyril R
  • 1
  • 1
  • Hi all, I have foud the issue. It was the bucket's input mapping that was misconfigured. Some property was wrongly named. I think I will issue a bug/improvement request for the trace to be more efficient. If the logs would have shown the name of the property I would have been able to solve it in 5 seconds. regards Cyril – cyril R Mar 19 '13 at 15:15

1 Answers1

0

I have gone through the details that you given above... But without the bucket configuration and complete error log it is hard to say what went wrong... But I have checked the stream definition and events that you have given above... It is working perfectly without any issue... I hope that you might made simple mistake when creating the bucket... Here I am sharing the bucket xml that I have created (note: change the email address in the output topic)

events json : link [1]

stream json : link [2]

bucket xml : link [3]

curl command for Stream :

curl -k --user admin:admin https://localhost:9443/datareceiver/1.0.0/streams/ --data @streamdefn2.json -H "Accept: application/json" -H "Content-type: application/json" -X POST

curl command for events :

curl -k --user admin:admin https://localhost:9443/datareceiver/1.0.0/stream/eu.ima.event.stream/1.2.0/ --data @events2.json -H "Accept: application/json" -H "Content-type: application/json" -X POST

(Please follow the doc [4] thoroughly for more details]

[1] https://docs.google.com/file/d/0B056dKd2JQGJa0pFaU1BTDlEbFk/edit?usp=sharing

[2] https://docs.google.com/file/d/0B056dKd2JQGJUFdUN21GRGpzY0k/edit?usp=sharing

[3] https://docs.google.com/file/d/0B056dKd2JQGJa0pFaU1BTDlEbFk/edit?usp=sharing

[4] http://docs.wso2.org/wiki/display/CEP210/Build+Analyzer 

Hope this will help you... Regards, Mohan

Mohanadarshan
  • 830
  • 5
  • 5