<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
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.<br>
<br>
Mark<br>
Yang Song wrote:
<blockquote
 cite="mid:657190290708070301l1c3b295v13cc8d4549dd9b6e@mail.gmail.com"
 type="cite">
  <div>Greetings everyone,</div>
  <div>&nbsp;</div>
  <div>Does anyone know how to dump the class generated from .drl&nbsp;file
to disk? Or even better if the generated Java source file can be dumped?</div>
  <div>&nbsp;</div>
  <div>Looking for some hints here, I got a NPE when firing the rules.
However, it is really hard to find out why&nbsp;the NEP was thrown...&nbsp;&nbsp;If I
can have the dumped class file,&nbsp;then&nbsp;I can&nbsp;be&nbsp;disassemble&nbsp;it back to
Java code.</div>
  <div>&nbsp;</div>
  <div>To debug this rule in Eclipse is a bit difficult here,
because&nbsp;the project&nbsp;is a&nbsp;little "big"&nbsp;and we usually use logging to do
debugging...</div>
  <div>&nbsp;</div>
  <div>java.lang.NullPointerException<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
monitor.Rule_ftp_other_host_alarm_0.consequence(Rule_ftp_other_host_alarm_0.java:23)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
monitor.Rule_ftp_other_host_alarm_0ConsequenceInvoker.evaluate(Rule_ftp_other_host_alarm_0ConsequenceInvoker.java:26)
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:545)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:509)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.drools.common.AbstractWorkingMemory.fireAllRules
(AbstractWorkingMemory.java:430)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:392)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
com.monitor.ruleengine.InferenceMachine.fireAllRules(InferenceMachine.java:400)
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
com.monitor.ruleengine.InferenceMachine.run(InferenceMachine.java:314)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at java.lang.Thread.run(Thread.java:595)</div>
  <div>&nbsp;</div>
  <div>Thanks very much,</div>
  <div>Yang</div>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
  </pre>
</blockquote>
<br>
</body>
</html>