0

We are trying to get the list of files using SVNLogClient.doList and getting the following exception.

 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)

Any Idea what could be the reason for this ?

Code which I am using..

   <!-- 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);

Note: This is working very fine for all the files, but when it comes to Directory it fails.

Marek-A-
  • 474
  • 12
  • 29
Abhishek
  • 23
  • 8
  • 1
    do you have some code example? this is could be any incorrect initialization, which is not handled well in SVNLogClient – Marek-A- Oct 26 '15 at 14:04
  • I have added the snippet above if you could please look into it. – Abhishek Oct 27 '15 at 11:56
  • So you are using [doList method] (http://svnkit.com/javadoc/org/tmatesoft/svn/core/wc/SVNLogClient.html) and when you have set `recursive - true to descend recursively (relevant for directories)` it works well otherwise it fails as described above? – Marek-A- Nov 11 '15 at 12:20

0 Answers0