<div dir="ltr">Hello Joe,<br><br><div class="gmail_quote">On Mon, Nov 17, 2008 at 7:54 PM, Joe White <span dir="ltr">&lt;<a href="mailto:Joe.White@recondotech.com">Joe.White@recondotech.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">









<div link="blue" vlink="purple" lang="EN-US">

<div>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Maxim,</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Are the classes you are trying to reference multiple levels of
inner classes? Drools 4 cannot reference nested inner classes in drl. That
issue is fixed in the release for drools 5.</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Joe</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p></div></div></blockquote><div>No, I&#39;m afraid they are &quot;Simple&quot; compilation units.<br>They do extend their &quot;basic&quot; versions, but this AFAIK should not be a problem.<br>
<br>Never the less, thank you for the information.<br><br>Maxim.<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div link="blue" vlink="purple" lang="EN-US">
<div><p><span style="font-size: 11pt; color: rgb(31, 73, 125);"></span></p>

<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">

<p><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;">
<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>
[mailto:<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>] <b>On Behalf Of </b>Maxim Veksler<br>
<b>Sent:</b> Monday, November 17, 2008 10:17 AM<br>
<b>To:</b> Rules Users List<br>
<b>Subject:</b> [rules-users] (interesting) migration problem from Drools 3.0.6
toDrools 4.0.7</span></p>

</div><div><div></div><div class="Wj3C7c">

<p>&nbsp;</p>

<div>

<p>Hello Everyone,<br>
<br>
Here&#39;s a fun stuff to debug:<br>
<br>
<br>
In our application we are using the concept of &quot;Dynamic Beans&quot;,
Drools is running in a webapp. The servlet container is tomcat6.<br>
<br>
Dynamic beans are beans we compile from java code and then load with a custom
class loader. This happens in the following method :<br>
<br>
The class that implements ServletContextListener has in his
contextInitialized(...) method a code to do the following: (simplification)<br>
<br>
ClassLoader cl = Janino.JavaSourceClassLoader(...)<br>
originalCl = Thread.currentThread().getContextClassLoader();<br>
Thread.currentThread().setContextClassLoader(cl);<br>
<br>
The above code allowed drools3 to find the Dynamic Classes (which didn&#39;t even
existed, not to be mention were available to ANY classloader).<br>
<br>
<br>
Now, inside the .drl files we use properties from these dynamic beans - This
allows us to be dynamic on the properties we can filter by.<br>
<br>
All good, but now comes the new Drools4 code. The application is no longer able
to find the mentioned classes. <br>
The only changes the I&#39;ve done was change Drools version from 3 to 4. <br>
<br>
The errors I&#39;m getting are of the form :<br>
<br>
Rule Compilation error : [Rule name=X Status, agendaGroup=MAIN, salience=0,
no-loop=false]<br>
&nbsp;&nbsp;&nbsp; com/X/ruleEngine/filtering/Rule_X_Status_0.java (2:267) :
Only a type can be imported. com.X.common.dataModel.facts.dynamic.X resolves to
a package<br>
&nbsp;&nbsp;&nbsp; com/X/ruleEngine/filtering/Rule_X_Status_0.java (2:334) :
Only a type can be imported. com.X.common.dataModel.facts.dynamic.X resolves to
a package<br>
&nbsp;&nbsp;&nbsp; com/X/ruleEngine/filtering/Rule_X_Status_0.java (2:1111) :
Only a type can be imported. com.X.common.dataModel.facts.banner.X resolves to
a package<br>
&nbsp;&nbsp;&nbsp; com/X/ruleEngine/filtering/Rule_X_Status_0.java (2:1379) :
The import com.X.common.dataModel.facts.X.X cannot be resolved<br>
...<br>
<br>
Anyone has ideas how to over come this?<br>
<br>
I&#39;m currently searching for alternatives, I&#39;m thinking about Configuring my
custom class loader at the webapp level or something like that... <br>
Help would be appreciated as I&#39;m not getting much success.<br>
<br>
-- <br>
Cheers, <br>
Maxim Veksler<br>
<br>
&quot;Free as in Freedom&quot; - Do u GNU ?</p>

</div>

</div></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>Cheers, <br>Maxim Veksler<br><br>&quot;Free as in Freedom&quot; - Do u GNU ?<br>
</div>