[JBoss JIRA] Created: (JBRULES-2253) ClassNotFound when ASM optimizer kicks in in MVEL consequence
by Michael Neale (JIRA)
ClassNotFound when ASM optimizer kicks in in MVEL consequence
-------------------------------------------------------------
Key: JBRULES-2253
URL: https://jira.jboss.org/jira/browse/JBRULES-2253
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.0.1.FINAL
Reporter: Michael Neale
Assignee: Michael Neale
Priority: Critical
Fix For: 5.1.0.M1
(ok if the subject is really confusing, perhaps this bug isn't for you).
In chasing down JBRULES-2234 I found this. Instructions (apologies for relying on Guvnor to reproduce):
To reproduce is not
easy, but here are some instructions:
* Run latest Guvnor (if you are able to, if not, then the rest is moot !).
* Import the attached repo (unzip it first).
* browse to KnowledgeBases/org/acme/insurance/pricing/
- press "build package"
* shut it down, restart (flushes caches etc...)
Then:
* browse to KnowledgeBases/org/acme/insurance/pricing/Test Scenarios
* open PolicyQuotePackageTest
* run it:
Now you should see an exception like this:
Caused by: java.lang.NoClassDefFoundError: org/acme/insurance/Policy
at ASMAccessorImpl_62408281250565694450.setValue(Unknown Source)
at org.mvel2.optimizers.dynamic.DynamicSetAccessor.setValue(DynamicSetAccessor.java:74)
at org.mvel2.compiler.CompiledAccExpression.setValue(CompiledAccExpression.java:47)
at org.mvel2.MVEL.executeSetExpression(MVEL.java:962)
at org.mvel2.ast.WithNode$ParmValuePair.eval(WithNode.java:242)
at org.mvel2.ast.WithNode.getReducedValueAccelerated(WithNode.java:67)
at org.mvel2.ast.InterceptorWrapper.getReducedValueAccelerated(InterceptorWrapper.java:38)
at org.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:104)
at org.mvel2.MVEL.executeExpression(MVEL.java:995)
at org.drools.base.mvel.MVELConsequence.evaluate(MVELConsequence.java:91)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:966)
This is due to it loading a previously serialized version of the KB.
If it was to run off a freshly compiled one, its all fine. Also, if I
tell MVEL to NOT use ASM optimizer, it works fine (using reflection).
So clearly the stuff is available to the classpath in the right
places... its only to do with ASM in mvel post deserialization. (and
for that to happen, MVEL has to execute the compiled expression enough
to kick in the JIT).
MVELCompilationUnit in drools is worth examining too... still not sure where the problem lies.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[JBoss JIRA] Created: (JBRULES-2179) better integration of ruleflow and AgendaFilter
by Michal Bali (JIRA)
better integration of ruleflow and AgendaFilter
-----------------------------------------------
Key: JBRULES-2179
URL: https://jira.jboss.org/jira/browse/JBRULES-2179
Project: JBoss Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: drools-core (expert)
Affects Versions: 5.0.1.FINAL
Reporter: Michal Bali
Assignee: Mark Proctor
Fix For: 5.1.0.M1
Attachments: agendaFilterWithRuleflow.zip
Hi,
I am creating this issue so that it won't be lost. See this post for more information: http://lists.jboss.org/pipermail/rules-users/2009-May/009110.html
My original email with one reply message is pasted below:
--------------------------------------------------------------
If a rule is not allowed to fire by an AgendaFilter the whole ruleflow stops.
I've created a small test case (attached). It contains:
- one DRL file with one dummy rule that is in some ruleflow-group.
- one RF file with three nodes ('start', 'ruleflow group' and 'end')
- a program that starts the process, and calls fireAllRules with custom agenda filter.
Once the program is executed the ruleflow will stop inside the ruleflow-group. If I remove the agenda filter it works as expected (the ruleflow finishes).
Tested with Drools 5.0.1.
Best regards,
Michal
----------------------------------------
Final reply from Mark:
It seems like a reasonable request, that if all the rules have been cancelled, fired or filtered that the ruleflow-group should be de-activated so the flow can continue. We'll look into it for 5.1.
---------------------------------------
Thanking you in advance,
Michal
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[JBoss JIRA] Created: (JBRULES-2243) Add support to source code assets to reference each other
by Edson Tirelli (JIRA)
Add support to source code assets to reference each other
---------------------------------------------------------
Key: JBRULES-2243
URL: https://jira.jboss.org/jira/browse/JBRULES-2243
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: drools-api, drools-compiler, drools-core, drools-eclipse
Affects Versions: 5.0.1.FINAL, 5.0.0.FINAL
Reporter: Edson Tirelli
Assignee: Edson Tirelli
Fix For: 5.1.0.M1
One asset defined in one DRL should be usable from other DRLs. So we need a way to import them from one file into another, in a similar way as #includes works in C++ or "import" in java, etc.
So, if I declare a type in DRL1.drl:
declare XYZ
...
end
I can then use it in rules in DRL2.drl:
uses "DRL1.drl"
rule "ABC"
when
XYZ(...)
then
end
Same for any other assets like functions.
This feature will require proper dependency management to avoid circular dependencies, classloader issues, etc. Also, the IDE will require update to be able to properly reflect these situations without raising false errors.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[JBoss JIRA] Created: (JBRULES-2257) Wrong condition evaluation if the condition contains a variable assignment
by Udo Klinkmüller (JIRA)
Wrong condition evaluation if the condition contains a variable assignment
----------------------------------------------------------------------------
Key: JBRULES-2257
URL: https://jira.jboss.org/jira/browse/JBRULES-2257
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.0.1.FINAL
Environment: Mac OS X, iMac, Eclipse Galileo (3.5)
Reporter: Udo Klinkmüller
Assignee: Mark Proctor
I have a rule which checks variables of two equal objects in an old and a new version. If I work with the variable daclaration $nd1 then the consequence is NOT executed although it should.
This is the version of the rule in that the consequence is not executed although it should:
------------------------------------------
package apm.event.resource;
#list any import classes here.
import java.util.*;
import de.fraport.test.*;
#declare any global variables here
global Collection results;
rule "Test-Del"
salience 900
when
#conditions
TestMainObjectPair( $omo: oldMainObject != null, $nmo: newMainObject )
TestObject( date1 == null, $od2: date2 != null, $os1: strVal1 != null ) from $omo.testObject
TestObject( $nd1: date1 != null || date2 != $od2 || strVal1 != $os1 ) from $nmo.testObject
then
#actions
System.out.println("****** Executing consequence of rule Test-Del nd1="+ $nd1 +" ...");
results.add($nto);
end
------------------------------------------
This is the rule version which delivers the expected result (without using $nd1):
------------------------------------------
package apm.event.resource;
#list any import classes here.
import java.util.*;
import de.fraport.test.*;
#declare any global variables here
global Collection results;
rule "Test-Del"
salience 900
when
#conditions
TestMainObjectPair( $omo: oldMainObject != null, $nmo: newMainObject )
TestObject( date1 == null, $od2: date2 != null, $os1: strVal1 != null ) from $omo.testObject
$nto: TestObject( date1 != null || date2 != $od2 || strVal1 != $os1 ) from $nmo.testObject
then
#actions
System.out.println("****** Executing consequence of rule Test-Del nd1="+ $nto.getDate1() +" ...");
results.add($nto);
end
------------------------------------------
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[JBoss JIRA] Created: (JBRULES-2258) count in sliding time
by Francesco Chiarelli (JIRA)
count in sliding time
---------------------
Key: JBRULES-2258
URL: https://jira.jboss.org/jira/browse/JBRULES-2258
Project: Drools
Issue Type: CTS Challenge
Security Level: Public (Everyone can see)
Components: drools-core (fusion)
Affects Versions: 5.0.1.FINAL
Environment: Mac os 10.5, Eclipse Galileo, Jboss 5,
Reporter: Francesco Chiarelli
Assignee: Mark Proctor
I'm trying to use a sliding time fro count a facts with a condition.
I'have set a stream mode.
In test, with pseudo clock active, set this to current Time (it's
correct?), declare a fact type in drl with
declare MyFact (i've a javabean)
@role(event)
@timestamp(myTimestamp)
end
attribute type of myTimestamp must be long or Date? I've tried with both
but nothing, engine count all fact
ex: n fact in x days ago from now, the statement over window:time(1s)
result always n fact. why?
in when:
// $o : Order(<condition>)
$nRic : Number(intValue<maxRic) from accumulate($n: Order(this==$o)
over window:time(1s),count($n))
ps. if i set a real clock altough a pseudo, in runTime i've a ClassCastExc. to JdkTimerService
There is a test suite about count?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[JBoss JIRA] Created: (JBRULES-2254) Webdav plugin creates hidden file with colon (":") in filename when copying resources from Guvnor - Causes issues on Windows
by Tihomir Surdilovic (JIRA)
Webdav plugin creates hidden file with colon (":") in filename when copying resources from Guvnor - Causes issues on Windows
----------------------------------------------------------------------------------------------------------------------------
Key: JBRULES-2254
URL: https://jira.jboss.org/jira/browse/JBRULES-2254
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-eclipse
Affects Versions: 5.0.1.FINAL
Reporter: Tihomir Surdilovic
Assignee: Mark Proctor
***
When trying to create rule flow in Jboss Developer Studio
1.) Dragging a file from the Guvnor Repositories view to the Eclipse Navigator
view (i.e. to create a local copy linked to the Guvnor) throws an error
indication that a directory could not be created. This directory name has colons in it (i.e. :), which will never be allowed under Windows XP.
Here is the error:
Could not create directory C:Documents and Settings539578My Documentsworkspace.metadata.pluginsorg.guvnor.tools-2edc6539:1232df2fb51:-7ff6
Could not create directory C:Documents and Settings539578My Documentsworkspace.metadata.pluginsorg.guvnor.tools-2edc6539:1232df2fb51:-7ff6
2.) Trying to use the "Resources from Guvnor" wizard also produces an error, and the wizard does not let you browse the Guvnor repository to choose resources to copy over to eclipse.
Error Reason:
3 entries found for http://localhost:8080/jboss-brms/org.drools.guvnor.Guvnor/webdav
***
The hidden file created by Guvnor plugin uses Webdav to create a hidden file which includes colons in filename which is not allowed by Windows XP.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[JBoss JIRA] Created: (JBRULES-2319) When using from (CE) the objects loaded are not available to RHS if the objects are events
by Richard Ambridge (JIRA)
When using from (CE) the objects loaded are not available to RHS if the objects are events
------------------------------------------------------------------------------------------
Key: JBRULES-2319
URL: https://jira.jboss.org/jira/browse/JBRULES-2319
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.0.1.FINAL
Environment: Ubuntu, Eclipse
Reporter: Richard Ambridge
Assignee: Mark Proctor
If I create the sample project from Eclipse, and modify DroolsTest to contain:
ArrayList<Message> a=new ArrayList<Message>();
Message a1=new Message(); a1.setId(1); a1.setMessage("mesC:7"); a1.setStatus(Message.HELLO); a.add(a1);
Message a2=new Message(); a2.setId(2);a2.setMessage("mesC:8"); a2.setStatus(Message.HELLO);a.add(a2);
ksession.setGlobal("data", a);
And set the environment as STREAM,
conf.setOption( EventProcessingOption.STREAM );
and then have a rule:
package com.sample
import com.sample.DroolsTest.Message;
global java.util.ArrayList data;
declare Message
@role( event )
end
rule "Hello World"
when
a : Message(id==4)
m : Message(id!=a.id, message==a.message) from data
then
System.out.println( "a is:"+a+" m is:"+m );
end
The result is:
a is:Message:[4] msg:mesC:7 m is:null
Notice, m is NULL
if you change this to fact based, m will contain the correct value.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months