Bug 968888

Summary: 'installed-drivers-list' operation doesn't pick up new driver in domain mode
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Osamu Nagano <onagano>
Component: Domain ManagementAssignee: Brian Stansberry <brian.stansberry>
Status: CLOSED WORKSFORME QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: asaji, jawilson
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-02 00:26:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Osamu Nagano 2013-05-30 08:28:48 UTC
Description of problem:
The management console has a wizard for JDBC datasource creation.  In this wizard, '/subsystem=datasources:installed-drivers-list' is used to list up available JDBC drivers.  This works as expected in standalone mode but doesn't in domain mode.  It cannot pick up a new installed JDBC driver, only 'h2' is listed even after the server restart.


Steps to Reproduce:

In standalone mode (works correctly) of CLI:
1. Confirm the initial state.  Only 'h2' will be listed.
/subsystem=datasources:installed-drivers-list

2. Add a module and a driver like this.
module add --name=org.postgresql --resources=/usr/share/java/postgresql-jdbc-9.1.901.jar --dependencies=javax.api,javax.transaction.api
/subsystem=datasources/jdbc-driver=postgresql:add(driver-name=postgresql,driver-module-name=org.postgresql,driver-xa-datasource-class-name=org.postgresql.xa.PGXADataSource)

3. List the driver again.  The new one will be listed.
/subsystem=datasources:installed-drivers-list


In domain mode (seems broken) of CLI:
1. Confirm the initial state.  Only 'h2' will be listed.
/host=master/server=server-one/subsystem=datasources:installed-drivers-list

2.  Add a new driver to default profile like this.
/profile=default/subsystem=datasources/jdbc-driver=postgresql:add(driver-name=postgresql,driver-module-name=org.postgresql,driver-xa-datasource-class-name=org.postgresql.xa.PGXADataSource)

3. List the driver again.  The new one will be not listed.
/host=master/server=server-one/subsystem=datasources:installed-drivers-list


Additional info:
Under /profile=default/subsystem=datasources, you can see all JDBC drivers correctly.  But this node doesn't have 'installed-drivers-list' operation.
--
[domain@localhost:9999 /] ls /profile=default/subsystem=datasources/jdbc-driver 
h2          postgresql  
--

Comment 1 Osamu Nagano 2013-05-31 01:08:53 UTC
Similar discussion is found in AS7-951.
https://issues.jboss.org/browse/AS7-951

Comment 3 Brian Stansberry 2013-06-02 00:26:49 UTC
Works fine for me.

Note that /profile=default is unrelated to /host=master/server=server-one. Use /profile=full and it works fine.

Comment 4 Anu Saji 2013-06-02 23:44:37 UTC
Hi,
 I want to reopen the case .
 when I try the following command in CLI to track the jdbc driver.
[domain@localhost:9999 /] /profile=full-ha/subsystem=datasources/jdbc-driver=oraclexa:read-resource

I can list it .

The real issue is when I want to configure the Datasource from management console using the driver created .
I can't list the driver from selection. Only *h2* driver appears .

Thanks

Comment 5 Osamu Nagano 2013-06-03 05:20:43 UTC
My shame, the profile should have been consistent on the profile among the driver added and the server-group assigned.

BTW, sometimes the management console lists a driver that is not installed in the selected profile.  I may file another bugzilla against Consoles once the reproducing condition becomes clear.

Comment 7 Anu Saji 2013-06-04 22:08:09 UTC
A new bug is created Bug 970419 and has been attached to this case to address the profile mismatch in management console.