Hi, I am using Drools Fusion latest version and playing around with simple rules and events. As long as I work in java environment everything works fine. But I have to put my drools code into a bundle since I am working with OSGi (framework: knopflerfish). OSGi uses it's own classloader and doesn't find my rule files when I try to load them via ResourceFactory.newClassPathResource(MyRules.drl).
Instead I am referencing the files with an absolute path like ResourceFactor.newFileResource("C:\\path\\rules\\file.drl"). In this case the file is being found but I am getting the following exception: java.lang.NoClassDefFoundError: sun/misc/Unsafe at org.mvel2.optimizers.dynamic.DynamicClassLoader.(DynamicClassLoader.java:39) ... exactly there where I load my file with the code sample above. I googled a lot and read something about class paths for OSGi that I have to add this file to the class path and so on. I tried to place the file somewhere else, I tried to add it just like an external library - nothing worked. Well, I would appreciate any ideas or suggestions if anyone has one. -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/sun-misc-Unsafe-Problem-with-OSGi-tp2748589p2748589.html Sent from the Drools - Dev mailing list archive at Nabble.com. _______________________________________________ rules-dev mailing list rules-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-dev