Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 900586 (JBPAPP6-944)

Summary: It is not possible enable a datasource via CLI
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Tyronne Wickramarathne <tyronne.forums>
Component: JCAAssignee: Stefano Maestri <smaestri>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: matthias.kirst, smaestri, tfonteyn, twells, vrastsel
Target Milestone: ---   
Target Release: EAP 6.0.1   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBPAPP6-944
Whiteboard: cli
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
JBoss-EAP6-Beta2
Last Closed: 2012-10-19 01:53:39 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 Tyronne Wickramarathne 2012-06-05 08:25:55 UTC
Affects: Compatibility/Configuration, Release Notes
Help Desk Ticket Reference: https://na7.salesforce.com/500A0000009gBmZ
Steps to Reproduce: - Start the application server
- Deploy a datasource or use the existing datasource
- Disable the given datasource
- Verify the preferred datasource has been disabled via admin console
- Try to enable the datasource via CLI
- The "JBAS014749: Operation handler failed: Service jboss.data-source-config.ExampleDS is already registered" will be thrown
project_key: JBPAPP6

It's not possible to enable a datasource via CLI. The following exception gets thrown :
JBAS014749: Operation handler failed: Service jboss.data-source-config.ExampleDS is already registered

Comment 1 Jesper Pedersen 2012-06-05 12:06:11 UTC
Fixed in CR1

Comment 2 Tom Fonteyne 2012-07-05 13:54:52 UTC
I don't understand why this was "rejected" and has a comment "Fixed in CR1" ?

We just ran into this issue with JBoss EAP 6.0.0 GA, and the issue is clearly still there.

Reproduction:

- add a jdbc driver via a module
- edit standalone.xml, adding a driver and a datasource.

                    <driver name="mysql" module="com.mysql.jdbc">
                        <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
                    </driver>

                <datasource jndi-name="java:/mysqlDS" pool-name="mysqlDS">
                    <connection-url>jdbc:mysql://localhost:3306/db</connection-url>
                    <driver>mysql</driver>
                    <security>
                        <user-name>user</user-name>
                        <password>pass</password>
                    </security>
                    <validation>
                        <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/>
                        <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/>
                    </validation>
                </datasource>

Note that the datasource does not have the "enabled" attribute.
- start the server

- in the GUI, use the "enable" button => fails
- in the CLI:  /subsystem=datasources/data-source=mysqlDS:read-attribute(name=enabled)
    -> reports "false"
   write-attribute does not work.

Next, stop and edit the xml so it reads:

<datasource jndi-name="java:/mysqlDS" pool-name="mysqlDS" enabled="false">

- start, and access the "enable" button in the GUI -> it now WORKS. Disabling also works.
- CLI: nothing changed, you still cannot write to the attribute.
  read-resource-description shows why: it's read-only.

So in summary:
- attribute not present -> GUI cannot toggle it
- attribute present -> GUI works fine
- both cases, CLI cannot write the attribute.

Comment 3 Stefano Maestri 2012-07-05 14:45:56 UTC
Link: Added: This issue Cloned to JBPAPP-9452


Comment 4 Stefano Maestri 2012-07-05 14:46:08 UTC
I've checked. There is a problem in xml parser default value for this attribute. I'm fixing it.
There is also a misuse of attribute/operation in cli here:
command line tool works fine using proper commands :enable and :disable. BTW in description enabled attribute is declared read-only and works as expected.




Comment 5 Stefano Maestri 2012-07-05 14:46:35 UTC
Link: Added: This issue Cloned to JBPAPP-9453


Comment 6 Vladimir Rastseluev 2012-09-21 09:39:13 UTC
Verified on EAP 6.0.1 ER2

Comment 7 Tom WELLS 2012-10-04 12:35:09 UTC
Release Notes Docs Status: Added: Not Yet Documented
Affects: Removed: Compatibility/Configuration Added: Compatibility/Configuration,Release Notes


Comment 8 Tom WELLS 2012-10-04 12:35:28 UTC
Updated release note fields.

Comment 9 Dana Mison 2012-10-17 22:36:52 UTC
reopening for release note updates

Comment 10 Dana Mison 2012-10-17 22:37:48 UTC
Writer: Added: sgilda


Comment 11 Dana Mison 2012-10-17 23:14:29 UTC
Writer: Removed: sgilda Added: tomwells


Comment 12 Tom WELLS 2012-10-19 01:51:59 UTC
Release Notes Docs Status: Removed: Not Yet Documented Added: Documented as Resolved Issue
Release Notes Text: Added: Datasources could not be enabled via the Management CLI, due to an XML parser error in the default value of the enabled attribute. The error has been corrected, and datasources can now be enabled successfully.


Comment 13 Anne-Louise Tangring 2012-11-13 20:07:52 UTC
Release Notes Docs Status: Removed: Documented as Resolved Issue 
Writer: Removed: tomwells 
Release Notes Text: Removed: Datasources could not be enabled via the Management CLI, due to an XML parser error in the default value of the enabled attribute. The error has been corrected, and datasources can now be enabled successfully. 
Docs QE Status: Removed: NEW