0 Replies Latest reply on Mar 3, 2005 3:26 PM by ittoronto

    config BMP to use MySql ?

    ittoronto

      Hi there,

      I am trying to config a BMP to use MySql, but the BMP always look for the 'java:/DefaultDS'. I have changed the configuration of JNDI name in 'jboss.xml' to 'java:/MySqlDS'. It seems to me that there is no problem with MySql as I could use it in a web application through Servlet.

      I tried to config a CMP to use MySql too. It can, but throwing an exception. The contents in the tables seem correct. The stack trace (part) is at the end of this email.

      The person who can solve these two problems will save me a lot of time and it will be a great help. Thanks in advance.

      Stack trace:

      12:17:02,421 INFO [STDOUT] Debug: PlayerBean ejbStore
      12:17:02,453 INFO [STDOUT] Debug: RosterBean getLeaguesOfPlayer
      12:17:02,453 INFO [STDOUT] Debug: PlayerBean ejbLoad
      12:17:02,453 INFO [STDOUT] Debug: PlayerBean ejbStore
      12:17:02,468 ERROR [PlayerBean#ejbSelectLeagues] Find failed
      java.sql.SQLException: Illegal mix of collations (utf8_bin,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2847)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1531)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1622)
      at com.mysql.jdbc.Connection.execSQL(Connection.java:2376)
      at com.mysql.jdbc.Connection.execSQL(Connection.java:2297)
      at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1860)
      at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1705)
      at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:296)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:206)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:128)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCSelectorBridge.execute(JDBCSelectorBridge.java:99)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCSelectorBridge.invoke(JDBCSelectorBridge.java:70)
      at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:91)
      at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:62)
      at team.PlayerBean$Proxy.ejbSelectLeagues()
      at team.PlayerBean.getLeagues(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.java:1174)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBCRelationInterceptor.java:72)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:273)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)