&nbsp;&nbsp; Sudipta,<br><br>&nbsp;&nbsp;&nbsp; I believe the problem is that you can&#39;t import classes from the default package into your rules file, but I&#39;m not sure.<br><br>&nbsp;&nbsp;&nbsp; Try making Message a top level class (not an inner class) and put it in a package (not the default one). Import it in the DRL and you shall be fine.
<br><br>&nbsp;&nbsp;&nbsp; We need a closer look at this before releasing next major final version.<br><br>&nbsp;&nbsp;&nbsp; []s<br>&nbsp;&nbsp;&nbsp; Edson<br><br><br><div><span class="gmail_quote">2007/4/5, Sudipta deb &lt;<a href="mailto:sudipta_hitk@yahoo.co.in">
sudipta_hitk@yahoo.co.in</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Sir,<br><br>I want to run a simple drools example i.e
. HelloWorldExample from command line<br><br style="font-weight: bold;"><span style="font-weight: bold;">My HelloWorldExample.java---&gt;</span><br><br><br style="font-style: italic;"><span style="font-style: italic;">import 
java.io.InputStreamReader;</span><br style="font-style: italic;"><span style="font-style: italic;">import java.io.Reader;</span><br style="font-style: italic;"><span style="font-style: italic;">import org.drools.RuleBase;
</span><br style="font-style: italic;"><span style="font-style: italic;">import org.drools.RuleBaseFactory;</span><br style="font-style: italic;"><span style="font-style: italic;">import org.drools.WorkingMemory;</span><br style="font-style: italic;">
<span style="font-style: italic;">import org.drools.compiler.PackageBuilder;</span><br style="font-style: italic;"><span style="font-style: italic;">import org.drools.rule.Package;</span><br style="font-style: italic;"><span style="font-style: italic;">
import org.drools.compiler.PackageBuilderConfiguration;</span><br style="font-style: italic;"><span style="font-style: italic;">import org.drools.compiler.*;</span><br style="font-style: italic;"><span style="font-style: italic;">
import java.lang.String;</span><br style="font-style: italic;"><span style="font-style: italic;">import java.io.*;</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">/**
</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;* This is a sample file to launch a rule package from a rule source file.</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;*/
</span><br style="font-style: italic;"><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">public class HelloWorldExample </span><br style="font-style: italic;"><span style="font-style: italic;">
{</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; public static final void main(final String[] args) </span><br style="font-style: italic;"><span style="font-style: italic;">
&nbsp;&nbsp;&nbsp; {</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try </span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span><br style="font-style: italic;"><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //load up the rulebase</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; final RuleBase ruleBase = loadRules();</span><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 final WorkingMemory workingMemory = ruleBase.newWorkingMemory();</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //go !</span><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; final Message message = new Message();</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; message.setMessage( &quot;Hello World &quot; );</span>
<br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; message.setStatus( Message.HELLO );</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; workingMemory.assertObject
( message );</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; workingMemory.fireAllRules();</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </span><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } </span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; catch ( final Throwable t ) </span><br style="font-style: italic;"><span style="font-style: italic;">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.printStackTrace();</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp;&nbsp;&nbsp; }</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; </span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; public static RuleBase loadRules() 
</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; {</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; RuleBase ruleBase=null;</span><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; try </span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp; </span><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; String [] ruleFiles = new String
 [1];&nbsp;&nbsp;&nbsp;&nbsp; </span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ruleFiles[0]&nbsp; = &quot;HelloWorld.drl&quot;;</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp; </span><br style="font-style: italic;"><span style="font-style: italic;">
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; PackageBuilderConfiguration pkgBuilderCfg = new PackageBuilderConfiguration();</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
 pkgBuilderCfg.setCompiler(PackageBuilderConfiguration.JANINO);</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; PackageBuilder builder = new PackageBuilder(pkgBuilderCfg);</span><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for( int i = 0, j = ruleFiles.length; i&lt;j; i++ )</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {</span><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; builder.addPackageFromDrl(new InputStreamReader(HelloWorldExample.class.getResourceAsStream( ruleFiles[i] )) ); //HelloWorldExample.class.getResourceAsStream( &quot;HelloWorld.drl
&quot; )</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //new InputStreamReader(getClass().getResourceAsStream( ruleFiles[i] ) )</span><br style="font-style: italic;"><span style="font-style: italic;">
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp; </span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; final Package pkg = builder.getPackage();
</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ruleBase = RuleBaseFactory.newRuleBase();</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ruleBase.addPackage
(pkg);</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp; </span><br style="font-style: italic;"><span style="font-style: italic;">
&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } </span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; catch (Exception fe) </span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {</span><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fe.printStackTrace();</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }</span><br style="font-style: italic;"><span style="font-style: italic;">
&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return
 ruleBase;</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp; }</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; /**</span><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp; * Please note that this is the &quot;low level&quot; rule assembly API.</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp; */</span><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp;&nbsp;&nbsp; private static RuleBase readRule() throws Exception </span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; {</span><br style="font-style: italic;"><span style="font-style: italic;">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //read in the source</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 final Reader source = new InputStreamReader( HelloWorldExample.class.getResourceAsStream( &quot;HelloWorld.drl&quot; ) );</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //optionally read in the DSL (if you are using it).</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Reader dsl = new InputStreamReader( DroolsTest.class.getResourceAsStream( &quot;/mylang.dsl&quot; ) );
</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Use package builder to build up a rule package.</span><br style="font-style: italic;"><span style="font-style: italic;">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //An alternative lower level class called &quot;DrlParser&quot; can also be used...</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; final PackageBuilder builder = new PackageBuilder();
</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //this wil parse and compile in one step</span><br style="font-style: italic;"><span style="font-style: italic;">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //NOTE: There are 2 methods here, the one argument one is for normal DRL.</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; builder.addPackageFromDrl( source );</span><br style="font-style: italic;">
<br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Use the following instead of above if you are using a DSL:</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 //builder.addPackageFromDrl( source, dsl );</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //get the compiled package (which is serializable)</span><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; final Package pkg = builder.getPackage();</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //add the package to a rulebase (deploy the rule package).
</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; final RuleBase ruleBase = RuleBaseFactory.newRuleBase();</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ruleBase.addPackage
( pkg );</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return ruleBase;</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; }</span><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp;&nbsp;&nbsp; </span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; public static class Message </span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; {
</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public static final int HELLO&nbsp;&nbsp; = 0;</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public static final int GOODBYE = 1;
</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private
 String&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; message;</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status;</span><br style="font-style: italic;"><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public String getMessage() </span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span><br style="font-style: italic;"><span style="font-style: italic;">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return this.message;</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void setMessage(final String message) 
</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.message = message;</span><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public int getStatus() </span><br style="font-style: italic;"><span style="font-style: italic;">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return this.status;</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><br style="font-style: italic;">
<br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void setStatus(final int status) </span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.status = status;</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><br style="font-style: italic;"><span style="font-style: italic;">
&nbsp;&nbsp;&nbsp; }</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; </span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">}</span><br><br><span style="font-weight: bold;">
My HelloWorld.drl--&gt;</span><br><span style="font-style: italic;">package drools_test;</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">import HelloWorldExample.*;</span>
<br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;</span><br style="font-style: italic;"><span style="font-style: italic;">rule &quot;Hello World&quot;</span><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp;&nbsp;&nbsp; when</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m : Message( status == Message.HELLO, message : message )</span><br style="font-style: italic;"><span style="font-style: italic;">
&nbsp;&nbsp;&nbsp; then</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println( message ); </span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m.setMessage( &quot;Goodbye cruel world&quot; );
</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m.setStatus( Message.GOODBYE );</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; modify( m );</span><br style="font-style: italic;">
<span style="font-style: italic;">end</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">rule &quot;GoodBye&quot;</span><br style="font-style: italic;"><span style="font-style: italic;">
&nbsp;&nbsp;&nbsp; no-loop true</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; when</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m : Message( status == Message.GOODBYE, message : message )
</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; then</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println( message ); </span><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m.setMessage( message );</span><br style="font-style: italic;"><span style="font-style: italic;">end<br><br></span>Now compilation works absolutely fine but when i am trying to run it some errors are coming
<span style="font-style: italic;"><br><br>Warning: An error occurred compiling a semantic invoker. Errors should have been reported elsewhere.<br>Warning: An error occurred compiling a semantic invoker. Errors should have been reported elsewhere.
<br>org.drools.rule.InvalidRulePackage: Rule Compilation error Class &quot;HelloWorldExample.Message&quot; not found Class &quot;HelloWorldExample.Message&quot; not found Class &quot;java.lang.Object&quot; has no method named &quot;setMessage&quot; Exception:0
<br>Rule
 Compilation error Class &quot;HelloWorldExample.Message&quot; not found Class &quot;HelloWorldExample.Message&quot; not found Class &quot;java.lang.Object&quot; has no method named &quot;setMessage&quot; Exception:0<br>
<br>&nbsp;&nbsp;&nbsp; at org.drools.rule.Package.checkValidity(Unknown Source)<br>&nbsp;&nbsp;&nbsp; at org.drools.common.AbstractRuleBase.addPackage(Unknown Source)<br>&nbsp;&nbsp;&nbsp; at HelloWorldExample.loadRules(HelloWorldExample.java:68)<br>&nbsp;&nbsp;&nbsp; at HelloWorldExample.main
(HelloWorldExample.java:29)<br><br></span>I put all the jar files in the classpath. Please help me.<br><br>With regards,<br><span class="sg"><br>Sudipta Deb.&nbsp; (+919831606520)<br>Kolkata,India<span style="font-style: italic;">
<br></span></span><span class="ad"><p> 
        

        
                </p><hr size="1"> 
Here�s a new way to find what you&#39;re looking for - <a href="http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.com/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Yahoo! Answers
</a> <p></p></span><br>_______________________________________________<br>rules-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org
</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br><br></blockquote></div>
<br><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;Software Engineer - JBoss Rules Core Developer<br>&nbsp;&nbsp;Office: +55 11 3124-6000<br>&nbsp;&nbsp;Mobile: +55 11 9218-4151<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">
www.jboss.com</a>