0

这篇文章似乎很长,但这仅仅是因为数据(样本和错误)。

我正在尝试制作一个桶来模拟 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 项目。

最好的问候,西里尔

4

1 回答 1

0

我已经查看了您上面提供的详细信息...但是如果没有存储桶配置和完整的错误日志,很难说出了什么问题...但是我已经检查了您上面给出的流定义和事件...它运行良好,没有任何问题...我希望您在创建存储桶时可能会犯一个简单的错误...这里我分享我创建的存储桶 xml(注意:更改输出主题中的电子邮件地址)

事件 json:链接 [1]

流 json:链接 [2]

存储桶 xml:链接 [3]

流的 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 

希望这会帮助你...问候,莫汉

于 2013-03-19T19:13:15.070 回答