SVN indexing fails due to ClassCastException

Still need help?

The Atlassian Community is here for you.

Ask the community


Fisheye fails to index a SVN repository due to this error:

2013-06-04 15:57:57,319 DEBUG [SvnExecution300 ABC] fisheye SvnTask-run - Executing svn diff --summarize -r 32011:32012
2013-06-04 15:57:57,887 DEBUG [SvnExecution300 ABC] fisheye SvnTask-run - Executing svn proplist -r 32012
2013-06-04 15:57:58,222 DEBUG [IncrementalPinger1 ABC] fisheye BaseRevisionCache-withDbWriteLock - Rolling back for priority 40
2013-06-04 15:57:58,253 ERROR [IncrementalPinger1 ABC] fisheye BaseRepositoryScanner-handleSlurpException - Problem processing revisions from repo ABC due to class com.cenqua.fisheye.rep.RepositoryClientException - java.lang.ClassCastException: java.lang.String cannot be cast to [B
com.cenqua.fisheye.rep.RepositoryClientException: java.lang.ClassCastException: java.lang.String cannot be cast to [B
	at com.cenqua.fisheye.svn.SvnThrottledClient.executeNoThrottle(
	at com.cenqua.fisheye.svn.SvnThrottledClient.execute(
	at com.atlassian.fisheye.svn.Svn2Infill2Processor.getPathPropertiesFromSvn(
	at com.atlassian.fisheye.svn.Svn2Infill2Processor.getPropertyChanges(
	at com.atlassian.fisheye.svn.Svn2Infill2Processor.infillChangeSet(
	at com.atlassian.fisheye.svn.Svn2Infill2Processor.access$100(
	at com.atlassian.fisheye.svn.Svn2Infill2Processor$1.perform(
	at com.atlassian.fisheye.svn.Svn2Infill2Processor$1.perform(
	at com.cenqua.fisheye.cache.BaseRevisionCache.withDbWriteLock(
	at com.atlassian.fisheye.svn.Svn2Infill2Processor.process(
	at com.atlassian.fisheye.svn.Svn2Scanner.slurpRepository(
	at com.atlassian.fisheye.svn.Svn2Scanner.doSlurpTransaction(
	at com.cenqua.fisheye.rep.BaseRepositoryEngine.doSlurp(
	at com.cenqua.fisheye.rep.RepositoryEngine.slurp(
	at com.cenqua.fisheye.rep.RepositoryHandle.processPingRequests(
	at com.cenqua.fisheye.rep.RepositoryHandle.access$100(
	at com.cenqua.fisheye.rep.RepositoryHandle$
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
	at java.util.concurrent.ThreadPoolExecutor$
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to [B
	at com.atlassian.fisheye.svn.Svn2Infill2Processor$8.singlePath(
	at Method)
	at com.cenqua.fisheye.svn.SvnThrottledClient$
	at com.cenqua.fisheye.svn.SvnThrottledClient$
	at java.util.concurrent.FutureTask$Sync.innerRun(
	... 3 more


Fisheye is configured to use a Native SVN Client instead of the bundled SVNKit client. See  this explanation:


This is caused by an incompatible class change made to the ProlistCallback interface by the Subversion project. In the Subversion 1.6 version of the call back the interface is defined as:

public interface ProplistCallback
     * the method will be called for every line in a file.
     * @param path        the path.
     * @param properties  the properties on the path.
    public void singlePath(String path, Map properties);

In Subversion 1.7, the org.apache.subversion package was introduced and the interface definition changed to

public interface ProplistCallback
    extends org.apache.subversion.javahl.callback.ProplistCallback

This change is not backward compatible since the actual callback definition from the super interface in the new package is typed

public void singlePath(String path, Map<String, byte[]> properties);

Older versions (1.6 and older) of the native javahl library making the call back do not pass a map containing byte[] values but a map containing Strings. When Fisheye iterates the map, there is an implicit cast to (byte[]) to re-introduce the type information from the map. Old native code calls will generate a ClassCastException as they are passing Strings.



This issue has been reported and addressed in version 3.0.1:

FE-4679 - Getting issue details... STATUS

Last modified on Nov 2, 2018

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.