帖子似乎很长,但仅仅是因为数据(样本和错误)。
我正在尝试使用cep 2.1.0模拟buildFailed示例。 (此示例有效)。
我创建了自己的流和我自己的示例数据。
然而它接触到了cep的输入处理程序,他的事件出了问题。
到目前为止,我还没有找到问题。
流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"
}
]
}
事件数据:
[
{
"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时,除了admin连接之外没有错误和没有日志 我们可能需要更多反馈。我使用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项目。
祝你好运, 西里尔
答案 0 :(得分:0)
我已经详细介绍了您在上面提供的详细信息...但是如果没有存储桶配置和完整的错误日志,很难说出现了什么问题...但我已经检查了您上面给出的流定义和事件...它完美无缺地工作......我希望你在创建存储桶时可能会犯一个简单的错误...这里我正在共享我创建的存储桶xml(注意:更改输出主题中的电子邮件地址)
事件json:link [1]
stream json:link [2]
bucket xml:link [3]
Stream的curl命令:
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命令:
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
(请详细了解文档[4]以获取更多详情]
[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
希望这会对你有所帮助...... 问候, 莫汉