svn: Processing REPORT request response failed: XML document structures must start and end within the same entity
問題
Indexing an SVN repository fails with the following error:
ERROR [InitPing1 < repository_name>] fisheye BaseRepositoryScanner-handleSlurpException - Problem processing revisions from repo < repository_name> due to class com.cenqua.fisheye.rep.RepositoryClientException - org.tigris.subversion.javahl.ClientException: svn: Processing REPORT request response failed: XML document structures must start and end within the same entity. (<PATH_TO_FILE>)
svn: REPORT request failed on '<PATH_TO_FILE>'
com.cenqua.fisheye.rep.RepositoryClientException: org.tigris.subversion.javahl.ClientException: svn: Processing REPORT request response failed: XML document structures must start and end within the same entity. (<PATH_TO_FILE>)
svn: REPORT request failed on '<PATH_TO_FILE>'
...
Caused by: org.tigris.subversion.javahl.ClientException: svn: Processing REPORT request response failed: XML document structures must start and end within the same entity. (<PATH_TO_FILE>)
svn: REPORT request failed on '<PATH_TO_FILE>'
...
Caused by: org.tmatesoft.svn.core.SVNException: svn: Processing REPORT request response failed: XML document structures must start and end within the same entity. (<PATH_TO_FILE>)
svn: REPORT request failed on '<PATH_TO_FILE>'
原因
SVNKit is failing to retrieve the entire response from the SVN server.
This may be caused by the following options.
Cause #1 - Authentication
SVNKit is using negotiated authentication rather than Basic Authentication.
Cause #2 - Connection truncated
The connection from SVNKit to the svn server is truncated.
This is usually the case when the changeset to be indexed is significantly big.
ソリューション
Resolution for Cause #1 - Authentication
- Force SVNKit to use Basic Authentication by setting the system property
-Dsvnkit.http.methods=Basic
(in addition to any system properties that are already provided via that environment variable) inFISHEYE_OPTS
(see Environment variables for reference). - Restart Fisheye/Crucible
Resolution for Cause #2 - Connection truncated
- Add the
-Dsvnkit.http.spoolDirectory=<path_to_a_temporary_folder>
in the FISHEYE_OPTS (see Environment variables for reference). For example:
-Dsvnkit.http.spoolDirectory=/tmp/fisheye/spooldirectory
- Restart Fisheye/Crucible
If your Fisheye instance is started as a Windows service, the Windows Environment Variables are not picked and these settings need to be adjusted in the service. Therefore, can you please try the following steps:
- Stop the FishEye/Crucible instance;
- Go to Windows Start Menu > All Programs > FishEye > Configure FishEye. If you can't find this, please do as follows:
- Go to the FishEye Windows service properties, in order to determine its Service Name;
- Using Command Prompt, go to <FishEye Installation Directory>\bin;
- Run prunmgr.exe "//ES//Fisheye" or prunmgr.exe "//ES//Atlassian Fisheye" or prunmgr.exe "//ES//Atlassian Crucible", depending on the Service Name determined right above.
- In the Atlassian FeCru Properties window, go to Java tab;
Configure the parameters:
-Dsvnkit.http.methods=Basic -Dsvnkit.http.spoolDirectory=c:\Atlassian\spoolDirectory
- Close the Atlassian FeCru Properties window;
- Start the FishEye/Crucible service.
Alternative resolution
Alternatively, the Native Subversion Client can be used instead.