Author: mprudhom
Date: Tue Aug 21 08:47:11 2007
New Revision: 568173
URL: http://svn.apache.org/viewvc?rev=568173&view=rev
Log:
OPENJPA-256 fixed for 1.0.0 branch
Modified:
openjpa/branches/1.0.0/openjpa-kernel/src/main/java/org/apache/openjpa/conf/QueryCompilationCacheValue.java
openjpa/branches/1.0.0/openjpa-project/CHANGES.txt
openjpa/branches/1.0.0/openjpa-project/RELEASE-NOTES.html
Modified: openjpa/branches/1.0.0/openjpa-kernel/src/main/java/org/apache/openjpa/conf/QueryCompilationCacheValue.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.0/openjpa-kernel/src/main/java/org/apache/openjpa/conf/QueryCompilationCacheValue.java?rev=568173&r1=568172&r2=568173&view=diff
==============================================================================
--- openjpa/branches/1.0.0/openjpa-kernel/src/main/java/org/apache/openjpa/conf/QueryCompilationCacheValue.java
(original)
+++ openjpa/branches/1.0.0/openjpa-kernel/src/main/java/org/apache/openjpa/conf/QueryCompilationCacheValue.java
Tue Aug 21 08:47:11 2007
@@ -26,6 +26,7 @@
import org.apache.openjpa.lib.conf.PluginValue;
import org.apache.openjpa.lib.util.concurrent.ConcurrentMap;
import org.apache.openjpa.lib.util.concurrent.ConcurrentHashMap;
+import org.apache.openjpa.lib.util.ParseException;
import org.apache.openjpa.util.CacheMap;
/**
@@ -58,6 +59,18 @@
try {
map = (Map) super.newInstance(clsName, type, conf, fatal);
+ } catch (ParseException pe) {
+ // OPENJPA256: this class differs from most plugins in that
+ // the plugin type is the standard java interface Map.class (rather
+ // than an openjpa-specific interface), which means that the
+ // ClassLoader used to load the implementation 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 ParseException (which is what we wrap the
+ // ClassNotFoundException in) and try again, this time using
+ // this class' ClassLoader.
+ map = (Map) super.newInstance(clsName,
+ QueryCompilationCacheValue.class, conf, fatal);
} catch (IllegalArgumentException iae) {
// OPENJPA256: this class differs from most plugins in that
// the plugin type is the standard java interface Map.class (rather
Modified: openjpa/branches/1.0.0/openjpa-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.0/openjpa-project/CHANGES.txt?rev=568173&r1=568172&r2=568173&view=diff
==============================================================================
--- openjpa/branches/1.0.0/openjpa-project/CHANGES.txt (original)
+++ openjpa/branches/1.0.0/openjpa-project/CHANGES.txt Tue Aug 21 08:47:11 2007
@@ -282,6 +282,8 @@
* [OPENJPA-321] - DB2 ABS Casting problem
* [OPENJPA-322] - Timezone on the Calendar object lost in proxying
* [OPENJPA-323] - Cleanup some message text
+ * [OPENJPA-256] - java.lang.ClassNotFoundException:
+ org.apache.openjpa.util.CacheMap in a jetty spring environment
Sub-task
Modified: openjpa/branches/1.0.0/openjpa-project/RELEASE-NOTES.html
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.0/openjpa-project/RELEASE-NOTES.html?rev=568173&r1=568172&r2=568173&view=diff
==============================================================================
--- openjpa/branches/1.0.0/openjpa-project/RELEASE-NOTES.html (original)
+++ openjpa/branches/1.0.0/openjpa-project/RELEASE-NOTES.html Tue Aug 21 08:47:11 2007
@@ -275,6 +275,8 @@
</li>
<li>[<a href='http://issues.apache.org/jira/browse/OPENJPA-323'>OPENJPA-323</a>]
- Cleanup some message text
</li>
+<li>[<a href='http://issues.apache.org/jira/browse/OPENJPA-256'>OPENJPA-256</a>]
- java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment
+</li>
</ul>
<h2> Sub-task
|