Re: [rules-users] Drools KB Object hierarchy Serilisation and Deserialisation thread safety issue

2013-12-18 Thread Stephen Masters
My experience switching a small project from 5.5.0.Final to 5.6.0.CR1 a few 
days ago, was that the only thing I had to do was change the Drools version 
number in my Maven pom.xml.

It is a fairly simple project though, so it doesn’t exercise a great deal of 
the platform.

 
On 18 Dec 2013, at 07:41, Davide Sottara dso...@gmail.com wrote:

 Adarsh, 
 CR1 is candidate release 1 and is available from the JBoss Maven 
 Repositories. 5.6.0.Final will probably be released this week.
 There are quite a few internal differences between 5.3 and 5.6, but as far as 
 I know the APIs have remained the same,
 so it should be possible to switch almost effortlessly. Others may be able to 
 comment on their upgrade experience.
 Ruleflows, however, have been informally deprecated in favor of proper bpmn 
 business processes for a while, so not much 
 was added there, but they should still be supported in 5.6.  
 Also remember that even 5.6, while a bit more robust from that perspective, 
 is not guaranteed to be 100% thread safe.
 Davide
 
 
 On 12/17/2013 07:00 AM, adarsh.cha...@hsbcib.com wrote:
 Davide, 
 
 Thanks for your reply on this.What does  CR1 stands for in 5.6.0.CR1 and  
 can someone point me to the  release life cycle timelines?. 
  Also the important aspect is  are 5.6.0.CR1 and 5.5.0.Final  versions 
 backward compatible to 5.3.0.Final  and  fully regressed ?   
 
  Is there any documentation that  describes the major changes  like this .We 
 are mostly using the rule engine  with the rule flow aspects of the product
 
 Thanks and regards,
 
 Adarsh CHAINI 
 
 
 From:Davide Sottara dso...@gmail.com
 To:  rules-users@lists.jboss.org
 Date:14/12/2013 19:56
 Subject: Re: [rules-users] Drools KB Object hierarchy Serilisation and 
 Deserialisation thread safety issue
 Sent by: rules-users-boun...@lists.jboss.org
 
 
 
 As far as I know, older versions of Drools were not guaranteed to be 
 thread-safe, 
 and the whole (de)serialization subsystem has been upgraded since 
 5.3.0.Final.
 Could you try a later version such as 5.5.0.Final or 5.6.0.CR1?
 
 Bugs and issues are usually reported using JIRA (community) or Bugzilla 
 (product)
 You can find more information on how to report/contribute here:
 http://www.jboss.org/contribute
 or in the drools documentation, chapter 1.2
 
 Davide
 
 On 12/13/2013 12:39 PM, adarsh.cha...@hsbcib.com wrote: 
 Hi, 
 
 We  have found that  some of the drools classes are not thread safe and 
 hence causing the whole KB serialisation  and deserialisation  issues  in a 
 highly concurrent  distributed cluster. 
 
 The below is an example of one of the instances we have come across where  
 the  usage of a  non thread safe collection as instance variables 
 has caused the issue. 
 
 Could someone look into this and advise: 
 
 1) If this has been reported /identified and logged somewhere  as an issue 
 already 
 2)If  there has been  any fix to problems like this in  later versions of  
 5.3.0.Final ?. 
 3)If not fixed already what  is the process to initiate a fix. 
 
 Caused by: java.io.InvalidObjectException: Illegal mappings count: -1 
at java.util.HashMap.readObject(HashMap.java:1130) 
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) 
at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  
at java.lang.reflect.Method.invoke(Method.java:601) 
at 
 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1004) 
at 
 java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1891) 
at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796) 
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348) 
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) 
at 
 org.jbpm.workflow.core.DroolsAction.readExternal(DroolsAction.java:61) 
at 
 org.jbpm.workflow.core.impl.DroolsConsequenceAction.readExternal(DroolsConsequenceAction.java:49)
  
at 
 java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1835) 
at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1794) 
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348) 
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) 
at 
 org.drools.rule.JavaDialectRuntimeData.readExternal(JavaDialectRuntimeData.java:182)
  
at 
 java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1835) 
at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1794) 
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348) 
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) 
at java.util.HashMap.readObject(HashMap.java:1155) 
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) 
at 
 

[rules-users] drools.package ResourceType?

2013-12-18 Thread rjr201
Hi,

I'm embedding Guvnor using the BRL Edition Mode. I'm then grabbing the BRL
code and adding it to the KnowledgeBuilder. I'm also loading the object
model jar using a class loader. This works fine if all the classes the rule
is using are at the root of the object model jar. 

My question is, can I add the class imports (what the package.drools file
does in guvnor) programmatically using KnowledgeBuilder, so my object model
doesn't have to be flat? I was hoping there would be a ResourceType for
drools.package, so I could do something like kbuilder.add(import
package.classname, ResourceType.?), but can't seem to find one. 

Hopefully that makes some kind of sense to someone.. 

Any help on this would be greatly appreciated. 
Rich. 




--
View this message in context: 
http://drools.46999.n3.nabble.com/drools-package-ResourceType-tp4027345.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] drools.package ResourceType?

2013-12-18 Thread Michael Anstis
HI,

drools.package was a Guvnor 5.5 (and prior) specific file used to add
imports to rules etc generated inside the application. It has no analogy
within drools-core itself.

Drools Workbench 6.0 adds imports to the files themselves so does not need
this additional helper file.

With kind regards,

Mike


On 18 December 2013 10:52, rjr201 rich.j.ri...@gmail.com wrote:

 Hi,

 I'm embedding Guvnor using the BRL Edition Mode. I'm then grabbing the BRL
 code and adding it to the KnowledgeBuilder. I'm also loading the object
 model jar using a class loader. This works fine if all the classes the rule
 is using are at the root of the object model jar.

 My question is, can I add the class imports (what the package.drools file
 does in guvnor) programmatically using KnowledgeBuilder, so my object model
 doesn't have to be flat? I was hoping there would be a ResourceType for
 drools.package, so I could do something like kbuilder.add(import
 package.classname, ResourceType.?), but can't seem to find one.

 Hopefully that makes some kind of sense to someone..

 Any help on this would be greatly appreciated.
 Rich.




 --
 View this message in context:
 http://drools.46999.n3.nabble.com/drools-package-ResourceType-tp4027345.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Drools KB Object hierarchy Serialisation and Deserialisation thread safety issue

2013-12-18 Thread adarsh . chaini
Also remember that even 5.6, while a bit more robust from that 
perspective, is not guaranteed to be 100% thread safe.

Is there a document that details this robustness and what has changed ?.

Ruleflows, however, have been informally deprecated in favor of proper 
bpmn business processes for a while, so not much 
was added there, but they should still be supported in 5.6. 

On above , what is  the time line  from deprecation to complete removal in 
future versions?.

How easy it is to migrate from the rule flow to the jbpmn? .Is  there a 
quick  migration  procedure/tool.



Thanks and regards,

Adarsh CHAINI 
SENIOR LEAD DEVELOPMENT SPECIALIST | HSBC Bank Plc
8 Canada Square, London E14 5HQ, UK
___




Phone
Int: (0)79914720 Ext: +44 (0)20 79914720
Mobile
+44(0)7595530105
Email
adarsh.cha...@hsbcib.com

___
Protect our environment - please only print this if you have to!




From:
Davide Sottara dso...@gmail.com
To:
Rules Users List rules-users@lists.jboss.org
Date:
18/12/2013 07:42
Subject:
Re: [rules-users] Drools KB Object hierarchy Serilisation and 
Deserialisation thread safety issue
Sent by:
rules-users-boun...@lists.jboss.org



Adarsh, 
CR1 is candidate release 1 and is available from the JBoss Maven 
Repositories. 5.6.0.Final will probably be released this week.
There are quite a few internal differences between 5.3 and 5.6, but as far 
as I know the APIs have remained the same,
so it should be possible to switch almost effortlessly. Others may be able 
to comment on their upgrade experience.
Ruleflows, however, have been informally deprecated in favor of proper 
bpmn business processes for a while, so not much 
was added there, but they should still be supported in 5.6. 
Also remember that even 5.6, while a bit more robust from that 
perspective, is not guaranteed to be 100% thread safe.
Davide


On 12/17/2013 07:00 AM, adarsh.cha...@hsbcib.com wrote:
Davide, 

Thanks for your reply on this.What does  CR1 stands for in 5.6.0.CR1 and 
can someone point me to the  release life cycle timelines?. 
 Also the important aspect is  are 5.6.0.CR1 and 5.5.0.Final  versions 
backward compatible to 5.3.0.Final  and  fully regressed ? 

 Is there any documentation that  describes the major changes  like this 
.We are mostly using the rule engine  with the rule flow aspects of the 
product

Thanks and regards,

Adarsh CHAINI 


From: 
Davide Sottara dso...@gmail.com 
To: 
rules-users@lists.jboss.org 
Date: 
14/12/2013 19:56 
Subject: 
Re: [rules-users] Drools KB Object hierarchy Serilisation and 
Deserialisation thread safety issue 
Sent by: 
rules-users-boun...@lists.jboss.org




As far as I know, older versions of Drools were not guaranteed to be 
thread-safe, 
and the whole (de)serialization subsystem has been upgraded since 
5.3.0.Final.
Could you try a later version such as 5.5.0.Final or 5.6.0.CR1?

Bugs and issues are usually reported using JIRA (community) or Bugzilla 
(product)
You can find more information on how to report/contribute here:
http://www.jboss.org/contribute
or in the drools documentation, chapter 1.2

Davide

On 12/13/2013 12:39 PM, adarsh.cha...@hsbcib.com wrote: 
Hi, 

We  have found that  some of the drools classes are not thread safe and 
hence causing the whole KB serialisation  and deserialisation  issues  in 
a highly concurrent  distributed cluster. 

The below is an example of one of the instances we have come across where 
the  usage of a  non thread safe collection as instance variables has 
caused the issue. 

Could someone look into this and advise: 

1) If this has been reported /identified and logged somewhere  as an issue 
already 
2)If  there has been  any fix to problems like this in  later versions of  
5.3.0.Final ?. 
3)If not fixed already what  is the process to initiate a fix. 

Caused by: java.io.InvalidObjectException: Illegal mappings count: -1 
   at java.util.HashMap.readObject(HashMap.java:1130) 
   at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) 
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:43) 
   at java.lang.reflect.Method.invoke(Method.java:601) 
   at java.io.ObjectStreamClass.invokeReadObject(
ObjectStreamClass.java:1004) 
   at java.io.ObjectInputStream.readSerialData(
ObjectInputStream.java:1891) 
   at java.io.ObjectInputStream.readOrdinaryObject(
ObjectInputStream.java:1796) 
   at java.io.ObjectInputStream.readObject0(
ObjectInputStream.java:1348) 
   at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) 

   at org.jbpm.workflow.core.DroolsAction.readExternal(
DroolsAction.java:61) 
   at 
org.jbpm.workflow.core.impl.DroolsConsequenceAction.readExternal(
DroolsConsequenceAction.java:49) 
   at java.io.ObjectInputStream.readExternalData(
ObjectInputStream.java:1835) 
   at java.io.ObjectInputStream.readOrdinaryObject(

Re: [rules-users] drools.package ResourceType?

2013-12-18 Thread rjr201
Hi Mantis, thanks for your response. 

I'm using kbuilder.add(ruleResource, ResourceType.BRL);

The BRL source code I grabbed from the embedded guvnor window doesn't have
explicit path names on the classes that it's using. For example, if the
class was packagename.Person it just has Person. Which means it tells me it
doesn't recognise the class when I add it to class builder. I was wondering
if there was a way round this? If not, it's not necessarily the end of the
world to have to put everything in the root of the objectmodel jar.

PS I realise that messing around with BRL stuff outside of Guvnor is not a
nice way to have to do things, but I've got my hands tied a bit with what I
can do (I'd much rather be using all the cool stuff I've been reading about
in 6!)



--
View this message in context: 
http://drools.46999.n3.nabble.com/drools-package-ResourceType-tp4027345p4027348.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] drools.package ResourceType?

2013-12-18 Thread Michael Anstis
Hello,

Unfortunately Guvnor 5.5 (and prior) only uses that file when (1) building
the package and creating the PKG file, and (2) when validating a rule.

More unfortunately (for you) there is no direct means to retrieve the
drools.package file either with REST (that I assume you're using for the
BRL rule).

You could retrieve the whole package source (IIRC something like
/package/{packageName}/source) and parse it for imports, but it's a long
winded way especially if the package is large.

That said it's only a one-off need; once you've parsed the imports you can
keep them locally.

With kind regards,

Mike





On 18 December 2013 11:14, rjr201 rich.j.ri...@gmail.com wrote:

 Hi Mantis, thanks for your response.

 I'm using kbuilder.add(ruleResource, ResourceType.BRL);

 The BRL source code I grabbed from the embedded guvnor window doesn't have
 explicit path names on the classes that it's using. For example, if the
 class was packagename.Person it just has Person. Which means it tells me it
 doesn't recognise the class when I add it to class builder. I was wondering
 if there was a way round this? If not, it's not necessarily the end of the
 world to have to put everything in the root of the objectmodel jar.

 PS I realise that messing around with BRL stuff outside of Guvnor is not a
 nice way to have to do things, but I've got my hands tied a bit with what I
 can do (I'd much rather be using all the cool stuff I've been reading about
 in 6!)



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/drools-package-ResourceType-tp4027345p4027348.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] drools.package ResourceType?

2013-12-18 Thread Wolfgang Laun
If this BRL source code is more or less the same as DRL, it
should be possible to prepend a few lines containing import statements.

-W

On 18/12/2013, rjr201 rich.j.ri...@gmail.com wrote:
 Hi Mantis, thanks for your response.

 I'm using kbuilder.add(ruleResource, ResourceType.BRL);

 The BRL source code I grabbed from the embedded guvnor window doesn't have
 explicit path names on the classes that it's using. For example, if the
 class was packagename.Person it just has Person. Which means it tells me it
 doesn't recognise the class when I add it to class builder. I was wondering
 if there was a way round this? If not, it's not necessarily the end of the
 world to have to put everything in the root of the objectmodel jar.

 PS I realise that messing around with BRL stuff outside of Guvnor is not a
 nice way to have to do things, but I've got my hands tied a bit with what I
 can do (I'd much rather be using all the cool stuff I've been reading about
 in 6!)



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/drools-package-ResourceType-tp4027345p4027348.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] drools.package ResourceType?

2013-12-18 Thread rjr201
Thanks very much for both your responses.

I've realised that I can add a DRL file to the kbuilder that just has the
imports in it. These imports are then picked up by any BRL resources that
are added. It's a bit of a hack, but this seems to be working. 

Thanks again for your responses. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/drools-package-ResourceType-tp4027345p4027351.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] kie-wb 6.0.0 tomcat7: Error uploading maven jar that is part of a multi-module maven project

2013-12-18 Thread Mario Fusco
Hi,

the MinimalPomParser is an xml parser we developed internally to cover the
most common and straightforward cases, but very likely it is unable to parse
the multi-module pom you're using.

However adding the kie-ci module to your dependencies (
https://github.com/droolsjbpm/drools/tree/master/kie-ci ) automatically
allows drools to use the native maven pom parser that should support your
use case.

To cut it short adding this to your dependencies should resolve your
problem.

  groupIdorg.kie/groupId
  artifactIdkie-ci/artifactId

I hope this helps,
Mario




--
View this message in context: 
http://drools.46999.n3.nabble.com/kie-wb-6-0-0-tomcat7-Error-uploading-maven-jar-that-is-part-of-a-multi-module-maven-project-tp4027338p4027353.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] kie-wb 6.0.0 tomcat7: Error uploading maven jar that is part of a multi-module maven project

2013-12-18 Thread Michael Anstis
The problem is that the OP is uploading the JAR to kie-wb.

This is where the error is thrown:
https://github.com/droolsjbpm/guvnor/blob/master/guvnor-m2repo-editor/guvnor-m2repo-editor-backend/src/main/java/org/guvnor/m2repo/backend/server/FileServlet.java#L154

Would this use the Maven Native Parser if on the classpath? We have kie-ci
as a dependency of guvnor-m2repo-editor-backend already.

With kind regards,

Mike



On 18 December 2013 15:51, Mario Fusco mario.fu...@gmail.com wrote:

 Hi,

 the MinimalPomParser is an xml parser we developed internally to cover the
 most common and straightforward cases, but very likely it is unable to
 parse
 the multi-module pom you're using.

 However adding the kie-ci module to your dependencies (
 https://github.com/droolsjbpm/drools/tree/master/kie-ci ) automatically
 allows drools to use the native maven pom parser that should support your
 use case.

 To cut it short adding this to your dependencies should resolve your
 problem.

   groupIdorg.kie/groupId
   artifactIdkie-ci/artifactId

 I hope this helps,
 Mario




 --
 View this message in context:
 http://drools.46999.n3.nabble.com/kie-wb-6-0-0-tomcat7-Error-uploading-maven-jar-that-is-part-of-a-multi-module-maven-project-tp4027338p4027353.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] kie-wb 6.0.0 tomcat7: Error uploading maven jar that is part of a multi-module maven project

2013-12-18 Thread jguenth
Yes, I'm trying to upload the JAR to the kie-wb maven repository via the
kie-wb Artifact Repository page.  Since the kie-ci module is already on the
webapps classpath, I assume there are no other work-arounds to try.

I debugged the MinimalPomParser method below and found the InputStream
passed in was a ByteArrayInputStream with a count of 10038 and it's position
was also 10038; as if it had already been read to end of file. While in
debug, I set the position to zero and let it continue.  Sure enough, it
uploaded succesfully!

static PomModel parse(String path, InputStream is) {
MinimalPomParser handler = new MinimalPomParser();
try {
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setValidating( false );
factory.setNamespaceAware( false );

SAXParser parser = factory.newSAXParser();
parser.parse( is, handler );
} catch (Exception e) {
throw new RuntimeException(Unable to parse File ' + path +
', e);
}

Perhaps something is reading the InputStream before calling the parse method
and not creating a new InputStream to parse.

Unfortunately, I keep getting the error below when I try to add a drools
rule to my project.  It is also failing in the MinimalPomParser because of
the same problem above.

Unable to complete your request. The following exception occurred:
org.kie.scanner.embedder.MavenEmbedderException: Failed to read artifact
descriptor for org.piercecountywa.linx.core:domain:jar:1.8.0-SNAPSHOT.

Regards,
Jay



--
View this message in context: 
http://drools.46999.n3.nabble.com/kie-wb-6-0-0-tomcat7-Error-uploading-maven-jar-that-is-part-of-a-multi-module-maven-project-tp4027338p4027356.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] kie-wb 6.0.0 tomcat7: Error uploading maven jar that is part of a multi-module maven project

2013-12-18 Thread Michael Anstis
Can you provide your JAR?


On 18 December 2013 22:23, jguenth jgue...@co.pierce.wa.us wrote:

 Yes, I'm trying to upload the JAR to the kie-wb maven repository via the
 kie-wb Artifact Repository page.  Since the kie-ci module is already on the
 webapps classpath, I assume there are no other work-arounds to try.

 I debugged the MinimalPomParser method below and found the InputStream
 passed in was a ByteArrayInputStream with a count of 10038 and it's
 position
 was also 10038; as if it had already been read to end of file. While in
 debug, I set the position to zero and let it continue.  Sure enough, it
 uploaded succesfully!

 static PomModel parse(String path, InputStream is) {
 MinimalPomParser handler = new MinimalPomParser();
 try {
 SAXParserFactory factory = SAXParserFactory.newInstance();
 factory.setValidating( false );
 factory.setNamespaceAware( false );

 SAXParser parser = factory.newSAXParser();
 parser.parse( is, handler );
 } catch (Exception e) {
 throw new RuntimeException(Unable to parse File ' + path +
 ', e);
 }

 Perhaps something is reading the InputStream before calling the parse
 method
 and not creating a new InputStream to parse.

 Unfortunately, I keep getting the error below when I try to add a drools
 rule to my project.  It is also failing in the MinimalPomParser because of
 the same problem above.

 Unable to complete your request. The following exception occurred:
 org.kie.scanner.embedder.MavenEmbedderException: Failed to read artifact
 descriptor for org.piercecountywa.linx.core:domain:jar:1.8.0-SNAPSHOT.

 Regards,
 Jay



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/kie-wb-6-0-0-tomcat7-Error-uploading-maven-jar-that-is-part-of-a-multi-module-maven-project-tp4027338p4027356.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] kie-wb 6.0.0 tomcat7: Error uploading maven jar that is part of a multi-module maven project

2013-12-18 Thread Jay Guenthard
Unfortunately, I cannot.  I will try to create a bogus multi-module project to 
replicate the problem and send it instead.

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Michael Anstis
Sent: Wednesday, December 18, 2013 2:28 PM
To: Rules Users List
Subject: Re: [rules-users] kie-wb 6.0.0 tomcat7: Error uploading maven jar that 
is part of a multi-module maven project

Can you provide your JAR?


--
View this message in context: 
http://drools.46999.n3.nabble.com/kie-wb-6-0-0-tomcat7-Error-uploading-maven-jar-that-is-part-of-a-multi-module-maven-project-tp4027338p4027356.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] kie-wb 6.0.0 tomcat7: Error uploading maven jar that is part of a multi-module maven project

2013-12-18 Thread jguenth
Here is a simple multi-module maven project that causes the error.
test-import.tar.gz
http://drools.46999.n3.nabble.com/file/n4027360/test-import.tar.gz  

Do a mvn clean install in the test-import directory and then try to upload
the test-import-domain-0.0.1-SNAPSHOT.jar from your local maven repository. 
It will be at
m2_repo/org/piercecountywa/test/test-import-domain/0.0.1-SNAPSHOT

Thanks,
Jay



--
View this message in context: 
http://drools.46999.n3.nabble.com/kie-wb-6-0-0-tomcat7-Error-uploading-maven-jar-that-is-part-of-a-multi-module-maven-project-tp4027338p4027360.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] separating .drl declare type from actual .drl rule into each own file

2013-12-18 Thread Davide Sottara
It is supported, but you must be careful when you compile the DRL
resources.
You will have to compile the declares first and ensure that the
classloader is set correctly.
The easiest way to achieve this is to use the CompositeKnowledgeBuilder:

KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.batch()
.add( ResourceFactory.newByteArrayResource(
declares.getBytes() ), ResourceType.DRL )
.add( ResourceFactory.newByteArrayResource(
rules.getBytes() ), ResourceType.DRL )
.build();
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );

Adjust the number and type of resources as needed.

Notice that this feature is only available in more recent versions. If
you want/need to use
an older one, could you please specify which version and post the
snippet of code
you are using to build the KB?
Thanks!

Davide


On 12/18/2013 05:40 PM, wtang wrote:
 I have a .drl rule file with many declare in it to define my own types.  I
 compile this file every time.  I want to separate the declare types out of
 its own file since the types don't change and just leave the rules in the
 original .drl file.

 I create my own declares.drl and pulled all the declare from the rule.drl
 file and inside the rule.drl file I just did import.  While my declares.drl
 file compile with no errors, I am getting types not resolve error from my
 .drl file event thought I have the import.

 Does drool support the separation of types into its own file and rule file
 just refer to those declared types?



 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/separating-drl-declare-type-from-actual-drl-rule-into-each-own-file-tp4027359.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] how to check error using knowledgeAgent when rules has error or doesn't compile

2013-12-18 Thread bhochhi
Got this working. I was adding the listener at wrong place.

thanks



--
View this message in context: 
http://drools.46999.n3.nabble.com/how-to-check-error-using-knowledgeAgent-when-rules-has-error-or-doesn-t-compile-tp4027221p4027362.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users