What steps will reproduce the problem? 1. set up n Jenkins builds with Jigomerge pre-build merge all hitting the same SVN repo 2. build once every hour or on successful completion of another build 3. wait for it to fail
What is the expected output? I expect a successful build.
What do you see instead? sporadically the build fails even if nothing has changed due to premature end of file
What version of the product are you using? 0.7
On what operating system? CentOS 6
Please provide any additional information below.
no change for <branch> since the previous build [DEBUG] executing command 'svn --non-interactive --username user revert -R /root/.jenkins/jobs/<buildName>/workspace/.' [DEBUG] exit value : 0 [DEBUG] executing command 'svn --non-interactive --username user update /root/.jenkins/jobs/<buildName>/workspace/.' At revision 23788. [DEBUG] exit value : 0 [DEBUG] executing command 'svn status --xml /root/.jenkins/jobs/<buildName>/workspace/.' <?xml version="1.0"?> <status> <target path="/root/.jenkins/jobs/<buildName>/workspace"> <entry path="/root/.jenkins/jobs/<buildName>/workspace/mbanking-operations/target"> <wc-status props="none" item="unversioned"> </wc-status> </entry> </target> </status>
[DEBUG] exit value : 0 [DEBUG] executing command 'svn --non-interactive --username user mergeinfo --show-revs eligible <branch> /root/.jenkins/jobs/<buildName>/workspace/.'
[DEBUG] exit value : 1 Merging 0 revisions ... [DEBUG] executing command 'svn --non-interactive --username user revert -R /root/.jenkins/jobs/<buildName>/workspace/.' [DEBUG] exit value : 0 [DEBUG] executing command 'svn --non-interactive --username user update /root/.jenkins/jobs/<buildName>/workspace/.' At revision 23788. [DEBUG] exit value : 0 [DEBUG] executing command 'svn status --xml /root/.jenkins/jobs/<buildName>/workspace/.'
[DEBUG] exit value : 0 class org.codehaus.groovy.runtime.InvokerInvocationException # org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file. org.codehaus.groovy.runtime.InvokerInvocationException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file. at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:97) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1054) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:704) at SvnMergeTool.invokeMethod(script1000862.groovy) at hudson.plugins.jigomerge.JigomergeBuilder.perform(JigomergeBuilder.java:101) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:692) at hudson.maven.MavenModuleSetBuild$RunnerImpl.build(MavenModuleSetBuild.java:864) at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:620) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:462) at hudson.model.Run.run(Run.java:1404) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:238) Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file. at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1234) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525) at groovy.util.XmlSlurper.parse(XmlSlurper.java:146) at groovy.util.XmlSlurper.parse(XmlSlurper.java:199) at groovy.util.XmlSlurper.parseText(XmlSlurper.java:225) at groovy.util.XmlSlurper$parseText.call(Unknown Source) at SvnMergeTool.listUnversionnedFiles(script1000862.groovy:292) at SvnMergeTool.resetWorkspace(script1000862.groovy:274) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:267) at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:52) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141) at SvnMergeTool.launchSvnMerge(script1000862.groovy:154) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) ... 15 more
Comment #1
Posted on Dec 16, 2011 by Happy RhinoHas there been any progress on this issue yet?
Comment #2
Posted on Jan 24, 2012 by Grumpy RabbitI was able to reproduce the problem on my CI platform. This seems to be a problem of the subversion response. I will implement an automatic retry if xml response is invalid. This will be integrated on the next release.
Comment #3
Posted on Jul 19, 2012 by Happy BirdHas there been any progress on this issue yet? I am using jenkins 0.7 plugin and it still fails every build due to this issue. Is there any work around?
Comment #4
Posted on Mar 22, 2013 by Happy Rhino=> UPGRAde subversion to 1.7 ( Requirements 1.6+ http://code.google.com/p/jigomerge/wiki/Requirements )
Comment #5
Posted on Jun 23, 2014 by Swift RhinoI have the same issue... I am using SVN 1.6.6+ and groovy 1.6+
Comment #6
Posted on Jun 24, 2014 by Swift RhinoI had the same issue with jigomerge-2.2.6.groovy file and I end up updating the executeCommand method as below.... Hope this helps you to fix your issue.
protected def executeCommand(String commandLabel, boolean discardOutput) { def processOutput = [:] if (verbose) { def commandLabelToPrint = commandLabel // dirty hack to delete password from verbose if(commandLabel.contains('--password')){ def passwordMatcher = commandLabelToPrint =~ "(.* )(--password \S* )(.*)" commandLabelToPrint = passwordMatcher[0][1] + passwordMatcher[0][3] } printOut.println '[DEBUG] executing command \'' + commandLabelToPrint + '\'' } def process = commandLabel.execute()
def outBuffer = new ByteArrayOutputStream()
def errBuffer = new ByteArrayOutputStream()
if(discardOutput){
if (verbose){
// process.consumeProcessOutput(printOut, printOut) process.waitForProcessOutput(printOut, printOut) } else { // discard output, see http://groovy.codehaus.org/groovy-jdk/java/lang/Process.html#consumeProcessOutput() // process.consumeProcessOutput(); process.waitForProcessOutput(); } }else{ // process.consumeProcessOutput(outBuffer, errBuffer) process.waitForProcessOutput(outBuffer, errBuffer) }
// process.waitFor()
if (verbose) {
if(!discardOutput){
printOut.println outBuffer.toString()
printOut.println errBuffer.toString()
}
printOut.println '[DEBUG] exit value : ' + process.exitValue()
}
processOutput.exitValue = process.exitValue()
processOutput.inText = outBuffer.toString()
processOutput.inErrText = errBuffer.toString()
return processOutput
}
Status: New
Labels:
Type-Defect
Priority-Medium