Hi,
I am getting the problem at very rare occasion that getPkFieldValue() from
JDBCommand generate an IllegalStateException.
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 really need some help to find out what happens.

I am using JBoss 2.3 Beta JVM 1.3.0_02, windows 2000.

Regards.

Vincent.


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to