Bugs item #539379, was opened at 2002-04-04 13:36 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376685&aid=539379&group_id=22866
Category: JBossCMP Group: v3.0 Rabbit Hole Status: Open Resolution: None Priority: 5 Submitted By: Matthias Bohlen (mattes3) Assigned to: Dain Sundstrom (dsundstrom) Summary: Creating bean instance rejected Initial Comment: OS: Windows 2000 JDK 1.3.1_02 I have ported the CMPCustomer example from SUN's J2SDKEE to JBoss (using XDoclet). It is an example where Customers, Addresses and Subscriptions for magazines can be created via a small web application and EJBs using CMP 2.0 with CMR. Deployment is OK, database tables are created, all is fine. Customers and Subscriptions can be created, Addresses cannot. The server gives a message: 2002-04-04 20:23:53,596 ERROR [Default] java.lang.reflect.UndeclaredThrowableException: 2002-04-04 20:23:53,596 ERROR [Default] java.rmi.ServerException: INSERTING AN ALREADY EXISTING BEAN, ID = ADDR01; nested exception is: java.lang.IllegalStateException: INSERTING AN ALREADY EXISTING BEAN, ID = ADDR01 2002-04-04 20:23:53,596 ERROR [Default] java.lang.IllegalStateException: INSERTING AN ALREADY EXISTING BEAN, ID = ADDR01 2002-04-04 20:23:53,606 ERROR [Default] at org.jboss.ejb.plugins.AbstractInstanceCache.insert (AbstractInstanceCache.java:265) 2002-04-04 20:23:53,606 ERROR [Default] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeH ome(EntityInstanceInterceptor.java:149) I have attached the full server log and the ear file. ---------------------------------------------------------------------- Comment By: Leon Doud (ldoud) Date: 2002-04-12 17:28 Message: Logged In: YES user_id=489493 Which version of XDoclet are you using? This sounds like an error I had before. "[ 531445 ] Entity remove() not removing from cache" The primary key class generated by XDoclet has an member field _hashcode that is marked transient. The hashcode method will only regenerate the _hashcode field if its value == Integer.MIN_VALUE. The bug occurs after you serialize the primary key. The _hashcode is transient and not saved during serialization. When deserialized it default back to zero and NOT Integer.MIN_VALUE. This causes the hashcode method to never recalculate the _hashcode field. So all primary keys have end up having a hashcode of zero. Though this may not be the problem, but its worth a look. The xdoclet bug was "[ 532832 ] Primary Key class bug" ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376685&aid=539379&group_id=22866 _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development