<< Back to previous view

[QB-415] Exception when promoting ognl.OgnlException: source is null for getProperty(null, "label")
Created: 26/Mar/09  Updated: 06/Jun/09

Status: Resolved
Project: QuickBuild
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Murray Waters Assigned To: Robin Shen
Resolution: Won't Fix Votes: 0
Remaining Estimate: Unknown Time Spent: Unknown
Original Estimate: Unknown
Environment: Windows/Tomcat

File Attachments: JPEG File qb.JPG    

 Description   
When performing a promotion, I get the following stacktrace (changed project name to "myProject" as this is a public forum). This is shown in the configuration log for the E2E folder as per below.

java.lang.RuntimeException: ognl.MethodFailedException: Method "convertVersionToLabel" failed for object root.myProject.projects.E2E [java.lang.NullPointerException]
at com.pmease.quickbuild.model.Configuration.evaluateStringExpression(Configuration.java:901)
at com.pmease.quickbuild.model.Configuration.getVersionForNewBuild(Configuration.java:974)
at com.pmease.quickbuild.model.Configuration.promote(Configuration.java:1163)
at com.pmease.quickbuild.triggeringinstance.PromoteTriggeringInstance.execute(PromoteTriggeringInstance.java:30)
at com.pmease.quickbuild.model.Queue$BuildRunner.run(Queue.java:240)
at java.lang.Thread.run(Thread.java:595)
Caused by: ognl.MethodFailedException: Method "convertVersionToLabel" failed for object root.myProject.projects.E2E [java.lang.NullPointerException]
at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:796)
at ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:61)
at ognl.OgnlRuntime.callMethod(OgnlRuntime.java:819)
at ognl.ASTMethod.getValueBody(ASTMethod.java:75)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
at ognl.SimpleNode.getValue(SimpleNode.java:210)
at ognl.Ognl.getValue(Ognl.java:333)
at com.pmease.quickbuild.model.Configuration.evaluateStringExpression(Configuration.java:898)
... 5 more


 Comments   
Comment by Murray Waters [ 26/Mar/09 03:16 PM ]
I have noticed that the promotion occurs correctly when I am logged in as an admin, but not when I am logged in as a normal user.
Comment by Robin Shen [ 26/Mar/09 06:40 PM ]
Please check the "next build version" property of configuration "root.myProject.projects.E2E" (if left blank, please check its parent until there is a non-empty value specified), and tell what the current value is.

Also please attach a screenshot of the promote setting screen when promote as a normal user.

Thanks
Robin
Comment by Murray Waters [ 26/Mar/09 07:46 PM ]
next build version property is:

${convertVersionToLabel(promotion.source.build.repository["cvsrepo"].label)}
Comment by Murray Waters [ 26/Mar/09 07:50 PM ]
where "cvsrepo" above is our cvs repository. I'm still trying to figure out why it would be null referencing that for a normal user but not null for an admin..
Comment by Robin Shen [ 27/Mar/09 12:11 AM ]
This is odd, I've tried the same scenarios and normal user seems to be able to promote correctly. Is it possible that you backup your database to xml and sent it to me for diagnostics?

Another approach is to specify an version variable when the promote setting screen appears:

version=${convertVersionToLabel(build.repository["cvsrepo"].label)}

And then define the "next build version" property of destination configuration as:
${var["version"]}

Regards
Robin
Comment by Murray Waters [ 29/Mar/09 08:10 PM ]
i've sent you an email with the relevant info.
Generated at Wed Oct 08 23:46:28 UTC 2025 using JIRA 189.