users@glassfish.java.net

deployment failed due to CMP for Primary Table without primary key

From: <glassfish_at_javadesktop.org>
Date: Wed, 01 Apr 2009 23:14:22 PDT

Hi,
We are migrating a project from weblogic10 to glassfish v2.We have one CMP for a primary table (no constraints and referenced with any other table) without a primary key.The application is running fine in weblogic but glassfish v2 complaining about the primary key and the deployment is failed.Is there any work around or glassfish doesn't support this feature?

I tried out below work arounds

1)I created one primary key class and declared one of the cmp-fields as the variable there with getter and setter method.This class implements serializable interface.hashcode() and equals methods are also overridden in this class.

2)Then I mentioned this class name in ejb-jar.xml as primary key class.

3)I declared the argument of findByPrimaryKey as this primary key class type.

Still the deployment failed throwing exception stating that primary table should have primary key.

Then I tried using java.lang.Object instead of customized(mentioned above) primary key class but No luck.

Any help or info ?
[Message sent by forum member 'satyaranjan2006' (satyaranjan2006)]

http://forums.java.net/jive/thread.jspa?messageID=340167