[
https://issues.jboss.org/browse/JBRULES-2885?page=com.atlassian.jira.plug...
]
Joe White updated JBRULES-2885:
-------------------------------
Description:
Exception thrown when adding the DRL below. The DRL isn't pasting correctly there is a
slash before the ( and a slash before ) Functions correctly in 5.0.1 and 5.1.1
*******************DRL**********************************
package benefitResolution.oop;
import java.util.Map;
import com.recondotech.droolsTest.TestObject;
dialect "mvel"
rule "Rule with parens"
salience 300
when
$testObj : TestObject($mapData: mapData)
Map(this['STRING_WITH_PARENS'] matches '(?i).*\(ROUTINE\).*')
from $mapData
then
System.out.println("PASS");
end
********************************************************
****************Exception******************************
Unable to determine the used declarations.
[Error: illegal escape sequence: (]
[Near : {... ENS'] ~= "(?i).*\(ROUTINE\).* ....}]
^
[Line: 1, Column: 51] : [Rule name='Set Value One Negative']
java.lang.IllegalArgumentException: Could not parse knowledge.
at
com.recondotech.droolsTest.DroolsUpdateTest.readKnowledgeBase(DroolsUpdateTest.java:40)
at com.recondotech.droolsTest.DroolsUpdateTest.testUpdate(DroolsUpdateTest.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
was:
Exception thrown when adding the DRL below. Functions correctly in 5.0.1 and 5.1.1
*******************DRL**********************************
package benefitResolution.oop;
import java.util.Map;
import com.recondotech.droolsTest.TestObject;
dialect "mvel"
rule "Rule with parens"
salience 300
when
$testObj : TestObject($mapData: mapData)
Map(this['STRING_WITH_PARENS'] matches '(?i).*\(ROUTINE\).*')
from $mapData
then
System.out.println("PASS");
end
********************************************************
****************Exception******************************
Unable to determine the used declarations.
[Error: illegal escape sequence: (]
[Near : {... ENS'] ~= "(?i).*\(ROUTINE\).* ....}]
^
[Line: 1, Column: 51] : [Rule name='Set Value One Negative']
java.lang.IllegalArgumentException: Could not parse knowledge.
at
com.recondotech.droolsTest.DroolsUpdateTest.readKnowledgeBase(DroolsUpdateTest.java:40)
at com.recondotech.droolsTest.DroolsUpdateTest.testUpdate(DroolsUpdateTest.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
DRL Mvel exception parsing escape sequences with \(
---------------------------------------------------
Key: JBRULES-2885
URL:
https://issues.jboss.org/browse/JBRULES-2885
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-compiler
Affects Versions: 5.2.0.M1
Environment: Windows
Java 1.5
Latest version of Drools 5.2.0.M1 including attached mvel version
Reporter: Joe White
Assignee: Mark Proctor
Fix For: 5.2.0.M1
Exception thrown when adding the DRL below. The DRL isn't pasting correctly there is
a slash before the ( and a slash before ) Functions correctly in 5.0.1 and 5.1.1
*******************DRL**********************************
package benefitResolution.oop;
import java.util.Map;
import com.recondotech.droolsTest.TestObject;
dialect "mvel"
rule "Rule with parens"
salience 300
when
$testObj : TestObject($mapData: mapData)
Map(this['STRING_WITH_PARENS'] matches '(?i).*\(ROUTINE\).*')
from $mapData
then
System.out.println("PASS");
end
********************************************************
****************Exception******************************
Unable to determine the used declarations.
[Error: illegal escape sequence: (]
[Near : {... ENS'] ~= "(?i).*\(ROUTINE\).* ....}]
^
[Line: 1, Column: 51] : [Rule name='Set Value One Negative']
java.lang.IllegalArgumentException: Could not parse knowledge.
at
com.recondotech.droolsTest.DroolsUpdateTest.readKnowledgeBase(DroolsUpdateTest.java:40)
at com.recondotech.droolsTest.DroolsUpdateTest.testUpdate(DroolsUpdateTest.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira