changelist.com.tek42.perforce.PerforceException: Failed to retrieve changelist.

Jenkins JIRA | vkolapan | 6 years ago
  1. 0

    I'm relatively new to Hudson. There is a particular job that would fail out with the below shown exception but the other jobs would not. This happens with a hit rate of 100% and not an one-off issue. I fear it could be due to a erroneous string parsing while going through the output of 'p4 describe'. If I change the "last changelist to track' to the latest changelist so as to avoid a lot of 'p4 describe' tasks and as expected it just goes through fine. If the above speculaion is true then is there a way to track down using hudson logs(where would this be?) on which string does this happen? Caught exception communicating with perforce. Failed to retrieve changelist.com.tek42.perforce.PerforceException: Failed to retrieve changelist. at com.tek42.perforce.parse.ChangelistBuilder.build(ChangelistBuilder.java:185) at com.tek42.perforce.parse.Changes.getChangelist(Changes.java:63) at com.tek42.perforce.parse.Changes.getChangelistsFromNumbers(Changes.java:381) at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:565) at hudson.model.AbstractProject.checkout(AbstractProject.java:1116) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411) at hudson.model.Run.run(Run.java:1324) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:139) Caused by: java.util.NoSuchElementException at java.util.StringTokenizer.nextToken(StringTokenizer.java:332) at com.tek42.perforce.parse.ChangelistBuilder.build(ChangelistBuilder.java:95) ... 10 more ERROR: Unable to communicate with perforce. Failed to retrieve changelist.

    Jenkins JIRA | 6 years ago | vkolapan
    changelist.com.tek42.perforce.PerforceException: Failed to retrieve changelist.
  2. 0

    I'm relatively new to Hudson. There is a particular job that would fail out with the below shown exception but the other jobs would not. This happens with a hit rate of 100% and not an one-off issue. I fear it could be due to a erroneous string parsing while going through the output of 'p4 describe'. If I change the "last changelist to track' to the latest changelist so as to avoid a lot of 'p4 describe' tasks and as expected it just goes through fine. If the above speculaion is true then is there a way to track down using hudson logs(where would this be?) on which string does this happen? Caught exception communicating with perforce. Failed to retrieve changelist.com.tek42.perforce.PerforceException: Failed to retrieve changelist. at com.tek42.perforce.parse.ChangelistBuilder.build(ChangelistBuilder.java:185) at com.tek42.perforce.parse.Changes.getChangelist(Changes.java:63) at com.tek42.perforce.parse.Changes.getChangelistsFromNumbers(Changes.java:381) at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:565) at hudson.model.AbstractProject.checkout(AbstractProject.java:1116) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411) at hudson.model.Run.run(Run.java:1324) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:139) Caused by: java.util.NoSuchElementException at java.util.StringTokenizer.nextToken(StringTokenizer.java:332) at com.tek42.perforce.parse.ChangelistBuilder.build(ChangelistBuilder.java:95) ... 10 more ERROR: Unable to communicate with perforce. Failed to retrieve changelist.

    Jenkins JIRA | 6 years ago | vkolapan
    changelist.com.tek42.perforce.PerforceException: Failed to retrieve changelist.
  3. 0

    The Hudson perforce plug-in is currently throwing exceptions for any changelists which contain "reserved" text in the changelist description. This appears to be introduced by the p4v client when creating changelist descriptions. Here is an example of a changelist which contains the problem (i.e. containing "Jobs fixed ..." in the changelist description): ===== begin output of "p4 describe -s 470718 ===== Change 470718 by someuser@someclient on 2010/10/01 15:32:59 Additional logic for org assoc validations at doc import time. Jobs fixed ... Jobs fixed ... SDRLS98139 on 2010/10/01 by pdbugs *closed* Affected files ... ... //depotxyz/fileabc#6 edit ====== end output of "p4 describe -s 470718 ====== In this case, the Hudson perforce plug-in fails and throws an exception: 18:16:46 [5.5_Continuous_Build] $ /usr/local/bin/p4 describe -s 470718 18:16:46 Caught exception communicating with perforce. Failed to retrieve changelist.com.tek42.perforce.PerforceException: Failed to retrieve changelist. 18:16:46 at com.tek42.perforce.parse.ChangelistBuilder.build(ChangelistBuilder.java:185) 18:16:46 at com.tek42.perforce.parse.Changes.getChangelist(Changes.java:63) 18:16:46 at com.tek42.perforce.parse.Changes.getChangelistsFromNumbers(Changes.java:381) 18:16:46 at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:552) 18:16:46 at hudson.model.AbstractProject.checkout(AbstractProject.java:1082) 18:16:46 at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479) 18:16:46 at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411) 18:16:46 at hudson.model.Run.run(Run.java:1273) 18:16:46 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) 18:16:46 at hudson.model.ResourceController.execute(ResourceController.java:88) 18:16:46 at hudson.model.Executor.run(Executor.java:137) 18:16:46 Caused by: java.util.NoSuchElementException 18:16:46 at java.util.StringTokenizer.nextToken(StringTokenizer.java:332) 18:16:46 at com.tek42.perforce.parse.ChangelistBuilder.build(ChangelistBuilder.java:120) 18:16:46 ... 10 more The problem exists because the StringTokenizer used inside the ChangelistBuilder class also considers tabs as a delimiter when parsing the output of the "p4 describe" command. This means that the parser is incapable of using the indenting provided by the "p4 describe" output to distinguish between keywords generated by the Perforce server and keyword text that is part of the changelist description. Steps to reproduce: 1) Create a changelist which contains "Jobs fixed ..." within the changelist description 2) Create a Hudson job which syncs from Perforce (i.e. Poll SCM) When the job attempts to obtain changelist information for the changelist which contains "Jobs fixed ..." in the changelist description, it will throw an exception and will fail to advance to the next changelist. This effectively causes the job to continually fail at the same point, unable to obtain information about subsequent changelists.

    Jenkins JIRA | 6 years ago | sstafford
    changelist.com.tek42.perforce.PerforceException: Failed to retrieve changelist.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    The Hudson perforce plug-in is currently throwing exceptions for any changelists which contain "reserved" text in the changelist description. This appears to be introduced by the p4v client when creating changelist descriptions. Here is an example of a changelist which contains the problem (i.e. containing "Jobs fixed ..." in the changelist description): ===== begin output of "p4 describe -s 470718 ===== Change 470718 by someuser@someclient on 2010/10/01 15:32:59 Additional logic for org assoc validations at doc import time. Jobs fixed ... Jobs fixed ... SDRLS98139 on 2010/10/01 by pdbugs *closed* Affected files ... ... //depotxyz/fileabc#6 edit ====== end output of "p4 describe -s 470718 ====== In this case, the Hudson perforce plug-in fails and throws an exception: 18:16:46 [5.5_Continuous_Build] $ /usr/local/bin/p4 describe -s 470718 18:16:46 Caught exception communicating with perforce. Failed to retrieve changelist.com.tek42.perforce.PerforceException: Failed to retrieve changelist. 18:16:46 at com.tek42.perforce.parse.ChangelistBuilder.build(ChangelistBuilder.java:185) 18:16:46 at com.tek42.perforce.parse.Changes.getChangelist(Changes.java:63) 18:16:46 at com.tek42.perforce.parse.Changes.getChangelistsFromNumbers(Changes.java:381) 18:16:46 at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:552) 18:16:46 at hudson.model.AbstractProject.checkout(AbstractProject.java:1082) 18:16:46 at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479) 18:16:46 at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411) 18:16:46 at hudson.model.Run.run(Run.java:1273) 18:16:46 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) 18:16:46 at hudson.model.ResourceController.execute(ResourceController.java:88) 18:16:46 at hudson.model.Executor.run(Executor.java:137) 18:16:46 Caused by: java.util.NoSuchElementException 18:16:46 at java.util.StringTokenizer.nextToken(StringTokenizer.java:332) 18:16:46 at com.tek42.perforce.parse.ChangelistBuilder.build(ChangelistBuilder.java:120) 18:16:46 ... 10 more The problem exists because the StringTokenizer used inside the ChangelistBuilder class also considers tabs as a delimiter when parsing the output of the "p4 describe" command. This means that the parser is incapable of using the indenting provided by the "p4 describe" output to distinguish between keywords generated by the Perforce server and keyword text that is part of the changelist description. Steps to reproduce: 1) Create a changelist which contains "Jobs fixed ..." within the changelist description 2) Create a Hudson job which syncs from Perforce (i.e. Poll SCM) When the job attempts to obtain changelist information for the changelist which contains "Jobs fixed ..." in the changelist description, it will throw an exception and will fail to advance to the next changelist. This effectively causes the job to continually fail at the same point, unable to obtain information about subsequent changelists.

    Jenkins JIRA | 6 years ago | sstafford
    changelist.com.tek42.perforce.PerforceException: Failed to retrieve changelist.
  6. 0

    last column has nulls error

    GitHub | 4 years ago | larryhengl
    java.util.NoSuchElementException

  1. sagar 7 times, last 9 months ago
5 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.util.NoSuchElementException

    No message provided

    at java.util.StringTokenizer.nextToken()
  2. Java RT
    StringTokenizer.nextToken
    1. java.util.StringTokenizer.nextToken(StringTokenizer.java:332)
    1 frame
  3. com.tek42.perforce
    Changes.getChangelistsFromNumbers
    1. com.tek42.perforce.parse.ChangelistBuilder.build(ChangelistBuilder.java:95)
    2. com.tek42.perforce.parse.Changes.getChangelist(Changes.java:63)
    3. com.tek42.perforce.parse.Changes.getChangelistsFromNumbers(Changes.java:381)
    3 frames
  4. hudson.plugins.perforce
    PerforceSCM.checkout
    1. hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:565)
    1 frame
  5. Hudson
    Executor.run
    1. hudson.model.AbstractProject.checkout(AbstractProject.java:1116)
    2. hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
    3. hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
    4. hudson.model.Run.run(Run.java:1324)
    5. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    6. hudson.model.ResourceController.execute(ResourceController.java:88)
    7. hudson.model.Executor.run(Executor.java:139)
    7 frames