[rules-users] How to dump the class/src generated by .drl file?

Yuri de Wit ydewit at gmail.com
Tue Aug 7 20:56:24 EDT 2007


In my experience dealing with these issues, it was reasonably
straightforward to figure what was going on by breakpointing on the
NPE, checking the variable in the stack trace and then looking back at
the drl file.

On 8/7/07, Yang Song <starsy at gmail.com> wrote:
> Thanks a lot Mark, it works.
>
> Have a good day. :)
>
> Yang
>
>
>
> On 8/7/07, Mark Proctor <mproctor at codehaus.org> wrote:
> >
> > 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
> >
> >
> >
> > _______________________________________________
> > rules-users mailing list
> > rules-users at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>



More information about the rules-users mailing list