[rules-users] Drools examples don't run

Michael Anstis michael.anstis at gmail.com
Thu Oct 21 03:09:33 EDT 2010


Are there any errors in addition to the NPE?

The context of the stack-trace suggests the process definition being loaded
is not on your classpath.

2010/10/21 赵侃侃 <kevin223 at gmail.com>

> Thanks Bruno,
>
> I have now fixed the NoClassDefFoundError, any ideas about the NullPointer
> one?
>
> Best Regards,
> Kevin Zhao
>
> 2010/10/20 Bruno Freudensprung <bruno.freudensprung at temis.com>
>
>>
>> Hello,
>>
>> I think you have to add the xstream jar to your classpath.
>> Here is the Maven dependency :
>>
>>     <dependency>
>>       <groupId>com.thoughtworks.xstream</groupId>
>>       <artifactId>xstream</artifactId>
>>       <version>1.3.1</version>
>>     </dependency>
>>
>> Best regards,
>>
>> Bruno.
>>
>>
>> 赵侃侃 a écrit :
>>
>> Hello,
>>
>>  I checked out the latest source from svn repository. It compiled OK and
>> imported the example projects to my eclipse workspace but the examples run
>> with error.
>> The two example projects are namely drools-examples-drl
>> & drools-examples-fusion.
>>
>>  org.drools.examples.pacman.Main gives the errors:
>>
>>  Exception in thread "main" java.lang.NoClassDefFoundError:
>> com/thoughtworks/xstream/XStream
>>  at
>> org.drools.audit.KnowledgeRuntimeLoggerProviderImpl.newThreadedFileLogger(KnowledgeRuntimeLoggerProviderImpl.java:34)
>>  at
>> org.drools.logger.KnowledgeRuntimeLoggerFactory.newThreadedFileLogger(KnowledgeRuntimeLoggerFactory.java:69)
>>  at org.drools.examples.pacman.Main.initKsession(Main.java:88)
>>  at org.drools.examples.pacman.Main.main(Main.java:39)
>> Caused by: java.lang.ClassNotFoundException:
>> com.thoughtworks.xstream.XStream
>>  at java.net.URLClassLoader$1.run(Unknown Source)
>>  at java.security.AccessController.doPrivileged(Native Method)
>>  at java.net.URLClassLoader.findClass(Unknown Source)
>>  at java.lang.ClassLoader.loadClass(Unknown Source)
>>  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>>  at java.lang.ClassLoader.loadClass(Unknown Source)
>>  ... 4 more
>>
>>
>>  org.drools.examples.broker.Main gives the errors:
>>
>>  java.lang.NullPointerException
>>  at
>> org.drools.compiler.PackageBuilder.addProcessFromXml(PackageBuilder.java:432)
>>  at
>> org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:468)
>>  at
>> org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
>>  at org.drools.examples.broker.Broker.loadRuleBase(Broker.java:95)
>>  at org.drools.examples.broker.Broker.createSession(Broker.java:80)
>>  at org.drools.examples.broker.Broker.<init>(Broker.java:57)
>>  at org.drools.examples.broker.Main.main(Main.java:53)
>>
>>  Does anyone experience the similar issues and know how to fix that?
>>
>>  Best Regards,
>> Kevin
>>
>> ------------------------------
>>
>> _______________________________________________
>> rules-users mailing listrules-users at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101021/6b03bf14/attachment.html 


More information about the rules-users mailing list