<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Everyone!<br>
<br>
We've been using the engine for quite a while in the project (a web
app) and now we're switching from Tomcat to Jetty in our local dev
environments. This change triggered a strange error when it compiles
the rules (both with the eclipse and janino dialects).<br>
<br>
I'm using eclipse 3.3.2, Jetty 7.1.7 and the error happened in Drools
4.0.4 to 4.0.6 (may be in other versions too).<br>
<br>
The exception I'm getting with the janino dialect (which is more
verbose) is attached and the rule (here's a small snippet)<br>
<table border="1" cellpadding="2" cellspacing="2" height="156"
width="1827">
<tbody>
<tr>
<td valign="top" width="600"><tt>org.slf4j.Loggerorg.slf4j.LoggerFactoryorg.slf4j.Loggerorg.slf4j.LoggerFactoryorg.slf4j.Loggerorg.slf4j.LoggerFactoryorg.slf4j.Loggerorg.slf4j.LoggerFactoryorg.slf4j.Loggerorg.slf4j.LoggerFactoryorg.slf4j.Loggerorg.slf4j.LoggerFactoryorg.slf4j.Loggerorg.slf4j.LoggerFactoryRule
Compilation error : [Rule name=insertion of versions, agendaGroup=MAIN,
salience=0, no-loop=false]<br>
com/elixir/rules/Rule_insertion_of_versions_0.java (16:3) :
Imported class "org.slf4j.LoggerFactory" could not be loaded<br>
com/elixir/rules/Rule_insertion_of_versions_0.java (16:26) : A
method named "getLogger" is not declared in any enclosing class nor any
supertype, nor through a static import<br>
com/elixir/rules/Rule_insertion_of_versions_0.java (16:52) : A
method named "info" is not declared in any enclosing class nor any
supertype, nor through a static import<br>
com/elixir/rules/Rule_insertion_of_versions_0.java (16:26) : A
method named "getLogger" is not declared in any enclosing class nor any
supertype, nor through a static import<br>
com/elixir/rules/Rule_insertion_of_versions_0.java (16:3) :
Imported class "org.slf4j.LoggerFactory" could not be loaded<br>
com/elixir/rules/Rule_insertion_of_versions_0.java (16:26) :
Instance method "getLogger" cannot be invoked in static context<br>
<br>
</tt></td>
</tr>
</tbody>
</table>
<br>
And I'm executing the following rule:<br>
<table border="1" cellpadding="2" cellspacing="2" height="332"
width="817">
<tbody>
<tr>
<td valign="top"><tt>package com.elixir<br>
<br>
#list any import classes here.<br>
import com.elixir.model.*;<br>
import java.util.HashSet;<br>
import java.util.Date;<br>
<br>
import org.slf4j.Logger;<br>
import org.slf4j.LoggerFactory;<br>
<br>
rule "insertion of versions" <br>
ruleflow-group "fact-insertion"<br>
when<br>
$a: Artifact(versions != null)<br>
$v: ArtifactVersion() from $a.getVersions()<br>
then<br>
insert ($v);<br>
LoggerFactory.getLogger("factinsertion.drl").info("Entered:
insertion of versions"); <br>
end</tt></td>
</tr>
</tbody>
</table>
<br>
And the PackageBuilder get's instantiated like this:<br>
<table border="1" cellpadding="2" cellspacing="2" height="64"
width="966">
<tbody>
<tr>
<td valign="top"><tt> PackageBuilderConfiguration
pkgBuilderCfg = new PackageBuilderConfiguration();<br>
JavaDialectConfiguration javaConf = (JavaDialectConfiguration)
pkgBuilderCfg.getDialectConfiguration( "java" );<br>
javaConf.setCompiler( JavaDialectConfiguration.JANINO );<br>
PackageBuilder builder = new PackageBuilder(pkgBuilderCfg);</tt><br>
</td>
</tr>
</tbody>
</table>
<br>
I'm quite sure that this is a mistake in how I'm running this, but I
can't find the solution :S.<br>
<br>
Oh, and just in case, we're running the application without any
problems in jetty but not from inside eclipse.<br>
<br>
<br>
Thanks in advance,<br>
Augusto<br>
<tt><br>
</tt><br>
<br>
<br>
<br>
</body>
</html>