0 Replies Latest reply on Oct 7, 2004 4:11 PM by Richard Nunziata

    Incomplete select stmt generated: can anyone help

    Richard Nunziata Newbie

      Can anyone tell me why I would get a incomplete Select stmt generated during a create. The primary key class is java.lang.Integer. I am using MySql. Where would I beging to look for an error of this type. I get the same error on the findby. There appear to be no other related error messages in the log.

      Thank you
      Richard



      2004-10-07 13:00:27,441 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.Cabin] Executing SQL: SELECT COUNT(*) FROM Cabin WHERE
      2004-10-07 13:00:27,441 ERROR [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.Cabin] Error checking if entity exists
      java.sql.SQLException: Syntax error or access violation message from server: "You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1"
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1167)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1278)
      at com.mysql.jdbc.Connection.execSQL(Connection.java:2247)
      at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1586)
      at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:296)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCInsertPKCreateCommand.beforeInsert(JDBCInsertPKCreateCommand.java:83)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute(JDBCAbstractCreateCommand.java:137)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:565)
      at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:222)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:269)
      at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:768)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)when performing a create.

      2004-10-07 13:00:27,441 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.Cabin] Executing SQL: SELECT COUNT(*) FROM Cabin WHERE
      2004-10-07 13:00:27,441 ERROR [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.Cabin] Error checking if entity exists
      java.sql.SQLException: Syntax error or access violation message from server: "You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1"
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1167)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1278)
      at com.mysql.jdbc.Connection.execSQL(Connection.java:2247)
      at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1586)
      at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:296)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCInsertPKCreateCommand.beforeInsert(JDBCInsertPKCreateCommand.java:83)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute(JDBCAbstractCreateCommand.java:137)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:565)
      at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:222)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:269)
      at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:768)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)