Description of problem: When one or more JARs are deployed to an JBoss EAP server as a managed deployment -- such as EJBs, JDBC4 drivers, libraries, and other managed deployments which have a file name that ends with .jar -- DataSource and XADataSource component configuration can not be updated. This is because the _Driver Name_ property contains an invalid value and the available items from the list do not reflect installed or available drivers in the JBoss EAP server. If there are three or less JARs installed and the current configuration value does not equal the name of one of the JARs, navigating to a DataSource resource's configuration page, the user sees the following error: The following configuration properties have invalid values: [Driver Name]. The values must be corrected before the configuration can be saved. If there are four or more JARs installed, the property changes from a radio-button to a drop-down list. In this case, the error is not displayed but if the target driver is installed as a module or has a corresponding driver entry in the JBoss EAP server's configuration, it is not listed in the drop-down. Meaning that configuration can not be updated or changed. This issue also affects new data sources being created. Version-Release number of selected component (if applicable): 3.2.1 How reproducible: Always Steps to Reproduce: 1. Install and start JBoss EAP 6 standalone server. 2. Deploy some fake JAR files to JBoss EAP server: ( JBOSS_HOME="${TESTENV_DIR}"'/jboss-eap-6.2.0.GA' _tmp="$(mktemp -d)" mkdir -p "${_tmp}"/fake-jar-01 mkdir -p "${_tmp}"/fake-jar-02 mkdir -p "${_tmp}"/fake-jar-03 touch "${_tmp}"/fake-jar-01/empty-file touch "${_tmp}"/fake-jar-02/empty-file touch "${_tmp}"/fake-jar-03/empty-file cd "${_tmp}" zip -r fake-jar-01.jar fake-jar-01 zip -r fake-jar-02.jar fake-jar-02 zip -r fake-jar-03.jar fake-jar-03 mv *.jar /tmp cd /tmp rm -rf "${_tmp}" "$JBOSS_HOME"/bin/jboss-cli.sh --connect --command="deploy /tmp/fake-jar-01.jar" "$JBOSS_HOME"/bin/jboss-cli.sh --connect --command="deploy /tmp/fake-jar-02.jar" "$JBOSS_HOME"/bin/jboss-cli.sh --connect --command="deploy /tmp/fake-jar-03.jar" ) 3. Install and start JBoss ON system. 4. Import JBoss EAP standalone server into inventory. 5. Update connection settings for JBoss EAP resource as needed. 6. Navigate to the current configuration page of the EAP / datasources / DataSource (Standalone) / ExampleDS resource. 7. Add another fake JAR file to the JBoss EAP server: ( JBOSS_HOME="${TESTENV_DIR}"'/jboss-eap-6.2.0.GA' _tmp="$(mktemp -d)" mkdir -p "${_tmp}"/fake-jar-04 touch "${_tmp}"/fake-jar-04/empty-file cd "${_tmp}" zip -r fake-jar-04.jar fake-jar-04 mv *.jar /tmp cd /tmp rm -rf "${_tmp}" "$JBOSS_HOME"/bin/jboss-cli.sh --connect --command="deploy /tmp/fake-jar-04.jar" ) 8. Invoke service discovery and wait for it to complete. 9. Navigate to the current configuration page of the EAP / datasources / DataSource (Standalone) / ExampleDS resource. 10. From _Driver Name_ drop-down, select _fake-jar-01.jar_. 11. Attempt to change _Driver Name_ drop-down back to _h2_ -- its original and correct value. Actual results: After step 6., the error banner at the top of the page displays: The following configuration properties have invalid values: [Driver Name]. The values must be corrected before the configuration can be saved. You are unable to update any configuration due to the _Driver Name_ field containing an invalid value with no way of fixing it. After step 9., the control changes from a radio-button to a drop-down and you can now update other configuration properties but as demonstrated in step 11. you can not set _Driver Name_ to a valid driver defined in the JBoss EAP configuration. Expected results: _Driver Name_ field after step 6. and step 11. only displays _h2_ as this is the only driver installed in JBoss EAP 6.2. No error message is displayed at step 6. Additionally, perhaps a separate test case, if a JDBC 4 driver has been deployed, it too show appear as a valid option. Additional info: The UI control switch between step 6. and step 9. seems strange. It would make sense that the current selection -- of _h2_ -- appear as a radio-button after step 6. However, I am sure it would if the available drivers were actually being displayed. One can see the actual available drivers: "$JBOSS_HOME"/bin/jboss-cli.sh --connect --command="/subsystem=datasources:installed-drivers-list" { "outcome" => "success", "result" => [{ "driver-name" => "h2", "deployment-name" => undefined, "driver-module-name" => "com.h2database.h2", "module-slot" => "main", "driver-datasource-class-name" => "", "driver-xa-datasource-class-name" => "org.h2.jdbcx.JdbcDataSource", "driver-class-name" => "org.h2.Driver", "driver-major-version" => 1, "driver-minor-version" => 3, "jdbc-compliant" => true }] } If you deploy a JDBC 4 driver, it too will appear in the above output. The root cause of this issue is that the _Dirver Name_ property is populated with a list of all JARs deployed in the JBoss EAP server. Not sure why we are doing this as JARs on their own do not equate to datasource driver names. Only JARs that are self-contained JDBC version 4+ drivers can be deployed in this manner. Modules or user defined datasources or XA datasource drivers are configured via modules and server configuration and will never show up in _Deployments_: <c:simple-property name="driver-name" required="true" type="string" description="Name of the (existing) JDBC driver to use" readOnly="false"> <c:option-source target="resource" expression="type=^Deployment$" filter=".*\.jar"/> </c:simple-property>
Created attachment 918531 [details] Screen shot Step 6 Screen shot showing error and UI radio-buttons at Step 6. This error prevents the user from updating any of the configuration for ExampleDS datasource.
Created attachment 918535 [details] Screen shot Step 9 Screen shot showing UI drop-down at Step 9. No error here because the drop-down is populated with _ha_ and this is selected by default.
Created attachment 918536 [details] Screen shot Step 11 Screen shot showing UI drop-down at Step 11. Notice that _h2_ is no longer in the drop-down.
Fixed in master commit e99089debfa95ad99d333c38414ff780b3ecf446 Author: Michael Burman <miburman> Date: Mon Jul 28 15:02:43 2014 +0300 [BZ 1120411] Only allow selecting a proper jdbc driver in the datasource configuration
AS7-951 caused issues with (Profile), have to edit this.
Commits in master solve issues with testing and Profile (need to be applied in this order): a106392596b6f8e717ee57c7a7b33d8ea891b9e4 c83e8c4536b07b7ea9b6571ef68af11c41018234
Problems cherry-picking this. First, in comment #4, its a bad commit hash: git cherry-pick -x e99089debfa95ad99d333c38414ff780b3ecf446 fatal: bad object e99089debfa95ad99d333c38414ff780b3ecf446 Second, cherry picking a106392596b6f8e717ee57c7a7b33d8ea891b9e4 from commit #6 results in a conflict.
I think you want to CP: 28df962ff235511387aff36d79133ed503dc7769 a106392596b6f8e717ee57c7a7b33d8ea891b9e4
Cherry-picked and squashed to the release/jon3.2.x: commit 912c719465fa1f9a1efe11e6f814a38cfa6bf5a5 Author: Michael Burman <miburman> Date: Mon Jul 28 15:02:43 2014 +0300 [BZ 1120411] Only allow selecting a proper jdbc driver in the datasource configuration (cherry picked from commit 28df962ff235511387aff36d79133ed503dc7769) [BZ 1120411] Cherry-picked commits a106392596b6f8e717ee57c7a7b33d8ea891b9e4 and c83e8c4536b07b7ea9b6571ef68af11c41018234 to fix integration tests
Moving to ON_QA as this is available for test in JON 3.2.3 ER01 build: http://jon01.mw.lab.eng.bos.redhat.com:8042/dist/release/jon/3.2.3.GA/8-14-14/
The issue is reproducible in JON 3.2.3 ER01 build. - Followed the steps and observed that after step 6, the error banner at the top of the page displays: The following configuration properties have invalid values: [Driver Name]. The values must be corrected before the configuration can be saved - After step 11, the dropdown 'Driver Name' does not show _h2_ value again after selecting _fake-jar-01.jar_. Please refer the attached screenshot.
Created attachment 929163 [details] screenshot
This fix was made available in JBoss ON 3.3 as per bug 1127869.