Hi all, After changing "*org.wso2.log_analyzer.out*" stream I am not getting that exception. Thank you for helping. I added few eventBuilders and they have been shown as Inactive builders, what is the reason for that?
Thank you. On Thu, Jan 9, 2014 at 11:54 PM, Lasantha Fernando <[email protected]>wrote: > Hi Chamila, > > Looking at the snippet pasted here, I cannot find any obvious issue in > your code. Can you point to the complete code for your client so I can dig > deeper? > > What are the values you pass for STREAM_NAME1 and VERSION1? > > Also, it seems the error is coming at data-bridge level before the event > hits the event builder. You can verify this by enabling tracing for your > InputEventAdaptor and EventBuilder, where you can see the actual incoming > event. Looking at the actual event received might help you find where the > issue is. > > Also as Manula has suggested, please check the *org.wso2.log_analyzer.out > stream *stream as well. > > Thanks, > Lasantha > > > On 9 January 2014 23:43, Manula Chathurika Thantriwatte > <[email protected]>wrote: > >> Hi, >> >> >> >> >> *Seems that org.wso2.log_analyzer.out stream have different stream >> definition. Please look into that. Thanks !* >> >> >> On Thu, Jan 9, 2014 at 11:07 PM, Chamila Wijayarathna >> <[email protected]>wrote: >> >>> hello all, >>> I am trying to send some events to CEP in WSO2Event Format. >>> In my publisher I create a stream as follows. >>> >>> *streamId1 = dataPublisher.defineStream("{" +* >>> * " 'name':'" + STREAM_NAME1 + "'," +* >>> * " 'version':'" + VERSION1 + "'," +* >>> * " 'nickName': 'Statistics'," +* >>> * " 'description': 'Service statistics'," +* >>> * " 'metaData':[" +* >>> >>> * " {'name':'referer','type':'STRING'}" +* >>> * " ]," +* >>> * " 'payloadData':[" +* >>> * " {'name':'SrcIp','type':'STRING'}," +* >>> * " {'name':'DestIp','type':'STRING'}," +* >>> * " {'name':'size','type':'STRING'}," +* >>> * " {'name':'timestamp','type':'STRING'}" +* >>> * " ]" +* >>> * "}");* >>> >>> Then I published some events using above stream as follows. >>> >>> Ob*ject[] meta = new Object[]{* >>> * "MetaData"* >>> * };* >>> *Object[] payload = new Object[]{* >>> * SrcIp,* >>> * DestIp,* >>> * size, // Unix timeStamp* >>> * "600" * >>> * };* >>> *Event statisticsEvent = new Event(streamId1, >>> System.currentTimeMillis(),* >>> * meta, correlation, >>> payload);* >>> * dataPublisher.publish(statisticsEvent);* >>> >>> I also created an event builder at CEP for above stream. It has the >>> following source view. >>> >>> *<?xml version="1.0" encoding="UTF-8"?>* >>> *<eventBuilder name="logg" statistics="disable" trace="disable" >>> xmlns="http://wso2.org/carbon/eventbuilder >>> <http://wso2.org/carbon/eventbuilder>">* >>> * <from eventAdaptorName="WSO2EventAdaptor" >>> eventAdaptorType="wso2event">* >>> * <property >>> name="stream">org.wso2.log_analyzer.netflow.info1</property>* >>> * <property name="version">1.0.0</property>* >>> * </from>* >>> * <mapping customMapping="enable" type="wso2event">* >>> * <property>* >>> * <from dataType="meta" name="referer"/>* >>> * <to name="ref" type="string"/>* >>> * </property>* >>> * <property>* >>> * <from dataType="payload" name="SrcIp"/>* >>> * <to name="src" type="string"/>* >>> * </property>* >>> * <property>* >>> * <from dataType="payload" name="DestIp"/>* >>> * <to name="dest" type="string"/>* >>> * </property>* >>> * <property>* >>> * <from dataType="payload" name="size"/>* >>> * <to name="size" type="string"/>* >>> * </property>* >>> * <property>* >>> * <from dataType="payload" name="timestamp"/>* >>> * <to name="timestamp" type="string"/>* >>> * </property>* >>> * </mapping>* >>> * <to streamName="org.wso2.log_analyzer.out" version="1.0.0"/>* >>> *</eventBuilder>* >>> >>> When I run the publisher and send the events to CEP I'm getting >>> following exeption for each event. >>> >>> * ERROR - {QueueWorker} Wrongly formatted event sent for carbon.super* >>> *org.wso2.carbon.databridge.core.exception.EventConversionException: >>> Error when converting MetaData of event bundle with events 36* >>> * at >>> org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.createEventList(ThriftEventConverter.java:126)* >>> * at >>> org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.toEventList(ThriftEventConverter.java:88)* >>> * at >>> org.wso2.carbon.databridge.core.internal.queue.QueueWorker.run(QueueWorker.java:72)* >>> * 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 >>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)* >>> * at >>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)* >>> * at java.lang.Thread.run(Thread.java:724)* >>> *Caused by: >>> org.wso2.carbon.databridge.core.exception.EventConversionException: No >>> StreamDefinition for streamId MetaData present in cache * >>> * at >>> org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.createEventList(ThriftEventConverter.java:112)* >>> * ... 8 more* >>> >>> What is the problem here? How can I solve this? >>> >>> >>> -- >>> *Chamila Wijayarathna* >>> Engineering Intern, >>> WSO2 Inc. >>> >>> >>> _______________________________________________ >>> Dev mailing list >>> [email protected] >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> Regards, >> Manula Chathurika Thantriwatte >> Software Engineer >> WSO2 Inc. : http://wso2.com >> lean . enterprise . middleware >> >> email : [email protected] / [email protected] >> phone : +94 772492511 >> blog : http://manulachathurika.blogspot.com/ >> >> >> >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > *Lasantha Fernando* > Software Engineer - Data Technologies Team > WSO2 Inc. http://wso2.com > > email: [email protected] > mobile: (+94) 71 5247551 > -- *Chamila Wijayarathna* Engineering Intern, WSO2 Inc.
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
