java.lang.IllegalArgumentException: Illegal group reference

Atlassian JIRA | Przemyslaw Borkowski [Atlassian] | 2 years ago
  1. 0

    h4. Symptoms You will not be able to edit or transition any issues that contain a '$' sign in any field. This occurs only when SQL logging has been enabled. The following will appear in your atlassian-jira.log: {code:none} 2014-09-22 13:39:39,403 http-8080-14 ERROR XXXXXX ######## ##.##.##.##,127.0.0.1 /secure/CommentAssignIssue.jspa [atlassian.jira.workflow.OSWorkflowManager] Caught exception while attempting to perform action ### from workflow ####### on issue 'XXXXX-###' java.lang.IllegalArgumentException: Illegal group reference at java.util.regex.Matcher.appendReplacement(Matcher.java:713) at java.util.regex.Matcher.replaceFirst(Matcher.java:861) at java.lang.String.replaceFirst(String.java:2146) at com.atlassian.jira.ofbiz.OfBizLogHelper.formatSQL(OfBizLogHelper.java:30) at com.atlassian.jira.ofbiz.LoggingSQLInterceptor.afterExecutionImpl(LoggingSQLInterceptor.java:67) ... {code} Or: {noformat} 2015-04-19 23:46:08,073 http-bio-8080-exec-38 ERROR cxue 1426x62252x6 1onb34q 10.110.121.121,10.119.20.32 /secure/CommentAssignIssue.jspa [atlassian.jira.workflow.OSWorkflowManager] Caught exception while attempting to perform action 11 from workflow 1052249 on issue 'ANE-28219' java.lang.IndexOutOfBoundsException: No group 1 at java.util.regex.Matcher.start(Unknown Source) at java.util.regex.Matcher.appendReplacement(Unknown Source) at java.util.regex.Matcher.replaceFirst(Unknown Source) at java.lang.String.replaceFirst(Unknown Source) at com.atlassian.jira.ofbiz.OfBizLogHelper.formatSQL(OfBizLogHelper.java:30) at com.atlassian.jira.ofbiz.LoggingSQLInterceptor.afterExecutionImpl(LoggingSQLInterceptor.java:67) at com.atlassian.jira.ofbiz.LoggingSQLInterceptor.afterSuccessfulExecution(LoggingSQLInterceptor.java:54) at com.atlassian.jira.ofbiz.ChainedSQLInterceptor.afterSuccessfulExecution(ChainedSQLInterceptor.java:91) at org.ofbiz.core.entity.jdbc.SQLProcessor.afterExecution(SQLProcessor.java:561) at org.ofbiz.core.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:642) at org.ofbiz.core.entity.GenericDAO.singleUpdate(GenericDAO.java:353) at org.ofbiz.core.entity.GenericDAO.customUpdate(GenericDAO.java:279) at org.ofbiz.core.entity.GenericDAO.update(GenericDAO.java:257) at org.ofbiz.core.entity.GenericDAO.update(GenericDAO.java:226) at org.ofbiz.core.entity.GenericHelperDAO.store(GenericHelperDAO.java:232) at org.ofbiz.core.entity.GenericDelegator.store(GenericDelegator.java:1686) at org.ofbiz.core.entity.GenericDelegator.store(GenericDelegator.java:1668) at org.ofbiz.core.entity.GenericValue.store(GenericValue.java:102) at com.atlassian.jira.issue.IssueImpl.store(IssueImpl.java:1319) at com.atlassian.jira.workflow.function.issue.GenerateChangeHistoryFunction.execute(GenerateChangeHistoryFunction.java:46) at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:1050) at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1446) at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:564) at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowActionInsideTxn(OSWorkflowManager.java:957) at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowAction(OSWorkflowManager.java:912) at com.atlassian.jira.bc.issue.DefaultIssueService.transition(DefaultIssueService.java:450) at com.atlassian.jira.web.action.issue.CommentAssignIssue.doExecute(CommentAssignIssue.java:192) at webwork.action.ActionSupport.execute(ActionSupport.java:165) {noformat} h4. Cause To format SQL JIRA is using {{String.replaceFirst}}, which is using regexp replacement String as second argument, so it treats {{$}} sign as a special character for replacing groups in regexp. h4. Workaround This only occurs when SQL logging is enabled, so you can just disable SQL logging to avoid the issue.

    Atlassian JIRA | 2 years ago | Przemyslaw Borkowski [Atlassian]
    java.lang.IllegalArgumentException: Illegal group reference
  2. 0

    h4. Symptoms You will not be able to edit or transition any issues that contain a '$' sign in any field. This occurs only when SQL logging has been enabled. The following will appear in your atlassian-jira.log: {code:none} 2014-09-22 13:39:39,403 http-8080-14 ERROR XXXXXX ######## ##.##.##.##,127.0.0.1 /secure/CommentAssignIssue.jspa [atlassian.jira.workflow.OSWorkflowManager] Caught exception while attempting to perform action ### from workflow ####### on issue 'XXXXX-###' java.lang.IllegalArgumentException: Illegal group reference at java.util.regex.Matcher.appendReplacement(Matcher.java:713) at java.util.regex.Matcher.replaceFirst(Matcher.java:861) at java.lang.String.replaceFirst(String.java:2146) at com.atlassian.jira.ofbiz.OfBizLogHelper.formatSQL(OfBizLogHelper.java:30) at com.atlassian.jira.ofbiz.LoggingSQLInterceptor.afterExecutionImpl(LoggingSQLInterceptor.java:67) ... {code} Or: {noformat} 2015-04-19 23:46:08,073 http-bio-8080-exec-38 ERROR cxue 1426x62252x6 1onb34q 10.110.121.121,10.119.20.32 /secure/CommentAssignIssue.jspa [atlassian.jira.workflow.OSWorkflowManager] Caught exception while attempting to perform action 11 from workflow 1052249 on issue 'ANE-28219' java.lang.IndexOutOfBoundsException: No group 1 at java.util.regex.Matcher.start(Unknown Source) at java.util.regex.Matcher.appendReplacement(Unknown Source) at java.util.regex.Matcher.replaceFirst(Unknown Source) at java.lang.String.replaceFirst(Unknown Source) at com.atlassian.jira.ofbiz.OfBizLogHelper.formatSQL(OfBizLogHelper.java:30) at com.atlassian.jira.ofbiz.LoggingSQLInterceptor.afterExecutionImpl(LoggingSQLInterceptor.java:67) at com.atlassian.jira.ofbiz.LoggingSQLInterceptor.afterSuccessfulExecution(LoggingSQLInterceptor.java:54) at com.atlassian.jira.ofbiz.ChainedSQLInterceptor.afterSuccessfulExecution(ChainedSQLInterceptor.java:91) at org.ofbiz.core.entity.jdbc.SQLProcessor.afterExecution(SQLProcessor.java:561) at org.ofbiz.core.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:642) at org.ofbiz.core.entity.GenericDAO.singleUpdate(GenericDAO.java:353) at org.ofbiz.core.entity.GenericDAO.customUpdate(GenericDAO.java:279) at org.ofbiz.core.entity.GenericDAO.update(GenericDAO.java:257) at org.ofbiz.core.entity.GenericDAO.update(GenericDAO.java:226) at org.ofbiz.core.entity.GenericHelperDAO.store(GenericHelperDAO.java:232) at org.ofbiz.core.entity.GenericDelegator.store(GenericDelegator.java:1686) at org.ofbiz.core.entity.GenericDelegator.store(GenericDelegator.java:1668) at org.ofbiz.core.entity.GenericValue.store(GenericValue.java:102) at com.atlassian.jira.issue.IssueImpl.store(IssueImpl.java:1319) at com.atlassian.jira.workflow.function.issue.GenerateChangeHistoryFunction.execute(GenerateChangeHistoryFunction.java:46) at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:1050) at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1446) at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:564) at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowActionInsideTxn(OSWorkflowManager.java:957) at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowAction(OSWorkflowManager.java:912) at com.atlassian.jira.bc.issue.DefaultIssueService.transition(DefaultIssueService.java:450) at com.atlassian.jira.web.action.issue.CommentAssignIssue.doExecute(CommentAssignIssue.java:192) at webwork.action.ActionSupport.execute(ActionSupport.java:165) {noformat} h4. Cause To format SQL JIRA is using {{String.replaceFirst}}, which is using regexp replacement String as second argument, so it treats {{$}} sign as a special character for replacing groups in regexp. h4. Workaround This only occurs when SQL logging is enabled, so you can just disable SQL logging to avoid the issue.

    Atlassian JIRA | 2 years ago | Przemyslaw Borkowski [Atlassian]
    java.lang.IllegalArgumentException: Illegal group reference
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    How to escape $ in java?

    Stack Overflow | 4 years ago | Edward
    java.lang.IllegalArgumentException: Illegal group reference
  5. 0

    50392 - SAS® Promotion Optimization displays "Illegal group reference ..." after running On-demand

    sas.com | 3 months ago
    java.lang.IllegalArgumentException: Illegal group reference

    3 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
      String.replaceFirst
      1. java.util.regex.Matcher.appendReplacement(Matcher.java:713)
      2. java.util.regex.Matcher.replaceFirst(Matcher.java:861)
      3. java.lang.String.replaceFirst(String.java:2146)
      3 frames
    3. com.atlassian.jira
      LoggingSQLInterceptor.afterExecutionImpl
      1. com.atlassian.jira.ofbiz.OfBizLogHelper.formatSQL(OfBizLogHelper.java:30)
      2. com.atlassian.jira.ofbiz.LoggingSQLInterceptor.afterExecutionImpl(LoggingSQLInterceptor.java:67)
      2 frames