Q:

Custom CharacterEscapeHandler defined in JaxBMarshaller works in Jetty, but not in Weblogic

The version of web logic is 12c.
So we were having the double & issue with the JaxBMasheller so we defined our own CharacterEscapeHandler, to essentially do nothing:
 marshaller.setProperty(CharacterEscapeHandler.class.getName(),
        new CharacterEscapeHandler() {
          @Override
          public void escape(char[] ch, int start, int length, boolean isAttVal, 
                             Writer out)   throws IOException {
                               out.write(ch, start, length);
          }
 });

This works great in Jetty, where we do most of our testing.  However once we deploy this to a local weblogic instance, we get exceptions:
java.lang.IllegalArgumentException: Xml Marshalling Exception
        at com.hilton.api.ws.view.xml.XmlViewRenderer.renderMergedOutputModel(XmlViewRenderer.java:101)
        at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
        at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1060)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:563)
Any ideas would be welcome.  Thanks in advance.

A:

WebLogic 12.1.1 contains EclipseLink JAXB (MOXy) as the default JAXB (JSR-222) provider (see:  http://blog.bdoughan.com/2011/12/eclipselink-moxy-is-jaxb-provider-in.html).  That version of EclipseLink did not support the CharacterEscapeHandlerExtension, this support was added in EclipseLink 2.4.0 (see:  http://blog.bdoughan.com/2012/06/eclipselink-24-release-available-for.html).  Here are instructions for including a newer version of EclipseLink in WebLogic:

http://blog.bdoughan.com/2012/10/updating-eclipselink-in-weblogic.html

