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.

  • A workspace mapping containing a variable reference (example and log output below) will fail to poll for changes due to the variable not getting resolved. Manually running the build will properly resolve the variable and update the workspace view. However, when a poll is executed, the workspace view is replaced with the raw template that does not have the variable's value inserted. The variable is defined using the standard Jenkins environment variable plugin. Example: //tools/sun/jdk1.8.0_45/${JAVA_PLATFORM}/... //CLIENT_NAME/tools/${JAVA_PLATFORM}/... Poll Log: {code} Started on Jul 22, 2015 3:27:00 PM Looking for changes... Using master Read ClientSpec from: //x/java/JRX/trunk/p4client.functest.view Using master perforce client: jenkins-rxa-x64-trunk-install-windows-8-64 Read ClientSpec from: //x/java/JRX/trunk/p4client.functest.view Warning: Client Spec line invalid, ignoring. (View:) Latest submitted change selected by workspace is 889214 ERROR: Failed to record SCM polling for hudson.model.FreeStyleProject@37d2f[rxa-x64-trunk-install-windows-8-64] java.util.regex.PatternSyntaxException: Illegal repetition near index 44 //x/java/JRX/trunk/testFunc/xinstall/tools/\${JAVA_PLATFORM}/(.*) ^ 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.PerforceSCMHelper.getTokenPattern(PerforceSCMHelper.java:218) at hudson.plugins.perforce.PerforceSCMHelper.doesPathMatchView(PerforceSCMHelper.java:198) at hudson.plugins.perforce.PerforceSCMHelper.mapToWorkspace(PerforceSCMHelper.java:184) at com.tek42.perforce.parse.Changes.getWorkspacePathForFile(Changes.java:98) at com.tek42.perforce.parse.Changes.calculateWorkspacePaths(Changes.java:92) at com.tek42.perforce.parse.Changes.getChangelist(Changes.java:74) at hudson.plugins.perforce.PerforceSCM.getCurrentDepotRevisionState(PerforceSCM.java:1354) at hudson.plugins.perforce.PerforceSCM.compareRemoteRevisionWith(PerforceSCM.java:1234) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:357) at hudson.scm.SCM.poll(SCM.java:374) at hudson.model.AbstractProject._poll(AbstractProject.java:1427) at hudson.model.AbstractProject.poll(AbstractProject.java:1330) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:466) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:495) 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.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) {code}
    via by Jason Archer,
  • A workspace mapping containing a variable reference (example and log output below) will fail to poll for changes due to the variable not getting resolved. Manually running the build will properly resolve the variable and update the workspace view. However, when a poll is executed, the workspace view is replaced with the raw template that does not have the variable's value inserted. The variable is defined using the standard Jenkins environment variable plugin. Example: //tools/sun/jdk1.8.0_45/${JAVA_PLATFORM}/... //CLIENT_NAME/tools/${JAVA_PLATFORM}/... Poll Log: {code} Started on Jul 22, 2015 3:27:00 PM Looking for changes... Using master Read ClientSpec from: //x/java/JRX/trunk/p4client.functest.view Using master perforce client: jenkins-rxa-x64-trunk-install-windows-8-64 Read ClientSpec from: //x/java/JRX/trunk/p4client.functest.view Warning: Client Spec line invalid, ignoring. (View:) Latest submitted change selected by workspace is 889214 ERROR: Failed to record SCM polling for hudson.model.FreeStyleProject@37d2f[rxa-x64-trunk-install-windows-8-64] java.util.regex.PatternSyntaxException: Illegal repetition near index 44 //x/java/JRX/trunk/testFunc/xinstall/tools/\${JAVA_PLATFORM}/(.*) ^ 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.PerforceSCMHelper.getTokenPattern(PerforceSCMHelper.java:218) at hudson.plugins.perforce.PerforceSCMHelper.doesPathMatchView(PerforceSCMHelper.java:198) at hudson.plugins.perforce.PerforceSCMHelper.mapToWorkspace(PerforceSCMHelper.java:184) at com.tek42.perforce.parse.Changes.getWorkspacePathForFile(Changes.java:98) at com.tek42.perforce.parse.Changes.calculateWorkspacePaths(Changes.java:92) at com.tek42.perforce.parse.Changes.getChangelist(Changes.java:74) at hudson.plugins.perforce.PerforceSCM.getCurrentDepotRevisionState(PerforceSCM.java:1354) at hudson.plugins.perforce.PerforceSCM.compareRemoteRevisionWith(PerforceSCM.java:1234) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:357) at hudson.scm.SCM.poll(SCM.java:374) at hudson.model.AbstractProject._poll(AbstractProject.java:1427) at hudson.model.AbstractProject.poll(AbstractProject.java:1330) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:466) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:495) 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.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) {code}
    via by Jason Archer,
  • Currently getting an error when a stream name has a dash in the name of such as "my-stream": java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence at java.util.regex.Pattern.error(Pattern.java:1924) at java.util.regex.Pattern.escape(Pattern.java:2416) at java.util.regex.Pattern.atom(Pattern.java:2164) at java.util.regex.Pattern.sequence(Pattern.java:2046) at java.util.regex.Pattern.expr(Pattern.java:1964) at java.util.regex.Pattern.compile(Pattern.java:1665) at java.util.regex.Pattern.<init>(Pattern.java:1337) at java.util.regex.Pattern.compile(Pattern.java:1022) at hudson.plugins.perforce.PerforceSCMHelper.getTokenPattern(PerforceSCMHelper.java:220) at hudson.plugins.perforce.PerforceSCMHelper.doesPathMatchView(PerforceSCMHelper.java:196) at hudson.plugins.perforce.PerforceSCMHelper.mapToWorkspace(PerforceSCMHelper.java:182) at com.tek42.perforce.parse.Changes.getWorkspacePathForFile(Changes.java:96) at com.tek42.perforce.parse.Changes.calculateWorkspacePaths(Changes.java:90) at com.tek42.perforce.parse.Changes.getChangelist(Changes.java:72) at com.tek42.perforce.parse.Changes.getChangelistsFromNumbers(Changes.java:431) at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:1073) at hudson.model.AbstractProject.checkout(AbstractProject.java:1277) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408)
    via by Michael Graessle,
  • Currently getting an error when a stream name has a dash in the name of such as "my-stream": java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence at java.util.regex.Pattern.error(Pattern.java:1924) at java.util.regex.Pattern.escape(Pattern.java:2416) at java.util.regex.Pattern.atom(Pattern.java:2164) at java.util.regex.Pattern.sequence(Pattern.java:2046) at java.util.regex.Pattern.expr(Pattern.java:1964) at java.util.regex.Pattern.compile(Pattern.java:1665) at java.util.regex.Pattern.<init>(Pattern.java:1337) at java.util.regex.Pattern.compile(Pattern.java:1022) at hudson.plugins.perforce.PerforceSCMHelper.getTokenPattern(PerforceSCMHelper.java:220) at hudson.plugins.perforce.PerforceSCMHelper.doesPathMatchView(PerforceSCMHelper.java:196) at hudson.plugins.perforce.PerforceSCMHelper.mapToWorkspace(PerforceSCMHelper.java:182) at com.tek42.perforce.parse.Changes.getWorkspacePathForFile(Changes.java:96) at com.tek42.perforce.parse.Changes.calculateWorkspacePaths(Changes.java:90) at com.tek42.perforce.parse.Changes.getChangelist(Changes.java:72) at com.tek42.perforce.parse.Changes.getChangelistsFromNumbers(Changes.java:431) at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:1073) at hudson.model.AbstractProject.checkout(AbstractProject.java:1277) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408)
    via by Michael Graessle,
  • 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,
  • Java Regex building
    via Stack Overflow by Sujatha Kannan
    ,
    • java.util.regex.PatternSyntaxException: Illegal repetition near index 44 //x/java/JRX/trunk/testFunc/xinstall/tools/\${JAVA_PLATFORM}/(.*) ^ 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.PerforceSCMHelper.getTokenPattern(PerforceSCMHelper.java:218) at hudson.plugins.perforce.PerforceSCMHelper.doesPathMatchView(PerforceSCMHelper.java:198) at hudson.plugins.perforce.PerforceSCMHelper.mapToWorkspace(PerforceSCMHelper.java:184) at com.tek42.perforce.parse.Changes.getWorkspacePathForFile(Changes.java:98) at com.tek42.perforce.parse.Changes.calculateWorkspacePaths(Changes.java:92) at com.tek42.perforce.parse.Changes.getChangelist(Changes.java:74) at hudson.plugins.perforce.PerforceSCM.getCurrentDepotRevisionState(PerforceSCM.java:1354) at hudson.plugins.perforce.PerforceSCM.compareRemoteRevisionWith(PerforceSCM.java:1234) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:357) at hudson.scm.SCM.poll(SCM.java:374) at hudson.model.AbstractProject._poll(AbstractProject.java:1427) at hudson.model.AbstractProject.poll(AbstractProject.java:1330) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:466) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:495) 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.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

    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