1 Reply Latest reply on Jul 21, 2005 1:39 PM by Rajesh J

    How to use MS SQL Server auto generated keys.

    Rajesh J Newbie

      Hi,

      I have sqlserver 2000 so I need to use "mssql-get-generated-keys"

      I added the following to standardjbosscmp-jdbc.xml
      <entity-command name="mssql-get-generated-keys"
      class="org.jboss.ejb.plugins.cmp.jdbc.mssql.JDBCMsSQLCreateCommand"/>

      and in my beans I added

      * @ejb:pk class="java.lang.Integer"
      * generate="false"
      * @jboss.unknown-pk class="java.lang.Integer"
      * auto-increment="true"
      *
      * @jboss.entity-command name="mssql-get-generated-keys"

      but when I try to deploy I get the error

      19:49:53,002 ERROR [EntityContainer] Starting failed jboss.j2ee:jndiName=cmr.MarketingRequestItemShipmentsLocalHome,service=EJB
      org.jboss.deployment.DeploymentException: Could not load class: org.jboss.ejb.plugins.cmp.jdbc.mssql.JDBCMsSQLCreateCommand
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityCommandMetaData.(JDBCEntityCommandMetaData.java:61)
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.(JDBCApplicationMetaData.java:279)
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:67)

      Where can I find the missing files? and am I missing some setup.

      Rajesh J