Complicated Issue
by abhinay_agarwal
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
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)
here is the attached changeset that i am using
changeset_process.xml
<http://drools.46999.n3.nabble.com/file/n4020175/changeset_process.xml>
ChangeSet_rules.xml
<http://drools.46999.n3.nabble.com/file/n4020175/ChangeSet_rules.xml>
please lemme know, if wat i am trying to achieve is evne possible or not?
If yes, then where am i going wrong ?
--
View this message in context: http://drools.46999.n3.nabble.com/Complicated-Issue-tp4020175.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 2 months
Drools 5.4 Jitting Error
by gboro54
I just updated to Drools 5.4 and I am not getting the following error on all
my map accessors:
10:41:12,997 ERROR [stderr] (Thread-169) Exception in thread "Thread-169"
java.lang.RuntimeException: Exception jitting: feeKeys[1] == null
10:41:12,998 ERROR [stderr] (Thread-169) at
org.drools.rule.constraint.MvelConstraint.executeJitting(MvelConstraint.java:219)
10:41:12,999 ERROR [stderr] (Thread-169) at
org.drools.rule.constraint.MvelConstraint.access$000(MvelConstraint.java:41)
10:41:13,000 ERROR [stderr] (Thread-169) at
org.drools.rule.constraint.MvelConstraint$1.run(MvelConstraint.java:201)
10:41:13,000 ERROR [stderr] (Thread-169) at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
10:41:13,001 ERROR [stderr] (Thread-169) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
10:41:13,002 ERROR [stderr] (Thread-169) at
java.lang.Thread.run(Thread.java:662)
10:41:13,002 ERROR [stderr] (Thread-169) Caused by: java.lang.VerifyError:
(class: ConditionEvaluator51817e9f4a7542c5b295be7d674f854c, method: evaluate
signature:
(Ljava/lang/Object;Lorg/drools/common/InternalWorkingMemory;Lorg/drools/reteoo/LeftTuple;)Z)
Expecting to find object/array on stack
10:41:13,004 ERROR [stderr] (Thread-169) at
java.lang.Class.getDeclaredConstructors0(Native Method)
10:41:13,004 ERROR [stderr] (Thread-169) at
java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
10:41:13,005 ERROR [stderr] (Thread-169) at
java.lang.Class.getConstructor0(Class.java:2699)
10:41:13,005 ERROR [stderr] (Thread-169) at
java.lang.Class.getConstructor(Class.java:1657)
10:41:13,006 ERROR [stderr] (Thread-169) at
org.drools.rule.builder.dialect.asm.ClassGenerator.newInstance(ClassGenerator.java:173)
10:41:13,006 ERROR [stderr] (Thread-169) at
org.drools.rule.constraint.ASMConditionEvaluatorJitter.jitEvaluator(ASMConditionEvaluatorJitter.java:53)
10:41:13,007 ERROR [stderr] (Thread-169) at
org.drools.rule.constraint.MvelConstraint.executeJitting(MvelConstraint.java:217)
10:41:13,008 ERROR [stderr] (Thread-169) ... 5 more
Could anyone indicate how to fix this?
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-5-4-Jitting-Error-tp3999176.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 2 months
Rules with variable timers
by Shannon Hastings
Is there a way to write a rule in DRL that uses a timer or something that is dynamic. I.E. I want the time that rule waits to fire to be dependent on a variable such as below:
rule "CheckDoseMissed"
no-loop
timer(int: $eventA.sleepTime)
when
$eventA : MyEvent()
………..
----------
Shannon Hastings
Inventrio
shannon.hastings(a)inventrio.com
(614) 389-2795 ext: 101
http://www.inventrio.com
13 years, 2 months
Rule Match deduplication
by michal.antolik
Hello,
I have a temporal pattern like
*A after B*
and a stream as
*A1,B1,B2,B3,B4,B5,A2,B6*
and if I define a pattern simply as
$a: Event()
$b: Event(this after $a)
I'll get matches like (A1,B1),(A1,B2),(A1,B3),(A1,B4),...
However I care about first match only and then I want to reset the pattern
so the next one would be (A2,B6).
Can you please advice how to achieve that? I don't want to do the
deduplication by myself and most importantly I could achieve much better
performance if I could expire partial matches (I cannot expire event since
it might be used by other patterns)
Thanks a lot for help.
--
View this message in context: http://drools.46999.n3.nabble.com/Rule-Match-deduplication-tp4020717.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 2 months
Droold 5.4.0
by hare ram
Hi All,
I am newbie to Drools. I just downloaded drools-distribution-5.4.0.Final.
If I look at the binaries directory.
there are lots of jar files in it. I want to know what the minimum set of
jars i need to include in my classpath
to compile and run simple drl file.
Thanks
13 years, 3 months
DROOLs callback API for L-value predicate matching events
by Cotton, Ben
Hi, Can someone please point me to compelling examples/sample code of how to use a DROOLs callback API for very high-resolution logging of L-value predicate matching events?
E.g. I want to be able to log when each of these 5 L-value predicates either "MATCHES" or "FAILS TO MATCH" (at the time of the event)
rule "LCHUS_IRS_CURRENCY_RULE" //XLS Item=195
when
IRDCurrencyRuleFact(
productType == "IRS",
currency=="GBP",
upfrontFeePaymentDate < IRDCurrencyRuleFact.terminationDate,
maturity <= 18275, //unit = days, i.e. 50 Years
notional <= 99,999,999,999.99 //max Notional
)
then
System.out.println("LCHUS");
end
Ben D Cotton III
Morgan Stanley & Co.
OTC Derivatives Clearing Technology
1221 AOTA Rockefeller Ctr - Flr 27
New York, NY 10020
(212)762.9094
ben.cotton(a)ms.com<mailto:ben.cotton@ms.com>
________________________________
NOTICE: Morgan Stanley is not acting as a municipal advisor and the opinions or views contained herein are not intended to be, and do not constitute, advice within the meaning of Section 975 of the Dodd-Frank Wall Street Reform and Consumer Protection Act. If you have received this communication in error, please destroy all electronic and paper copies and notify the sender immediately. Mistransmission is not intended to waive confidentiality or privilege. Morgan Stanley reserves the right, to the extent permitted under applicable law, to monitor electronic communications. This message is subject to terms available at the following link: http://www.morganstanley.com/disclaimers If you cannot access these links, please notify us by reply message and we will send the contents to you. By messaging with Morgan Stanley you consent to the foregoing.
13 years, 3 months
Re: [rules-users] debug
by Kevin Kelleher
Hi,
As I see it , this is a big problem.
I was looking at drools about 10 months ago (5.3.0 Final) and debug worked
just fine ... ... so similar to earlier comment of Bruno here.
Today I downloaded drools 5.5.0 Final & eclipse Juno and debug is broken
...
Can we expect a patch? I can't see how we could proceed if this issue is not
resolved.
Any suggestions welcome.
Regards,
Kevin
--
View this message in context: http://drools.46999.n3.nabble.com/debug-tp3889772p4021012.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 3 months
Mixing Drools language and Java implementions without performance loss
by Oliver Libutzki
Hello everyone,
as I try to find the best solution for a scheduling problem Drools
Planner seems to be the perfect fit.
Instead of using drl files I want to implement the rules in Java, but I
still would like to use the power of Drools (Planner) to find the best
solution as fast as possible.
My first attempt is to use the Description API (Examples:
https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test...).
This might work, but I wonder if I really have to write the whole rule
this way. Of course I can use "eval" Expressions to integrate Java code,
but I would like to know how expensive this is in certain situations.
So, which information does Drools use to optimize the algorithm?
An example taken from the Test class I mentioned:
.lhs()
.pattern("StockTick").constraint("company ==
\"RHT\"").end()
.end()
I guess it's important to select the StockTick by using the pattern. But
what about the company criteria? Is using the constraint faster than
invoking a method like "checkType"?
.lhs().pattern("StockTick").name("myStockTick").eval().constraint(
"checkCompany(myCheese, \"RHT\"").end()
.end()
In general, I would like to know which parts can be implemented in
"secret Java" which the drools compiler doesn't know and which parts
should be implemented by using the explicit descr api elements in order
to use the full power of the Drools engine. Thanks for your answers!
Kind regards Oliver
13 years, 3 months
Different results with same fact base
by raffi
Hi,
I have a strange behavior with the Drools Expert 5.5.0. After running the
main class few times in a row, the results suddenly differ from the ones
before it. That means there are somtimes 3, 4 or 5 results shown in console.
I am using a statefulknowledgesession. Inserting of all facts is done with
normal java lists. For my last type of facts I insert one, call
fireAllRules(), and retract it again. Showing in console is solved with
queries. At the end I'm calling the dispose()-method. I added it to see if
there is a change in behavior. But with or without it there is the same
problem with different results after few directly runnings.
Rules and queries are defined in a drl-file and loaded via
knowledgebuilder's add()-method. I am working with eclipse and of course the
plugin for it.
Could it be a problem with something memory like (in a way like a cache or
similar to the garbage collection)?
I hope with this short explanation you can give me a feedback. If not its
not problem to describe in a more detailed way.
Thank you.
--
View this message in context: http://drools.46999.n3.nabble.com/Different-results-with-same-fact-base-t...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 3 months