java.lang.IllegalArgumentException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • JBoss Community / Mailing Lists
    via by Unknown author,
  • 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
    via by psmith,
  • JBoss Community / Mailing Lists
    via by Unknown author,
    • 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)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Axelo
    5 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    15 more bugmates