Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-1270

Datasources fraction does not interpret xa-datasource-properties

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2017.4.0
    • Fix Version/s: 2017.5.0
    • Component/s: core
    • Labels:
      None
    • Sprint:
      2017-Apr-B
    • Steps to Reproduce:
      Hide

      Create wildfly-swarm project with arquillian, EJB, JPA, Datasources fraction.
      Add MySQL connector java to pom
      Create YML projects defaults with xa dataource
      Create arquillian test to construct and start wildfly-swarm server
      xa datasource URL is shown as undefined in console output on starting server.

      This has been reproduced by another user with Postgresql xa datatsource using the fraction api to configure the datasource.

      Show
      Create wildfly-swarm project with arquillian, EJB, JPA, Datasources fraction. Add MySQL connector java to pom Create YML projects defaults with xa dataource Create arquillian test to construct and start wildfly-swarm server xa datasource URL is shown as undefined in console output on starting server. This has been reproduced by another user with Postgresql xa datatsource using the fraction api to configure the datasource.

      Description

      Datasources configuration in project-defaults.yml:

      swarm:
        datasources:
          xa-data-sources:
            supportHunter-ds:
              allocation-retry: 10
              transaction-isolation: TRANSACTION_REPEATABLE_READ
              driver-name: mysql
              jndi-name: java:jboss/datasources/supportHunter-ds
              user-name: root
              max-pool-size: 20
              min-pool-size: 10
              pool-prefill: true
              xa-datasource-properties:
                URL: jdbc:mysql://localhost:3306/SUPPORT_HUNTER
      

      snapshot of relevant portion of console log:

      2017-04-12 14:10:53,557 DEBUG [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (ServerService Thread Pool -- 2) supportHunter-ds: getConnection(null, WrappedConnectionRequestInfo@2a791412[userName=root]) [0/20]
      2017-04-12 14:10:53,557 WARN  [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (ServerService Thread Pool -- 2) IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: IJ031084: Unable to create connection
      	at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:509)
      	at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:416)
      	at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.createConnectionEventListener(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:1320)
      	at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.getConnection(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:496)
      	at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:617)
      	at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:589)
      	at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:626)
      	at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:429)
      	at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:747)
      	at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:138)
      	at org.jboss.as.connector.subsystems.datasources.WildFlyDataSource.getConnection(WildFlyDataSource.java:66)
      	at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122)
      	at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:33)
      	at org.hibernate.tool.hbm2ddl.DatabaseExporter.<init>(DatabaseExporter.java:35)
      	at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:425)
      	at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:361)
      	at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:350)
      	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:467)
      	at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444)
      	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:879)
      	at org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)
      	at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:161)
      	at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:121)
      	at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:667)
      	at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:193)
      	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)
      	at org.jboss.threads.JBossThread.run(JBossThread.java:320)
      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Failed to get a connection using the URL 'undefined'.
      	at sun.reflect.GeneratedConstructorAccessor36.newInstance(Unknown Source)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
      	at com.mysql.jdbc.Util.getInstance(Util.java:408)
      	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:918)
      	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:897)
      	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:886)
      	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860)
      	at com.mysql.jdbc.jdbc2.optional.MysqlDataSource.getConnection(MysqlDataSource.java:413)
      	at com.mysql.jdbc.jdbc2.optional.MysqlDataSource.getConnection(MysqlDataSource.java:136)
      	at com.mysql.jdbc.jdbc2.optional.MysqlXADataSource.getXAConnection(MysqlXADataSource.java:56)
      	at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:492)
      	... 28 more
      

      Used default MySQL driver. Supplied MySQL connector Java 5.1.42

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  bob.mcwhirter Bob McWhirter
                  Reporter:
                  edwin.j.jaufmann.jr Edwin Jaufmann
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: