0 Replies Latest reply on Nov 21, 2003 12:22 PM by Vijay Kandy

    Error checking if entity exists

    Vijay Kandy Newbie

      Hello All,

      I am trying to build a CMP with Xdoclet and eclipse. My tags look like this:

      /**
      * A UserBean represents a user (person, tool or process) that can
      * issue a Command.
      *
      * @ejb.bean name = "User"
      * jndi-name = "ejb/com/mailcode/pbo/um/User"
      * display-name = "User EJB"
      * type = "CMP"
      * view-type = "both"
      * cmp-version = "2.x"
      * schema = "User"
      * primkey-field = "id"
      *
      * @ejb.transaction type = "Required"
      * @ejb.util generate = "false"
      * @ejb.value-object name = "User" match = "*"
      * @ejb:finder signature="java.util.Collection findAll()" query="SELECT OBJECT(a) FROM User AS a"
      */
      public abstract class UserBean implements EntityBean
      {
      //abstract methods...
      }

      When I run a client, I am thrown this trace:

      javax.ejb.FinderException: Find failed: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Incorrect syntax near the keyword 'User'.
      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)

      Can someone help me?

      Thanks,
      Vijay