Hello everyone.

After trying a bunch of different things, i have now come to the
realization that i badly need help.

I have a number of maven-bundle-plugin powered builds running on a jenkins
server. Most of them are working fine, except for one, where i get this
error:

[INFO]
[INFO] *--- maven-bundle-plugin:2.5.3:install (default-install) @
managedproperties-consumer ---
*[INFO] Writing OBR metadata[WARNING] Exception while updating local
OBR: nulljava.lang.NullPointerException
        at 
org.apache.felix.obrplugin.ObrUpdate.writeRepositoryXml(ObrUpdate.java:267)
        at 
org.apache.felix.obrplugin.ObrUpdate.parseRepositoryXml(ObrUpdate.java:310)
        at org.apache.felix.obrplugin.ObrInstall.execute(ObrInstall.java:143)
        at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
        at 
org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
        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:606)
        at 
org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
        at 
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
        at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:181)
        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:606)
        at hudson.maven.Maven3Builder.call(Maven3Builder.java:136)
        at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
        at hudson.remoting.UserRequest.perform(UserRequest.java:121)
        at hudson.remoting.UserRequest.perform(UserRequest.java:49)
        at hudson.remoting.Request$2.run(Request.java:324)
        at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)




It happens across different versions as well


[INFO] *--- maven-bundle-plugin:3.2.0:install (default-install) @
managedproperties-service ---
*[INFO] Installing
dk/netdesign/managedproperties-service/0.7-SNAPSHOT/managedproperties-service-0.7-SNAPSHOT.jar
[INFO] Writing OBR metadata[WARNING] Exception while updating local
OBR: nulljava.lang.NullPointerException
        at 
org.apache.felix.obrplugin.ObrUpdate.writeRepositoryXml(ObrUpdate.java:267)
        at org.apache.felix.obrplugin.ObrInstall.execute(ObrInstall.java:139)
        at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
        at 
org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at 
org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
        at 
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
        at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:181)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at hudson.maven.Maven3Builder.call(Maven3Builder.java:136)
        at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
        at hudson.remoting.UserRequest.perform(UserRequest.java:121)
        at hudson.remoting.UserRequest.perform(UserRequest.java:49)
        at hudson.remoting.Request$2.run(Request.java:324)
        at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)



I have looked at the source code and found what appears to be the trigger:


        try
        {
            file = File.createTempFile( "repository", ".xml" );
            writer = new OutputStreamWriter( new FileOutputStream( file ) );
        }
        catch ( IOException e )
        {
            m_logger.error( "Unable to write to file: " + file.getName() );
            e.printStackTrace();
            throw new MojoExecutionException( "Unable to write to
file: " + file.getName() + " : " + e.getMessage() );
        }

        try
        {
            new DataModelHelperImpl().writeRepository( m_repository, writer );
        }
        catch ( IOException e )
        {
            throw new MojoExecutionException( "Unable to write
repository xml", e );
        }



I don't get it. This is a Jenkins server that runs several projects with
the same structure. The maven settings are the same, java.io.tmpdir is set
to a directory and i tried writing in it with the jenkins user, which works
fine.

jenkins 9801 1 25 00:27 pts/1 00:07:23 /usr/bin/java
-Djava.util.logging.config.file=/data/jenkins/tomcat/conf/logging.properties
-Djava.awt.headless=true -Xmx512m
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-DJENKINS_HOME=/data/jenkins/home
-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENC ODED_SLASH=true -Xmx512m
-Xmx1024m -XX:MaxPermSize=256m
-Djavax.net.ssl.trustStore=/etc/ssl/certs/java/managed-cacerts
-Djava.endorsed.dirs=/usr/share/tomcat7/endorsed -classpath /usr/sha
re/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar
-Dcatalina.base=/data/jenkins/tomcat -Dcatalina.home=/usr/share/tomcat7
-Djava.io.tmpdir=/data/jenkins/tomcat/temp org.
apache.catalina.startup.Bootstrap start


I have no idea where to go from here. Downgrading the maven-bundle-plugin
was kind of my last shot in the dark.

Has anyone seen this before?

Thanks for your time.
Martin

Reply via email to