I'm currently using Jboss Rules in it's 3.0.6 version, and I can't find the JavaRuleClassBuilder class, is anyone have an idea to recover the generated class from dsl & Drl file? (So helpfull for debugging ^_^).
Thanks
Olivier
--------------------------------------------------------------------------------
De : rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] De la part de Mark Proctor
Envoyé : mardi 7 août 2007 12:27
À : Rules Users List
Objet : Re: [rules-users] How to dump the class/src generated by .drl file?
There is no standard api for this, you would have to get your hands dirty with the source. Look at JavaRuleClassBuilder and you can see where to put your printouts.
Mark
Yang Song wrote:
Greetings everyone,
Does anyone know how to dump the class generated from .drl file to disk? Or even better if the generated Java source file can be dumped?
Looking for some hints here, I got a NPE when firing the rules. However, it is really hard to find out why the NEP was thrown... If I can have the dumped class file, then I can be disassemble it back to Java code.
To debug this rule in Eclipse is a bit difficult here, because the project is a little "big" and we usually use logging to do debugging...
java.lang.NullPointerException
at monitor.Rule_ftp_other_host_alarm_0.consequence(Rule_ftp_other_host_alarm_0.java:23)
at monitor.Rule_ftp_other_host_alarm_0ConsequenceInvoker.evaluate(Rule_ftp_other_host_alarm_0ConsequenceInvoker.java:26)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:545)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:509)
at org.drools.common.AbstractWorkingMemory.fireAllRules (AbstractWorkingMemory.java:430)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:392)
at com.monitor.ruleengine.InferenceMachine.fireAllRules(InferenceMachine.java:400)
at com.monitor.ruleengine.InferenceMachine.run(InferenceMachine.java:314)
at java.lang.Thread.run(Thread.java:595)
Thanks very much,
Yang
--------------------------------------------------------------------------------