From 22f77ef4d21994610bd250e99230555ad56fb4d8 Mon Sep 17 00:00:00 2001 From: Marc Prud'hommeaux Date: Mon, 29 Jan 2007 21:07:20 +0000 Subject: [PATCH] Handle ClassNotFoundException and ClassCircularityError instances when trying to load the classes into the temporary class loader during enhancement. These exceptions will indicate that the class is not loadable, and so they couldn't have any persistent metadata anyway. git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@501183 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/openjpa/enhance/PCClassFileTransformer.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openjpa-kernel-5/src/main/java/org/apache/openjpa/enhance/PCClassFileTransformer.java b/openjpa-kernel-5/src/main/java/org/apache/openjpa/enhance/PCClassFileTransformer.java index 0dc7e535c..deb09f856 100644 --- a/openjpa-kernel-5/src/main/java/org/apache/openjpa/enhance/PCClassFileTransformer.java +++ b/openjpa-kernel-5/src/main/java/org/apache/openjpa/enhance/PCClassFileTransformer.java @@ -173,6 +173,14 @@ public class PCClassFileTransformer if (_repos.getMetaData(c, null, false) != null) return Boolean.TRUE; return null; + } catch (ClassNotFoundException cnfe) { + // cannot load the class: this might mean that it is a proxy + // or otherwise inaccessible class + return Boolean.FALSE; + } catch (ClassCircularityError cce) { + // this can happen if we are loading classes what this + // class already depends on + return Boolean.FALSE; } catch (RuntimeException re) { throw re; } catch (Throwable t) {