java.lang.IllegalArgumentException: Illegal group reference

JBoss Issue Tracker | psmith | 1 decade ago
  1. 0

    JBoss Community / Mailing Lists

    sourceforge.net | 1 year ago
    java.lang.IllegalArgumentException: Illegal group reference
  2. 0

    Many of the examples show the variable naming convention of prefixing the name with a dollar sign '$'. When the .drl contains a function, use of this naming convention causes the parsing to fail with the following exception: java.lang.IllegalArgumentException: Illegal group reference at java.util.regex.Matcher.appendReplacement(Unknown Source) at java.util.regex.Matcher.replaceAll(Unknown Source) at org.drools.semantics.java.FunctionFixer.fix(FunctionFixer.java:42) at org.drools.semantics.java.FunctionFixer.fix(FunctionFixer.java:12) at org.drools.semantics.java.RuleBuilder.build(RuleBuilder.java:686) at org.drools.semantics.java.RuleBuilder.build(RuleBuilder.java:242) at org.drools.semantics.java.RuleBuilder.build(RuleBuilder.java:159) at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:206) at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:125) at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:90) at testing.FunctionTest.testFunction(FunctionTest.java:18) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) This issue is discussed here: http://cephas.net/blog/2006/02/09/javalangillegalargumentexception_illegal_group_reference_replaceall_and_dollar_signs.html

    JBoss Issue Tracker | 1 decade ago | psmith
    java.lang.IllegalArgumentException: Illegal group reference
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    JBoss Community / Mailing Lists

    sourceforge.net | 4 months ago
    java.lang.IllegalArgumentException: Illegal group reference

    2 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Illegal group reference

      at java.util.regex.Matcher.appendReplacement()
    2. Java RT
      Matcher.replaceAll
      1. java.util.regex.Matcher.appendReplacement(Unknown Source)
      2. java.util.regex.Matcher.replaceAll(Unknown Source)
      2 frames
    3. org.drools.semantics
      RuleBuilder.build
      1. org.drools.semantics.java.FunctionFixer.fix(FunctionFixer.java:42)
      2. org.drools.semantics.java.FunctionFixer.fix(FunctionFixer.java:12)
      3. org.drools.semantics.java.RuleBuilder.build(RuleBuilder.java:686)
      4. org.drools.semantics.java.RuleBuilder.build(RuleBuilder.java:242)
      5. org.drools.semantics.java.RuleBuilder.build(RuleBuilder.java:159)
      5 frames
    4. org.drools.compiler
      PackageBuilder.addPackageFromDrl
      1. org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:206)
      2. org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:125)
      3. org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:90)
      3 frames
    5. testing
      FunctionTest.testFunction
      1. testing.FunctionTest.testFunction(FunctionTest.java:18)
      1 frame
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      4. java.lang.reflect.Method.invoke(Unknown Source)
      4 frames
    7. JUnit
      TestSuite.run
      1. junit.framework.TestCase.runTest(TestCase.java:154)
      2. junit.framework.TestCase.runBare(TestCase.java:127)
      3. junit.framework.TestResult$1.protect(TestResult.java:106)
      4. junit.framework.TestResult.runProtected(TestResult.java:124)
      5. junit.framework.TestResult.run(TestResult.java:109)
      6. junit.framework.TestCase.run(TestCase.java:118)
      7. junit.framework.TestSuite.runTest(TestSuite.java:208)
      8. junit.framework.TestSuite.run(TestSuite.java:203)
      8 frames
    8. JUnit3 Runner
      RemoteTestRunner.main
      1. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
      2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
      3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      3 frames