Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 983675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:53:50+00:00 2026-05-16T04:53:50+00:00

Is there a more comprehensive quick start for drools 5. I was attempting to

  • 0

Is there a more comprehensive quick start for drools 5. I was attempting to run the simple Hello World .drl rule but I wanted to do it through an ant script, possibly with just javac/java:

I get the following error: Note: I don’t am running completely without Eclipse or any other IDE:

Is there a more comprehensive quick start for drools 5. I was attempting to run the simple Hello World .drl rule but I wanted to do it through an ant script, possibly with just javac/java:

I get the following error: Note: I don’t am running completely without Eclipse or any other IDE:

test:
     [java] Exception in thread "main" org.drools.RuntimeDroolsException: Unable to load d
ialect 'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java:org.drools.rule
.builder.dialect.java.JavaDialectConfiguration'
     [java]     at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuild
erConfiguration.java:274)
     [java]     at org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigurati
onMap(PackageBuilderConfiguration.java:259)
     [java]     at org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConf
iguration.java:176)
     [java]     at org.drools.compiler.PackageBuilderConfiguration.<init>(PackageBuilderCo
nfiguration.java:153)
     [java]     at org.drools.compiler.PackageBuilder.<init>(PackageBuilder.java:242)
     [java]     at org.drools.compiler.PackageBuilder.<init>(PackageBuilder.java:142)
     [java]     at org.drools.builder.impl.KnowledgeBuilderProviderImpl.newKnowledgeBuilde
r(KnowledgeBuilderProviderImpl.java:29)
     [java]     at org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilder(Knowledg
eBuilderFactory.java:29)
     [java]     at org.berlin.rpg.rules.Rules.rules(Rules.java:33)
     [java]     at org.berlin.rpg.rules.Rules.main(Rules.java:73)
     [java] Caused by: java.lang.RuntimeException: The Eclipse JDT Core jar is not in the
classpath
     [java]     at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.setCompil
er(JavaDialectConfiguration.java:94)
     [java]     at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.init(Java
DialectConfiguration.java:55)
     [java]     at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuild
erConfiguration.java:270)
     [java]     ... 9 more
     [java] Java Result: 1

...
...

I do include the following libraries with my javac and java target:

 <path id="classpath">
     <pathelement location="${lib.dir}" />
     <pathelement location="${lib.dir}/drools-api-5.0.1.jar" />
     <pathelement location="${lib.dir}/drools-compiler-5.0.1.jar" />
     <pathelement location="${lib.dir}/drools-core-5.0.1.jar" />
     <pathelement location="${lib.dir}/janino-2.5.15.jar" />
 </path>

Here is the Java code that is throwing the error. I commented out the java.compiler code, that didn’t work either.

public void rules() {

/*
final Properties properties = new Properties(); 
properties.setProperty( "drools.dialect.java.compiler", "JANINO" ); 
PackageBuilderConfiguration cfg = new PackageBuilderConfiguration( properties ); 
JavaDialectConfiguration javaConf = (JavaDialectConfiguration) 
cfg.getDialectConfiguration( "java" ); 
*/
final KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();

// this will parse and compile in one step
kbuilder.add(ResourceFactory.newClassPathResource("HelloWorld.drl", Rules.class), ResourceType.DRL);

// Check the builder for errors
if (kbuilder.hasErrors()) {
    System.out.println(kbuilder.getErrors().toString());
    throw new RuntimeException("Unable to compile \"HelloWorld.drl\".");
}

// Get the compiled packages (which are serializable)
final Collection<KnowledgePackage> pkgs = kbuilder.getKnowledgePackages();

// Add the packages to a knowledgebase (deploy the knowledge packages).
final KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(pkgs);

final StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
ksession.setGlobal("list", new ArrayList<Object>());

ksession.addEventListener(new DebugAgendaEventListener());
ksession.addEventListener(new DebugWorkingMemoryEventListener());

// Setup the audit logging
KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory.newFileLogger(ksession, "log/helloworld");

final Message message = new Message();
message.setMessage("Hello World");
message.setStatus(Message.HELLO);
ksession.insert(message);

ksession.fireAllRules();
logger.close();
ksession.dispose();

}

…

Here I don’t think Ant is relevant because I have fork set to true:

 <target name="test" depends="compile">
     <java classname="org.berlin.rpg.rules.Rules" fork="true">
         <classpath refid="classpath.rt" />
         <classpath>
             <pathelement location="${basedir}" />
             <pathelement location="${build.classes.dir}" />
         </classpath>
     </java>
 </target>

The error is thrown at line 1.

Basically, I haven’t done anything except call

final KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();

I am running with Windows XP, Java6, and within Ant.1.7.
The most recent (as of yesterday) version 5 of Drools-Rules.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T04:53:50+00:00Added an answer on May 16, 2026 at 4:53 am

    the key to the problem is this line in the error listing:
    “Caused by: java.lang.RuntimeException: The Eclipse JDT Core jar is not in the classpath”

    This reference is to the library “core-3.4.2.v_883_R34x.jar” which is installed by the Eclipse Drools plugin

    If you add core-3.4.2.v_883_R34x.jar to your libraries then you won’t get the runtime exception.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there more comprehensive sample of creating Google App Engine App using GData Python
I did some HTTP monitoring with WireShark. Are there more tools like this that
Are there any more generic tools that can compile or basically merge multiple PHP
Is there a more efficient way to convert an HTMLCollection to an Array, other
Would there a more elegant way of writing the following syntax? Thread t0 =
Is there a more concise/standard idiom (e.g., a JDK method) for piping an input
If there is more than one way, please list them. I only know of
Is there a more efficient way to clamp real numbers than using if statements
Is there a more elegant solution to convert an ' Arraylist ' into a
Is there are more efficient way than the following for selecting the third parent?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.