[rules-users] How to dump the class/src generated by .drl file?
Mark Proctor
mproctor at codehaus.org
Tue Aug 7 06:26:43 EDT 2007
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
> ------------------------------------------------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070807/4d5380f2/attachment.html
More information about the rules-users
mailing list