Uploaded image for project: 'IronJacamar'
  1. IronJacamar
  2. JBJCA-1320

Unable to create JDBC local datasource without properties on JBoss EAP 7

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Minor
    • None
    • WildFly/IronJacamar 1.3.3.Final
    • JDBC
    • None
    • Hide

      1. Prepare JBoss EAP 7.0.0

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

      ...
      <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>
      ...
      

      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

      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
      

      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.'

      Show
      1. Prepare JBoss EAP 7.0.0 2. Edit standalone.xml and MySQL datasource like below: ... <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> ... 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 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 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.'
    • Workaround Exists
    • Hide

      It's working after changing <datasource> with <xa-datasource> element in the datasources subsystem.

      Show
      It's working after changing <datasource> with <xa-datasource> element in the datasources subsystem.

    Description

      It should display warning message than throwing error as WFLY-6198.
      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 to JBoss EAP 7 or creating non-XA datasource for using local transactions in JBoss EAP 7.
      In case of MySQL datasource classes it's possible to use datasource-class and create non-XA datasource in JBoss EAP 6 and WildFly 10 but not EAP 7.

      Attachments

        Issue Links

          Activity

            People

              rhn-support-jwon Ted Won
              rhn-support-jwon Ted Won
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: