4 Replies Latest reply on Mar 27, 2014 6:28 AM by Wells G

    How to register custom ProcessEventListener

    Wells G Novice

      HI guys ,

        

          I created a custom ProcessEventListener and put the jar in */WEB-INFO/lib/ , and add eventListener from UI (add ksession then add the listener to the ksession)

       

      <kmodule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

               xmlns="http://jboss.org/kie/6.0.0/kmodule">

        <kbase name="KBase" default="true" eventProcessingMode="stream" equalsBehavior="identity" declarativeAgenda="disabled" scope="javax.enterprise.context.ApplicationScoped" packages="*">

          <ksession name="ksession" type="stateful" default="true" clockType="realtime" beliefSystem="simple" scope="javax.enterprise.context.ApplicationScoped">

            <listeners>

              <processEventListener type="com.domain.audit.CustomeProcessEventListener"/>

            </listeners>

          </ksession>

        </kbase>

      </kmodule>

       

      then begin to click 'build & deploy ' , it reported the following errors:

      Caused by: java.lang.ClassNotFoundException: com.domain.audit.CustomeProcessEventListener from [Module "org.drools:main" from local module loader @751dc8af (finder: local module finder @7662953a (roots: /home/wguo/apps/jboss-eap-6.2/modules,/home/user/apps/jboss-eap-6.2/modules/system/layers/bpms,/home/user/apps/jboss-eap-6.2/modules/system/layers/base))]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_09-icedtea]

          at java.lang.Class.forName(Class.java:186) [rt.jar:1.7.0_09-icedtea]

          at org.drools.compiler.kie.util.CDIHelper$CDIBeanCreator.createBean(CDIHelper.java:109) [drools-compiler-6.0.2-redhat-2.jar:6.0.2-redhat-2]

          at org.drools.compiler.kie.util.CDIHelper.wireListnersAndWIHs(CDIHelper.java:42) [drools-compiler-6.0.2-redhat-2.jar:6.0.2-redhat-2]

          ... 61 more

       

      anyone know the issues , thanks .