Skip to Main Content

Complex Data Type: Java Data Cartridge

900697Mar 12 2012 — edited Mar 13 2012
Hi,

I have defined a class test.Address (under src folder) and the event type as below:
<wlevs:event-type-repository>
<wlevs:event-type type-name="Student">
<wlevs:properties>
<wlevs:property name="name" type="char"/>
<wlevs:property name="address" type="Address"/>
</wlevs:properties>
</wlevs:event-type>
<wlevs:event-type type-name="Address">
<wlevs:class>test.Address</wlevs:class>
</wlevs:event-type>
</wlevs:event-type-repository>

But the line "<wlevs:property name="address" type="Address"/>" is giving below error:
The type "Address" is unknown. Property types in tuple property sets must be one of the native tuple types, a primitive type, a fully qualified class name, or an array type.

And query in processor also throws error.
Query:
<processor>
<name>CDSProcessor</name>
<rules>
<query id="ExampleQuery">
<![CDATA[
select name,address.street from channel [now]
]]>
</query>
</rules>
</processor>

Error: Invalid statement: "select name,>>address.street<< from channel [now]"
Description: Invalid symbolic expression: address.street
Cause: Probable causes are: There is no symbol named address, or Error while handling member
access to complex type. Field street of type test.Address not found., or Types address.street and
address not found when referencing constructor or static method..
Action: Verify symbols reference to valid variable name, attribute name, function name, complex type
name, method name, or field name.


Please help on how to use Java Data Cartridge or complex data struture in CEP.


Thanks,
Sri

Edited by: 897694 on Mar 12, 2012 3:29 AM

Edited by: 897694 on Mar 12, 2012 3:34 AM
Comments
Post Details
Added on Mar 12 2012
10 comments
171 views