Re: [rules-users] Local Variable
On 09/10/2012, joy kripa_...@infosys.com wrote: Hi If am declaring a map as global variable. global java.util.Map map In the then part of rule 1 am putting a key n value into map Is it possible to get the value using the key from the then part of rule 2? Not necessarily so: only if rule 1 fires before rule 2, which may or may not happen. Do i want to update,insert like any thing on global variable? or How is it possible for rule engine to identify the changes in global variable tht shud be reflected on other rule! This is answered in the documentation, section 4.5.2., global. -W Regards joy -- View this message in context: http://drools.46999.n3.nabble.com/Local-Variable-tp4020144p4020173.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
[rules-users] Complicated Issue
hey, M using guvnor 5.3.0 Final version and two instances of guvnor. In my first guvnor application, i ve two packages containg all my rules which i am accessing using drools core and knowledge api v5.2.0 Final .I use type DRL to extract rules from my change set. In my second guvnor application, i just have a package which contains my JBPM process. Here, i am using drools 5.3.1 Final jars to connect and make my kbase. i use type = PKG in my chnage set, which is contradictory to JIRA https://issues.jboss.org/browse/JBRULES-3388 is opened that a PKG cannot be read, but was working fine for my application. Now i dont want to deploy two different wars of guvnor and was expecting to do it by deploying just 1 guvnor. So instead of taking the headache of using different jars, i used a neutral GUVNOR and drools 5.4.0 final version. I deployed the guvnor, imported the old repository, built the packages and tried firing the rules using type = DRL in my change set. Everything Worked fine. As soon as i changed my type = PKG in my change set to access the rules, i got an error : java.lang.UnsupportedClassVersionError: Institutional/CalculateDateDifference : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at org.drools.rule.JavaDialectRuntimeData$PackageClassLoader.fastFindClass(JavaDialectRuntimeData.java:615) at org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:254) at org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:237) at org.drools.util.CompositeClassLoader.loadClass(CompositeClassLoader.java:88) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.drools.rule.MVELDialectRuntimeData.getParserConfiguration(MVELDialectRuntimeData.java:270) at org.drools.base.mvel.MVELCompilationUnit.getCompiledExpression(MVELCompilationUnit.java:203) at org.drools.base.mvel.MVELConsequence.compile(MVELConsequence.java:75) at org.drools.rule.MVELDialectRuntimeData.onBeforeExecute(MVELDialectRuntimeData.java:173) at org.drools.rule.DialectRuntimeRegistry.onBeforeExecute(DialectRuntimeRegistry.java:144) at org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:599) at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:472) at org.drools.impl.KnowledgeBaseImpl.addKnowledgePackages(KnowledgeBaseImpl.java:150) at org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:1085) at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:824) at org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:673) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:203) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:182) at com.infy.fcs.drools.adapter.DroolsGuvnorTest.readKnowledgeBase(DroolsGuvnorTest.java:196) at com.infy.fcs.drools.adapter.DroolsGuvnorTest.main(DroolsGuvnorTest.java:107) When i tried to access the process package(Which is a diff package and contains only a process), i got the following error java.lang.UnsupportedClassVersionError: Fatca_Process/Process_Fatca_Process_Fatca_integration_queue_f06d3a378a5f49d5b7589aae2c0b686eReturnValueEvaluator7Invoker : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at org.drools.rule.JavaDialectRuntimeData$PackageClassLoader.fastFindClass(JavaDialectRuntimeData.java:615) at org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:254) at org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:237) at org.drools.util.CompositeClassLoader.loadClass(CompositeClassLoader.java:88) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.drools.rule.JavaDialectRuntimeData.wire(JavaDialectRuntimeData.java:435) at org.drools.rule.JavaDialectRuntimeData.wire(JavaDialectRuntimeData.java:430) at org.drools.rule.JavaDialectRuntimeData.onBeforeExecute(JavaDialectRuntimeData.java:256) at org.drools.rule.DialectRuntimeRegistry.onBeforeExecute(DialectRuntimeRegistry.java:138) at org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:599) at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:472) at org.drools.impl.KnowledgeBaseImpl.addKnowledgePackages(KnowledgeBaseImpl.java:150) at org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:1085) at
Re: [rules-users] Complicated Issue
Based upon the stack trace I would say [it] was working fine for my application. might not be strictly true. We always promote use of compatible versions of Drools Expert and Guvnor. See below. http://docs.jboss.org/drools/release/5.4.0.Final/droolsjbpm-introduction-docs/html/compatibility.html On 9 October 2012 08:31, abhinay_agarwal abhinay_agar...@infosys.comwrote: hey, M using guvnor 5.3.0 Final version and two instances of guvnor. In my first guvnor application, i ve two packages containg all my rules which i am accessing using drools core and knowledge api v5.2.0 Final .I use type DRL to extract rules from my change set. In my second guvnor application, i just have a package which contains my JBPM process. Here, i am using drools 5.3.1 Final jars to connect and make my kbase. i use type = PKG in my chnage set, which is contradictory to JIRA https://issues.jboss.org/browse/JBRULES-3388 is opened that a PKG cannot be read, but was working fine for my application. Now i dont want to deploy two different wars of guvnor and was expecting to do it by deploying just 1 guvnor. So instead of taking the headache of using different jars, i used a neutral GUVNOR and drools 5.4.0 final version. I deployed the guvnor, imported the old repository, built the packages and tried firing the rules using type = DRL in my change set. Everything Worked fine. As soon as i changed my type = PKG in my change set to access the rules, i got an error : java.lang.UnsupportedClassVersionError: Institutional/CalculateDateDifference : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at org.drools.rule.JavaDialectRuntimeData$PackageClassLoader.fastFindClass(JavaDialectRuntimeData.java:615) at org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:254) at org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:237) at org.drools.util.CompositeClassLoader.loadClass(CompositeClassLoader.java:88) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.drools.rule.MVELDialectRuntimeData.getParserConfiguration(MVELDialectRuntimeData.java:270) at org.drools.base.mvel.MVELCompilationUnit.getCompiledExpression(MVELCompilationUnit.java:203) at org.drools.base.mvel.MVELConsequence.compile(MVELConsequence.java:75) at org.drools.rule.MVELDialectRuntimeData.onBeforeExecute(MVELDialectRuntimeData.java:173) at org.drools.rule.DialectRuntimeRegistry.onBeforeExecute(DialectRuntimeRegistry.java:144) at org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:599) at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:472) at org.drools.impl.KnowledgeBaseImpl.addKnowledgePackages(KnowledgeBaseImpl.java:150) at org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:1085) at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:824) at org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:673) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:203) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:182) at com.infy.fcs.drools.adapter.DroolsGuvnorTest.readKnowledgeBase(DroolsGuvnorTest.java:196) at com.infy.fcs.drools.adapter.DroolsGuvnorTest.main(DroolsGuvnorTest.java:107) When i tried to access the process package(Which is a diff package and contains only a process), i got the following error java.lang.UnsupportedClassVersionError: Fatca_Process/Process_Fatca_Process_Fatca_integration_queue_f06d3a378a5f49d5b7589aae2c0b686eReturnValueEvaluator7Invoker : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at org.drools.rule.JavaDialectRuntimeData$PackageClassLoader.fastFindClass(JavaDialectRuntimeData.java:615) at org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:254) at org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:237) at org.drools.util.CompositeClassLoader.loadClass(CompositeClassLoader.java:88) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.drools.rule.JavaDialectRuntimeData.wire(JavaDialectRuntimeData.java:435) at org.drools.rule.JavaDialectRuntimeData.wire(JavaDialectRuntimeData.java:430) at org.drools.rule.JavaDialectRuntimeData.onBeforeExecute(JavaDialectRuntimeData.java:256) at
Re: [rules-users] Complicated Issue
Thanks for the quick reply Mike.. as you can see, now i am using compatible versions i.e. drools expert v5.4.0 Final and so as GUVNOR 5.4.0 Final.. Y do i still get this error ?? -- View this message in context: http://drools.46999.n3.nabble.com/Complicated-Issue-tp4020175p4020177.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] Complicated Issue
Guvnor 5.4 needs Java 1.6. http://docs.jboss.org/drools/release/5.5.0.Beta1/droolsjbpm-introduction-docs/html/releaseNotes.html#releaseNotes_5.4.0 Guvnor 5.4.x requires at least Java 6 to run. The Drools and jBPM will still run on Java 5. Guvnor 5.3.x hotfixes will still run on Java 5 too. Are you using a suitable version of Java? On 9 October 2012 09:36, abhinay_agarwal abhinay_agar...@infosys.comwrote: Thanks for the quick reply Mike.. as you can see, now i am using compatible versions i.e. drools expert v5.4.0 Final and so as GUVNOR 5.4.0 Final.. Y do i still get this error ?? -- View this message in context: http://drools.46999.n3.nabble.com/Complicated-Issue-tp4020175p4020177.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] Complicated Issue
i have been using java 6 from the start.. -- View this message in context: http://drools.46999.n3.nabble.com/Complicated-Issue-tp4020175p4020179.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] Complicated Issue
OK, can you confirm all classes are compiled with 1.6?:- The error message suggests something (perhaps Fatca_Process) has been compiled with 1.7, which would cause the Unsupported major.minor version 51.0 error. java.lang. UnsupportedClassVersionError: Fatca_Process/Process_Fatca_Process_Fatca_integration_queue_f06d3a378a5f49d5b7589aae2c0b686eReturnValueEvaluator7Invoker : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) ... On 9 October 2012 10:00, abhinay_agarwal abhinay_agar...@infosys.comwrote: i have been using java 6 from the start.. -- View this message in context: http://drools.46999.n3.nabble.com/Complicated-Issue-tp4020175p4020179.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] Complicated Issue
the process was also compiled with 1.6 -- View this message in context: http://drools.46999.n3.nabble.com/Complicated-Issue-tp4020175p4020181.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] Complicated Issue
hey mike.. i found the issue..my jboss was working on jboss 1.7.. now as i fixed it..evrything is working fine.. tnxx a lot !! -- View this message in context: http://drools.46999.n3.nabble.com/Complicated-Issue-tp4020175p4020182.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] Finding the definition of a rule
Hi, I am currently using a KnowledgeAgent to implement hot deployment in our applications. So far this is working, but now the requirement arose to remove specific rules via program call. I thought the easiest way would be to remove the rule from the resources and let the KnowledgeAgent handle the rest. But as far as I see, there is no way to get the source resource of a rule from the KnowledgeBase/RuleBase. I guess I wont have another choice than to parse the initial changeset, gather all resources, and go through them to find and remove the rule. But this seems like overkill to achieve something that simple. Does anybody know a better way to remove specific rules while using a KnowledgeAgent. kind regards Lukas -- View this message in context: http://drools.46999.n3.nabble.com/Finding-the-definition-of-a-rule-tp4020183.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] com.google.protobuf.MessageOrBuilder
I think you are missing the com.google.protobuf bundle... actually, protobuf is not a bundle yet: http://code.google.com/p/protobuf/issues/detail?id=298 so, you need to use the org.drools.osgi.wrapper.protobuf-java maintained by drools team here(https://github.com/droolsjbpm/droolsjbpm-build-distribution) regards, Cristiano On 08/10/12 15:08, gboro54 wrote: I am trying to deploy an application onto JBoss 7.1 running drools 5.4 and I am getting the following error. Any thoughts? java.lang.ClassNotFoundException: com.google.protobuf.MessageOrBuilder from [Module deployment.fbms.ear.fbms-service.jar:main from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) ... 26 more -- View this message in context: http://drools.46999.n3.nabble.com/com-google-protobuf-MessageOrBuilder-tp4020171.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
[rules-users] java.lang.OutOfMemoryError: Java heap space
I've seen many posts about users receiving a java.lang.OutOfMemoryError: Java heap space error. The answer have been to increase heap space. I was wondering if there is another way around this. I have about 10,000 facts that I want to bring into working memory. Is there a way to insert some of them, run the rules, remove the inserted ones, and then insert more? Thanks! -- View this message in context: http://drools.46999.n3.nabble.com/java-lang-OutOfMemoryError-Java-heap-space-tp4020185.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] Finding the definition of a rule
org.drools.rule.Rule has a getResource() method, set during the build process, that is not publicly reflected by the org.drools.definition.rule.Rule interface. Iterating over knowledgeAgent.getKnowledgeBase().getKnowledgePackage(xyz).getRules() with a type check and a cast should do the trick. Maybe Mark can tell if it would be appropriate to expose it or not. Best Davide -- View this message in context: http://drools.46999.n3.nabble.com/Finding-the-definition-of-a-rule-tp4020183p4020186.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] Not able to upload POJO model jar in Oracle DB.
Hi, Currently I am using Oracle 11g DB for Guvnor repository for storing my rules and POJO model jar. After guvnor instance is started following 11 tables are created in Oracle 11g DB schema. 1) FS_FSENTRY 2) FS_WS_DEFAULT_FSENTRY 3) PM_WS_DEFAULT_BINVAL 4) PM_WS_DEFAULT_BUNDLE 5) PM_WS_DEFAULT_NAMES 6) PM_WS_DEFAULT_REFS 7) VERSIONING_FS_FSENTRY 8) VERSIONING_PM_BINVAL 9) VERSIONING_PM_BUNDLE 10) VERSIONING_PM_NAMES 11) VERSIONING_PM_REFS I have copied *ojdbc6.jar* jar in my tomcat 7's lib folder. I am using jdk 1.7. I am able to create packages in oracle but not able to uplaod my model jar in DB. Please find attach file Oracle_Error.txt http://drools.46999.n3.nabble.com/file/n4020187/Oracle_Error.txt for error log: In MySQL DB uploading of jar works fine. Please let me know if there is any issue in Oracle version? Thanks, Manasi -- View this message in context: http://drools.46999.n3.nabble.com/Not-able-to-upload-POJO-model-jar-in-Oracle-DB-tp4020187.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] Not able to upload POJO model jar in Oracle DB.
It seems related to an open Jackrabbit bug on Oracle databases: https://issues.apache.org/jira/browse/JCR-936 The workaround seems to be to manually add the trigger defined here: https://issues.apache.org/jira/browse/JCR-936?focusedCommentId=12498242page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12498242 -- Build Smarter Software. Spantree Technology Group, LLC 813 W Randolph St, Suite 301, Chicago, IL email: ced...@spantree.net (mailto:ced...@spantree.net) | phone: 773.359.3865 (tel:773.359.3865) On Wednesday, October 10, 2012 at 12:43 AM, Manasi wrote: Hi, Currently I am using Oracle 11g DB for Guvnor repository for storing my rules and POJO model jar. After guvnor instance is started following 11 tables are created in Oracle 11g DB schema. 1) FS_FSENTRY 2) FS_WS_DEFAULT_FSENTRY 3) PM_WS_DEFAULT_BINVAL 4) PM_WS_DEFAULT_BUNDLE 5) PM_WS_DEFAULT_NAMES 6) PM_WS_DEFAULT_REFS 7) VERSIONING_FS_FSENTRY 8) VERSIONING_PM_BINVAL 9) VERSIONING_PM_BUNDLE 10) VERSIONING_PM_NAMES 11) VERSIONING_PM_REFS I have copied *ojdbc6.jar* jar in my tomcat 7's lib folder. I am using jdk 1.7. I am able to create packages in oracle but not able to uplaod my model jar in DB. Please find attach file Oracle_Error.txt http://drools.46999.n3.nabble.com/file/n4020187/Oracle_Error.txt for error log: In MySQL DB uploading of jar works fine. Please let me know if there is any issue in Oracle version? Thanks, Manasi -- View this message in context: http://drools.46999.n3.nabble.com/Not-able-to-upload-POJO-model-jar-in-Oracle-DB-tp4020187.html Sent from the Drools: User forum mailing list archive at Nabble.com (http://Nabble.com). ___ rules-users mailing list rules-users@lists.jboss.org (mailto: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