[jboss-jira] [JBoss JIRA] (DROOLS-9) Exception in User-defined Java method when rules are optimized by the JIT compiler
Andreas Bentele (JIRA)
jira-events at lists.jboss.org
Mon Jan 7 10:49:08 EST 2013
[ https://issues.jboss.org/browse/DROOLS-9?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Bentele updated DROOLS-9:
---------------------------------
Description:
I watched this issue after upgrading from Drools 5.3.1 to Drools 5.5.0.Final.
I didn't find any trivial example, so I reproduced the error with a non-trivial test case, and attached the test case to this issue. The output is listed in the field "Steps to reproduce":
What does the application:
- it calls the rule "DroolsJITTest-Rule" 20 times - 20 is the threshold for jitting. In the output, you can see the line "Service.getAllTimers" 20 times.
- after that output, a exception during jitting is thrown, because com.sample.Service.getTimePerStroke(Service.java:42) throwed an exception
- this service is called in the LHS of the rule
But:
Code of the rule:
{code}
rule "DroolsJITTest-Rule"
when
$service : Service()
p: PulseEvent(
$actionTimestamp : actionTimestamp,
$eventTimestamp : eventTimestamp
)
t: TimerToken(
$machineId : id,
$timestampUTC : timestampUTC,
$service.getLongValue(service.workplaceIdForMachineId($machineId, $actionTimestamp), "RC.WORKPLACE_LEADING_OPERATION_ID") > 0,
service.getTimePerStroke($service.getLongValue(service.workplaceIdForMachineId($machineId, $actionTimestamp), "RC.WORKPLACE_LEADING_OPERATION_ID")) > 15
) from $service.getAllTimers("RC.MACHINE_STROKE_TIMER")
then
System.out.println( "Rule executed" );
update(p);
end
{code}
was:
I watched this issue after upgrading from Drools 5.3.1 to Drools 5.5.0.Final.
I didn't find any trivial example, so I reproduced the error with a non-trivial test case, and attached the test case to this issue.
> Exception in User-defined Java method when rules are optimized by the JIT compiler
> -----------------------------------------------------------------------------------
>
> Key: DROOLS-9
> URL: https://issues.jboss.org/browse/DROOLS-9
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Andreas Bentele
> Assignee: Mark Proctor
> Attachments: DroolsJITTestCase.zip
>
>
> I watched this issue after upgrading from Drools 5.3.1 to Drools 5.5.0.Final.
> I didn't find any trivial example, so I reproduced the error with a non-trivial test case, and attached the test case to this issue. The output is listed in the field "Steps to reproduce":
> What does the application:
> - it calls the rule "DroolsJITTest-Rule" 20 times - 20 is the threshold for jitting. In the output, you can see the line "Service.getAllTimers" 20 times.
> - after that output, a exception during jitting is thrown, because com.sample.Service.getTimePerStroke(Service.java:42) throwed an exception
> - this service is called in the LHS of the rule
> But:
> Code of the rule:
> {code}
> rule "DroolsJITTest-Rule"
> when
> $service : Service()
> p: PulseEvent(
> $actionTimestamp : actionTimestamp,
> $eventTimestamp : eventTimestamp
> )
> t: TimerToken(
> $machineId : id,
> $timestampUTC : timestampUTC,
> $service.getLongValue(service.workplaceIdForMachineId($machineId, $actionTimestamp), "RC.WORKPLACE_LEADING_OPERATION_ID") > 0,
> service.getTimePerStroke($service.getLongValue(service.workplaceIdForMachineId($machineId, $actionTimestamp), "RC.WORKPLACE_LEADING_OPERATION_ID")) > 15
> ) from $service.getAllTimers("RC.MACHINE_STROKE_TIMER")
> then
> System.out.println( "Rule executed" );
> update(p);
> end
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list