1.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.java Thu May 30 10:58:13 2013 -0700 1.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.java Wed Jun 12 14:47:09 2013 +0100 1.3 @@ -289,12 +289,23 @@ 1.4 String pkg = nav.getPackageName(clazz); 1.5 if (!registries.containsKey(pkg)) { 1.6 // insert the package's object factory 1.7 - C c = nav.findClass(pkg + ".ObjectFactory", clazz); 1.8 + C c = loadObjectFactory(clazz, pkg); 1.9 if (c != null) 1.10 addRegistry(c, p); 1.11 } 1.12 } 1.13 1.14 + private C loadObjectFactory(C clazz, String pkg) { 1.15 + C c; 1.16 + try { 1.17 + c = nav.findClass(pkg + ".ObjectFactory", clazz); 1.18 + } catch (SecurityException ignored) { 1.19 + // treat SecurityException in same way as ClassNotFoundException in this case 1.20 + c = null; 1.21 + } 1.22 + return c; 1.23 + } 1.24 + 1.25 /** 1.26 * Getting parametrized classes of {@code JAXBElement<...>} property 1.27 * @param p property which parametrized types we will try to get