onepremise / gReview

A Bamboo plugin integrating Gerrit which allows Bamboo to verify changes and update the Gerrit review system.
Apache License 2.0
15 stars 23 forks source link

NPE on Bamboo agent after job is dispatched by gReview #19

Closed hakonlo closed 12 years ago

hakonlo commented 12 years ago

I managed to get gReview to start builds, but they fail right away on the (remote) agents.

Bamboo server log:

2012-10-30 13:35:06,597 INFO [bambooAgentMessageListenerConnector-1] [DefaultErrorHandler] Recording an error: Unknown error occurred on 'xxx-bamboo2.xxx' when building FOO-BAR-JOB1-6. Agent will attempt process the build result... : FOO-BAR-JOB1 : java.lang.NullPointerException

Agent log:

INFO   | jvm 2    | 2012/10/30 13:35:06 | 2012-10-30 13:35:06,558 INFO [3-BAM::xxx-bamboo2.xxx::Agent:pool-5-thread-1] [BuildAgentControllerImpl] FOO-BAR-JOB1-6 taken from queue.
INFO   | jvm 2    | 2012/10/30 13:35:06 | 2012-10-30 13:35:06,582 ERROR [3-BAM::xxx-bamboo2.xxx::Agent:pool-5-thread-1] [BuildAgentControllerImpl] Unknown error occurred on 'xxx-bamboo2.xxx' when building FOO-BAR-JOB1-6. Agent will attempt process the build result...
INFO   | jvm 2    | 2012/10/30 13:35:06 | com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException
INFO   | jvm 2    | 2012/10/30 13:35:06 |   at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:152)
INFO   | jvm 2    | 2012/10/30 13:35:06 |   at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:115)
INFO   | jvm 2    | 2012/10/30 13:35:06 |   at com.atlassian.bamboo.repository.RepositoryDataImpl.getRepository(RepositoryDataImpl.java:136)
INFO   | jvm 2    | 2012/10/30 13:35:06 |   at com.atlassian.bamboo.v2.build.BuildContextHelper.rewire(BuildContextHelper.java:32)
INFO   | jvm 2    | 2012/10/30 13:35:06 |   at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:86)
INFO   | jvm 2    | 2012/10/30 13:35:06 |   at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:109)
INFO   | jvm 2    | 2012/10/30 13:35:06 |   at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:52)
INFO   | jvm 2    | 2012/10/30 13:35:06 |   at java.lang.Thread.run(Thread.java:662)
INFO   | jvm 2    | 2012/10/30 13:35:06 | Caused by: java.lang.NullPointerException
INFO   | jvm 2    | 2012/10/30 13:35:06 |   at com.atlassian.plugin.module.ClassPrefixModuleFactory.createModule(ClassPrefixModuleFactory.java:32)
INFO   | jvm 2    | 2012/10/30 13:35:06 |   at com.atlassian.plugin.module.PrefixDelegatingModuleFactory.createModule(PrefixDelegatingModuleFactory.java:99)
INFO   | jvm 2    | 2012/10/30 13:35:06 |   at com.atlassian.bamboo.plugin.descriptor.AbstractBambooModuleDescriptor.createModule(AbstractBambooModuleDescriptor.java:26)
INFO   | jvm 2    | 2012/10/30 13:35:06 |   at com.atlassian.bamboo.plugin.descriptor.AbstractBambooModuleDescriptor.getModule(AbstractBambooModuleDescriptor.java:90)
INFO   | jvm 2    | 2012/10/30 13:35:06 |   at com.atlassian.bamboo.plugin.descriptor.RepositoryModuleDescriptor.getModule(RepositoryModuleDescriptor.java:43)
INFO   | jvm 2    | 2012/10/30 13:35:06 |   at com.atlassian.bamboo.plugin.descriptor.RepositoryModuleDescriptor.getModule(RepositoryModuleDescriptor.java:18)
INFO   | jvm 2    | 2012/10/30 13:35:06 |   at com.atlassian.bamboo.repository.DefaultRepositoryManager.getNewRepositoryInstance(DefaultRepositoryManager.java:48)
INFO   | jvm 2    | 2012/10/30 13:35:06 |   at com.atlassian.bamboo.repository.RepositoryReference.create(RepositoryReference.java:25)
INFO   | jvm 2    | 2012/10/30 13:35:06 |   at com.atlassian.bamboo.repository.RepositoryReference.create(RepositoryReference.java:9)
INFO   | jvm 2    | 2012/10/30 13:35:06 |   at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:326)
INFO   | jvm 2    | 2012/10/30 13:35:06 |   at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:146)
INFO   | jvm 2    | 2012/10/30 13:35:06 |   ... 7 more
INFO   | jvm 2    | 2012/10/30 13:35:06 | 2012-10-30 13:35:06,599 INFO [3-BAM::xxx-bamboo2.xxx::Agent:pool-5-thread-1] [RemoteBuildResultProcessor] Build FOO-BAR-JOB1-6 completed on Bamboo agent. Sending results to server.
onepremise commented 12 years ago

Hi hakonlo,

Thanks for reporting your issue. Would you mind running gReview in debug mode and posting the output from logs? I have instructions on the readme here: https://github.com/onepremise/gReview/blob/master/README.md

onepremise commented 12 years ago

New release available:

https://marketplace.atlassian.com/plugins/com.houghtonassociates.bamboo.plugins.greview

hakonlo commented 11 years ago

Sorry, I haven't had time to verify your fix. It works.