java.lang.IllegalArgumentException: Illegal group reference

JIRA | rafal.najman | 2 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    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)

    JIRA | 2 years ago | rafal.najman
    java.lang.IllegalArgumentException: Illegal group reference
  2. 0

    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)

    JIRA | 2 years ago | rafal.najman
    java.lang.IllegalArgumentException: Illegal group reference
  3. 0

    How to escape $ in java?

    Stack Overflow | 4 years ago | Edward
    java.lang.IllegalArgumentException: Illegal group reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    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.

    JIRA | 1 month ago | Zac Bowen
    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(Unknown Source)
      2. java.util.regex.Matcher.replaceFirst(Unknown Source)
      3. java.lang.String.replaceFirst(Unknown Source)
      3 frames
    3. Liquibase Core
      Main.main
      1. liquibase.sqlgenerator.core.UpdateGenerator.generateSql(UpdateGenerator.java:50)
      2. liquibase.sqlgenerator.core.UpdateGenerator.generateSql(UpdateGenerator.java:17)
      3. liquibase.sqlgenerator.SqlGeneratorChain.generateSql(SqlGeneratorChain.java:30)
      4. liquibase.sqlgenerator.SqlGeneratorFactory.generateSql(SqlGeneratorFactory.java:208)
      5. liquibase.sqlgenerator.core.MarkChangeSetRanGenerator.generateSql(MarkChangeSetRanGenerator.java:81)
      6. liquibase.sqlgenerator.core.MarkChangeSetRanGenerator.generateSql(MarkChangeSetRanGenerator.java:24)
      7. liquibase.sqlgenerator.SqlGeneratorChain.generateSql(SqlGeneratorChain.java:30)
      8. liquibase.sqlgenerator.SqlGeneratorFactory.generateSql(SqlGeneratorFactory.java:208)
      9. liquibase.executor.AbstractExecutor.applyVisitors(AbstractExecutor.java:23)
      10. liquibase.executor.jvm.JdbcExecutor.access$500(JdbcExecutor.java:36)
      11. liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:304)
      12. liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
      13. liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122)
      14. liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:112)
      15. liquibase.changelog.StandardChangeLogHistoryService.setExecType(StandardChangeLogHistoryService.java:264)
      16. liquibase.database.AbstractJdbcDatabase.markChangeSetExecStatus(AbstractJdbcDatabase.java:1089)
      17. liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:50)
      18. liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:73)
      19. liquibase.Liquibase.update(Liquibase.java:200)
      20. liquibase.integration.commandline.Main.doMigration(Main.java:1032)
      21. liquibase.integration.commandline.Main.run(Main.java:177)
      22. liquibase.integration.commandline.Main.main(Main.java:96)
      22 frames