Bean propery enhanced by CGLIB - mapper exception
-------------------------------------------------
Key: OCM-37
URL: https://issues.apache.org/jira/browse/OCM-37
Project: Jackrabbit OCM
Issue Type: Bug
Environment: Ubuntu linux 9.10, java 1.6.0_13, Jackrabbit ocm 1.5.3
Reporter: Lukasz Grabski
Hi,
I'm not sure if it affects version 1.6, but in version 1.5.2 of jackrabbit ocm
I'm getting an exception that is caused by mapper lookup in
AbstractMapperImpl.getClassDescriptorByClass method.
I have a bean, that has property mapped with @Bean(proxy = true). I think that
the cause is that mapper is unable to find descriptor for class enhanced by
cglib. After little modification, getClassDescriptorByClass looks like this:
public ClassDescriptor getClassDescriptorByClass(Class clazz) {
if (Enhancer.isEnhanced(clazz)) { // <- here it is :)
clazz = clazz.getSuperclass();
}
ClassDescriptor descriptor =
mappingDescriptor.getClassDescriptorByName(clazz.getName());
if (descriptor==null) {
throw new IncorrectPersistentClassException("Class of
type: " + clazz.getName() + " has no descriptor.");
}
return descriptor ;
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.