Bug 968888 - 'installed-drivers-list' operation doesn't pick up new driver in domain mode
'installed-drivers-list' operation doesn't pick up new driver in domain mode
Status: CLOSED WORKSFORME
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Domain Management (Show other bugs)
6.1.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Brian Stansberry
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-30 04:28 EDT by Osamu Nagano
Modified: 2013-08-20 15:41 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-01 20:26:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Osamu Nagano 2013-05-30 04:28:48 EDT
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-30 21:08:53 EDT
Similar discussion is found in AS7-951.
https://issues.jboss.org/browse/AS7-951
Comment 3 Brian Stansberry 2013-06-01 20:26:49 EDT
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 19:44:37 EDT
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 01:20:43 EDT
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 18:08:09 EDT
A new bug is created Bug 970419 and has been attached to this case to address the profile mismatch in management console.

Note You need to log in before you can comment on or make changes to this bug.