Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-2886

Illegal escape sequence exception in 5.2.0M1. See also JIRA JBRULES-2885

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 5.2.0.M2
    • 5.2.0.M1
    • drools-compiler
    • None

    Description

      Exception thrown for rules that work in 5.0.1 and 5.1.1. Rules and exception below. Unit test emailed to team

      ***************************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 '\..*') from $mapData
      then
      System.out.println("PASS");
      end
      **********************************************************

      ***********************Exception***********************

      Unable to determine the used declarations.
      [Error: illegal escape sequence: .]
      [Near :

      {... STRING_WITH_PARENS'] ~= "\..* ....}

      ]
      ^
      [Line: 1, Column: 36] : [Rule name='Rule with slash dot']

      java.lang.IllegalArgumentException: Could not parse knowledge.
      at com.recondotech.droolsTest.SlashDotTest.readKnowledgeBase(SlashDotTest.java:40)
      at com.recondotech.droolsTest.SlashDotTest.testUpdate(SlashDotTest.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)

      Attachments

        Activity

          People

            etirelli@redhat.com Edson Tirelli
            jwhite-1 Joseph White (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty