这篇文章似乎很长,但这仅仅是因为数据(样本和错误)。
我正在尝试制作一个桶来模拟 cep 2.1.0 中的 buildFailed 示例。(此示例有效)。
我创建了自己的流和自己的示例数据。
然而,cep 的输入处理程序似乎对我的事件有问题。
到目前为止,我还没有发现问题。
流定义:
{
"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"
}
]
}
事件数据:
[
{
"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"]
}
]
当我发送 streamdef 时,没有错误,也没有日志,除了管理员连接我们可能需要更多反馈。我使用 curl post 命令。
当我发送事件时出现错误:
[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)
请任何人,你有什么提示吗?我真的需要这个来继续我的概念证明 CEP 项目。
最好的问候,西里尔