SvnRemoteList.listExternalItems中SVNKit Library 1.8.8中的java.lang.NullPointerException

时间:2015-10-26 13:56:40

标签: java svnkit

我们正在尝试使用SVNLogClient.doList获取文件列表并获得以下异常。

 ERROR SCR 2015-10-21 16:46:05 : Unknown exception occurred
 java.lang.NullPointerException     at
 org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteList.listExternalItems(SvnRemoteList.java:210)
    at
 org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteList.listExternals(SvnRemoteList.java:195)
    at
 org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteList.doList(SvnRemoteList.java:143)
    at
 org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteList.run(SvnRemoteList.java:43)
    at
 org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteList.run(SvnRemoteList.java:24)
    at
 org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
    at
 org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
    at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
    at
 org.tmatesoft.svn.core.wc.SVNLogClient.doList(SVNLogClient.java:1310)
    at
 org.tmatesoft.svn.core.wc.SVNLogClient.doList(SVNLogClient.java:1238)

任何想法可能是什么原因?

我正在使用的代码..

   <!-- language: lang-java -->

    --  Intialization Code.
    ISVNAuthenticationManager authManager = SVNWCUtil
            .createDefaultAuthenticationManager(login, this.password);
    -- Setting Authentication Manager
    repository.setAuthenticationManager(authManager);
    -- Intialilalizng Log Client
    SVNLogClient logClient = new SVNLogClient(authManager, null);

    SVNRepository repository = SVNRepositoryFactory.create(svnURL);
    if (repository instanceof DAVRepository) {
        ((DAVRepository) repository).setSpoolResponse(true);
    }
    -- Using a Event Handler
    ISVNDirEntryHandler handler = new DirEntryHandler(deletedItemRelPath,
            deletedFileMap);
    -- Calling the following method.
    logClient.doList(
            SVNURL.parseURIEncoded(repository.getRepositoryRoot(false)
                    + tempPath), SVNRevision.create(mostRecentRevision),
            SVNRevision.UNDEFINED, false, true, handler);

注意:这对所有文件都很好,但是当它涉及目录时,它会失败。

0 个答案:

没有答案