java.util.regex.PatternSyntaxException

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.

  • Perforce polling broken. No SCM triggered build are working and CI is effectively down. Below is the perforce polling log which is seemingly puking on the use of overlapping workspace chraracter "+" which has been working for us for months.. I use a workspace similiar to //depot/trunk/accounts-payable/... //jenkins-workspace/... +//depot/sandboxes/smacdonald/m3/accounts-payable/... //jenkins-workspace/... Note the "+" which is a legal character in perforce workspace and has been working fine for months up until recently.. I am unsure exactly when this started occurring, but have backed off my recent upgrade 1.426 back to 1.425 and its is still occurring. All my CI builds are currently broke. Polling Log... Started on Aug 17, 2011 3:27:47 PM Looking for changes... Using node: Jenkins Using master perforce client: jenkins_trunk_accounts-payable [.jenkins] $ /usr/bin/p4 workspace -o jenkins_trunk_accounts-payable [.jenkins] $ /usr/bin/p4 counter change [.jenkins] $ /usr/bin/p4 -s changes //jenkins_trunk_accounts-payable/...@41451,@41507 Latest submitted change selected by workspace is 41506 [.jenkins] $ /usr/bin/p4 describe -s 41506 [.jenkins] $ /usr/bin/p4 -G where //depot/sandboxes/smacdonald/m3/accounts-payable/pom.xml ERROR: Failed to record SCM polling java.util.regex.PatternSyntaxException: Dangling meta character '+' near index 0 +//depot/sandboxes/smacdonald/m3/accounts-payable/accounts-payable-db/.* ^ at java.util.regex.Pattern.error(Pattern.java:1713) at java.util.regex.Pattern.sequence(Pattern.java:1878) at java.util.regex.Pattern.expr(Pattern.java:1752) at java.util.regex.Pattern.compile(Pattern.java:1460) at java.util.regex.Pattern.<init>(Pattern.java:1133) at java.util.regex.Pattern.compile(Pattern.java:823) at hudson.plugins.perforce.PerforceSCM.doesFilenameMatchP4Pattern(PerforceSCM.java:1055) at hudson.plugins.perforce.PerforceSCM.doesFilenameMatchAnyP4Pattern(PerforceSCM.java:1043) at hudson.plugins.perforce.PerforceSCM.isChangelistExcluded(PerforceSCM.java:1022) at hudson.plugins.perforce.PerforceSCM.getCurrentDepotRevisionState(PerforceSCM.java:963) at hudson.plugins.perforce.PerforceSCM.compareRemoteRevisionWith(PerforceSCM.java:844) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:355) at hudson.scm.SCM.poll(SCM.java:372) at hudson.model.AbstractProject.poll(AbstractProject.java:1324) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:420) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:449) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)
    via by Scott MacDonald,
  • Perforce polling broken. No SCM triggered build are working and CI is effectively down. Below is the perforce polling log which is seemingly puking on the use of overlapping workspace chraracter "+" which has been working for us for months.. I use a workspace similiar to //depot/trunk/accounts-payable/... //jenkins-workspace/... +//depot/sandboxes/smacdonald/m3/accounts-payable/... //jenkins-workspace/... Note the "+" which is a legal character in perforce workspace and has been working fine for months up until recently.. I am unsure exactly when this started occurring, but have backed off my recent upgrade 1.426 back to 1.425 and its is still occurring. All my CI builds are currently broke. Polling Log... Started on Aug 17, 2011 3:27:47 PM Looking for changes... Using node: Jenkins Using master perforce client: jenkins_trunk_accounts-payable [.jenkins] $ /usr/bin/p4 workspace -o jenkins_trunk_accounts-payable [.jenkins] $ /usr/bin/p4 counter change [.jenkins] $ /usr/bin/p4 -s changes //jenkins_trunk_accounts-payable/...@41451,@41507 Latest submitted change selected by workspace is 41506 [.jenkins] $ /usr/bin/p4 describe -s 41506 [.jenkins] $ /usr/bin/p4 -G where //depot/sandboxes/smacdonald/m3/accounts-payable/pom.xml ERROR: Failed to record SCM polling java.util.regex.PatternSyntaxException: Dangling meta character '+' near index 0 +//depot/sandboxes/smacdonald/m3/accounts-payable/accounts-payable-db/.* ^ at java.util.regex.Pattern.error(Pattern.java:1713) at java.util.regex.Pattern.sequence(Pattern.java:1878) at java.util.regex.Pattern.expr(Pattern.java:1752) at java.util.regex.Pattern.compile(Pattern.java:1460) at java.util.regex.Pattern.<init>(Pattern.java:1133) at java.util.regex.Pattern.compile(Pattern.java:823) at hudson.plugins.perforce.PerforceSCM.doesFilenameMatchP4Pattern(PerforceSCM.java:1055) at hudson.plugins.perforce.PerforceSCM.doesFilenameMatchAnyP4Pattern(PerforceSCM.java:1043) at hudson.plugins.perforce.PerforceSCM.isChangelistExcluded(PerforceSCM.java:1022) at hudson.plugins.perforce.PerforceSCM.getCurrentDepotRevisionState(PerforceSCM.java:963) at hudson.plugins.perforce.PerforceSCM.compareRemoteRevisionWith(PerforceSCM.java:844) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:355) at hudson.scm.SCM.poll(SCM.java:372) at hudson.model.AbstractProject.poll(AbstractProject.java:1324) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:420) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:449) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)
    via by Scott MacDonald,
  • Hi there, It appears the "Poll Exclude File(s)" section of the Perforce plugin doesn't support build parameters. In my Perforce view configuration I'm quite happily using something like: //mydepot/${branch}/Engine/Include/Macros.h "//workspace/Engine/Include/Macros.h" where "branch" is a string parameter specified under the "This build is parameterized" option. However, if I enter the following in "Poll Exclude File(s)": //mydepot/${branch}/Engine/Tools/Source/StripELF/Readme_e.txt I get: {code} ERROR: Failed to record SCM polling java.util.regex.PatternSyntaxException: Illegal repetition near index 8 //mydepot/${branch}/Engine/Tools/Source/StripELF/Readme_e.txt ^ at java.util.regex.Pattern.error(Unknown Source) at java.util.regex.Pattern.closure(Unknown Source) at java.util.regex.Pattern.sequence(Unknown Source) at java.util.regex.Pattern.expr(Unknown Source) at java.util.regex.Pattern.compile(Unknown Source) at java.util.regex.Pattern.<init>(Unknown Source) at java.util.regex.Pattern.compile(Unknown Source) at hudson.plugins.perforce.PerforceSCM.doesFilenameMatchP4Pattern(PerforceSCM.java:1112) at hudson.plugins.perforce.PerforceSCM.doesFilenameMatchAnyP4Pattern(PerforceSCM.java:1100) at hudson.plugins.perforce.PerforceSCM.isChangelistExcluded(PerforceSCM.java:1079) at hudson.plugins.perforce.PerforceSCM.getCurrentDepotRevisionState(PerforceSCM.java:1020) at hudson.plugins.perforce.PerforceSCM.compareRemoteRevisionWith(PerforceSCM.java:900) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:356) at hudson.scm.SCM.poll(SCM.java:373) at hudson.model.AbstractProject.poll(AbstractProject.java:1326) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:420) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:449) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) {code} Can this be fixed please? Regards, Tom.
    via by Thomas Fields,
  • Hi there, It appears the "Poll Exclude File(s)" section of the Perforce plugin doesn't support build parameters. In my Perforce view configuration I'm quite happily using something like: //mydepot/${branch}/Engine/Include/Macros.h "//workspace/Engine/Include/Macros.h" where "branch" is a string parameter specified under the "This build is parameterized" option. However, if I enter the following in "Poll Exclude File(s)": //mydepot/${branch}/Engine/Tools/Source/StripELF/Readme_e.txt I get: {code} ERROR: Failed to record SCM polling java.util.regex.PatternSyntaxException: Illegal repetition near index 8 //mydepot/${branch}/Engine/Tools/Source/StripELF/Readme_e.txt ^ at java.util.regex.Pattern.error(Unknown Source) at java.util.regex.Pattern.closure(Unknown Source) at java.util.regex.Pattern.sequence(Unknown Source) at java.util.regex.Pattern.expr(Unknown Source) at java.util.regex.Pattern.compile(Unknown Source) at java.util.regex.Pattern.<init>(Unknown Source) at java.util.regex.Pattern.compile(Unknown Source) at hudson.plugins.perforce.PerforceSCM.doesFilenameMatchP4Pattern(PerforceSCM.java:1112) at hudson.plugins.perforce.PerforceSCM.doesFilenameMatchAnyP4Pattern(PerforceSCM.java:1100) at hudson.plugins.perforce.PerforceSCM.isChangelistExcluded(PerforceSCM.java:1079) at hudson.plugins.perforce.PerforceSCM.getCurrentDepotRevisionState(PerforceSCM.java:1020) at hudson.plugins.perforce.PerforceSCM.compareRemoteRevisionWith(PerforceSCM.java:900) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:356) at hudson.scm.SCM.poll(SCM.java:373) at hudson.model.AbstractProject.poll(AbstractProject.java:1326) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:420) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:449) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) {code} Can this be fixed please? Regards, Tom.
    via by Thomas Fields,
  • Invalid checkout Rule +=AAA
    via by Unknown author,
  • h3. Symptoms When Log Scanner runs, if it encounters an invalid RegEx it will throw a java.util.regex.PatternSyntaxException. {noformat} 2012-09-27 10:27:52,030 HerculesWorker_1 ERROR admin 627x88x1 1205bs4 172.20.6.95 /plugins/servlet/stp/view/hercules/execute [com.atlassian.sisyphus.SisyphusPattern] Failed to compile pattern 'After upgrade to JIRA 5, Activity Stream or another gadget/plugin doesn't work' at https://confluence.atlassian.com/pages/viewpage.action?pageId=298977954 java.util.regex.PatternSyntaxException: Dangling meta character '?' near index 0 ?.*(Caused\sby\:\sjava\.lang\.NoClassDefFoundError\:\scom\/opensymphony\/user\/User\;)|.*(java\.lang\.NoClassDefFoundError\:\scom\/opensymphony\/user\/User)|.*(Missing\sclass\:\scom\/opensymphony\/user\/User)|.*(java\.lang\.NoSuchMethodError\:.*com\/opensymphony\/user\/User)|.*(Caused\sby\:\sjava\.lang\.ClassNotFoundException\:\scom\.opensymphony\.user\.(User|Group)) ^ at java.util.regex.Pattern.error(Pattern.java:1713) at java.util.regex.Pattern.sequence(Pattern.java:1878) at java.util.regex.Pattern.expr(Pattern.java:1752) at java.util.regex.Pattern.compile(Pattern.java:1460) at java.util.regex.Pattern.<init>(Pattern.java:1133) at java.util.regex.Pattern.compile(Pattern.java:823) at com.atlassian.sisyphus.SisyphusPattern.compile(SisyphusPattern.java:82) at com.atlassian.sisyphus.SisyphusPattern.getPattern(SisyphusPattern.java:106) at com.atlassian.sisyphus.DefaultSisyphusPatternMatcher.matchAttachmentLine(DefaultSisyphusPatternMatcher.java:50) at com.atlassian.sisyphus.DefaultSisyphusPatternMatcher.match(DefaultSisyphusPatternMatcher.java:85) at com.atlassian.support.tools.hercules.SupportToolsHerculesScanAction$3.run(SupportToolsHerculesScanAction.java:210) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) 2012-09-27 10:27:52,107 HerculesWorker_1 ERROR admin 627x88x1 1205bs4 172.20.6.95 /plugins/servlet/stp/view/hercules/execute [com.atlassian.sisyphus.SisyphusPattern] Failed to compile pattern 'JIRA Keeps Asking for Login' at https://confluence.atlassian.com/display/JIRAKB/JIRA+Keeps+Asking+for+Login java.util.regex.PatternSyntaxException: Dangling meta character '?' near index 0 ? ^ at java.util.regex.Pattern.error(Pattern.java:1713) at java.util.regex.Pattern.sequence(Pattern.java:1878) at java.util.regex.Pattern.expr(Pattern.java:1752) at java.util.regex.Pattern.compile(Pattern.java:1460) at java.util.regex.Pattern.<init>(Pattern.java:1133) at java.util.regex.Pattern.compile(Pattern.java:823) at com.atlassian.sisyphus.SisyphusPattern.compile(SisyphusPattern.java:82) at com.atlassian.sisyphus.SisyphusPattern.getPattern(SisyphusPattern.java:106) at com.atlassian.sisyphus.DefaultSisyphusPatternMatcher.matchAttachmentLine(DefaultSisyphusPatternMatcher.java:50) at com.atlassian.sisyphus.DefaultSisyphusPatternMatcher.match(DefaultSisyphusPatternMatcher.java:85) at com.atlassian.support.tools.hercules.SupportToolsHerculesScanAction$3.run(SupportToolsHerculesScanAction.java:210) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) {noformat} h3. Workaround Use valid Regular Expressions.
    via by David Currie [Atlassian],
  • h3. Symptoms When Log Scanner runs, if it encounters an invalid RegEx it will throw a java.util.regex.PatternSyntaxException. {noformat} 2012-09-27 10:27:52,030 HerculesWorker_1 ERROR admin 627x88x1 1205bs4 172.20.6.95 /plugins/servlet/stp/view/hercules/execute [com.atlassian.sisyphus.SisyphusPattern] Failed to compile pattern 'After upgrade to JIRA 5, Activity Stream or another gadget/plugin doesn't work' at https://confluence.atlassian.com/pages/viewpage.action?pageId=298977954 java.util.regex.PatternSyntaxException: Dangling meta character '?' near index 0 ?.*(Caused\sby\:\sjava\.lang\.NoClassDefFoundError\:\scom\/opensymphony\/user\/User\;)|.*(java\.lang\.NoClassDefFoundError\:\scom\/opensymphony\/user\/User)|.*(Missing\sclass\:\scom\/opensymphony\/user\/User)|.*(java\.lang\.NoSuchMethodError\:.*com\/opensymphony\/user\/User)|.*(Caused\sby\:\sjava\.lang\.ClassNotFoundException\:\scom\.opensymphony\.user\.(User|Group)) ^ at java.util.regex.Pattern.error(Pattern.java:1713) at java.util.regex.Pattern.sequence(Pattern.java:1878) at java.util.regex.Pattern.expr(Pattern.java:1752) at java.util.regex.Pattern.compile(Pattern.java:1460) at java.util.regex.Pattern.<init>(Pattern.java:1133) at java.util.regex.Pattern.compile(Pattern.java:823) at com.atlassian.sisyphus.SisyphusPattern.compile(SisyphusPattern.java:82) at com.atlassian.sisyphus.SisyphusPattern.getPattern(SisyphusPattern.java:106) at com.atlassian.sisyphus.DefaultSisyphusPatternMatcher.matchAttachmentLine(DefaultSisyphusPatternMatcher.java:50) at com.atlassian.sisyphus.DefaultSisyphusPatternMatcher.match(DefaultSisyphusPatternMatcher.java:85) at com.atlassian.support.tools.hercules.SupportToolsHerculesScanAction$3.run(SupportToolsHerculesScanAction.java:210) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) 2012-09-27 10:27:52,107 HerculesWorker_1 ERROR admin 627x88x1 1205bs4 172.20.6.95 /plugins/servlet/stp/view/hercules/execute [com.atlassian.sisyphus.SisyphusPattern] Failed to compile pattern 'JIRA Keeps Asking for Login' at https://confluence.atlassian.com/display/JIRAKB/JIRA+Keeps+Asking+for+Login java.util.regex.PatternSyntaxException: Dangling meta character '?' near index 0 ? ^ at java.util.regex.Pattern.error(Pattern.java:1713) at java.util.regex.Pattern.sequence(Pattern.java:1878) at java.util.regex.Pattern.expr(Pattern.java:1752) at java.util.regex.Pattern.compile(Pattern.java:1460) at java.util.regex.Pattern.<init>(Pattern.java:1133) at java.util.regex.Pattern.compile(Pattern.java:823) at com.atlassian.sisyphus.SisyphusPattern.compile(SisyphusPattern.java:82) at com.atlassian.sisyphus.SisyphusPattern.getPattern(SisyphusPattern.java:106) at com.atlassian.sisyphus.DefaultSisyphusPatternMatcher.matchAttachmentLine(DefaultSisyphusPatternMatcher.java:50) at com.atlassian.sisyphus.DefaultSisyphusPatternMatcher.match(DefaultSisyphusPatternMatcher.java:85) at com.atlassian.support.tools.hercules.SupportToolsHerculesScanAction$3.run(SupportToolsHerculesScanAction.java:210) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) {noformat} h3. Workaround Use valid Regular Expressions.
    via by David Currie [Atlassian],
  • Exception when replacing brackets
    via Stack Overflow by Kewitschka
    ,
    • java.util.regex.PatternSyntaxException: Dangling meta character '+' near index 0 +//depot/sandboxes/smacdonald/m3/accounts-payable/accounts-payable-db/.* ^ at java.util.regex.Pattern.error(Pattern.java:1713) at java.util.regex.Pattern.sequence(Pattern.java:1878) at java.util.regex.Pattern.expr(Pattern.java:1752) at java.util.regex.Pattern.compile(Pattern.java:1460) at java.util.regex.Pattern.<init>(Pattern.java:1133) at java.util.regex.Pattern.compile(Pattern.java:823) at hudson.plugins.perforce.PerforceSCM.doesFilenameMatchP4Pattern(PerforceSCM.java:1055) at hudson.plugins.perforce.PerforceSCM.doesFilenameMatchAnyP4Pattern(PerforceSCM.java:1043) at hudson.plugins.perforce.PerforceSCM.isChangelistExcluded(PerforceSCM.java:1022) at hudson.plugins.perforce.PerforceSCM.getCurrentDepotRevisionState(PerforceSCM.java:963) at hudson.plugins.perforce.PerforceSCM.compareRemoteRevisionWith(PerforceSCM.java:844) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:355) at hudson.scm.SCM.poll(SCM.java:372) at hudson.model.AbstractProject.poll(AbstractProject.java:1324) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:420) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:449) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)

    Users with the same issue

    Andreas Häber
    1 times, last one,
    Dunmer
    14 times, last one,
    aldrinleal
    1 times, last one,
    jstrayer
    2 times, last one,
    Handemelindo
    1 times, last one,
    23 more bugmates