openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Prud'hommeaux (JIRA)" <>
Subject [jira] Resolved: (OPENJPA-256) java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment
Date Thu, 02 Aug 2007 03:54:52 GMT


Marc Prud'hommeaux resolved OPENJPA-256.

       Resolution: Fixed
    Fix Version/s: 1.0.0

The QueryCompilationCacheValue class differs from most plugins in that th
e plugin type is the standard java interface Map.class (rather than an openjpa-s
pecific interface), which means that the ClassLoader used to load the implementa
tion will be the system class loader; this presents a problem if OpenJPA is not
in the system classpath, so work around the problem by catching the IllegalArgum
entException (which is what we wrap the ClassNotFoundException in) and try again.

This is fixed as of revision 562011. The only workaround of earlier versions of OpenJPA is
to set the "openjpa.QueryCompilationCache" property to "none" (thereby disabling the query
compilation cache).

> java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring
> ------------------------------------------------------------------------------------------------
>                 Key: OPENJPA-256
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>         Environment: jetty 6.1.3 jdk 1.5 spring 2.0.5 openjpa 1.0.0-SNAPSHOT maven 2.0.5

>            Reporter: Bernd Bohmann
>             Fix For: 1.0.0
>         Attachments: OPENJPA-256.error.log
> Get a ClassNotFoundException: org.apache.openjpa.util.CacheMap.
> I think the java.util.Map in Line 1405 
> queryCompilationCachePlugin.instantiate(Map.class, this); 
> of OpenJPAConfigurationImpl cause the error.
> The classloader in this enviroment is a sun.misc.Launcher$AppClassLoader for java.util.Map
not a WebAppClassLoader.
> Changing the Map.class to CacheMap.class solves the problem (the right ClassLoader is

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message