<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoQuote, li.MsoQuote, div.MsoQuote
        {mso-style-priority:29;
        mso-style-link:"Quote Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;
        font-style:italic;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.QuoteChar
        {mso-style-name:"Quote Char";
        mso-style-priority:29;
        mso-style-link:Quote;
        color:black;
        font-style:italic;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hello everyone,<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>I&#8217;m fairly new to Drools, having only worked with a basic setup for a little while now. I&#8217;ve successfully gotten a Drools 5.0.1 runtime working with an app running under JBoss 5 but now I need Drools to run under a standalone application. I&#8217;ve more or less copied all of the set up that I used in the JBoss app but am experiencing weird compilation problems.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>My application code looks like the following&#8230;<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>KnowledgeAgent kagent = KnowledgeAgentFactory.<i>newKnowledgeAgent</i>(</span><span style='font-size:10.0pt;font-family:"Courier New";color:#2A00FF'>&quot;MyAgenda&quot;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>kagent.applyChangeSet(ResourceFactory.<i>newClassPathResource</i>(</span><span style='font-size:10.0pt;font-family:"Courier New";color:#2A00FF'>&quot;my_rules.xml&quot;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>));</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:black'>KnowledgeBase </span><span style='font-size:10.0pt;font-family:"Courier New";color:#0000C0'>kbase</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'> = kagent.getKnowledgeBase();<o:p></o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>final</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black'> StatefulKnowledgeSession ksession = </span><span style='font-size:10.0pt;font-family:"Courier New";color:#0000C0'>kbase</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>.newStatefulKnowledgeSession();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>ksession.addEventListener(</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>new</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black'> DebugAgendaEventListener());</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>ksession.addEventListener(</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>new</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black'> <span style='background:silver;mso-highlight:silver'>DebugWorkingMemoryEventListener</span>());</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:black'>KnowledgeRuntimeLogger krlogger = KnowledgeRuntimeLoggerFactory.<i>newConsoleLogger</i>(ksession);<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:black'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:black'>ksession.insert(myObject);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>ksession.fireAllRules();</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>krlogger.close();</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:black'>ksession.dispose();<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:black'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal>and my rules file looks like&#8230;<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;font-family:"Courier New";color:#960000'>package</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black'> mypackage</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;font-family:"Courier New";color:#960000'>rule</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;test&quot;</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:#960000'>when</span></b><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Object()</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:#960000'>then</span></b><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(</span><span style='font-size:10.0pt;font-family:"Courier New";color:green'>&quot;Hello World!&quot;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;font-family:"Courier New";color:#960000'>end</span></b><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Finally this is the output I am seeing from my application&#8230;<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoQuote>[2010:06:180 18:06:144:info] ResourceChangeNotification created<o:p></o:p></p><p class=MsoQuote>[2010:06:180 18:06:147:info] ResourceChangeScanner created with default interval=60<o:p></o:p></p><p class=MsoQuote>[2010:06:180 18:06:147:debug] ResourceChangeNotification monitor added monitor=org.drools.io.impl.ResourceChangeScannerImpl@7d0b8078<o:p></o:p></p><p class=MsoQuote>[2010:06:180 18:06:149:info] KnowledgAgent created, with configuration:<o:p></o:p></p><p class=MsoQuote>monitorChangeSetEvents=true scanResources=true scanDirectories=true<o:p></o:p></p><p class=MsoQuote>[2010:06:180 18:06:149:info] KnowledegAgent has started listening for ChangeSet notifications<o:p></o:p></p><p class=MsoQuote>(null: 3, 78): SchemaLocation: schemaLocation value = 'http://drools.org/drools-5.0/change-set.xsd' must have even number of URI's.<o:p></o:p></p><p class=MsoQuote>(null: 3, 78): cvc-elt.1: Cannot find the declaration of element 'change-set'.<o:p></o:p></p><p class=MsoQuote>[2010:06:180 18:06:181:info] KnowledgAgent applying ChangeSet<o:p></o:p></p><p class=MsoQuote>[2010:06:180 18:06:182:debug] KnowledgeAgent subscribing to resource=[ClassPathResource path='TestRules.drl']<o:p></o:p></p><p class=MsoQuote>[2010:06:180 18:06:182:debug] ResourceChangeNotification subscribing listener=org.drools.agent.impl.KnowledgeAgentImpl@61176350 to resource=[ClassPath<o:p></o:p></p><p class=MsoQuote>Resource path='TestRules.drl']<o:p></o:p></p><p class=MsoQuote>[2010:06:180 18:06:185:debug] ResourceChangeScanner subcribing notifier=org.drools.io.impl.ResourceChangeNotifierImpl@46794afc to resource=[ClassPathR<o:p></o:p></p><p class=MsoQuote>esource path='TestRules.drl']<o:p></o:p></p><p class=MsoQuote>[2010:06:180 18:06:187:debug] KnowledgeAgent ChangeSet requires KnowledgeBuilder<o:p></o:p></p><p class=MsoQuote>[2010:06:180 18:06:187:debug] KnowledgeAgent rebuilding KnowledgeBase using ChangeSet<o:p></o:p></p><p class=MsoQuote>[2010:06:180 18:06:315:debug] KnowledgeAgent building resource=[ClassPathResource path='TestRules.drl']<o:p></o:p></p><p class=MsoQuote>java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.CompilationResult.getProblems()[Lorg/eclipse/jdt/core/compiler/CategorizedProblem;<o:p></o:p></p><p class=MsoQuote>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.drools.commons.jci.compilers.EclipseJavaCompiler$3.acceptResult(EclipseJavaCompiler.java:321)<o:p></o:p></p><p class=MsoQuote>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:335)<o:p></o:p></p><p class=MsoQuote>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:351)<o:p></o:p></p><p class=MsoQuote>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:51)<o:p></o:p></p><p class=MsoQuote>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:389)<o:p></o:p></p><p class=MsoQuote>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.drools.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:56)<o:p></o:p></p><p class=MsoQuote>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.drools.compiler.PackageRegistry.compileAll(PackageRegistry.java:74)<o:p></o:p></p><p class=MsoQuote>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.drools.compiler.PackageBuilder.compileAll(PackageBuilder.java:690)<o:p></o:p></p><p class=MsoQuote>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:653)<o:p></o:p></p><p class=MsoQuote>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:290)<o:p></o:p></p><p class=MsoQuote>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:488)<o:p></o:p></p><p class=MsoQuote>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:25)<o:p></o:p></p><p class=MsoQuote>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:386)<o:p></o:p></p><p class=MsoQuote>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:120)<o:p></o:p></p><p class=MsoQuote>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:109)<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Now I&#8217;ve checked all of the maven dependencies to make sure the they are all there and I can doubly confirm everything is fine. In fact, I even went so far to make sure the jars included in my app contained the org.eclipse.jdt.core.compiler.CategorizedProblem.class file. The only difference I&#8217;ve been able to think of so far is that my standalone application uses the Java service wrapper where JBoss does not.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Any help is greatly appreciated.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Cheers,<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Jean-Philippe Steinmetz<o:p></o:p></p></div></body></html>