Red Hat Bugzilla – Full Text Bug Listing
|Summary:||Exception when trying to deploy bundle with new parameter|
|Product:||[Other] RHQ Project||Reporter:||bkramer <bkramer>|
|Component:||Provisioning||Assignee:||John Mazzitelli <mazz>|
|Status:||CLOSED CURRENTRELEASE||QA Contact:||Mike Foley <mfoley>|
|Version:||4.2||CC:||hrupp, jshaughn, loleary, mazz|
|Target Release:||RHQ 4.5.0|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|:||828838 (view as bug list)||Environment:|
|Last Closed:||2013-09-01 05:58:05 EDT||Type:||Bug|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:||818751|
Description bkramer 2012-06-05 08:55:40 EDT
Created attachment 589522 [details] screen shot that shows the exception Description of problem: Initial deployment of the bundle that contains parameters works fine. However, if I try to deploy new version of the bundle that has an additional parameter, deployment will fail with the following message in the UI: Failed to create deployment: java.lang.RuntimeException: javax.ejb.EJBException:java.lang.IllegalArgumentException: Invalid Configuration: [Required property 'bego.param02' has a null value in Configuration[id=0].] -> java.lang.IllegalArgumentException:Invalid Configuration: [Required property 'bego.param02' has a null value in Configuration[id=0].] Version-Release number of selected component (if applicable): JON 3.0.1 How reproducible: Always Steps to Reproduce: 1. Upload and deploy the bundle jee_test-1.0.0-SNAPSHOT-bundle.zip (attached with this bugzilla) to a destination. This bundle contains one parameter with a default value - "param 01". 2. Upload the bundle jee_test-1.0.1-SNAPSHOT-bundle.zip (attached here) and deploy it to the same destination. This bundle contains an additional parameter bego.param02 with a default value - "param new". 3. Press Next (to accept default values); 4. Press Next button (Provide Deployment Information screen); Actual results: In the "Deploy Bundle to Destination Platforms" screen, the error message is logged: Failed to create deployment: java.lang.RuntimeException: javax.ejb.EJBException:java.lang.IllegalArgumentException: Invalid Configuration: [Required property 'bego.param02' has a null value in Configuration[id=0].] -> java.lang.IllegalArgumentException:Invalid Configuration: [Required property 'bego.param02' has a null value in Configuration[id=0].] (see attached screen shot). Expected results: Deployment should work fine and default value that is defined for bego.param02 should be accepted. Additional info: Initial deployment of the bundle that has parameters will work fine. I tried to deploy jee_test-1.0.1-SNAPSHOT-bundle.zip bundle (without 1.0.0 version) and deployment was successful.
Comment 3 Larry O'Leary 2012-06-08 15:20:45 EDT
Setting initial priority and target as this is blocking JON product Bug 828838
Comment 4 John Mazzitelli 2012-06-20 11:02:49 EDT
This looks to be the same as bug 820333 (and bug 818751).
Comment 5 John Mazzitelli 2012-06-20 11:07:29 EDT
I'll investigate this further. I think the issue here might be because the new property has required="true". Since the previous deployment didn't have this property defined, it will therefore be null. But now that it is required, the old deployment will not conform to the new property schema where that new property is now required. Might have to play games to get it to display an empty string. For a workaround - set required to "false" and I think it will work. You might also want to consider setting a default value for the new property in your deploy.xml recipe. That might also help work around this (but not sure about that - I'm more confident required="false" will workaround the issue).
Comment 6 John Mazzitelli 2012-06-20 11:58:30 EDT
this may be a problem in the configuration editor. I went into the second property field, and changed it, then put it back to its default value ("param new") and it worked. If I leave the defaults as-is, it fails.
Comment 7 John Mazzitelli 2012-06-20 16:13:11 EDT
This is not a problem in the config editor. Its a way the bundle wizard initializes the config editor. To workaround this issue, I believe you can just change the value and change it back to the default value and it will work. I'm working on a fix to ConfigurationUtility so it can normalize a configuration such that missing required properties are set to their defaults before the configuration editor is shown.
Comment 8 John Mazzitelli 2012-06-20 16:15:36 EDT
before applying any fix for this bug, you have to apply fix to bug 818751 (git commit 184dabf)
Comment 9 John Mazzitelli 2012-06-20 17:27:27 EDT
git commit to master: a5ef337
Comment 10 Heiko W. Rupp 2013-09-01 05:58:05 EDT
Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since.