CMP EJB Create Exception


EJB programming & troubleshooting: CMP EJB Create Exception

  1. CMP EJB Create Exception (1 messages)

    Hi, I'm trying to test a CMP EJB with JBoss AS using a MySQL DB. But I've got an exception I don't understand : --------------------------------------------------------- javax.ejb.CreateException: Error checking if entity exists:com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'tss.xuser' doesn't exist at org.jboss.ejb.plugins.cmp.jdbc.JDBCInsertPKCreateCommand.beforeInsert( at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute( at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity( at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity( at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity( at org.jboss.ejb.EntityContainer.createLocalHome( etc etc... --------------------------------------------------------- My table is named "user" and not "xuser". I checked it all up but don't find any reference to "xuser" in any files (ejb-jar.xml, xdoclet notations etc...). So I don't understand.... Could anybody help please ? Thanx. Here is my ejb-jar.xml concerning this user bean : ------------ <![CDATA[]]> User com.mystore.bean.user.UserLocalHome com.mystore.bean.user.UserLocal com.mystore.bean.user.UserBean Container java.lang.Long false 2.x User <![CDATA[]]> usrId <![CDATA[]]> usrEmail <![CDATA[]]> usrPassword <![CDATA[]]> usrDateOfBirth usrId findByEmailAndPassword java.lang.String java.lang.String <![CDATA[select object(usr) from User usr where usr.usrEmail = ?1 and usr.usrPassword = ?2]]> ------------

    Threaded Messages (1)

  2. configuration issue[ Go to top ]

    in standardjbosscmp-jdbc.xml you'll find near the end that "user" is a reserved word then they prepended by x. I suggest that you change the name of your field rather than "user", but maybe a modification of the configuration file is solution too. I didn't try to solve such a problem though.