Tomcat 5.5
Java 1.5
jbossrules-4.0.0.12865MR3

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:

InputStream is = PolicyRuntime.class.getResourceAsStream(name);
DroolsObjectInputStream in = new DroolsObjectInputStream(is);
Package p = (Package) in.readObject();

When run outside Tomcat it loads fine, when run inside Tomcat I get:

java.lang.NoClassDefFoundError: org/drools/base/extractors/BaseObjectClassFieldExtractor
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at org.drools.base.ClassFieldExtractorFactory$ByteArrayClassLoader.defineClass(ClassFieldExtractorFactory.java:455)
at org.drools.base.ClassFieldExtractorFactory.getClassFieldExtractor(ClassFieldExtractorFactory.java:114)
at org.drools.base.ClassFieldExtractor.init(ClassFieldExtractor.java:77)
at org.drools.base.ClassFieldExtractor.<init>(ClassFieldExtractor.java:57)
at org.drools.base.ClassFieldExtractorCache.getExtractor(ClassFieldExtractorCache.java:35)
at org.drools.base.ClassFieldExtractor.readResolve(ClassFieldExtractor.java:72)

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.

Thanks

Jesse