You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Thirion <th...@gmail.com> on 2012/05/21 13:15:02 UTC

Found a sollution to @Strategy ClassNotFound exception

Hi.

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
installHandlers) 
of class:
org.apache.openjpa.jdbc.meta.MappingRepository
my class was able to be loaded:

Class<?> c = JavaTypes.classForName(name, field,
                AccessController.doPrivileged(
                   
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: http://openjpa.208410.n2.nabble.com/Found-a-sollution-to-Strategy-ClassNotFound-exception-tp7569006.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.