Inital Scan of Perforce Repository Fails with A NumberFormatException
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Problem
An error occurs for the same revision even if the scan is restarted:
1
2
3
4
5
6
7
8
9
2008-07-24 10:21:14,826 DEBUG [pool-2-thread-1] fisheye.app P4Process-finish - Exception processing command c:\program files\perforce\p4.exe -p <host>:1666 -u <username> -ztag changes -l //depot/...@10,210
java.lang.NumberFormatException: For input string: "comment blah comment more comment"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Long.parseLong(Long.java:403)
at java.lang.Long.parseLong(Long.java:461)
at com.cenqua.fisheye.perforce.client.P4Client$3.processGroup(P4Client.java:115)
at com.cenqua.fisheye.perforce.client.P4Exec$6.processLine(P4Exec.java:328)
at com.cenqua.fisheye.perforce.client.P4OutputLineProcessor.processOutput(P4OutputLineProcessor.java:36)
at com.cenqua.fisheye.perforce.client.P4Exec$4.processOutput(P4Exec.java:186)
Diagnosis
Diagnostic Steps
Run the following command outside of Fisheye:
1
c:\program files\perforce\p4.exe -p <host>:1666 -u <username> -ztag changes -l //depot/...@10,210
An output similar to below will be produced:
1 2 3 4 5 6 7 8
... change 100 ... time 1124169874 ... user parthak ... client ATLASSIAN ... status submitted ... desc Some description ba, bla, blah ... change comment blah comment more comment
Run the same command without the
-ztag
parameter:1
c:\program files\perforce\p4.exe -p <host>:1666 -u <username> changes -l //depot/...@10,210
The command above will produce the following output:
1 2 3 4 5
Change 100 on 2005/08/15 by parthak@ATLASSIAN Some description ba, bla, blah ... change comment blah comment more comment
Notice the comment has the following "... change" String.
Cause
Fisheye sends the -ztag
parameter to perforce and processes the output. The "... change"
string is usually followed by a revision number, but in the case above it is included in the comment and followed by some comments. When Fisheye tries to process the result, it throws a NumberFormatException
because it was actually given a string while expecting for a numerical result.
Solution
Resolution
Modify the comment to remove the "... change" string or modify it to prevent it from being processed.
For the case above, run the command below and modify the comment:
1
c:\program files\perforce\p4.exe -p <host>:1666 -u <username> change -f 100
Was this helpful?