History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-415
Type: Bug Bug
Status: Resolved Resolved
Resolution: Won't Fix
Priority: Major Major
Assignee: Robin Shen
Reporter: Murray Waters
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Exception when promoting ognl.OgnlException: source is null for getProperty(null, "label")

Created: 26/Mar/09 03:09 PM   Updated: 06/Jun/09 05:26 AM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. JPEG File qb.JPG (110 kb)

Environment: Windows/Tomcat


 Description  « Hide
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


 All   Comments   Work Log   Change History      Sort Order:
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.

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

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

${convertVersionToLabel(promotion.source.build.repository["cvsrepo"].label)}

Change by Murray Waters [26/Mar/09 07:48 PM]
Field Original Value New Value
Attachment qb.JPG [ 10100 ]

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..

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

Murray Waters [29/Mar/09 08:10 PM]
i've sent you an email with the relevant info.

Change by Robin Shen [06/Jun/09 05:26 AM]
Status Open [ 1 ] Resolved [ 5 ]
Resolution Won't Fix [ 2 ]