ERROR: Processing failed due to a bug in the code.

54 views
Skip to first unread message

Ahmet Maruf Aytekin

unread,
Oct 15, 2012, 3:57:35 AM10/15/12
to jenkins...@googlegroups.com
I am getting following error during teh execution of groovy commands via "execute system groovy script" plugin:

Jenkins ver. 1.473


ERROR: Processing failed due to a bug in the code. Please report this to jenkins...@googlegroups.com
java.lang.NullPointerException: Cannot invoke method getModuleRecords() on null object
at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
at Script1.run(Script1.groovy:6)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:682)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:666)
at hudson.plugins.groovy.SystemGroovy.perform(SystemGroovy.java:65)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:717)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:866)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:805)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
at hudson.model.Run.execute(Run.java:1488)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:236)
project=hudson.maven.MavenModuleSet@e63c13c[mkk-push]
project.getModules()=[hudson.maven.MavenModule@7d486c15[mkk-push/tr.com.mkk:mkk-push][mkk-push/tr.com.mkk:mkk-push][relativePath:]]
project.getRootModule()=hudson.maven.MavenModule@7d486c15[mkk-push/tr.com.mkk:mkk-push][mkk-push/tr.com.mkk:mkk-push][relativePath:]
FATAL: Cannot invoke method getModuleRecords() on null object
java.lang.NullPointerException: Cannot invoke method getModuleRecords() on null object
at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
at Script1.run(Script1.groovy:6)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:682)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:666)
at hudson.plugins.groovy.SystemGroovy.perform(SystemGroovy.java:65)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:717)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:866)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:805)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
at hudson.model.Run.execute(Run.java:1488)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:236)


Maruf



________________________________

Bu mesaj ve ekleri mesajda gönderildiği belirtilen kişi/kişilere özeldir ve gizlidir. Bu mesaj tarafınıza yanlışlıkla ulaşmış olsa da mesaj içeriğinin gizliliği ve bu gizlilik yükümlülüğüne uyulması zorunluluğu tarafınız için de söz konusudur. Böyle bir durumda, lütfen gönderen kişiyi bilgilendiriniz ve mesajı sisteminizden siliniz. Mesaj ve eklerinde yer alan bilgilerin doğruluğu ve güncelliği konusunda gönderenin ya da Merkezi Kayıt Kuruluşu A.Ş.'nin herhangi bir sorumluluğu bulunmamaktadır. Merkezi Kayıt Kuruluşu A.Ş. mesajın ve bilgilerinin size değisikliğe uğrayarak veya geç ulaşmasından, bütünlüğünün ve gizliliğinin bozulmasından, virus içermesinden ve bilgisayar sisteminize verebileceği herhangi bir zarardan sorumlu tutulamaz.

This message and attachments are confidential and intended solely for the individual(s) stated in this message.If you received this message although you are not the addressee you are responsible to keep confidential the message. In that case please inform the sender and delete the message. The sender has no responsibility for the accuracy or correctness of the information in the message and its attachments. Merkezi Kayit Kurulusu A.S. shall have no liability for any changes or late receiving,loss of integrity and confidentiality, viruses and any damages caused in any way to your computer system.


Ahmet Maruf Aytekin

unread,
Oct 30, 2012, 6:09:30 AM10/30/12
to jenkins...@googlegroups.com
If someone else experiencing the same problem, following script worked for me on Jenkins ver. 1.486:

import hudson.model.*;
import hudson.util.*;

def thr = Thread.currentThread();
def currentBuild = thr?.executable;
def mavenVer = currentBuild.getParent().getModules().toArray()[0].getVersion();
def newParamAction = new hudson.model.ParametersAction(new hudson.model.StringParameterValue("PROJECT_VERSION", mavenVer));
currentBuild.addAction(newParamAction);


Maruf
Reply all
Reply to author
Forward
0 new messages