<div dir="ltr">How come it started working when i added the missing jars?<div><br></div><div>jxl.jar and xstream.jar? </div><div><br></div><div>E.<br><br><div class="gmail_quote">2010/5/11 Salaboy <span dir="ltr">&lt;<a href="mailto:salaboy@gmail.com">salaboy@gmail.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div bgcolor="#FFFFFF"><div>You need to move the rules inside /src/main/resources/ and maven will include the rule file into the classpath automatically. <br>

<br>- Ing. Mauricio Salatino -</div><div><div></div><div class="h5"><div><br>On May 10, 2010, at 8:21, eyal edri &lt;<a href="mailto:eyal.edri@gmail.com" target="_blank">eyal.edri@gmail.com</a>&gt; wrote:<br><br></div><div>

</div><blockquote type="cite"><div><div dir="ltr">I&#39;m still having problem unfortunately.. :(<div><br></div><div>i get a strange error that i didn&#39;t got before turning to maven:</div><div><br></div><div>when running:</div>

<div><br></div><div><b>kbuilder.add(ResourceFactory.newClassPathResource(&quot;src/main/rules/sample.drl&quot;), ResourceType.DRL);</b></div>

<div><br></div><div><div>this errors occurs:</div><div><font color="#990000">j</font><span style="font-size:x-small"><font color="#990000">ava.lang.RuntimeException: java.io.FileNotFoundException: &#39;src/main/rules/sample.drl&#39; cannot be opened because it does not exist</font></span></div>



<div><span style="white-space:pre"><span style="font-size:x-small"><font color="#990000">        </font></span></span><span style="font-size:x-small"><font color="#990000">at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:559)</font></span></div>



<div><span style="white-space:pre"><span style="font-size:x-small"><font color="#990000">        </font></span></span><span style="font-size:x-small"><font color="#990000">at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:25)</font></span></div>



<div><span style="white-space:pre"><span style="font-size:x-small"><font color="#990000">        </font></span></span><span style="font-size:x-small"><font color="#990000">at com.commtouch.drools.DroolsTest.readKnowledgeBase(DroolsTest.java:42)</font></span></div>



<div><span style="white-space:pre"><span style="font-size:x-small"><font color="#990000">        </font></span></span><span style="font-size:x-small"><font color="#990000">at com.commtouch.drools.DroolsTest.main(DroolsTest.java:25)</font></span></div>



<div><span style="font-size:x-small"><font color="#990000">Caused by: java.io.FileNotFoundException: &#39;src/main/rules/sample.drl&#39; cannot be opened because it does not exist</font></span></div>

<div><span style="white-space:pre"><span style="font-size:x-small"><font color="#990000">        </font></span></span><span style="font-size:x-small"><font color="#990000">at org.drools.io.impl.ClassPathResource.getInputStream(ClassPathResource.java:104)</font></span></div>



<div><span style="white-space:pre"><span style="font-size:x-small"><font color="#990000">        </font></span></span><span style="font-size:x-small"><font color="#990000">at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:287)</font></span></div>



<div><span style="white-space:pre"><span style="font-size:x-small"><font color="#990000">        </font></span></span><span style="font-size:x-small"><font color="#990000">at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:488)</font></span></div>



<div><span style="white-space:pre"><span style="font-size:x-small"><font color="#990000">        </font></span></span><span style="font-size:x-small"><font color="#990000">... 3 more</font></span></div>

<div><span style="font-size:x-small"><font color="#990000"><br></font></span></div><div><span style="font-size:x-small">i see a difference between the .classpth and .project files in both projects (Drools project vs Maven Project).</span></div>



<div><span style="font-size:x-small">could this be the reason?</span></div><div><span style="font-size:x-small"><br></span></div><div><font color="#990000"><span style="font-size:x-small">Eyal.</span></font></div>

<br><div class="gmail_quote">On Mon, May 10, 2010 at 12:20 PM, eyal edri <span dir="ltr">&lt;<a href="mailto:eyal.edri@gmail.com" target="_blank"></a><a href="mailto:eyal.edri@gmail.com" target="_blank">eyal.edri@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">OK, the eclipse maven plugin added those deps type as &#39;pom&#39; instead of &#39;jar&#39;, <div>so the drools jars weren&#39;t included.</div><div><br></div><div>fixed that.</div><div><br></div><div>thanks.<div>



<div></div><div><br>
<br><div class="gmail_quote">On Mon, May 10, 2010 at 11:25 AM, eyal edri <span dir="ltr">&lt;<a href="mailto:eyal.edri@gmail.com" target="_blank"></a><a href="mailto:eyal.edri@gmail.com" target="_blank">eyal.edri@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div dir="ltr">OK, Still got problems.<div><br></div><div>i&#39;ve created a maven project, and all looks good in compile time (with all the org.drools dep below).</div><div><br></div><div>but i think i still missing a &#39;runtime&#39; dependency, cause when i try to run the Hello World example, i get this error: </div>





<div><br></div><div><font color="#330099">[the src line is this: </font></div><div><font color="#330099">KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();]</font></div>
<div><br></div><div><div><span style="font-size:x-small"><font color="#990000">org.drools.ProviderInitializationException: Provider org.drools.builder.impl.KnowledgeBuilderProviderImpl could not be set.</font></span></div>





<div><span style="white-space:pre"><span style="font-size:x-small"><font color="#990000">        </font></span></span><span style="font-size:x-small"><font color="#990000">at org.drools.builder.KnowledgeBuilderFactory.loadProvider(KnowledgeBuilderFactory.java:111)</font></span></div>





<div><span style="white-space:pre"><span style="font-size:x-small"><font color="#990000">        </font></span></span><span style="font-size:x-small"><font color="#990000">at org.drools.builder.KnowledgeBuilderFactory.getKnowledgeBuilderProvider(KnowledgeBuilderFactory.java:101)</font></span></div>





<div><span style="white-space:pre"><span style="font-size:x-small"><font color="#990000">        </font></span></span><span style="font-size:x-small"><font color="#990000">at org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilder(KnowledgeBuilderFactory.java:29)</font></span></div>





<div><span style="white-space:pre"><span style="font-size:x-small"><font color="#990000">        </font></span></span><span style="font-size:x-small"><font color="#990000">at com.commtouch.drools.DroolsTest.readKnowledgeBase(DroolsTest.java:38)</font></span></div>





<div><span style="white-space:pre"><span style="font-size:x-small"><font color="#990000">        </font></span></span><span style="font-size:x-small"><font color="#990000">at com.commtouch.drools.DroolsTest.main(DroolsTest.java:24)</font></span></div>





<div><span style="font-size:x-small"><font color="#990000"><span style="background-color:rgb(255, 204, 51)">Caused by: java.lang.ClassNotFoundException: org.drools.builder.impl.KnowledgeBuilderProviderImpl</span></font></span></div>





<div><span style="white-space:pre"><span style="font-size:x-small"><font color="#990000">        </font></span></span><span style="font-size:x-small"><font color="#990000">at java.net.URLClassLoader$1.run(URLClassLoader.java:202)</font></span></div>





<div><span style="white-space:pre"><span style="font-size:x-small"><font color="#990000">        </font></span></span><span style="font-size:x-small"><font color="#990000">at java.security.AccessController.doPrivileged(Native Method)</font></span></div>





<div><span style="white-space:pre"><span style="font-size:x-small"><font color="#990000">        </font></span></span><span style="font-size:x-small"><font color="#990000">at java.net.URLClassLoader.findClass(URLClassLoader.java:190)</font></span></div>





<div><span style="white-space:pre"><span style="font-size:x-small"><font color="#990000">        </font></span></span><span style="font-size:x-small"><font color="#990000">at java.lang.ClassLoader.loadClass(ClassLoader.java:307)</font></span></div>





<div><span style="white-space:pre"><span style="font-size:x-small"><font color="#990000">        </font></span></span><span style="font-size:x-small"><font color="#990000">at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)</font></span></div>





<div><span style="white-space:pre"><span style="font-size:x-small"><font color="#990000">        </font></span></span><span style="font-size:x-small"><font color="#990000">at java.lang.ClassLoader.loadClass(ClassLoader.java:248)</font></span></div>





<div><span style="white-space:pre"><span style="font-size:x-small"><font color="#990000">        </font></span></span><span style="font-size:x-small"><font color="#990000">at java.lang.Class.forName0(Native Method)</font></span></div>





<div><span style="white-space:pre"><span style="font-size:x-small"><font color="#990000">        </font></span></span><span style="font-size:x-small"><font color="#990000">at java.lang.Class.forName(Class.java:169)</font></span></div>





<div><span style="white-space:pre"><span style="font-size:x-small"><font color="#990000">        </font></span></span><span style="font-size:x-small"><font color="#990000">at org.drools.builder.KnowledgeBuilderFactory.loadProvider(KnowledgeBuilderFactory.java:108)</font></span></div>





<div><span style="white-space:pre">        </span></div><div>am i missing org.drools.builder? (i didn&#39;t see it in the maven repo..)</div><div><div></div><div><br><div class="gmail_quote">On Sun, May 9, 2010 at 3:35 PM, Salaboy <span dir="ltr">&lt;<a href="mailto:salaboy@gmail.com" target="_blank"></a><a href="mailto:salaboy@gmail.com" target="_blank">salaboy@gmail.com</a>&gt;</span> wrote:<br>





<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I always prefer to create the maven projects from the scratch. You<br>
only need to add the following deps (groupid and artifactid)<br>
<br>
org.drools<br>
drools-api<br>
<br>
org.drools<br>
drools-core<br>
<br>
org.drools<br>
drools-compiler<br>
<br>
You probably need to add the jboss repository as well in order to get<br>
this deps<br>
<br>
<a href="http://Repository.jboss.org/maven2" target="_blank"></a><a href="http://Repository.jboss.org/maven2" target="_blank">Repository.jboss.org/maven2</a><br>
<br>
<br>
- Ing. Mauricio Salatino -<br>
<div><div></div><div><br>
On May 9, 2010, at 5:01, eyal edri &lt;<a href="mailto:eyal.edri@gmail.com" target="_blank"></a><a href="mailto:eyal.edri@gmail.com" target="_blank">eyal.edri@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Hi,<br>
&gt;<br>
&gt; I&#39;ve created the HelloWorld drools sample project and i want to turn<br>
&gt; it into a maven project.<br>
&gt;<br>
&gt; i know i can create and empty maven project and copy all sources<br>
&gt; from the drools project to it,<br>
&gt; but how do i handle the dependant jars (drools runtime?)<br>
&gt;<br>
&gt; is there a guide of how to mavenize your drools projects?<br>
&gt;<br>
&gt; --<br>
&gt; Eyal Edri<br>
</div></div>&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org" target="_blank"></a><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank"></a><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>


_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank"></a><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank"></a><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>


</blockquote></div><br><br clear="all"><br></div></div>-- <br>Eyal Edri<br>
</div></div>
</blockquote></div><br><br clear="all"><br></div></div>-- <br>Eyal Edri<br>
</div></div>
</blockquote></div><br><br clear="all"><br>-- <br>Eyal Edri<br>
</div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>rules-users mailing list</span><br><span><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a></span><br>

<span><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a></span><br></div></blockquote></div></div></div><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><br clear="all"><br>-- <br>Eyal Edri<br>
</div></div>