[JIRA] [subversion-plugin] (JENKINS-32169) NPE in Subversion Plug-in 2.5.5

26 views
Skip to first unread message

sven.steiniger@gmx.de (JIRA)

unread,
Dec 22, 2015, 6:31:01 AM12/22/15
to jenkinsc...@googlegroups.com
Sven Steiniger created an issue
 
Jenkins / Bug JENKINS-32169
NPE in Subversion Plug-in 2.5.5
Issue Type: Bug Bug
Assignee: Unassigned
Components: subversion-plugin
Created: 22/Dec/15 11:30 AM
Environment: Jenkins 1.643
Subversion-Plugin 2.5.5
Priority: Blocker Blocker
Reporter: Sven Steiniger

SVN checkout and configuration terminates with the following Exception:

javax.servlet.ServletException: java.lang.NullPointerException
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
	at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:249)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
	at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:249)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
	at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:59)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:129)
	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:123)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
	at org.eclipse.jetty.server.Server.handle(Server.java:370)
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
	at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:949)
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1011)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
	at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
	at hudson.scm.SubversionSCM$ModuleLocation$DescriptorImpl.checkCredentialsId(SubversionSCM.java:3095)
	at hudson.scm.SubversionSCM$ModuleLocation$DescriptorImpl.doCheckCredentialsId(SubversionSCM.java:3071)
	at sun.reflect.GeneratedMethodAccessor216.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:121)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
	... 69 more

Downgrading to 2.5.4 fixed the issue.
When looking at the stacktrace it seems to be caused by the changes of "JENKINS-16711 Allow repository URL-encoded"
(commit 3a9cf510c6caa285478aeb4f5b914d30165947d4)

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

recena@gmail.com (JIRA)

unread,
Dec 22, 2015, 6:42:02 AM12/22/15
to jenkinsc...@googlegroups.com

recena@gmail.com (JIRA)

unread,
Dec 22, 2015, 6:42:02 AM12/22/15
to jenkinsc...@googlegroups.com

recena@gmail.com (JIRA)

unread,
Dec 22, 2015, 6:51:03 AM12/22/15
to jenkinsc...@googlegroups.com
Manuel Jesús Recena Soto commented on Bug JENKINS-32169
 
Re: NPE in Subversion Plug-in 2.5.5

Sven Steiniger, Could you provide your Job configuration? and a console output? I can not reproduce the NPE.

recena@gmail.com (JIRA)

unread,
Dec 23, 2015, 7:15:02 AM12/23/15
to jenkinsc...@googlegroups.com

erik_newton@hotmail.com (JIRA)

unread,
Jan 4, 2016, 5:47:03 AM1/4/16
to jenkinsc...@googlegroups.com

Here is my config. I have removed the real URLs. It is a C++ project containing SVN externals, where for a while I have had to use the additional credentials workaround https://issues.jenkins-ci.org/browse/JENKINS-21785, which may be relevant. I still get the bug in 2.5.6. The job appears to build OK, it is only when you go to the job config page you see an ERROR hyperlink which expamds to the stack trace, and so most people may not have noticed?

<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description>My Project</description>
<logRotator class="hudson.tasks.LogRotator">
<daysToKeep>-1</daysToKeep>
<numToKeep>-1</numToKeep>
<artifactDaysToKeep>200</artifactDaysToKeep>
<artifactNumToKeep>-1</artifactNumToKeep>
</logRotator>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.scm.SubversionSCM" plugin="subve...@2.5.6">
<locations>
<hudson.scm.SubversionSCM_-ModuleLocation>
<remote>REMOVED</remote>
<credentialsId>2bc6a345-9be4-4339-bd92-REMOVED</credentialsId>
<local>.</local>
<depthOption>infinity</depthOption>
<ignoreExternalsOption>false</ignoreExternalsOption>
</hudson.scm.SubversionSCM_-ModuleLocation>
</locations>
<additionalCredentials>
<hudson.scm.SubversionSCM_-AdditionalCredentials>
<realm>REMOVED</realm>
<credentialsId>2bc6a345-9be4-4339-bd92-REMOVED</credentialsId>
</hudson.scm.SubversionSCM_-AdditionalCredentials>
</additionalCredentials>
<excludedRegions></excludedRegions>
<includedRegions></includedRegions>
<excludedUsers></excludedUsers>
<excludedRevprop></excludedRevprop>
<excludedCommitMessages></excludedCommitMessages>
<workspaceUpdater class="hudson.scm.subversion.UpdateWithCleanUpdater"/>
<ignoreDirPropChanges>false</ignoreDirPropChanges>
<filterChangelog>false</filterChangelog>
</scm>
<assignedNode>WINDOWS</assignedNode>
<canRoam>false</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers>
<hudson.triggers.SCMTrigger>
<spec>H/2 * * * *</spec>
<ignorePostCommitHooks>false</ignorePostCommitHooks>
</hudson.triggers.SCMTrigger>
</triggers>
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.BatchFile>
<command>build</command>
</hudson.tasks.BatchFile>
<hudson.tasks.BatchFile>
<command>cloc --by-file --xml --out=cloc.xml . --exclude-dir=gtest,snappy,Crypto++
"C:\Program Files\Cppcheck\cppcheck" -q --enable=all --suppress=unusedFunction -IInclude -iExternals -iISIMath -U min -U max . --xml --xml-version=2 2> cppcheck.xml</command>
</hudson.tasks.BatchFile>
</builders>
<publishers>
<hudson.plugins.warnings.WarningsPublisher plugin="warn...@4.51">
<healthy></healthy>
<unHealthy></unHealthy>
<thresholdLimit>low</thresholdLimit>
<pluginName>[WARNINGS] </pluginName>
<defaultEncoding></defaultEncoding>
<canRunOnFailed>false</canRunOnFailed>
<usePreviousBuildAsReference>false</usePreviousBuildAsReference>
<useStableBuildAsReference>false</useStableBuildAsReference>
<useDeltaValues>false</useDeltaValues>
<thresholds plugin="analys...@1.75">
<unstableTotalAll></unstableTotalAll>
<unstableTotalHigh></unstableTotalHigh>
<unstableTotalNormal></unstableTotalNormal>
<unstableTotalLow></unstableTotalLow>
<unstableNewAll></unstableNewAll>
<unstableNewHigh></unstableNewHigh>
<unstableNewNormal></unstableNewNormal>
<unstableNewLow></unstableNewLow>
<failedTotalAll></failedTotalAll>
<failedTotalHigh>0</failedTotalHigh>
<failedTotalNormal></failedTotalNormal>
<failedTotalLow></failedTotalLow>
<failedNewAll></failedNewAll>
<failedNewHigh></failedNewHigh>
<failedNewNormal></failedNewNormal>
<failedNewLow></failedNewLow>
</thresholds>
<shouldDetectModules>false</shouldDetectModules>
<dontComputeNew>true</dontComputeNew>
<doNotResolveRelativePaths>true</doNotResolveRelativePaths>
<includePattern></includePattern>
<excludePattern></excludePattern>
<messagesPattern></messagesPattern>
<parserConfigurations/>
<consoleParsers>
<hudson.plugins.warnings.ConsoleParser>
<parserName>MSBuild</parserName>
</hudson.plugins.warnings.ConsoleParser>
</consoleParsers>
</hudson.plugins.warnings.WarningsPublisher>
<hudson.plugins.tasks.TasksPublisher plugin="ta...@4.47">
<healthy></healthy>
<unHealthy></unHealthy>
<thresholdLimit>low</thresholdLimit>
<pluginName>[TASKS] </pluginName>
<defaultEncoding></defaultEncoding>
<canRunOnFailed>false</canRunOnFailed>
<usePreviousBuildAsReference>false</usePreviousBuildAsReference>
<useStableBuildAsReference>false</useStableBuildAsReference>
<useDeltaValues>false</useDeltaValues>
<thresholds plugin="analys...@1.75">
<unstableTotalAll></unstableTotalAll>
<unstableTotalHigh></unstableTotalHigh>
<unstableTotalNormal></unstableTotalNormal>
<unstableTotalLow></unstableTotalLow>
<unstableNewAll></unstableNewAll>
<unstableNewHigh></unstableNewHigh>
<unstableNewNormal></unstableNewNormal>
<unstableNewLow></unstableNewLow>
<failedTotalAll></failedTotalAll>
<failedTotalHigh></failedTotalHigh>
<failedTotalNormal></failedTotalNormal>
<failedTotalLow></failedTotalLow>
<failedNewAll></failedNewAll>
<failedNewHigh></failedNewHigh>
<failedNewNormal></failedNewNormal>
<failedNewLow></failedNewLow>
</thresholds>
<shouldDetectModules>false</shouldDetectModules>
<dontComputeNew>true</dontComputeNew>
<doNotResolveRelativePaths>false</doNotResolveRelativePaths>
<high></high>
<normal>TODO</normal>
<low></low>
<ignoreCase>true</ignoreCase>
<asRegexp>false</asRegexp>
<pattern>*/.c, */.cpp, */.h, */.hpp</pattern>
<excludePattern>Externals/**</excludePattern>
</hudson.plugins.tasks.TasksPublisher>
<hudson.tasks.ArtifactArchiver>
<artifacts>*/Release/.dll, */.zip</artifacts>
<allowEmptyArchive>false</allowEmptyArchive>
<onlyIfSuccessful>true</onlyIfSuccessful>
<fingerprint>true</fingerprint>
<defaultExcludes>true</defaultExcludes>
</hudson.tasks.ArtifactArchiver>
<org.jenkinsci.plugins.cppcheck.CppcheckPublisher plugin="cppc...@1.21">
<cppcheckConfig>
<pattern>cppcheck.xml</pattern>
<ignoreBlankFiles>false</ignoreBlankFiles>
<allowNoReport>false</allowNoReport>
<configSeverityEvaluation>
<threshold></threshold>
<newThreshold></newThreshold>
<failureThreshold></failureThreshold>
<newFailureThreshold></newFailureThreshold>
<healthy></healthy>
<unHealthy></unHealthy>
<severityError>true</severityError>
<severityWarning>true</severityWarning>
<severityStyle>true</severityStyle>
<severityPerformance>true</severityPerformance>
<severityInformation>true</severityInformation>
<severityNoCategory>true</severityNoCategory>
<severityPortability>true</severityPortability>
</configSeverityEvaluation>
<configGraph>
<xSize>500</xSize>
<ySize>200</ySize>
<numBuildsInGraph>0</numBuildsInGraph>
<displayAllErrors>true</displayAllErrors>
<displayErrorSeverity>false</displayErrorSeverity>
<displayWarningSeverity>false</displayWarningSeverity>
<displayStyleSeverity>false</displayStyleSeverity>
<displayPerformanceSeverity>false</displayPerformanceSeverity>
<displayInformationSeverity>false</displayInformationSeverity>
<displayNoCategorySeverity>false</displayNoCategorySeverity>
<displayPortabilitySeverity>false</displayPortabilitySeverity>
</configGraph>
</cppcheckConfig>
</org.jenkinsci.plugins.cppcheck.CppcheckPublisher>
<hudson.tasks.junit.JUnitResultArchiver plugin="ju...@1.10">
<testResults>**/test_detail.xml, **/test_detail_64.xml</testResults>
<keepLongStdio>false</keepLongStdio>
<healthScaleFactor>1.0</healthScaleFactor>
<allowEmptyResults>false</allowEmptyResults>
</hudson.tasks.junit.JUnitResultArchiver>
<hudson.plugins.sloccount.SloccountPublisher plugin="sloc...@1.21">
<pattern>**/cloc.xml</pattern>
<encoding></encoding>
<commentIsCode>false</commentIsCode>
<numBuildsInGraph>0</numBuildsInGraph>
<ignoreBuildFailure>false</ignoreBuildFailure>
</hudson.plugins.sloccount.SloccountPublisher>
<hudson.tasks.Mailer plugin="mai...@1.16">
<recipients></recipients>
<dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
<sendToIndividuals>true</sendToIndividuals>
</hudson.tasks.Mailer>
</publishers>
<buildWrappers/>
</project>

recena@gmail.com (JIRA)

unread,
Jan 4, 2016, 5:56:02 AM1/4/16
to jenkinsc...@googlegroups.com

Erik Newton, What bug? "I still get the bug in 2.5.6"

This issue is related to a NPE. I'm waiting for additional information (by Sven Steiniger).

tschoening@am-soft.de (JIRA)

unread,
Jan 4, 2016, 6:16:05 AM1/4/16
to jenkinsc...@googlegroups.com

The NPE is exactly "the bug": Just go to the configuration page of your project using SVN notice the ERROR-link underneath "Credentials", click on that link and you get the stack trace for the NPE mentioned in this report.

tschoening@am-soft.de (JIRA)

unread,
Jan 4, 2016, 6:22:01 AM1/4/16
to jenkinsc...@googlegroups.com
Thorsten Schöning updated an issue
 
Change By: Thorsten Schöning
Attachment: Screenshot JENKINS-32169.png

recena@gmail.com (JIRA)

unread,
Jan 4, 2016, 6:30:01 AM1/4/16
to jenkinsc...@googlegroups.com
Manuel Jesús Recena Soto commented on Bug JENKINS-32169
 
Re: NPE in Subversion Plug-in 2.5.5

Thorsten Schöning, I'm going to double check but I did not see this error in my fresh installation.

tschoening@am-soft.de (JIRA)

unread,
Jan 4, 2016, 6:35:02 AM1/4/16
to jenkinsc...@googlegroups.com
Thorsten Schöning edited a comment on Bug JENKINS-32169
The NPE is exactly "the bug": Just go to the configuration page of your project using SVN ,  notice the ERROR-link underneath "Credentials", click on that link and you get the stack trace for the NPE mentioned in this report.

tschoening@am-soft.de (JIRA)

unread,
Jan 4, 2016, 6:37:02 AM1/4/16
to jenkinsc...@googlegroups.com

In my not fresh installation it is easily reproducible by just upgrading the Subversion plugin to a current version, like described before and can be seen in my attached screenshot. I only removed the URLs, so there are not actually blank. Reverting to in my case version 2.5.3 resolves this problem.

recena@gmail.com (JIRA)

unread,
Jan 4, 2016, 6:39:01 AM1/4/16
to jenkinsc...@googlegroups.com

tschoening@am-soft.de (JIRA)

unread,
Jan 4, 2016, 6:50:01 AM1/4/16
to jenkinsc...@googlegroups.com

Yes, just before I posted my comment and like Erik Newton did.

recena@gmail.com (JIRA)

unread,
Jan 4, 2016, 7:06:02 AM1/4/16
to jenkinsc...@googlegroups.com

erik_newton@hotmail.com (JIRA)

unread,
Jan 4, 2016, 9:13:03 AM1/4/16
to jenkinsc...@googlegroups.com

Yes, I was just posting my config file in case Sven didn't return.
I have the same NPE issue/bug.
It sounds like you're narrowing the problem down now though.
Cheers.

recena@gmail.com (JIRA)

unread,
Jan 4, 2016, 2:39:01 PM1/4/16
to jenkinsc...@googlegroups.com

Erik Newton, Thorsten Schöning, I'm sorry but I could not to reproduce the NPE.

  1. A fresh Jenkins 1.643 installation
  2. Update (manually) Subversion Plugin to 2.5.5
  3. Create a job with a subversion repository:
  4. Update (using update center) Subversion Plugin 2.5.6
  5. Edit the same job:
  6. Create a new job with a subversion repository:

I don't you can reach this error in the UI when the validate method:

/**
 * Validate the value for a remote (repository) location.
 */
public FormValidation doCheckCredentialsId(StaplerRequest req, @AncestorInPath Item context,
        @QueryParameter String remote, @QueryParameter String value) {

    // Test the connection only if we have job configure permission
    if (context == null || !context.hasPermission(Item.CONFIGURE)) {
        return FormValidation.ok();
    }
    return checkCredentialsId(req, context, remote, value);
}

/**
 * Validate the value for a remote (repository) location.
 */
public FormValidation checkCredentialsId(StaplerRequest req, @Nonnull Item context, String remote, String value) {

    // Ignore validation if repository URL is empty
    String url = Util.fixEmptyAndTrim(remote);
    if (url == null) {
        return FormValidation.ok();
    }

    // Is the repository URL parameterized?
    if (remote.indexOf('$') != -1) {
        return FormValidation.warning("The repository URL is parameterized, connection check skipped");
    }

    try {
        SVNURL repoURL = SVNURL.parseURIEncoded(remote);
        StandardCredentials credentials = lookupCredentials(context, value, repoURL);
        SVNRepository repo = descriptor().getRepository(context, repoURL, credentials, Collections
                .<String, Credentials>emptyMap(), null);
        String repoRoot = repo.getRepositoryRoot(false).toDecodedString();
        String repoPath = repo.getLocation().toDecodedString().substring(repoRoot.length());
        SVNPath path = new SVNPath(repoPath, true, true);
        SVNNodeKind svnNodeKind = repo.checkPath(path.getTarget(), path.getPegRevision().getNumber());
        if (svnNodeKind != SVNNodeKind.DIR) {
            return FormValidation.error("Credentials looks fine but the repository URL is invalid");
        }
    } catch (SVNException e) {
        LOGGER.log(Level.SEVERE, e.getErrorMessage().getMessage());
        return FormValidation.error("Unable to access to repository");
    }
    return FormValidation.ok();

does not use FormValidation.errorWithMarkup()

Maybe, a step by step process would be useful to catch this NPE.

erik_newton@hotmail.com (JIRA)

unread,
Jan 4, 2016, 2:52:03 PM1/4/16
to jenkinsc...@googlegroups.com

If it helps, I'm using LTS version 1.625.3
and I've got an SVN project with externals, which has given me trouble in the past.
I'll try to get round to a clean install if I get time

recena@gmail.com (JIRA)

unread,
Jan 4, 2016, 2:54:02 PM1/4/16
to jenkinsc...@googlegroups.com
[~elzo], [~tschoening], I'm sorry but I could not to reproduce the NPE.

# A fresh Jenkins 1.643 installation
# Update (manually) Subversion Plugin to 2.5.5
# Create a job with a subversion repository: (/)
# Update (using update center) Subversion Plugin 2.5.6
# Edit the same job: (/)
# Create a new job with a subversion repository: (/)

I don't
 know how  you can reach this error in the UI when the validate method:


{noformat}
{noformat}


does not use {{FormValidation.errorWithMarkup()}}

Maybe, a step by step process would be useful to catch this NPE.

recena@gmail.com (JIRA)

unread,
Jan 4, 2016, 3:02:03 PM1/4/16
to jenkinsc...@googlegroups.com

Erik Newton, in the environment field I can see: Jenkins 1.643 + Subversion Plugin 2.5.5.

In the screenshot I can see an error that it seems related to validation. I don't know if there is any relation with svn:externals. If you configure your job is a right way, svn:externals look work fine.

erik_newton@hotmail.com (JIRA)

unread,
Jan 4, 2016, 3:22:02 PM1/4/16
to jenkinsc...@googlegroups.com

I have just downloaded a fresh 1.625.3
I configured a job with an svn url using the svn:// protocol
I couldn't see where to enter credentials so didn't (I think because out-of-the-box the SVN plugin pre-dates the credentials thing?)
The project built. I assume because my machine already knows the SVN password
I did an update of all plugins to latest versions (which by default is bleeding edge not LTS)
On the configuration of the project, I could now see a place to empty credentials (but didn't enter any) I already had the above ERROR and stack trace.

erik_newton@hotmail.com (JIRA)

unread,
Jan 4, 2016, 3:32:01 PM1/4/16
to jenkinsc...@googlegroups.com

I forgot to say I'm on Windows 7, Java (build 1.8.0_66-b18)

It looks like in my above test, it was using a .jenkins folder which may have had some old stuff in it.
I'll try it again

tschoening@am-soft.de (JIRA)

unread,
Jan 4, 2016, 3:34:02 PM1/4/16
to jenkinsc...@googlegroups.com

Did you use credentials with your SVN repos? Even if so, it may still be that there's some problem with existing settings. FormValidation.errorWithMarkup() doesn't seem to be necessary, the error is rendered because of an AJAX call and the error message is a complete HTTP 500 document output:

Request URL:http://domain.example.org:8080/jenkins/job/Libs%20Perl%20AMS/descriptorByName/hudson.scm.SubversionSCM$ModuleLocation/checkCredentialsId?value=GUID&remote=URL

erik_newton@hotmail.com (JIRA)

unread,
Jan 4, 2016, 3:50:02 PM1/4/16
to jenkinsc...@googlegroups.com

So tried the same procedure with Jenkins 1.643, and a clean JENKINS_HOME
I configured a job with svn:// url, but didn't set polling or any building, just a subversion repository url
I just updated the subversion plugin rather than everything, but this updated SCM & MapDB API Plugins
Went back to project config page and before I could do anything with credentials I got the stack trace.
My production system uses credentials and had been working fine up to now.

tschoening@am-soft.de (JIRA)

unread,
Jan 4, 2016, 3:57:05 PM1/4/16
to jenkinsc...@googlegroups.com

The NPE occurs in the following line:

String repoRoot = repo.getRepositoryRoot(false).toDecodedString();

getRepositoryRoot returns null:

public SVNURL getRepositoryRoot(boolean forceConnection) throws SVNException {
if (forceConnection && myRepositoryRoot == null)

{ testConnection(); }

return myRepositoryRoot;
}

Other parts of the code were already prepared:

https://github.com/jenkinsci/subversion-plugin/commit/19b8ccfcc9ecee269c56b9a10828b897087447c8

tschoening@am-soft.de (JIRA)

unread,
Jan 4, 2016, 3:58:02 PM1/4/16
to jenkinsc...@googlegroups.com
Thorsten Schöning edited a comment on Bug JENKINS-32169
The NPE occurs in the following line:


{code:java}
String repoRoot = repo.getRepositoryRoot(false).toDecodedString();
{code}


getRepositoryRoot returns null:


{code:java}
    public SVNURL getRepositoryRoot(boolean forceConnection) throws SVNException {
        if (forceConnection && myRepositoryRoot == null) {
            testConnection();
        }
        return myRepositoryRoot;
    }
{code}

tschoening@am-soft.de (JIRA)

unread,
Jan 4, 2016, 3:59:05 PM1/4/16
to jenkinsc...@googlegroups.com
Thorsten Schöning edited a comment on Bug JENKINS-32169
The NPE occurs in the following line:


{code:java}
String repoRoot = repo.getRepositoryRoot(false).toDecodedString();
{code}


getRepositoryRoot returns null:


{code:java}
    public SVNURL getRepositoryRoot(boolean forceConnection) throws SVNException {
        if (forceConnection && myRepositoryRoot == null) {
            testConnection();
        }
        return myRepositoryRoot;
    }
{code}


Other parts of the code were already prepared  in 2.5.4 :

[https://github.com/jenkinsci/subversion-plugin/commit/19b8ccfcc9ecee269c56b9a10828b897087447c8]

tschoening@am-soft.de (JIRA)

unread,
Jan 4, 2016, 4:07:02 PM1/4/16
to jenkinsc...@googlegroups.com

tschoening@am-soft.de (JIRA)

unread,
Jan 4, 2016, 4:13:01 PM1/4/16
to jenkinsc...@googlegroups.com

recena@gmail.com (JIRA)

unread,
Jan 4, 2016, 5:06:07 PM1/4/16
to jenkinsc...@googlegroups.com

Did you use credentials with your SVN repos?

Yes I did. I see only one different, I'm using HTTP and HTTPS protocols.

Before to do any source code modification, I need to reproduce the NPE.

Regards,

recena@gmail.com (JIRA)

unread,
Jan 4, 2016, 5:09:04 PM1/4/16
to jenkinsc...@googlegroups.com

Thorsten Schöning By the way, are you using also svn:// protocol?

recena@gmail.com (JIRA)

unread,
Jan 4, 2016, 5:47:02 PM1/4/16
to jenkinsc...@googlegroups.com
Manuel Jesús Recena Soto started work on Bug JENKINS-32169
 
Change By: Manuel Jesús Recena Soto
Status: Open In Progress

recena@gmail.com (JIRA)

unread,
Jan 4, 2016, 5:52:04 PM1/4/16
to jenkinsc...@googlegroups.com

tschoening@am-soft.de (JIRA)

unread,
Jan 5, 2016, 2:41:02 AM1/5/16
to jenkinsc...@googlegroups.com

Yes, my URLs are using svn:// protocol.

tschoening@am-soft.de (JIRA)

unread,
Jan 5, 2016, 2:43:01 AM1/5/16
to jenkinsc...@googlegroups.com
Thorsten Schöning edited a comment on Bug JENKINS-32169
Yes, my URLs are using svn:// protocol.


Wouldn't it be wise to not just change the concrete line of this NPE, but as well search for other uses of getRepositoryRoot(false)? Most of those will most likely result in an NPE with svn/file-protocol I guess.

scm_issue_link@java.net (JIRA)

unread,
Jan 5, 2016, 6:12:02 AM1/5/16
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Manuel Recena
Path:
src/main/java/hudson/scm/SubversionSCM.java
http://jenkins-ci.org/commit/subversion-plugin/c129d51f1f84cbd8fb7d4cbc265c42ed0f13753a
Log:
Merge pull request #154 from recena/JENKINS-32169

JENKINS-32169 SVNRepository.getRepositoryRoot(false) can return null

Compare: https://github.com/jenkinsci/subversion-plugin/compare/7304b1317e7e...c129d51f1f84

scm_issue_link@java.net (JIRA)

unread,
Jan 5, 2016, 6:12:02 AM1/5/16
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Manuel Recena
Path:
src/main/java/hudson/scm/SubversionSCM.java

http://jenkins-ci.org/commit/subversion-plugin/088085793eeaa6c3cb8930f7e6385d8179f7b25c
Log:
JENKINS-32169 SVNRepository.getRepositoryRoot(false) can return null when one uses svn:// and file:// protocols

recena@gmail.com (JIRA)

unread,
Jan 5, 2016, 6:39:02 AM1/5/16
to jenkinsc...@googlegroups.com
Status: In Progress Resolved
Resolution: Fixed

laurent@tourreau.fr (JIRA)

unread,
Jan 6, 2016, 3:50:02 AM1/6/16
to jenkinsc...@googlegroups.com
Laurent TOURREAU commented on Bug JENKINS-32169
 
Re: NPE in Subversion Plug-in 2.5.5

Hi
I've tried with 2.5.6 version
The issue is still present too.

recena@gmail.com (JIRA)

unread,
Jan 6, 2016, 1:28:01 PM1/6/16
to jenkinsc...@googlegroups.com

A new release (2.5.7) was published including this bug solved.

erik_newton@hotmail.com (JIRA)

unread,
Jan 11, 2016, 4:13:02 AM1/11/16
to jenkinsc...@googlegroups.com

Thanks everyone, for their work in fixing this. 2.5.7 looks good.
Cheers,
Erik

recena@gmail.com (JIRA)

unread,
Jan 11, 2016, 4:18:02 AM1/11/16
to jenkinsc...@googlegroups.com
Manuel Jesús Recena Soto closed an issue as Fixed
 

Erik Newton Thanks for your feedback.

Status: Resolved Closed
Reply all
Reply to author
Forward
0 new messages