<< Back to previous view |
[QB-2651] NullPointerException when trying to run conf that was copied via REST
|
|
Status: | Closed |
Project: | QuickBuild |
Component/s: | None |
Affects Version/s: | 6.1.0 |
Fix Version/s: | None |
Type: | Bug | Priority: | Major |
Reporter: | Jaroslav Gorjatsev | Assigned To: | Robin Shen |
Resolution: | Won't Fix | Votes: | 2 |
Remaining Estimate: | Unknown | Time Spent: | Unknown |
Original Estimate: | Unknown |
File Attachments: | var_prompt.png |
Description |
We've bunch of configurations that where copied via REST and after that they can't be started manually giving exception below. However, build can be started via scheduler or if triggered by "Trigger Step". Also if create an any new configuration under this copied configuration, then it will give the same exception. So it seems something is wrong in the topmost copied config. Stacktrace: Error Details: Message: Method onLinkClicked of interface org.apache.wicket.markup.html.link.ILinkListener targeted at [ [Component id = run]] on component [ [Component id = run]] threw an exception Root cause: java.lang.NullPointerException Complete stack: org.apache.wicket.WicketRuntimeException: Method onLinkClicked of interface org.apache.wicket.markup.html.link.ILinkListener targeted at [ [Component id = run]] on component [ [Component id = run]] threw an exception at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:282) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:220) at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:179) at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:165) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:719) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162) java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor527.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:272) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:220) at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:179) at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:165) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:719) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162) |
Comments |
Comment by Jaroslav Gorjatsev [ 29/Feb/16 09:47 PM ] |
Also triggering via REST works, so affects only UI triggering |
Comment by Jaroslav Gorjatsev [ 29/Feb/16 10:22 PM ] |
Found an issue. For some reason variables that were also copied along with configurations had no prompt option set (had to be No Prompt) |
Comment by Robin Shen [ 01/Mar/16 12:40 AM ] |
I tried but can not reproduce. Can you please demonstrate this issue with an sample database and get it send to [robin AT pmease DOT com]? |
Comment by Jaroslav Gorjatsev [ 01/Mar/16 01:26 AM ] |
To repro try following:
Create confs: Root/level1/level2/level3 create var on level2, let's say named test issue following REST request for level3 config with following payload: <?xml version="1.0" ?> <com.pmease.quickbuild.model.Configuration> <id>LEVEL3_ID</id> <parent>LEVEL2_ID</parent> <name>test</name> <versionManagerDOM> <com.pmease.quickbuild.setting.configuration.version.UseSpecifiedVersion revision="0.0.0"> <version>1.0.0</version> </com.pmease.quickbuild.setting.configuration.version.UseSpecifiedVersion> </versionManagerDOM> <statusDate>2016-02-29T23:04:52.000Z</statusDate> <pluginSettingDOMs/> <data/> <stepDOMs/> <repositoryDOMs/> <aggregationDOMs/> <variables> <com.pmease.quickbuild.variable.Variable> <name>test</name> <valueProvider class="com.pmease.quickbuild.variable.CleartextValueProvider"> <value>testValue</value> </valueProvider> </com.pmease.quickbuild.variable.Variable> </variables> <notifications/> <promotions/> </com.pmease.quickbuild.model.Configuration> Click edit button in UI for this modified conf and you'll see that prompt option is not set. Or try running the conf and it will throw the exception. To fix the issue we've added explicit prompt setting, i.e: <com.pmease.quickbuild.variable.Variable> <name>test</name> <valueProvider class="com.pmease.quickbuild.variable.CleartextValueProvider"> <value>testValue</value> </valueProvider> <promptSetting class="com.pmease.quickbuild.variable.DoNotPrompt"> <remember>true</remember> <allowEmpty>false</allowEmpty> <order>100</order> <readOnly>false</readOnly> </promptSetting> </com.pmease.quickbuild.variable.Variable> |
Comment by Robin Shen [ 02/Mar/16 12:12 AM ] |
The variable must have its prompt setting specified. If you are not sure about the correct format of XML, just create some template conf via UI, and then dump it via RESTful API to get it. |