0

I have been using the following macro (as suggested here The svn client 'svnkit' is not available) to let Jenkins create a tag from a branch in a subversion repository and it has been working fine.

<macrodef name="branch2tag">
    <attribute name="src"/>
    <attribute name="dest"/>
    <sequential>
        <java classname="org.tmatesoft.svn.cli.SVN" fork="true" classpathref="test.classpath.dep">
            <arg value="--non-interactive"/>
            <arg line="--username ${user}"/>
            <arg line="--password ${password}"/>
            <arg value="copy"/>
            <arg value="@{src}"/>
            <arg value="@{dest}"/>
            <arg value="-m"/>
            <arg value="&quot;Created by Jenkins&quot;"/>
        </java>
    </sequential>
</macrodef>

A few days ago it started throwing an exception and I have no idea why.

 [java] May 27, 2013 11:41:46 AM org.tmatesoft.svn.core.internal.util.DefaultSVNDebugLogger log
 [java] SEVERE: CLI: null
 [java] java.lang.NullPointerException
 [java]     at org.tmatesoft.svn.core.internal.wc.SVNCopyDriver.copyWCToRepos(SVNCopyDriver.java:672)
 [java]     at org.tmatesoft.svn.core.internal.wc.SVNCopyDriver.setupCopy(SVNCopyDriver.java:621)
 [java]     at org.tmatesoft.svn.core.internal.wc16.SVNCopyClient16.doCopy(SVNCopyClient16.java:440)
 [java]     at org.tmatesoft.svn.core.internal.wc2.old.SvnOldRemoteCopy.run(SvnOldRemoteCopy.java:52)
 [java]     at org.tmatesoft.svn.core.internal.wc2.old.SvnOldRemoteCopy.run(SvnOldRemoteCopy.java:15)
 [java]     at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:20)
 [java]     at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
 [java]     at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:291)
 [java]     at org.tmatesoft.svn.core.wc2.SvnRemoteCopy.run(SvnRemoteCopy.java:227)
 [java]     at org.tmatesoft.svn.core.wc.SVNCopyClient.doCopy(SVNCopyClient.java:480)
 [java]     at org.tmatesoft.svn.cli.svn.SVNCopyCommand.run(SVNCopyCommand.java:99)
 [java]     at org.tmatesoft.svn.cli.AbstractSVNCommandEnvironment.run(AbstractSVNCommandEnvironment.java:142)
 [java]     at org.tmatesoft.svn.cli.AbstractSVNLauncher.run(AbstractSVNLauncher.java:79)
 [java]     at org.tmatesoft.svn.cli.svn.SVN.main(SVN.java:26)
 [java]     at org.tmatesoft.svn.cli.SVN.main(SVN.java:22)
 [java] java.lang.NullPointerException
 [java]     at org.tmatesoft.svn.core.internal.wc.SVNCopyDriver.copyWCToRepos(SVNCopyDriver.java:672)
 [java]     at org.tmatesoft.svn.core.internal.wc.SVNCopyDriver.setupCopy(SVNCopyDriver.java:621)
 [java]     at org.tmatesoft.svn.core.internal.wc16.SVNCopyClient16.doCopy(SVNCopyClient16.java:440)
 [java]     at org.tmatesoft.svn.core.internal.wc2.old.SvnOldRemoteCopy.run(SvnOldRemoteCopy.java:52)
 [java]     at org.tmatesoft.svn.core.internal.wc2.old.SvnOldRemoteCopy.run(SvnOldRemoteCopy.java:15)
 [java]     at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:20)
 [java]     at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
 [java]     at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:291)
 [java]     at org.tmatesoft.svn.core.wc2.SvnRemoteCopy.run(SvnRemoteCopy.java:227)
 [java]     at org.tmatesoft.svn.core.wc.SVNCopyClient.doCopy(SVNCopyClient.java:480)
 [java]     at org.tmatesoft.svn.cli.svn.SVNCopyCommand.run(SVNCopyCommand.java:99)
 [java]     at org.tmatesoft.svn.cli.AbstractSVNCommandEnvironment.run(AbstractSVNCommandEnvironment.java:142)
 [java]     at org.tmatesoft.svn.cli.AbstractSVNLauncher.run(AbstractSVNLauncher.java:79)
 [java]     at org.tmatesoft.svn.cli.svn.SVN.main(SVN.java:26)
 [java]     at org.tmatesoft.svn.cli.SVN.main(SVN.java:22)
 [java] Java Result: 1

My first thought was to check that no changes had been made to the server that hosts Jenkins because it looked to me like svnkit could not find the subversion executables. But the executables are available to the Jenkins user.

Does someone have an idea what could be the cause of this?

Community
  • 1
  • 1
jkc
  • 142
  • 1
  • 2
  • 13
  • The SVNKit source code is [freely available](http://svn.svnkit.com/repos/svnkit/tags/). After matching your version of SVNKit with the source code version, you can look up line 672 of SVNCopyDriver.java to see if there is an obvious reason for the NullPointerException. – Chad Nouis May 28 '13 at 13:47
  • I tried that and it was the reason that I thought it was a problem with the executables. – jkc May 29 '13 at 15:44
  • I located the problem. I had made a change to the target that calls the macro. The result was that [src] wasn't correct, actually [src] was set to e.g. [3.5.0] instead of the full URL to the branch e.g. [https://[server:port]/branches/3.5.0]. It looks like there could be a bug in SVNkit because it breaks and throws an NullPointerException. I will report this to the SVNkit issue tracker. – jkc Jun 03 '13 at 16:32

0 Answers0