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.

  • We have a problem during update procedure when there is $ (dolar character) in changeset (file) name. This problem not occur if it is launch first time (no update procedure). INFO 09.01.15 16:55: liquibase: changeSet-tdp_51_708318/00000E$_PI_upgrade_package_initialization.xml::7.0.83.18-section_begin.sql::liquibase: Successfully released change log lock Unexpected error running Liquibase: Illegal group reference SEVERE 09.01.15 16:55: liquibase: changeSet-tdp_51_708318/00000E$_PI_upgrade_package_initialization.xml::7.0.83.18-section_begin.sql::liquibase: Illegal group reference java.lang.IllegalArgumentException: Illegal group reference at java.util.regex.Matcher.appendReplacement(Unknown Source) at java.util.regex.Matcher.replaceFirst(Unknown Source) at java.lang.String.replaceFirst(Unknown Source) at liquibase.sqlgenerator.core.UpdateGenerator.generateSql(UpdateGenerator.java:50) at liquibase.sqlgenerator.core.UpdateGenerator.generateSql(UpdateGenerator.java:17) at liquibase.sqlgenerator.SqlGeneratorChain.generateSql(SqlGeneratorChain.java:30) at liquibase.sqlgenerator.SqlGeneratorFactory.generateSql(SqlGeneratorFactory.java:208) at liquibase.sqlgenerator.core.MarkChangeSetRanGenerator.generateSql(MarkChangeSetRanGenerator.java:81) at liquibase.sqlgenerator.core.MarkChangeSetRanGenerator.generateSql(MarkChangeSetRanGenerator.java:24) at liquibase.sqlgenerator.SqlGeneratorChain.generateSql(SqlGeneratorChain.java:30) at liquibase.sqlgenerator.SqlGeneratorFactory.generateSql(SqlGeneratorFactory.java:208) at liquibase.executor.AbstractExecutor.applyVisitors(AbstractExecutor.java:23) at liquibase.executor.jvm.JdbcExecutor.access$500(JdbcExecutor.java:36) at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:304) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:112) at liquibase.changelog.StandardChangeLogHistoryService.setExecType(StandardChangeLogHistoryService.java:264) at liquibase.database.AbstractJdbcDatabase.markChangeSetExecStatus(AbstractJdbcDatabase.java:1089) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:50) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:73) at liquibase.Liquibase.update(Liquibase.java:200) at liquibase.integration.commandline.Main.doMigration(Main.java:1032) at liquibase.integration.commandline.Main.run(Main.java:177) at liquibase.integration.commandline.Main.main(Main.java:96)
    via by rafal.najman,
  • We have a problem during update procedure when there is $ (dolar character) in changeset (file) name. This problem not occur if it is launch first time (no update procedure). INFO 09.01.15 16:55: liquibase: changeSet-tdp_51_708318/00000E$_PI_upgrade_package_initialization.xml::7.0.83.18-section_begin.sql::liquibase: Successfully released change log lock Unexpected error running Liquibase: Illegal group reference SEVERE 09.01.15 16:55: liquibase: changeSet-tdp_51_708318/00000E$_PI_upgrade_package_initialization.xml::7.0.83.18-section_begin.sql::liquibase: Illegal group reference java.lang.IllegalArgumentException: Illegal group reference at java.util.regex.Matcher.appendReplacement(Unknown Source) at java.util.regex.Matcher.replaceFirst(Unknown Source) at java.lang.String.replaceFirst(Unknown Source) at liquibase.sqlgenerator.core.UpdateGenerator.generateSql(UpdateGenerator.java:50) at liquibase.sqlgenerator.core.UpdateGenerator.generateSql(UpdateGenerator.java:17) at liquibase.sqlgenerator.SqlGeneratorChain.generateSql(SqlGeneratorChain.java:30) at liquibase.sqlgenerator.SqlGeneratorFactory.generateSql(SqlGeneratorFactory.java:208) at liquibase.sqlgenerator.core.MarkChangeSetRanGenerator.generateSql(MarkChangeSetRanGenerator.java:81) at liquibase.sqlgenerator.core.MarkChangeSetRanGenerator.generateSql(MarkChangeSetRanGenerator.java:24) at liquibase.sqlgenerator.SqlGeneratorChain.generateSql(SqlGeneratorChain.java:30) at liquibase.sqlgenerator.SqlGeneratorFactory.generateSql(SqlGeneratorFactory.java:208) at liquibase.executor.AbstractExecutor.applyVisitors(AbstractExecutor.java:23) at liquibase.executor.jvm.JdbcExecutor.access$500(JdbcExecutor.java:36) at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:304) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:112) at liquibase.changelog.StandardChangeLogHistoryService.setExecType(StandardChangeLogHistoryService.java:264) at liquibase.database.AbstractJdbcDatabase.markChangeSetExecStatus(AbstractJdbcDatabase.java:1089) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:50) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:73) at liquibase.Liquibase.update(Liquibase.java:200) at liquibase.integration.commandline.Main.doMigration(Main.java:1032) at liquibase.integration.commandline.Main.run(Main.java:177) at liquibase.integration.commandline.Main.main(Main.java:96)
    via by rafal.najman,
  • How to escape $ in java?
    via Stack Overflow by Edward
    ,
  • When trying to create a new issue an IllegalArgumentException is thrown due to an illegal group modifier. The stacktrace is: {noformat} An error occurred handling request. Cause: Illegal group reference java.lang.IllegalArgumentException: Illegal group reference at java.util.regex.Matcher.appendReplacement(Unknown Source) at java.util.regex.Matcher.replaceFirst(Unknown Source) at java.lang.String.replaceFirst(Unknown Source) at org.swift.jira.cli.helpers.LogHelper.convert(LogHelper.java:57) at org.swift.jira.cli.helpers.LogHelper.logMessage(LogHelper.java:51) at org.swift.jira.cli.helpers.LogHelper.debug(LogHelper.java:28) at org.swift.jira.cli.helpers.DefaultReplaceHelper.findReplaceInternal(DefaultReplaceHelper.java:433) at org.swift.jira.cli.helpers.DefaultReplaceHelper.findReplace(DefaultReplaceHelper.java:394) at org.swift.jira.cli.JiraClient.subReplace(JiraClient.java:2533) at org.swift.jira.cli.helpers.IssueHelper.updateFieldsFromParamters(IssueHelper.java:239) at org.swift.jira.cli.helpers.IssueHelper.createIssue(IssueHelper.java:132) at org.swift.jira.cli.JiraClient.handleRequest(JiraClient.java:1114) at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:506) at org.swift.common.cli.CliClient.doWork(CliClient.java:530) at org.swift.common.cli.CliClient.doWork(CliClient.java:645) at org.swift.common.cli.CliClient.doWork(CliClient.java:629) at org.swift.common.cli.AbstractRemoteClient.processRunLine(AbstractRemoteClient.java:869) at org.swift.common.cli.CliClient.doSingleRunLine(CliClient.java:1409) at org.swift.common.cli.CliClient.run(CliClient.java:1273) at org.swift.jira.cli.JiraClient.handleRequest(JiraClient.java:884) at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:506) at org.swift.common.cli.CliClient.doWork(CliClient.java:530) at org.swift.jira.cli.JiraClient.main(JiraClient.java:150) {noformat} This has happened on more than one issue. The common link seems to be a stacktrace in the issue description. However, I do not believe that this occurs for every stacktrace. This exception has also occurred when trying to add a comment containing a stacktrace to an issue. When this occurs the stack trace is : {noformat} An error occurred handling request. Cause: Illegal group reference java.lang.IllegalArgumentException: Illegal group reference at java.util.regex.Matcher.appendReplacement(Unknown Source) at java.util.regex.Matcher.replaceFirst(Unknown Source) at java.lang.String.replaceFirst(Unknown Source) at org.swift.jira.cli.helpers.LogHelper.convert(LogHelper.java:57) at org.swift.jira.cli.helpers.LogHelper.logMessage(LogHelper.java:51) at org.swift.jira.cli.helpers.LogHelper.debug(LogHelper.java:28) at org.swift.jira.cli.helpers.DefaultReplaceHelper.findReplaceInternal(DefaultReplaceHelper.java:433) at org.swift.jira.cli.helpers.DefaultReplaceHelper.findReplace(DefaultReplaceHelper.java:394) at org.swift.jira.cli.JiraClient.subReplace(JiraClient.java:2533) at org.swift.jira.cli.helpers.IssueHelper.updateFieldsFromParamters(IssueHelper.java:239) at org.swift.jira.cli.helpers.IssueHelper.createIssue(IssueHelper.java:132) at org.swift.jira.cli.JiraClient.handleRequest(JiraClient.java:1114) at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:506) at org.swift.common.cli.CliClient.doWork(CliClient.java:530) at org.swift.common.cli.CliClient.doWork(CliClient.java:645) at org.swift.common.cli.CliClient.doWork(CliClient.java:629) at org.swift.common.cli.AbstractRemoteClient.processRunLine(AbstractRemoteClient.java:869) at org.swift.common.cli.CliClient.doSingleRunLine(CliClient.java:1409) at org.swift.common.cli.CliClient.run(CliClient.java:1273) at org.swift.jira.cli.JiraClient.handleRequest(JiraClient.java:884) at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:506) at org.swift.common.cli.CliClient.doWork(CliClient.java:530) at org.swift.jira.cli.JiraClient.main(JiraClient.java:150) {noformat} While searching for an existing issue I did find TBL-323 which appears as though it may be similar.
    via by Zac Bowen,
  • GitHub comment 35#172377010
    via GitHub by viveleroi
    ,
  • 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.
    via by Przemyslaw Borkowski [Atlassian],
    • java.lang.IllegalArgumentException: Illegal group reference at java.util.regex.Matcher.appendReplacement(Unknown Source) at java.util.regex.Matcher.replaceFirst(Unknown Source) at java.lang.String.replaceFirst(Unknown Source) at liquibase.sqlgenerator.core.UpdateGenerator.generateSql(UpdateGenerator.java:50) at liquibase.sqlgenerator.core.UpdateGenerator.generateSql(UpdateGenerator.java:17) at liquibase.sqlgenerator.SqlGeneratorChain.generateSql(SqlGeneratorChain.java:30) at liquibase.sqlgenerator.SqlGeneratorFactory.generateSql(SqlGeneratorFactory.java:208) at liquibase.sqlgenerator.core.MarkChangeSetRanGenerator.generateSql(MarkChangeSetRanGenerator.java:81) at liquibase.sqlgenerator.core.MarkChangeSetRanGenerator.generateSql(MarkChangeSetRanGenerator.java:24) at liquibase.sqlgenerator.SqlGeneratorChain.generateSql(SqlGeneratorChain.java:30) at liquibase.sqlgenerator.SqlGeneratorFactory.generateSql(SqlGeneratorFactory.java:208) at liquibase.executor.AbstractExecutor.applyVisitors(AbstractExecutor.java:23) at liquibase.executor.jvm.JdbcExecutor.access$500(JdbcExecutor.java:36) at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:304) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:112) at liquibase.changelog.StandardChangeLogHistoryService.setExecType(StandardChangeLogHistoryService.java:264) at liquibase.database.AbstractJdbcDatabase.markChangeSetExecStatus(AbstractJdbcDatabase.java:1089) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:50) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:73) at liquibase.Liquibase.update(Liquibase.java:200) at liquibase.integration.commandline.Main.doMigration(Main.java:1032) at liquibase.integration.commandline.Main.run(Main.java:177) at liquibase.integration.commandline.Main.main(Main.java:96)

    Users with the same issue

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