openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thirion <>
Subject Found a sollution to @Strategy ClassNotFound exception
Date Mon, 21 May 2012 11:15:02 GMT

I wrote a custom Strategy for a field and kept getting errors that my class
in invalid.

I checked out version 2.2.0.

By adding ‘false’ to the call to getClassLoaderAction inside method:
protected FieldStrategy namedStrategy(FieldMapping field, boolean
of class:
my class was able to be loaded:

Class<?> c = JavaTypes.classForName(name, field,
J2DoPrivHelper.getClassLoaderAction(FieldStrategy.class)), false);

The boolean parameter for ‘mustExist’ should be false in order for issue
OpenJPA 758 to get taken into consideration and find the correct class
loader in JavaTypes.classForName method .

View this message in context:
Sent from the OpenJPA Developers mailing list archive at

View raw message