wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Primary Key Generation using entity command in Jboss Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Primary Key Generation using entity command in Jboss " Watch "Primary Key Generation using entity command in Jboss " New topic
Author

Primary Key Generation using entity command in Jboss

Sivakumar Nachimuthu
Ranch Hand

Joined: Aug 10, 2004
Posts: 52
I have written a custom implementation for Primary Key Generation using entity command. This implementation works fine for entity beans having Integer as Primary Key Class. The Class Cast Exception is being thrown for the beans having java.lang.Long as primary key Class.

I have the following ejb doclet code in my bean



The exception is thrown when i call local.getEventId() method .






Where should i specify the primary class as java.lang.Long to avoid this exception.

Thanks
Siva
[ December 19, 2005: Message edited by: Sivakumar Nachimuthu ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Primary Key Generation using entity command in Jboss
 
Similar Threads
PROCEDURE mysql.IDENTITY does not exist
automatic generation of primary keys for CMP Entity EJB
EJB 2.1 Error - Find failed - java.sql.SQLException: Column not found
JBoss Primary Key Generation
TRANSACTION ROLLBACK EXCEPTION:null