Hello, 

I want to automatically increment the primary key field in the database(MySql) 
in a CMP bean. I have written the following lines in the jbosscmp-jdbc.xml 

<unknown-pk> 
<unknown-pk-class>java.lang.Integer</unknown-pk-class> 
<field-name>userID</field-name> 
<column-name>userID</column-name> 
<jdbc-type>INTEGER</jdbc-type> 
<sql-type>INT(11)</sql-type> 
<auto-increment/> 
</unknown-pk> 
<entity-command name="mysql-get-generated-keys"/> 

But when i get a Nullpointer exception when i try to insert a record through my 
CMP. 
Can you please tell me where i am going wrong 
Thanks 

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

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


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to