Hi there,

I met 3 problems while deploy EJB using MySql. Anyone has met any of them and 
has a solution?

1. While following the 'Getting Started with JBoss 4.0' chapter 8, there is a 
key is too long problem. Sorry, I did not keep it. It seems that this happens 
to 'PlayerBean_teams_TeamBean_players'. It is true that this is the table name 
not key, but the prompt is complain to the key and display has limitation to 
1024. I manually create the table on MySql client console and meet the 
following problem.

2. With manually create the table above, I deploy the applcation. While run the 
client, it seems ok at beginning, but throw an exception. I compare the result 
in the tables with the one using HSQL, I did not find any different. Every 
record is in the correct table. The stack trace are appended at the end.

3. I try to deploy an BMP ejb, savingsaccount using MySql, but meet a problem 
of 'Table not found' problem. Here is the prompt:

'javax.ejb.EJBException: ejbFindByPrimaryKey: Table not found: SAVINGSACCOUNT 
in statement [select....' 

Anyone knows if I miss some deployment descriptor, like 'jboss-jdbc.xml' or 
'jbossbmp-jdbc.xml', functionally the same as 'jbosscmp-jdbc.xml'?

Thank you in advance.



Here is the stack trace of problem 2:

Server side:

22:29:22,890 INFO  [STDOUT] Debug: PlayerBean ejbLoad
22:29:22,890 INFO  [STDOUT] Debug: PlayerBean ejbStore
22:29:22,890 INFO  [STDOUT] Debug: PlayerBean ejbStore
22:29:22,906 INFO  [STDOUT] Debug: PlayerBean ejbStore
22:29:22,906 INFO  [STDOUT] Debug: PlayerBean ejbStore
22:29:22,906 INFO  [STDOUT] Debug: PlayerBean ejbStore
22:29:22,921 INFO  [STDOUT] Debug: RosterBean getLeaguesOfPlayer
22:29:22,937 INFO  [STDOUT] Debug: PlayerBean ejbLoad
22:29:22,937 INFO  [STDOUT] Debug: PlayerBean ejbStore
22:29:22,937 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

        at 
org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:111)
        at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:242)
        at 
org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:89)
        at 
org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:53)
        at 
org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
        at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:313)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
        at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:123)
        at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
        at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
        at 
org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:514)
        at org.jboss.ejb.Container.invoke(Container.java:870)
        at 
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:413)
        at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:44)
        at $Proxy97.getLeagues(Unknown Source)
        at roster.RosterBean.getLeaguesOfPlayer(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.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:584)
        at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:123)
        at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185

        at 
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:294)
        at 
org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
        at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:313)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
        at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
        at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
        at 
org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
        at org.jboss.ejb.Container.invoke(Container.java:870)
        at sun.reflect.GeneratedMethodAccessor113.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
        at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at 
org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
        at 
org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
        at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
        at 
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
        at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
        at java.lang.Thread.run(Thread.java:595)
22:29:22,953 ERROR [LogInterceptor] EJBException in method: public abstract 
java.util.ArrayList roster.Roster.getLeague
OfPlayer(java.lang.String) throws java.rmi.RemoteException:
javax.ejb.EJBException: Find failed: java.sql.SQLException: Illegal mix of 
collations (utf8_bin,IMPLICIT) and (utf8_gen
ral_ci,IMPLICIT) for operation '='
        at roster.RosterBean.getLeaguesOfPlayer(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.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:584)
        at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:123)
        at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185

        at 
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:294)
        at 
org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
        at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:313)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
        at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
        at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
        at 
org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
        at org.jboss.ejb.Container.invoke(Container.java:870)
        at sun.reflect.GeneratedMethodAccessor113.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
        at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at 
org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
        at 
org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
        at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
        at 
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
        at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
        at java.lang.Thread.run(Thread.java:595)

Client side:

Buildfile: jboss-build.xml

run-cmp:
     [java] P6 Ian Carlyle goalkeeper 555.0
     [java] P7 Rebecca Struthers midfielder 777.0
     [java] P8 Anne Anderson forward 65.0
     [java] P9 Jan Wesley defender 100.0
     [java] P10 Terry Smithson midfielder 100.0

     [java] T1 Honey Bees Visalia
     [java] T2 Gophers Manteca
     [java] T5 Crows Orland

     [java] P2 Alice Smith defender 505.0
     [java] P22 Janice Walker defender 857.0
     [java] P25 Frank Fletcher defender 399.0
     [java] P5 Barney Bold defender 100.0
     [java] P9 Jan Wesley defender 100.0

     [java] Caught an exception:
     [java] java.rmi.ServerException: RemoteException occurred in server 
thread; nested exception is:
     [java]     java.rmi.ServerException: EJBException:; nested exception is:
     [java]     javax.ejb.EJBException: Find failed: java.sql.SQLException: 
Illegal mix of collations (utf8_bin,IMPLICIT
) and (utf8_general_ci,IMPLICIT) for operation '='
     [java]     at 
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:325)
     [java]     at sun.rmi.transport.Transport$1.run(Transport.java:153)
     [java]     at java.security.AccessController.doPrivileged(Native Method)
     [java]     at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
     [java]     at 
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
     [java]     at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
     [java]     at java.lang.Thread.run(Thread.java:595)
     [java]     at 
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
     [java]     at 
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
     [java]     at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
     [java]     at 
org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
     [java]     at 
org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:118)
     [java]     at 
org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:163)
     [java]     at 
org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:103)
     [java]     at 
org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
     [java]     at 
org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
     [java]     at 
org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:106)
     [java]     at 
org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:91)
     [java]     at $Proxy2.getLeaguesOfPlayer(Unknown Source)
     [java]     at client.RosterClient.getSomeInfo(RosterClient.java:78)
     [java]     at client.RosterClient.main(RosterClient.java:52)
     [java] Caused by: java.rmi.ServerException: EJBException:; nested 
exception is:
     [java]     javax.ejb.EJBException: Find failed: java.sql.SQLException: 
Illegal mix of collations (utf8_bin,IMPLICIT
) and (utf8_general_ci,IMPLICIT) for operation '='
     [java]     at 
org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:352)
     [java]     at 
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:196)
     [java]     at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
     [java]     at 
org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
     [java]     at org.jboss.ejb.Container.invoke(Container.java:870)
     [java]     at sun.reflect.GeneratedMethodAccessor113.invoke(Unknown Source)
     [java]     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java]     at java.lang.reflect.Method.invoke(Method.java:585)
     [java]     at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
     [java]     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
     [java]     at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
     [java]     at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
     [java]     at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
     [java]     at 
org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
     [java]     at 
org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
     [java]     at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
     [java]     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java]     at java.lang.reflect.Method.invoke(Method.java:585)
     [java]     at 
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
     [java]     at sun.rmi.transport.Transport$1.run(Transport.java:153)
     [java]     at java.security.AccessController.doPrivileged(Native Method)
     [java]     at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
     [java]     at 
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
     [java]     at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
     [java]     at java.lang.Thread.run(Thread.java:595)
     [java] Caused by: javax.ejb.EJBException: Find failed: 
java.sql.SQLException: Illegal mix of collations (utf8_bin,I
MPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='
     [java]     at roster.RosterBean.getLeaguesOfPlayer(Unknown Source)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java]     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java]     at java.lang.reflect.Method.invoke(Method.java:585)
     [java]     at 
org.jboss.invocation.Invocation.performCall(Invocation.java:345)
     [java]     at 
org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:584)

     [java]     at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:123)
     [java]     at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.j
ava:185)
     [java]     at 
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.ja
va:294)
     [java]     at 
org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
     [java]     at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
     [java]     at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:313)
     [java]     at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
     [java]     at 
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
     [java]     ... 23 more

BUILD SUCCESSFUL
Total time: 11 seconds


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3868673#3868673

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3868673


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to