title: Dozer 5.3.2 on Oracle Weblogic 10.3.6
body: <p>I have a problem running Dozer 5.3.2 on Oracle Weblogic 10.3.6. 
  If I run Dozer in the container following exception occurs.
  In my JUnit tests Dozer works fine.</p>
  
  <pre><code>java.lang.IllegalArgumentException   
  oracle.xml.jaxp.JXDocumentBuilderFactory.setAttribute(JXDocumentBuilderFactory.java:147) 
  weblogic.xml.jaxp.RegistryDocumentBuilderFactory.setAttribute(RegistryDocumentBuilderFactory.java:176) 
  org.dozer.loader.xml.XMLParserFactory.createDocumentBuilderFactory(XMLParserFactory.java:56) 
  org.dozer.loader.xml.XMLParserFactory.createParser(XMLParserFactory.java:35) 
  org.dozer.loader.xml.MappingFileReader.&lt;init&gt;(MappingFileReader.java:46) 
  org.dozer.loader.CustomMappingsLoader.&lt;init&gt;(CustomMappingsLoader.java:52) 
  org.dozer.DozerBeanMapper.loadCustomMappings(DozerBeanMapper.java:212) 
  org.dozer.DozerBeanMapper.getMappingProcessor(DozerBeanMapper.java:186) 
  org.dozer.DozerBeanMapper.map(DozerBeanMapper.java:111) 
  myProject.myObject.MyDefaultMapper.map(MyDefaultMapper.java:23) 
  myProject.myObject.mapToClientDS(XYZService.java:162) 
  myProject.myObject.read(XYZService.java:42) 
  myProject.myObject.search(MyController.java:64) 
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
  java.lang.reflect.Method.invoke(Method.java:597) 
  com.sun.el.parser.AstValue.invoke(Unknown Source) 
  com.sun.el.MethodExpressionImpl.invoke(Unknown Source) 
  oracle.adf.controller.internal.util.ELInterfaceImpl.invokeMethod(ELInterfaceImpl.java:173) 
  .... 
  weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
  </code></pre>
  
  <p>The Problem seems to be following method in <code>org.dozer.loader.xml.XMLParserFactory</code>:</p>
  
  <pre><code>private DocumentBuilderFactory createDocumentBuilderFactory() { DocumentBuilderFactory     
  factory = DocumentBuilderFactory.newInstance(); 
  factory.setValidating(true); 
  factory.setNamespaceAware(true); 
  factory.setIgnoringElementContentWhitespace(true); 
  factory.setAttribute(SCHEMA_FEATURE, true); // For Xerces implementation 
  return factory; }
  </code></pre>
  
  <p>This method sets <code>factory.setAttribute(SCHEMA_FEATURE, true)</code>. The Oracle implementation does not support the attribute <code>SCHEMA_FEATURE</code> and throws an <code>IllegalArgumentException</code> including the following stack trace:</p>
  
  <pre><code>oracle.xml.jaxp.JXDocumentBuilderFactory.setAttribute(JXDocumentBuilderFactory.java:147) 
  weblogic.xml.jaxp.RegistryDocumentBuilderFactory.setAttribute(RegistryDocumentBuilderFactory.java:176)
  </code></pre>
  
  <p>I have also tried to replace the oracle implementation of JAXP with Xerces. I have done it by configuring <code>&lt;prefer-web-inf-classes&gt;true&lt;/prefer-web-inf-classes&gt;</code> in <code>WEB-INF/weblogic.xml</code> and adding the Xerces libraries to the libraries wich are deployed. But if I try to replace the libraries I receive following exception while deploying the application. I have tried Xerces 2.11.0 (JAXP 1.4) and also Xerces 2.9.1 (JAXP 1.3, which should be the right replacement for Weblogic 10.3.6). (<code>xercesImpl.jar</code>, <code>xml-apis.jar</code>)</p>
  
  <pre><code>Caused By: java.lang.NoSuchMethodError: 
  
  org.apache.xerces.impl.xpath.regex.RegularExpression.&lt;init&gt;(Ljava/lang/String;Ljava/lang/String;Ljava/util/Locale;)V at 
  
  org.apache.xerces.impl.dv.xs.XSSimpleTypeDecl.applyFacets(Unknown Source) at 
  
  org.apache.xerces.impl.dv.xs.XSSimpleTypeDecl.applyFacets1(Unknown Source) at 
  
  org.apache.xerces.impl.dv.xs.BaseSchemaDVFactory.createBuiltInTypes(Unknown Source) at 
  
  org.apache.xerces.impl.dv.xs.SchemaDVFactoryImpl.createBuiltInTypes(Unknown Source) at 
  
  org.apache.xerces.impl.dv.xs.SchemaDVFactoryImpl.&lt;clinit&gt;(Unknown Source) Truncated. see log file for complete stacktrace
  </code></pre>
  
  <p>f you look in the sourcecode of org.apache.xerces.impl.xpath.regex.RegularExpression you will see that RegularExpression has following ctors in version 2.11.0:</p>
  
  <pre><code>(String a) 
  (String b, String d) 
  (String c, String f, Locale l) 
  (String d, Token t, int p, boolean h, int o)
  </code></pre>
  
  <p>RegularExpression has following ctors in version 2.9.1: </p>
  
  <pre><code>(String a) 
  (String b, String d) 
  (String c, Token t, int p, boolean h, int o) 
  </code></pre>
  
  <p>So I can´t unterstand why the exception occurs for both versions. </p>
  
  <p>I also have tried to configure xerces to be loaded by the filter classloader by configuring <code>&lt;prefer-application-packages&gt; &lt;package-name&gt;org.apache.xerces.*&lt;package-name&gt;</code> but that results in <code>ClassCastException</code>s because implementations were mixed up.</p>
  
  <p>I hope somebody can help me to run Dozer on WebLogic 10.3.6.</p>
  
  <p>Regards,</p>
  
  <p>Max</p>