From ardi.priasa at gmail.com Mon Aug 9 00:35:38 2010 Content-Type: multipart/mixed; boundary="===============0508018093084912129==" MIME-Version: 1.0 From: priasa To: rules-users at lists.jboss.org Subject: [rules-users] error while build package at guvnor Date: Sun, 08 Aug 2010 21:35:38 -0700 Message-ID: <1281328538720-1050914.post@n3.nabble.com> --===============0508018093084912129== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable dear All, = I am a newbie... = starting learn drools since 2010 -08-05 = i try to create sample.jbpm = here is the code : = = = = = = = = = = = = = = = = = i getting error while build package : = the error : = unable to parse xml : Exception class java.lang.NullPointerException : null = any suggestion ? = -- = View this message in context: http://drools-java-rules-engine.46999.n3.nabb= le.com/error-while-build-package-at-guvnor-tp1050914p1050914.html Sent from the Drools - User mailing list archive at Nabble.com. --===============0508018093084912129==-- From pdl at agh.edu.pl Mon Aug 9 04:21:23 2010 Content-Type: multipart/mixed; boundary="===============1118048563996613831==" MIME-Version: 1.0 From: Pierre de Leusse To: rules-users at lists.jboss.org Subject: [rules-users] Inserting new rule in existing package Date: Mon, 09 Aug 2010 10:21:21 +0200 Message-ID: <002201cb379b$d988f080$8c9ad180$@edu.pl> In-Reply-To: 1281328538720-1050914.post@n3.nabble.com --===============1118048563996613831== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hello all, In my program, I receive series of rules as String in XML along with the name of package they should be added to. putRules(String knowledgeSet, List XMLRules) At the moment, I load from the repository the original state of the PackageDescr, get all rule names currently in working memory from the StatefulKnowledgeSession and take out of the PackageDescr what's not in working memory. >From there, I try to manually (using DOM4J) insert the new rules in the XML representation of the PackageDescr and load this one. But... 1) I get the following error when I try to load the latter XML (package node is in the XML, I've checked): Code: XmlPackageReader xmlReader =3D new XmlPackageReader(null); StringReader sr =3D new StringReader(documentGlob.asXML()); PackageDescr packageDescr =3D xmlReader.read(sr); Error: (null: 2, 222): schema_reference.4: Failed to read schema document 'drools.org/drools-5.0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not . (null: 2, 222): cvc-elt.1: Cannot find the declaration of element 'package'. 2) There is a removeRule function on the KnowledgeBase class, why not addRule, did I miss something? 3) There must be an easier way to do this. Could somebody give me some pointers? All the best, Pierre --===============1118048563996613831==--