SKM IT World

Just another blog about IT

SaxException During a Sucessful Maven Build in Jenkins

Leave a comment

During the inspection of  several  sucessful Maven 3 build output, following SaxException catchs my eye:

[INFO] Parsing file:/home/skosmalla/.m2/repository/repository.xml
[Fatal Error] repository.xml:3:1: Premature end of file.
org.xml.sax.SAXParseException: Premature end of file.
at javax.xml.parsers.DocumentBuilder.parse(
at org.apache.felix.obrplugin.ObrUpdate.parseFile(
at org.apache.felix.obrplugin.ObrUpdate.parseRepositoryXml(
at org.apache.felix.obrplugin.ObrInstall.execute(
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(
at org.apache.maven.DefaultMaven.doExecute(
at org.apache.maven.DefaultMaven.execute(
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(
at hudson.remoting.UserRequest.perform(
at hudson.remoting.UserRequest.perform(
at hudson.remoting.Request$
at java.util.concurrent.Executors$
at java.util.concurrent.FutureTask$Sync.innerRun(
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
at java.util.concurrent.ThreadPoolExecutor$

I didn’t find a solution with google for this problem. But I found a hint that the repository.xml  is generated by Maven at the  end of  a build.  I noticed that only the Maven builds had this SaxException that were built parallelly (Jenkins had two build processors)  and all Maven builds used the same M2 repository.  So I had the idea that the reason of this exception could be that two almost finished Maven build tried to generate the repository.xml.  I actived in every job the option Use private Maven repository and the SaxException didn’t turn up anymore.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.