That's what I thought but how can you get drools to use the janino compiler?
It does when the code is running under JBoss.

On 3/1/06, Michael Neale <[EMAIL PROTECTED]> wrote:
>
> I think its missing JDT from the classpath for the project.
>
> On 3/1/06, Paul Smith <[EMAIL PROTECTED]> wrote:
> >
> > Guys,
> >
> > has anybody had any issues trying to run their drools unit tests from
> > eclipse with drools 2.5 beta 2. Everything seems to work well with 2.1but
> > I
> > get the following with 2.5 beta 2:
> >
> > java.lang.NoClassDefFoundError:
> > org/eclipse/jdt/internal/compiler/env/INameEnvironment
> > at org.apache.commons.jci.compilers.JavaCompilerFactory.createCompiler(
> > JavaCompilerFactory.java:82)
> > at org.drools.semantics.java.JavaSemanticFunctionsCompiler.getInstance(
> > JavaSemanticFunctionsCompiler.java:27)
> > at org.drools.semantics.java.JavaFunctions.getSemanticFunctionsCompiler(
> > JavaFunctions.java:101)
> > at org.drools.smf.RuleSetCompiler.compile(RuleSetCompiler.java:166)
> > at org.drools.smf.RuleSetCompiler.<init>(RuleSetCompiler.java:67)
> > at org.drools.io.RuleSetLoader.addFromInputSource(RuleSetLoader.java
> :169)
> > at org.drools.io.RuleSetLoader.addFromUrl(RuleSetLoader.java:68)
> > at org.drools.io.RuleBaseLoader.loadFromUrl(RuleBaseLoader.java:529)
> > at org.drools.io.RuleBaseLoader.loadFromUrl(RuleBaseLoader.java:494)
> > at org.drools.io.RuleBaseLoader.loadFromUrl(RuleBaseLoader.java:479)
> >
> >
> > This seems to be because it's trying to pick up the Eclipse compiler
> > instead
> > of the janino one which is on the classpath because of the following:
> >
> > public class JavaSemanticFunctionsCompiler extends
> > AbstractSemanticCompiler
> >     implements
> >     SemanticFunctionsCompiler
> > {
> >     private static SemanticFunctionsCompiler INSTANCE;
> >
> >     private final String                     semanticType;
> >
> >     public static SemanticFunctionsCompiler getInstance()
> >     {
> >         if ( JavaSemanticFunctionsCompiler.INSTANCE == null )
> >         {
> >             JavaSemanticFunctionsCompiler.INSTANCE = new
> > JavaSemanticFunctionsCompiler( "java",
> >
> > JavaCompilerFactory.getInstance().createCompiler(
> > JavaCompilerFactory.ECLIPSE ) );
> >         }
> >         return JavaSemanticFunctionsCompiler.INSTANCE;
> >     }
> >
> > INSTANCE seems to be always null when running from JUnit. Everything
> works
> > ok when I run the cactus tests against the deployed app running under
> > JBoss
> > 4.0.4
> >
> > Do I have to configure something else when running straight JUnit tests?
> >
> >
>
>

Reply via email to