Created attachment 430206 [details] Java exception that I got Description of problem: I have to change the name of the archive file as well as the version number to upload an updated bundle. Otherwise, I get a java exception relating to rollback. Version-Release number of selected component (if applicable): I'm using a build from June 30 and I have a postgres database. The bundle file is very simple; I have a deploy.xml file and a text configuration file that I zip into bundle.zip. How reproducible: Always, so far. Steps to Reproduce: 1. Upload a bundle with an archive named bundle.zip. 2. Edit the deploy.xml file so that the version is 2.0, make a change to the config file, and make a new bundle.zip file. 3. Try to upload the new bundle. a. Click New. b. Select the recipe radio button and upload the new deploy.xml. c. In the files screen (page 2), try to upload bundle.zip. Actual results: Get the error message "Bundle file upload failed" and a java error. Expected results: Should be able to upload the archive just fine.
Created attachment 430207 [details] bundle zip I don't know if it matters, but I'm also attaching my bundle. It doesn't do anything; I just made it up so I could run through the wizard.
Created attachment 430411 [details] bundle zipped with 100% more zip -r
the deploy.xml has invalid XML - erroneous deployment-unit end tag. When uploading just the recipe, don't use <tag/> notation, use <tag></tag> everywhere in the recipe.
<?xml version="1.0"?> <project name="myapp" default="main" xmlns:rhq="antlib:org.rhq.bundle"> <rhq:bundle name="Other App" version="1.6" description="this is just an example"> <rhq:deployment-unit name="appserver"> <rhq:archive name="bundle.zip"> <rhq:replace> <rhq:fileset> <include name="name.properties"></include> <include name="port.properties"></include> </rhq:fileset> </rhq:replace> </rhq:archive> </rhq:deployment-unit> <rhq:input-property name="app.ipaddress" description="the IP address" required="true"></rhq:input-property> <rhq:input-property name="http.port" description="the HTTP port" required="true" type="integer"></rhq:input-property> <rhq:input-property name="https.port" description="the HTTPS port" required="true" type="integer"></rhq:input-property> </rhq:bundle> <target name="main"></target> </project>
Created attachment 430417 [details] just the prop files, like i upload in the ui
This might have something to do with it :) HiddenItem versionField = new HiddenItem("version"); versionField.setValue("1.0"); This is in: org.rhq.enterprise.gui.coregui.client.components.upload.BundleFileUploadForm and its always setting the version of the uploaded bundle file to 1.0. We should, instead, always set it to the version of the bundle itself. versionField.setValue(this.bundleVersion.getVersion());
this is the patch to fix this: @@ -151,3 +151,3 @@ public class BundleFileUploadForm extends DynamicCallbackForm { HiddenItem versionField = new HiddenItem("version"); - versionField.setValue("1.0"); + versionField.setValue(this.bundleVersion.getVersion());
release-3.0.0 branch commit: 01445ef3c09a6429fb6ce4ba97f64dd2fc60a098 here's the replication steps to test the fix works: 1) Go to Bundle UI and click "New" to create a new bundle (i.e. start the Create Bundle wizard) 2) Select the "upload recipe" radio button 3) Copy the recipe XML text that Deon specified in comment #4 and paste it into the recipe text area 4) Click Next 5) Upload the attached bundle.zip as the bundle file 6) Finish the wizard. This created bundle with version 1.6. Now repeat - Click "New" to start the Create Bundle wizard again 7) Select the "upload recipe" radio button 8) Copy the recipe XML text that Deon specified in comment #4 and paste it into the recipe text area but change it as specified in the next step... 9) Change the bundle version from 1.6 to 2.0 10) Click Next 11) Upload the attached bundle.zip as the bundle file Step 11 should finish successfully. Finish the wizard and you should have two bundle versions now.
Verified on latest jon 2.4.0.GA_QA build#53 Followed replication steps to test the fix as provided in comment 8. The bundle.zip is uploaded successfully and displays two bundle versions.
Mass-closure of verified bugs against JON.