2 Replies Latest reply on Apr 24, 2014 8:42 AM by Junger He-Oracle

    InvocationTargetException in User Defined Function in Oracle CEP

    68d433fe-f25a-4ae2-9b0d-580de44bb4bc

      I was trying to use a UDF in my CQL query. But I got the following error:

       

      An InvocationTargetException was encountered while attempting to register the user defined function

      "mymod".  The message was: null

       

      My code snippet is bellow:

       

      Bean:

      package com.bea.wlevs.example.function;

       

      import com.bea.wlevs.oracle.ci.event.CiMessages;

       

      public class UpdateMessage  {

         

          public CiMessages addChannel(CiMessages cm, String channel){

              System.out.println("I am in function");

              cm.setChannel(channel);

             

              return cm;

             

          }

         

      }

      config.xml:

      <processor>
         <name>CiRuleEngine</name>
         <rules>
         <query id="filterRule"> <![CDATA[ select addChannel(*,"SMSData") from DCInputChannel[now] as dc ]]> </query>

       

         </rules>

          </processor>

       

       

      content.xml:

       

      <wlevs:processor id="CiRuleEngine">
         <wlevs:listener ref="IntermediateChannel" />
         <wlevs:function function-name="mymod" exec-method="addCHannel">
         <bean class="com.bea.wlevs.example.function.UpdateMessage"/>
         </wlevs:function>

          </wlevs:processor>

       

      Can any one help me to resolve this error?