Tuesday, 16 November 2010

Hudson Job SVN "Malformed URL" error

A blog post documenting something we configured incorrectly using Hudson, maybe useful to others.

Via Hudson we build a Java EE application using Ant. The associated Hudson job first checks out the code from SVN. During the SVN check out phase of the job we'd see the following reported in the job console output:

Started by user cmuir
Checking out a fresh workspace because there's no workspace at C:\java\hudson\Hudson1372\build
Checking out https://acme.com/svn/VisualSVNRepo/ADFTaskFlows/REA/trunk
A Build
A Build\Build.jpr
A Build\rea.build.properties
A Build\rea.hudson.properties
A Build\build.xml
A Model
... snip ...
A ViewController\src\acme\rea\taskflow\view\beans\pageFlow
A ViewController\src\acme\rea\taChecking out
ERROR: Failed to check out
org.tmatesoft.svn.core.SVNException: svn: Malformed URL ''
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
at org.tmatesoft.svn.core.SVNURL.(SVNURL.java:221)
at org.tmatesoft.svn.core.SVNURL.parseURIEncoded(SVNURL.java:125)
at hudson.scm.SubversionSCM$ModuleLocation.getSVNURL(SubversionSCM.java:2116)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:742)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:660)
at hudson.FilePath.act(FilePath.java:753)
at hudson.FilePath.act(FilePath.java:735)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:653)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:601)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1046)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
at hudson.model.Run.run(Run.java:1248)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:129)
A ViewController\src\acme\rea\taskflow\view\beans\pageFlow\AuditEvent.java
... snip ...
At revision 3642
Sending e-mails to: chris.muir@acme.com
Finished: FAILURE
In particular note the error:

ERROR: Failed to check out
org.tmatesoft.svn.core.SVNException: svn: Malformed URL ''

From a bit of research we discovered the problem in our specific case was an error in the Hudson job configuration (Hudson console -> Login -> (select specific job) -> Configure). Under the Source Code Management section we'd accidentally created two SVN locations, the 2nd one being blank:

Essentially this second blank entry was causing the error above, where the Malformed "empty" URL '' is the empty SVN location. Simply removing this location from the job configuration solves the issue.


Hudson 1.372


Gursel Koca said...

I came accross the same problem. Thanks for your blog.

Aravind J said...

Great, I had same issue. Thanks for posting this...

Aravind J.

imran said...

Thank you very much. Your blog helped me.

Dave said...

You are a lifesaver! :) I can stop pulling out my hair now...

Thanks for helping me.