Unable to build index of kmodule.xml from Kie project jar
by Sumit Dhaniya
I'm trying to use the Kie jar in my spring project. It successfully
identifies the Kie jars in my project but give errors listed below :-
INFO ClasspathKieProject - Found kmodule:
jar:file:/C:/Users/Sumit%20Dhaniya/.m2/repository/com/demo/FirstDemo/1.0/FirstDemo-1.0.jar!/META-INF/kmodule.xml
ERROR ClasspathKieProject - Unable to load pom.properties
from/C:/Users/Sumit
Dhaniya/.m2/repository/com/demo/FirstDemo/1.0/FirstDemo-1.0.jar as jarPath
cannot be found
/Users/Sumit Dhaniya/.m2/repository/com/demo/FirstDemo/1.0/FirstDemo-1.0.jar
ERROR ClasspathKieProject - Unable to load pom.properties
from/C:/Users/Sumit
Dhaniya/.m2/repository/com/demo/FirstDemo/1.0/FirstDemo-1.0.jar
\Users\Sumit Dhaniya\.m2\repository\com\demo\FirstDemo\1.0\FirstDemo-1.0.jar
(The system cannot find the path specified)
ERROR ClasspathKieProject - Unable to build index of kmodule.xml
url=jar:file:/C:/Users/Sumit%20Dhaniya/.m2/repository/com/demo/FirstDemo/1.0/FirstDemo-1.0.jar!/META-INF/kmodule.xml
Even if I define kie modules and sessions in my conf file I can't access the
drl and rdrl files in my Kie Project.
Though if I create my objects using
kieServices.getResources().newUrlResource(url); everything works fine.
--
View this message in context: http://drools.46999.n3.nabble.com/Unable-to-build-index-of-kmodule-xml-fr...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 9 months
How to read XML using XMLPackageReader-Drools-compiler.5.2.1.final?
by Praveen
Hi,
I am using Drools-compiler.5.2.1.final.
I am trying to convert an drl to xml and vice versa using DrlParser,
DrlDumper, XMLPackageReader and XML Dumper.
Drl to XML conversion works fine but XML to Drl throws NPE.
I have placed the XML file under a folder called sample.
NPE is thrown at line 5..
Also attached is the exception.
Please suggest.
TIA.
Reader source = new InputStreamReader(
DroolsConversionHelper.class.getResourceAsStream(xmlFileName));
PackageBuilderConfiguration conf = new PackageBuilderConfiguration();
XmlPackageReader reader = new
XmlPackageReader(conf.getSemanticModules());
DrlDumper dumper = new DrlDumper();
//line 5 reader.read(source);
PackageDescr descr = reader.getPackageDescr();
String test = dumper.dump(descr);
System.out.println(test);
java.lang.NullPointerException
at
org.drools.xml.ExtensibleXmlParser.resolveSchema(ExtensibleXmlParser.java:696)
at
org.drools.xml.ExtensibleXmlParser.resolveEntity(ExtensibleXmlParser.java:622)
at
com.sun.org.apache.xerces.internal.util.EntityResolverWrapper.resolveEntity(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.resolveEntity(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.resolveDocument(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(Unknown
Source)
Regards,
Praveen.
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-read-XML-using-XMLPackageReader-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 9 months
Processing xml with control characters in droolserver
by Shameer E S
Hi,
I am sending xml to initiate rule execution in drools server 5.4. When
there is control character in the xml, it is failing with following error,
is there any way to overcome this?
16 Jul 2014 00:03:28,852 ERROR
[org.apache.camel.processor.DefaultErrorHandler] (http--0.0.0.0-8080-239)
Failed delivery for exchangeId:
ID-svl-prod-prwf04-juniper-net-51091-1404737660521-0-3260214. Exhausted
after delivery attempt: 1 caught:
com.thoughtworks.xstream.converters.ConversionException: : Illegal
character ((CTRL-CHAR, code 8)) [note: in XML 1.1, it could be included via
entity expansion]
at [row,col {unknown-source}]: [30,126] : : Illegal character
((CTRL-CHAR, code 8)) [note: in XML 1.1, it could be included via entity
expansion]
at [row,col {unknown-source}]: [30,126]
---- Debugging information ----
message : : Illegal character ((CTRL-CHAR, code 8)) [note: in
XML 1.1, it could be included via entity expansion]
at [row,col {unknown-source}]: [30,126]
cause-exception : com.thoughtworks.xstream.io.StreamException
cause-message : : Illegal character ((CTRL-CHAR, code 8)) [note: in
XML 1.1, it could be included via entity expansion]
at [row,col {unknown-source}]: [30,126]
class : java.lang.String
required-type : java.lang.String
converter-type :
com.thoughtworks.xstream.converters.SingleValueConverterWrapper
wrapped-converter :
com.thoughtworks.xstream.converters.basic.StringConverter
path : /batch-execution/set-global[7]/map/entry[50]/string[2]
line number : 2
class[1] : java.util.HashMap
converter-type[1] :
com.thoughtworks.xstream.converters.collections.MapConverter
class[2] : org.drools.command.runtime.SetGlobalCommand
converter-type[2] :
org.drools.runtime.help.impl.XStreamXML$SetGlobalConverter
class[3] : org.drools.command.runtime.BatchExecutionCommandImpl
converter-type[3] :
com.thoughtworks.xstream.converters.reflection.ReflectionConverter
version : null
Thanks & Regards,
Shameer
10 years, 9 months
Getting Errors Deploying kie-drools-wb-distribution-6.0.1.Final
by Nguyen, Chieu X
I am trying to deploy the kie-drools-wb on Tomcat7, but I keep getting these errors.
SEVERE: Error listenerStart
Jul 23, 2014 10:03:26 AM org.apache.catalina.core.StandardContext
startInternal
SEVERE: Context [/rule-mgnt-6.0.1] startup failed due to previous errors Jul 23, 2014 10:03:26 AM org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application [/rule-mgnt-6.0.1] appears to have started a thread named [pool-4-thread-1] but has failed to stop it. This is very likely to create a memory leak.
Jul 23, 2014 10:03:26 AM org.apache.catalina.loader.WebappClassLoader
checkThreadLocalMapForLeaks
SEVERE: The web application [/rule-mgnt-6.0.1] created a ThreadLocal with key of type [org.jboss.solder.servlet.beanManager.ServletContextAttributeProvider$1]
(value
[org.jboss.solder.servlet.beanManager.ServletContextAttributeProvider$1@323acc6f])
and a value of type [org.apache.catalina.core.ApplicationContextFacade]
(value [org.apache.catalina.core.ApplicationContextFacade@3243a52c]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Jul 23, 2014 10:03:26 AM org.apache.catalina.loader.WebappClassLoader
checkThreadLocalMapForLeaks
SEVERE: The web application [/rule-mgnt-6.0.1] created a ThreadLocal with key of type [org.jboss.errai.config.util.ClassScanner$1] (value
[org.jboss.errai.config.util.ClassScanner$1@7711057b]) and a value of type [java.lang.Boolean] (value [true]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
I have follow the instructions provided from this link:http://drools.46999.n3.nabble.com/rules-users-Problems-deploying-war...
1. I have added these 3 jar files in my tomcat_home/lib directory
a. javax.security.jacc-api-1.5.jar
b. kie-tomcat-integration-6.1.0.CR2.jar
c. slf4j-api-1.7.7.jar
2. Modified the server.xml in tomcat_home/conf directory by adding the line below in the <Host> tag
<Valve className="org.kie.integration.tomcat.JACCValve" /> 3. Added the following in tomcat-users.xml
<role rolename="admin"/>
<role rolename="analyst"/>
<role rolename="manager-gui"/>
<role rolename="user"/>
<user username="admin" password="dummy" roles="admin"/>
<user username="tomcat" password="dummy2" roles="manager-gui"/> 4. Delete org.uberfire.security.auth.AuthenticationSource inside WEB-INF/classes/META-INF/services 5. Rename org.uberfire.security.auth.AuthenticationSource-TOMCAT-JEE-SECURITY to org.uberfire.security.auth.AuthenticationSource inside WEB-INF/classes/META-INF/services 6. Created a setenv.sh in tomcat_home/bin directory, which has this as it content
export JAVA_OPTS="-Dfile.encoding=UTF-8 -Xms128m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=256m"
7. Finally, uncomment the section in web.xml from the WAR file.
I am using Tomcat 7.0.54 and running on 64 bit Linux server. I would appreciate any suggestions.
Thank You,
Chieu Nguyen
Chieu.nguyen(a)verizon.com
10 years, 9 months
Re: [rules-users] Drools Applications Google Group
by Mark Proctor
I’m currently setting a google group, won’t touch nabble. It allows welcome messages, sticky nodes, and if necessary moderation.
Mark
On 22 Jul 2014, at 18:24, Wolfgang Laun <wolfgang.laun(a)gmail.com> wrote:
> As long as Nabble is kept out.
>
> Stackoverflow is, at present, quite reasonable, with a high percentage
> of what I consider as interesting, i.e., the "hard core" Expert/Fusion
> questions.
>
> Cheers
> Wolfgang
>
> On 22/07/2014, Mark Proctor <mproctor(a)codehaus.org> wrote:
>> A while back there was a discussion on the volume of posts and the range of
>> post discussions. OptaPlanner already has it's own google group, which has
>> helped reduce the volume. There is still the discussion on whether to split
>> Drools.
>>
>> My initial idea is to leave this list for installation, setup,
>> configuration, deployment and getting started (hello world won't run) - this
>> tends to be a fairly shallow knowledge area, that new people will need to
>> deal with. Then also create a separate google group for those wanting help
>> on writing rule applications, that's authoring (drl, score cards, decision
>> tables etc) and running (insert, fireAllRules etc); this would become a deep
>> knowledge area. In the google group you would not ask how to install the
>> workbench, or how to deploy your app, or how to setup HA etc.
>>
>> Thoughts?
>>
>> We are about to do 6.1 final. For this we are revamping the websites, and
>> sorting out our communications (lists etc) at the same time.
>>
>> Mark
>>
>>
10 years, 9 months
KieContainer#updateToVersion fails when both versions of a drl file contain an event type declaration for an existing class
by mikedev9000
I am using the latest drools 6.1.0-SNAPSHOT. I have two jars containing
different versions of a KieModule, and they each contain a drl file with an
event type declaration for an existing class. If I try to update the
container from one version to the other, the call to
KieContainer#updateToVersion returns a Results instance that contains errors
related to the @timestamp attribute on that event declaration. Here is an
example of the error message: "[Message [id=1, level=ERROR, path=r0.drl,
line=3, column=0
text=Error creating field accessors for timestamp field 'mytime' for type
'FooEvent']]".
The following .patch file can be used to add a unit test to the
IncrementalCompilationTest.java file that demonstrates this problem.
test_container_update_problem.patch
<http://drools.46999.n3.nabble.com/file/n4030100/test_container_update_pro...>
After applying the patch, and running this unit test, I see the following
test failure:
java.lang.AssertionError: Errors detected on updateToVersion: [Message
[id=1, level=ERROR, path=r0.drl, line=3, column=0
text=Error creating field accessors for timestamp field 'mytime' for type
'FooEvent']]
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.junit.Assert.assertFalse(Assert.java:64)
at
org.drools.compiler.integrationtests.IncrementalCompilationTest.testUpdateWithDeclarationPresent(IncrementalCompilationTest.java:95)
This error makes it nearly impossible for me to rely on and use
KieContainer#updateToVersion, because I need to allow frequent changes to be
made to drl files at run time, and I would prefer not to recreate the
KieContainer, and all of its KieBases and KieSessions on every update.
Is this a known issue? If so, are there plans to fix it before the
6.1.0.Final release?
--
View this message in context: http://drools.46999.n3.nabble.com/KieContainer-updateToVersion-fails-when...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 9 months
Drools Applications Google Group
by Mark Proctor
A while back there was a discussion on the volume of posts and the range of post discussions. OptaPlanner already has it’s own google group, which has helped reduce the volume. There is still the discussion on whether to split Drools.
My initial idea is to leave this list for installation, setup, configuration, deployment and getting started (hello world won’t run) - this tends to be a fairly shallow knowledge area, that new people will need to deal with. Then also create a separate google group for those wanting help on writing rule applications, that’s authoring (drl, score cards, decision tables etc) and running (insert, fireAllRules etc); this would become a deep knowledge area. In the google group you would not ask how to install the workbench, or how to deploy your app, or how to setup HA etc.
Thoughts?
We are about to do 6.1 final. For this we are revamping the websites, and sorting out our communications (lists etc) at the same time.
Mark
10 years, 9 months