Hello,<br>did you set the java compiler name : &quot;JANINO&quot; or &quot;JAVA&quot; ?<br><br><div class="gmail_quote">2009/7/28  <span dir="ltr">&lt;<a href="mailto:Pankaj.Jain@lntinfotech.com">Pankaj.Jain@lntinfotech.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><font face="Trebuchet MS" size="2">Hi</font>
<br>
<br><font face="Trebuchet MS" size="2">I still have not got any solution
of my problem that I posted previously. I have included all required jar
files and set proper class path .. Please do help ?</font>
<br>
<br><font face="Trebuchet MS" size="2">problem: </font>
<br>
<table>
<tbody><tr valign="top">
<td><font face="Trebuchet MS" size="2">I am trying to integrate Drool with
ofbiz and run application from command prompt. In one way I have integrated
it properly and I am able to run it <b>successfully.</b></font><font size="3">
<br>
</font><font face="Trebuchet MS" size="2"><b><br>
Code :</b> Which I was using initially</font><font size="3"> <br>
</font><font face="Trebuchet MS" size="2"><br>
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
</font><font size="3"><br>
</font><font face="Trebuchet MS" size="2"><br>
or</font><font size="3"> <br>
</font><font face="Trebuchet MS" size="2"><br>
PackageBuilderConfiguration cfg = new PackageBuilderConfiguration();</font><font size="3">
</font><font face="Trebuchet MS" size="2"><br>
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
</font><font size="3"><br>
</font><font face="Trebuchet MS" size="2"><b><br>
Exception I got :</b></font><font size="3"> <br>
</font><font face="Trebuchet MS" size="2"><br>
org.drools.RuntimeDroolsException: Unable to load dialect &#39;org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java
<br>
:org.drools.rule.builder.dialect.java.JavaDialectConfiguration&#39;</font><font size="3">
</font><font face="Trebuchet MS" size="2"><br>
at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:274)
at org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigurationMap(PackageBuilderConfiguration.java:259)
</font><font size="3"><br>
</font><font face="Trebuchet MS" size="2"><br>
at org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:176)
at org.drools.compiler.PackageBuilderConfiguration.&lt;init&gt;(PackageBuilderConfiguration.java:153)
at org.drools.compiler.PackageBuilder.&lt;init&gt;(PackageBuilder.java:242)
<br>
.</font><font size="3"> </font><font face="Trebuchet MS" size="2"><br>
.</font><font size="3"> </font><font face="Trebuchet MS" size="2"><br>
.</font><font size="3"> </font><font face="Trebuchet MS" size="2"><br>
Caused by: java.lang.NullPointerException</font><font size="3"> </font><font face="Trebuchet MS" size="2"><br>
at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.setCompiler(JavaDialectConfiguration.java:92)
at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.init(JavaDialectConfiguration.java:55)
at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:270</font><font size="3">
<br>
</font><font face="Trebuchet MS" size="2"><b><br>
Problem I found : </b><br>
In the class JavaDialectConfiguration in jar file drools-compiler.jar there
is a method named &quot;setCompliler&quot;,  in this method Null Pointer
Exception was coming.</font><font size="3"> <br>
</font><font face="Trebuchet MS" size="2"><b><br>
Solution I provided :</b></font><font size="3"> </font><font face="Trebuchet MS" size="2"><br>
In my application I created my custom class CustomJavaDialectConfiguration
by extending to class JavaDialectConfiguration, In this class I overrided
the method setCompiler. My method was exactly same as that of method setCompiler
in JavaDialectConfiguration . To call my dialect class I also overrided
the method &quot;addDialect&quot; of PackageBuilderConfiguration class
. For that I created class CustomPackageBuilderConfiguration by extending
to PackageBuilderConfiguration. <br>
after that I wrote the code:</font><font size="3"> <br>
</font><font face="Trebuchet MS" size="2"><br>
PackageBuilderConfiguration cfg = new CustomPackageBuilderConfiguration();</font><font size="3">
</font><font face="Trebuchet MS" size="2"><br>
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(cfg);</font><font size="3">
<br>
<br>
</font><font face="Trebuchet MS" size="2"><br>
Now application is running perfectly fine from both eclipse and command
prompt without any exception.</font><font size="3"> <br>
</font><font face="Trebuchet MS" size="2"><b><br>
I want to know as my overrided method &quot;setCompiler&quot; was exactly
same then why I had to override method, and In original code (ie in drools-compiler.jar
file) why it was giving exception  ???  Was that due to class
lader or something else ??  Please do help in this regard ....</b></font><font size="3">
<br>
</font></td></tr></tbody></table>
<br><font face="Trebuchet MS" size="2"> </font>
<br>
<br><font face="Trebuchet MS" size="2">Thanks &amp; Regards:<br>
<br>
Pankaj Jain | L&amp;T infotech |Navi Mumbai<br>
Mobile: +91 9920218945<br>
Email : <a href="mailto:pankaj.jain@lntinfotech.com" target="_blank">pankaj.jain@lntinfotech.com</a><br>
<a href="http://www.Lntinfotech.com" target="_blank">www.Lntinfotech.com</a><br>
<br>
&quot;Whatever the mind of man can conceive &amp; believe, it can achieve.&quot;<br>
<b><br>
Larsen &amp; Toubro Infotech Ltd.</b></font><font face="Trebuchet MS" size="2" color="blue"><u><br>
</u></font><a href="http://www.lntinfotech.com/" target="_blank"><font face="Trebuchet MS" size="2" color="blue"><u>www.Lntinfotech.com</u></font></a><font face="Trebuchet MS" size="2"><br>
<br>
This Document is classified as: <br>
<br>
</font><input name="F1_chkbox" checked value="on" type="checkbox"><font face="Trebuchet MS" size="2">L&amp;T
Infotech Proprietary   </font><input name="F1_chkbox" value="on" type="checkbox"><font face="Trebuchet MS" size="2">L&amp;T
Infotech Confidential   </font><input name="F1_chkbox" value="on" type="checkbox"><font face="Trebuchet MS" size="2">L&amp;T
Infotech Internal Use Only   </font><input name="F1_chkbox" value="on" type="checkbox"><font face="Trebuchet MS" size="2">L&amp;T
Infotech General Business   <br>
<br>
This Email may contain confidential or privileged information for the intended
recipient (s) If you are not the intended recipient, please do not use
or disseminate the information, notify the sender and delete it from your
system. </font>

<br>
______________________________________________________________________<br>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a 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>