I am new to ejb's and jboss which really complicates things for me. I am trying 
to deploy a cmp application but recieve a sql exception. 

Error:
Caused by: java.sql.SQLException: Unexpected token: ) in statement [CREATE TABLE
 CUSTOMEREJB (name VARCHAR(256), birthdate TIMESTAMP, sssNo VARCHAR(256), addres
s VARCHAR(256), annualSalary DOUBLE, CONSTRAINT PK_CUSTOMEREJB PRIMARY KEY ()]
        at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
        at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)

Here is my ejb-jar.xml

 <enterprise-beans>
   
      
            This bean represents customer
      
      <ejb-name>CustomerEJB</ejb-name>
      <abstract-schema-name>customer</abstract-schema-name>
      com.demo.entity.cmp.CustomerHomeRemote
      com.demo.entity.cmp.CustomerRemote
      <ejb-class>com.demo.entity.cmp.CustomerBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.Integer</prim-key-class>
      False
      <security-identity><use-caller-identity/></security-identity>
      <resource-ref>
           DataSource for Demo Database
           <res-ref-name>jdbc/cmp-demo</res-ref-name>
           <res-type>javax.sql.DataSource</res-type>
           <res-auth>Container</res-auth>
      </resource-ref>
      <cmp-field>
         <field-name>name</field-name>
      </cmp-field>
      <cmp-field>
         <field-name>birthdate</field-name>
      </cmp-field>
      <cmp-field>
         <field-name>sssNo</field-name>
      </cmp-field>
      <cmp-field>
         <field-name>address</field-name>
      </cmp-field>
      <cmp-field>
         <field-name>annualSalary</field-name>
      </cmp-field>      
      
       <query-method>
        <method-name>findBySssNo</method-name>
         <method-params>
           <method-param>java.lang.String</method-param>
         </method-params>
       </query-method>
       <ejb-ql>SELECT ID FROM CUSTOMER WHERE SSS_NO=?</ejb-ql>
      
      
 </enterprise-beans>
</ejb-jar>


What am I doing wrong?

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

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


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to