Skip to main content

Issue with using reflection on glassfish v 3.1.2.2

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
mevivs
Offline
Joined: 2013-05-28

Hi,
I am trying to deploy and run a sample application over glassfish v 3.1.2.2. I am able to deploy it successfully. But somehow facing some issues while doing some process. It is related to reflection :

Caused by: com.impetus.kundera.property.PropertyAccessException: java.lang.IllegalArgumentException: Can not set pt.lighthouselabs.sherlock.model.AuditRecordId field pt.lighthouselabs.sherlock.model.AuditRecord.id to pt.lighthouselabs.sherlock.model.AuditRecord
at com.impetus.kundera.property.PropertyAccessorHelper.getObject(PropertyAccessorHelper.java:139)
at com.impetus.kundera.property.PropertyAccessorHelper.getId(PropertyAccessorHelper.java:262)
at com.impetus.kundera.persistence.PersistenceValidator.isValidEntityObject(PersistenceValidator.java:51)

This is something working fine in out of container and as well as on tomcat. So wondering it is something to do with classloading or may be some environmental issue? I tried to debug this issue and this is failing for:

protected void ensureObj(Object paramObject)
{
if (!(this.field.getDeclaringClass().isAssignableFrom(paramObject.getClass())))
throwSetIllegalArgumentException(paramObject);
}

Any help?

-Vivek