Solucionado (ver solução)
Solucionado
(ver solução)
2
respostas

Erro de conexão ao iniciar o JBoss


LOG

16:13:09,501 WARN [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (JCA PoolFiller) IJ000610: Unable to fill pool: javax.resource.ResourceException: Could not create connection at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:277) at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:235) at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:761) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final] at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.fillToMin(SemaphoreArrayListManagedConnectionPool.java:706) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final] at org.jboss.jca.core.connectionmanager.pool.mcp.PoolFiller.run(PoolFiller.java:97) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final] at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45] Caused by: java.sql.SQLException: java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:975) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:920) at com.mysql.jdbc.ConnectionImpl.buildCollationMapping(ConnectionImpl.java:1074) at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3590) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2531) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2301) at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:834) at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_45] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_45] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_45] at java.lang.reflect.Constructor.newInstance(Constructor.java:526) [rt.jar:1.7.0_45] at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:416) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:317) at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:249) ... 5 more Caused by: java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long at com.mysql.jdbc.ConnectionImpl.buildCollationMapping(ConnectionImpl.java:1019) ... 18 more


DATASOURCE

jdbc:mysql://localhost:3306/livraria com.mysql 10 100 true root

DRIVER

com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
2 respostas

Oi Marcio,

Esse problema geralmente está relacionado com um bug no jar do mysql.

Qual versão do mysql-connector você está utilizando?

Tente atualizar para uma versão mais nova e veja se resolve.

solução!

Bom dia pessoal, consegui resolver o problema trocando o driver do mysql pela versão mysql-connector-java-5.1.45-bin.jar, e adicionando a linha <driver-class>com.mysql.jdbc.Driver</driver-class> na configuração do driver do mysql dentro do arquivo standalone.xml.

<driver name="com.mysql" module="com.mysql">
  <driver-class>com.mysql.jdbc.Driver</driver-class>
  <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
</driver>

Espero que ajude alguém que esteja passando pelo mesmo problema. Abraço.