Once it starts getting into the DX of the DRL rules to feed into Drools it's gets quickly past my experience level .... I had hoped for a clean do it all in one place kind of thing but it doesn't look that way.....
********************** On Mon, Jan 2, 2012 at 2:46 PM, Wolfgang Laun <[email protected]>wrote: > On 2 January 2012 14:30, Matthew Versaggi <[email protected]> wrote: > >> Here's what I got working and when it failed .... it was just the basic >> 'hello world' kind of stuff: >> >> Worked: >> final KnowledgeBuilder kbuilder = >> KnowledgeBuilderFactory.newKnowledgeBuilder(); >> >> Died: >> // this will parse and compile in one step >> kbuilder.add(ResourceFactory.newClassPathResource("HelloWorld.drl", >> DroolsTest.class), ResourceType.DRL); >> >> LogCat: >> 01-02 13:13:17.684: E/AndroidRuntime(537): java.lang.RuntimeException: >> Unable to start activity >> ComponentInfo{com.versaggi.android.droolsandroidtest/com.versaggi.android.droolsandroidtest.DroolsAndroidTestActivity}: >> java.lang.NullPointerException >> >> > I've seen NPEs thrown up from down in the Drools gears when the DRL > resource could not be found. Make sure that > ResourceFactory.newClassPathResource("HelloWorld.drl", > DroolsTest.class) > > is != null. > > I had to re-compile the CompositeClassLoader.java file and then reinsert >> it into the drools-api-5.1.0.M2.jar file to get past this issue: >> >> "A small modification is needed in org.drools.util.CompositeClassLoader. >> Apparently, the Android JVM doesn't allow null as the parent classloader >> so I changed that to super(CompositeClassLoader.class.getClassLoader())in >> the constructor, and that works fine." >> > > Yes, that's come up in other Java environments as well, and IIRC been > fixed on the way towards 5.2.0. )There ought to be a closed JIRA, if s.o. > cares to look it up.) > > -W > > > _______________________________________________ > rules-dev mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-dev > >
_______________________________________________ rules-dev mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-dev
