Bugs item #417749, was updated on 2001-04-20 15:03 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376685&aid=417749&group_id=22866 Category: JBossCMP Group: v2.3 (unstable) Status: Open Resolution: None Priority: 5 Submitted By: Vincent Harcq (vharcq) Assigned to: Nobody/Anonymous (nobody) Summary: IllegalStateException in JDBCCommand Initial Comment: I am getting the problem at very rare occasion that getPkFieldValue() from JDBCommand generate an IllegalStateException. I can only reproduce the problem if I make a fBPK on a CMP bean then directly remove it. The problem disappear if I use another method (than remove()) on the remote interface. The workaround is so to run a get() method on the RI before calling remove(). More details : -------------- Here is the method protected Object getPkFieldValue(Object pk, PkFieldMetaData pkFieldMetaData) throws IllegalAccessException { Field field = pkFieldMetaData.getPkField(); try{ System.out.println("In "+field+" we have to found "+pk); System.out.println(pkFieldMetaData.getName()+"-- "+field.getDeclaringClass()+"--"+pk.getClass()); if (field.getDeclaringClass()!=pk.getClass()){ System.out.println("Wooooooooooooooooooooooow"); System.out.println(pk.getClass().getClassLoader()); System.out.println(field.getDeclaringClass ().getClassLoader()); } return field.get(pk); } In fact in this rare occasion, field.get(Object o) is called with field.getDeclarringClass() having a different classloader than the object o. So even if the classes are the same, the field.get() will throw the IllegalStateException exception. What I can not understand is why there are 2 classloaders : my entity bean is in one jar so linked to one classloader. I repeat : it only happens with 1. remote=home.fBPK() 2. remote.remove() It works fine if 1. remote=home.fBPK() 2. remote.getdata() 3. remote.remove() I am using JBoss 2.3 Beta JVM 1.3.0_02, win2k. I am not (yet I hope :) ) at this level of JBoss undertanding to figure out what is happening. I can provide help to any CMP gurus if needed (just send me test corrections, I apply them, test and give feed back) ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376685&aid=417749&group_id=22866 _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
