<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.14.1">
</HEAD>
<BODY>
Tomcat 5.5<BR>
Java 1.5<BR>
jbossrules-4.0.0.12865MR3<BR>
<BR>
I have an instance of Drools running inside a webapp deployed on Tomcat. The rules have been compiled ahead of time and are loaded in with:<BR>
<BR>
InputStream is = PolicyRuntime.class.getResourceAsStream(name);<BR>
DroolsObjectInputStream in = new DroolsObjectInputStream(is);<BR>
Package p = (Package) in.readObject();<BR>
<BR>
When run outside Tomcat it loads fine, when run inside Tomcat I get:<BR>
<BR>
java.lang.NoClassDefFoundError: org/drools/base/extractors/BaseObjectClassFieldExtractor<BR>
        at java.lang.ClassLoader.defineClass1(Native Method)<BR>
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)<BR>
        at org.drools.base.ClassFieldExtractorFactory$ByteArrayClassLoader.defineClass(ClassFieldExtractorFactory.java:455)<BR>
        at org.drools.base.ClassFieldExtractorFactory.getClassFieldExtractor(ClassFieldExtractorFactory.java:114)<BR>
        at org.drools.base.ClassFieldExtractor.init(ClassFieldExtractor.java:77)<BR>
        at org.drools.base.ClassFieldExtractor.<init>(ClassFieldExtractor.java:57)<BR>
        at org.drools.base.ClassFieldExtractorCache.getExtractor(ClassFieldExtractorCache.java:35)<BR>
        at org.drools.base.ClassFieldExtractor.readResolve(ClassFieldExtractor.java:72)<BR>
<BR>
I've tried adding DroolsObjectInputStream.class.getClassLoader() , PolicyRuntime.class.getClassLoader() and Thread.currentThread().getContextClassLoader() to the constructor of the DroolsObjectInputStream but none had any effect.<BR>
<BR>
Thanks<BR>
<BR>
Jesse<BR>
<BR>
</BODY>
</HTML>