[jboss-jira] [JBoss JIRA] (WFLY-7018) Valid Wildfly 10.0.0.Final DataSource fails in Wildfly 10.1.0.Final
Arnie Morein (JIRA)
issues at jboss.org
Sat Jan 14 13:13:00 EST 2017
[ https://issues.jboss.org/browse/WFLY-7018?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13348312#comment-13348312 ]
Arnie Morein commented on WFLY-7018:
------------------------------------
I suspect this issue just wasted two weeks of my time on a project. I was deploying 10.1.0 on a server in AWS using a ZIPped copy that was working fine on my development machine (WF and MySQL local). On the AWS server WF was reporting connection refused when starting up and trying to create the connection pool. None of the usual diagnostic issues were at fault so I was stumped. Then I found this issue.
I cloned the DS to use the MySQL XA driver - and it worked just fine!
I have no idea why or how this was happening, but only because WF was connecting to a different machine for the data did the bug show up. The URL was valid (both DNS name and IP).
I downgraded to WF 9.0.2.Final and the non-XA DS worked fine so I can move on.
But this is a serious issue, especially since the error message indicates a communications issue which isn't really the case.
If a DS can be set up with only a connection URL, and that URL doesn't have a valid server name or it cannot be reserved, the library should report something to that effect. It should NOT default to localhost! That is a horrible behavior!!
Any changes to values in the configuration file should be reported in the log. I had NO WAY of knowing about this change to what was configured.
> Valid Wildfly 10.0.0.Final DataSource fails in Wildfly 10.1.0.Final
> -------------------------------------------------------------------
>
> Key: WFLY-7018
> URL: https://issues.jboss.org/browse/WFLY-7018
> Project: WildFly
> Issue Type: Bug
> Components: JCA
> Affects Versions: 10.1.0.Final
> Reporter: Mark S
> Assignee: Lin Gao
>
> My current Wildfly 10.0.0.Final (Non-XA) Datasource configuration will not work for Wildfly 10.1.0.Final. See the "Steps to Reproduce" section.
> The stacktrace points to here:
> * https://source.jboss.org/browse/IronJacamar/adapters/src/main/java/org/jboss/jca/adapters/jdbc/local/LocalManagedConnectionFactory.java?hb=true#to108
> * https://github.com/ironjacamar/ironjacamar/blob/ironjacamar-1.3.4.Final/adapters/src/main/java/org/jboss/jca/adapters/jdbc/local/LocalManagedConnectionFactory.java#L108
> h3. The work-around
> h3. Wildfly 10.1.0.Final Datasource configuration via CLI
> {code}
> # No parameter to set a connection property value.
> {code}
> h3. Wildfly 10.1.0.Final Datasource configuration via XML (standalone-full.xml)
> Note the addition of {{<connection-property name="databaseName">myapp</connection-property>}}
> {code:xml}
> <subsystem xmlns="urn:jboss:domain:datasources:4.0">
> <datasources>
> <datasource jndi-name="java:/MY_APP_DS" pool-name="Postgres_MY_APP_DS">
> <connection-url>jdbc:postgresql://localhost:5432/myapp</connection-url>
> <connection-property name="databaseName">myapp</connection-property>
> <driver>postgres</driver>
> <security>
> <user-name>myapp</user-name>
> <password>myapp</password>
> </security>
> <validation>
> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker"/>
> <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter"/>
> </validation>
> </datasource>
> <drivers>
> <driver name="postgres" module="org.postgres">
> <driver-class>org.postgresql.Driver</driver-class>
> <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
> <datasource-class>org.postgresql.ds.PGSimpleDataSource</datasource-class>
> </driver>
> </drivers>
> </datasources>
> </subsystem>
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list