[jboss-jira] [JBoss JIRA] (JBJCA-1320) Unable to create JDBC local datasource without properties on JBoss EAP 7

ted won (JIRA) issues at jboss.org
Mon May 30 03:18:00 EDT 2016


     [ https://issues.jboss.org/browse/JBJCA-1320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ted won updated JBJCA-1320:
---------------------------
               Description: 
It's failed with error "IJ031103: At least one connection property must be defined for datasource-class" when it's doing migration from JBoss EAP 6 / WildFly 10 or creating non-XA datasource, using local transactions in JBoss EAP 7.
It should display warning message than error.
In case of MySQL datasource classes it's possible to use datasource-class for non-XA datasource in JBoss EAP 6 and WildFly 10 but EAP 7.
        Steps to Reproduce: 
1. Prepare JBoss EAP 7.0.0

2. Edit standalone.xml and MySQL datasource like below:

{code:xml}
...
<subsystem xmlns="urn:jboss:domain:datasources:4.0">
    <datasources>
        <datasource jndi-name="java:jboss/datasources/MySqlDS" pool-name="MySqlDS">
            <connection-url>jdbc:mysql://localhost:3306/mydb</connection-url>
            <driver>com.mysql</driver>
            <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
            <pool>
                <min-pool-size>10</min-pool-size>
                <max-pool-size>100</max-pool-size>
                <prefill>true</prefill>
            </pool>
            <security>
                <user-name>root</user-name>
                <password></password>
            </security>
            <statement>
                <prepared-statement-cache-size>32</prepared-statement-cache-size>
                <share-prepared-statements/>
            </statement>
        </datasource>
        <drivers>
            <driver name="com.mysql" module="com.mysql">
                <datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource</datasource-class>
            </driver>
        </drivers>
    </datasources>
</subsystem>
...
{code}

3. Run JBoss EAP 7.0.0
bin/standalone.sh

4. Failed to start service org.wildfly.data-source.MySqlDS
javax.resource.ResourceException: IJ031103: At least one connection property must be defined for datasource-class: com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource

{code}
15:55:35,314 ERROR [org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$AS7DataSourceDeployer] (MSC service thread 1-3) Error during the deployment of java:jboss/datasources/MySqlDS: javax.resource.ResourceException: IJ031103: At least one connection property must be defined for datasource-class: com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
	at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createConnectionFactory(LocalManagedConnectionFactory.java:108)
	at org.jboss.jca.deployers.common.AbstractDsDeployer.deployDataSource(AbstractDsDeployer.java:772)
	at org.jboss.jca.deployers.common.AbstractDsDeployer.createObjectsAndInjectValue(AbstractDsDeployer.java:312)
	at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$AS7DataSourceDeployer.deploy(AbstractDataSourceService.java:364)
	at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.start(AbstractDataSourceService.java:145)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

15:55:35,315 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service org.wildfly.data-source.MySqlDS: org.jboss.msc.service.StartException in service org.wildfly.data-source.MySqlDS: WFLYJCA0033: Error during the deployment of MySqlDS
	at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.start(AbstractDataSourceService.java:159)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.jboss.msc.service.StartException in anonymous service: WFLYJCA0032: Unable to start the ds because it generated more than one cf
	at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.start(AbstractDataSourceService.java:147)
	... 5 more
{code}


5. Actual expected: 
Go to JBoss EAP 7.0.0 Management Console
Go to http://localhost:9990/console/App.html#profile/datasources;name=MySqlDS
Run 'Test Connection' and return 'Successfully connected to database MySqlDS.'

                Attachment: com.msql.tar.gz
    Workaround Description: It's working after changing <datasource> with <xa-datasource> element in the datasources subsystem.
                Workaround: Workaround Exists


> Unable to create JDBC local datasource without properties on JBoss EAP 7
> ------------------------------------------------------------------------
>
>                 Key: JBJCA-1320
>                 URL: https://issues.jboss.org/browse/JBJCA-1320
>             Project: IronJacamar
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: WildFly/IronJacamar 1.3.3.Final
>            Reporter: ted won
>            Assignee: ted won
>            Priority: Minor
>         Attachments: com.msql.tar.gz
>
>
> It's failed with error "IJ031103: At least one connection property must be defined for datasource-class" when it's doing migration from JBoss EAP 6 / WildFly 10 or creating non-XA datasource, using local transactions in JBoss EAP 7.
> It should display warning message than error.
> In case of MySQL datasource classes it's possible to use datasource-class for non-XA datasource in JBoss EAP 6 and WildFly 10 but EAP 7.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list