[ https://issues.apache.org/jira/browse/TOMEE-1337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14135172#comment-14135172
]
Romain Manni-Bucau commented on TOMEE-1337:
-------------------------------------------
Not sure your issue, this config works in tomee 1.7.0 (user/password/schema = root/pwd/test):
{code}
<?xml version="1.0" encoding="UTF-8"?>
<tomee>
<Resource id="My DataSource" type="DataSource">
JdbcDriver com.mysql.jdbc.Driver
JdbcUrl jdbc:mysql://localhost:3306/test
User root
Password pwd
JtaManaged true
</Resource>
<Resource id="My Unmanaged DataSource" type="DataSource">
JdbcDriver com.mysql.jdbc.Driver
JdbcUrl jdbc:mysql://localhost:3306/test
User root
Password pwd
JtaManaged false
</Resource>
<Resource id="bookDataSource" type="DataSource">
XaDataSource bookXaDataSource
DataSourceCreator dbcp
UserName root
Password pwd
</Resource>
<Resource id="bookXaDataSource" type="XADataSource"
class-name="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource">
Url jdbc:mysql://localhost:3306/test
User root
Password pwd
</Resource>
</tomee>
{code}
> Usage of com.mysql.jdbc.jdbc2.optional.MysqlXADataSource in Tomee 1.7.0 not possible
> ------------------------------------------------------------------------------------
>
> Key: TOMEE-1337
> URL: https://issues.apache.org/jira/browse/TOMEE-1337
> Project: TomEE
> Issue Type: Bug
> Affects Versions: 1.7.0
> Environment: Debian GNU/Linux 7.x 64bit
> Oracle Java 8u20 64 bit
> Mysql 5.5.38
> Reporter: Oliver Guenther
> Priority: Critical
> Attachments: catalina.out, wrong-source-with-username.png, wrong-source.png
>
>
> If you want to use the mysql xa datasource, the configuration parameters are ignored.
> To reproduce:
> Install mysql 5.5
> Install tomee.
> Create a database in mysql.
> Modify the tomee.xml like this.
> {code:xml}
> <Resource id="repairDataSource" type="javax.sql.DataSource">
> JdbcDriver com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
> JdbcUrl jdbc:mysql://localhost/database
> UserName YYYY
> Password XXXX
> JtaManaged true
> </Resource>
> {code}
> Start tomee.
> You will see some warnings in the log like this.
> [main] INFO unknown.jul.logger - Creating Resource(id=repairDataSource)
> [main] WARN unknown.jul.logger - Property "JdbcUrl" not supported by "repairDataSource"
> WARN unknown.jul.logger - Property "UserName" not supported by "repairDataSource"
> WARN unknown.jul.logger - Property "Password" not supported by "repairDataSource"
> WARN unknown.jul.logger - Property "PasswordCipher" not supported by "repairDataSource"
> WARN unknown.jul.logger - Property "ConnectionProperties" not supported by "repairDataSource"
> WARN unknown.jul.logger - Property "DefaultAutoCommit" not supported by "repairDataSource"
> WARN unknown.jul.logger - Property "DefaultReadOnly" not supported by "repairDataSource"
> WARN unknown.jul.logger - Property "InitialSize" not supported by "repairDataSource"
> WARN unknown.jul.logger - Property "MaxActive" not supported by "repairDataSource"
> WARN unknown.jul.logger - Property "MaxIdle" not supported by "repairDataSource"
> WARN unknown.jul.logger - Property "MinIdle" not supported by "repairDataSource"
> WARN unknown.jul.logger - Property "ValidationQuery" not supported by "repairDataSource"
> WARN unknown.jul.logger - Property "TestOnBorrow" not supported by "repairDataSource"
> WARN unknown.jul.logger - Property "TestOnReturn" not supported by "repairDataSource"
> WARN unknown.jul.logger - Property "TestWhileIdle" not supported by "repairDataSource"
> WARN unknown.jul.logger - Property "NumTestsPerEvictionRun" not supported by "repairDataSource"
> WARN unknown.jul.logger - Property "PoolPreparedStatements" not supported by "repairDataSource"
> WARN unknown.jul.logger - Property "MaxOpenPreparedStatements" not supported by "repairDataSource"
> WARN unknown.jul.logger - Property "AccessToUnderlyingConnectionAllowed" not supported
by "repairDataSource"
> The DataSoruce itself can be discovered via JNDI in the application but is not configured
probably.
> A usage results in a SQL Exception, saying user 'sa' has no access rights in the database.
> It seams that the configuration parameters are ignored and some default values from HSQLDB
are used.
> Using the "JdbcDriver com.mysql.jdbc.Driver" solves the issue, but this driver does not
support any XA abilities.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
|