title: Weblogic 12.2.1.2 - How to tune the object Serializer to use Jackson 2 and strange phenomena on jaxrs enablement for application/json endpoints
body: <p>On Weblogic JEE 7 (version 12.2.1.2), I am finding it quite strange to understand the behavior of the application server in relation to the enablement and configuration of the JAX-RS web services.</p>
  <p>The first point that I am trying to understand is a phenomena that I find quite inexplicable.
  On a sample application where I was testing a trivial jax-rs web service where initially there were only to components:</p>
  <p>Component (A)</p>
  <pre><code>@ApplicationPath(&quot;rest&quot;)
  public class RestApplication extends Application {
  
      private static final Logger LOGGER = LoggerFactory.getLogger(RestApplication.class);
  
      // Class loading
      {
          LOGGER.info(&quot;Rest application static constructor invoked&quot;);
      }
  
      /**
       * Default not arguments constructor
       */
      public RestApplication() {
          LOGGER.info(&quot;Rest application default constructore invoked.&quot;);
      }
  
  }
  </code></pre>
  <p>Which appropriately enables the base context for all rest endpoints you may want to use in your deployment.
  Works exactly as in Wildfly - 100%.
  So nothing to say about this component.</p>
  <p>And then we enter the &quot;swamp&quot;, component B, our rest endpoint.
  There are several dummy apis on this dummy endpoint, we focus just on the most trivial of all.</p>
  <pre><code>@Path(&quot;/exampleRestEndpoint&quot;)
  @Consumes({ &quot;application/json&quot;, &quot;text/html&quot; })
  @Produces({ &quot;application/json&quot; })
  public class ExampleRestEndpoint {
  
      private static final Logger LOGGER = LoggerFactory.getLogger(ExampleRestEndpoint.class);
  
      @PostConstruct
      public void postConstruct() {
          LOGGER.info(&quot;Rest Endpoint constructed.&quot;);
      }
     
      @GET
      @Path(&quot;/ping&quot;)
      public BasicJsonResponseDto&lt;String&gt; ping() {
          Instant date = Instant.now();
          return new BasicJsonResponseDto&lt;String&gt;(&quot;Ping-service invoked successfully. &quot; + date.toString());
      }
  }
  </code></pre>
  <p>I will go into details on the DTO class later at the bottom.
  There are already points of discussion here.</p>
  <p>The first point of discussion for me is the the metadata annotation at the top of the class that declares that for this endpoint we want to deliver back to the clients application/json.</p>
  <p>But on my first writing of this annotation, I had in fact not added ANY such anotation.
  So on my first implementation, the application server was working returning me a reply.
  On a second step, when I added the annotation stating that the rest endpoint was to be returing applicaiton/json, weblogic stopped rendering any response complaining of the following:</p>
  <blockquote>
  <p>SEVERE: MessageBodyWriter not found for media type=application/json,
  type=class com.jersey.jaxb.Todo, genericType=class
  com.jersey.jaxb.Todo.</p>
  </blockquote>
  <p>Same experiment on wildfly, the endpoint worked immediately no major hassle.
  The following stack overflow thread yielded me an answer that worked:
  <a href="https://stackoverflow.com/questions/33120094/test-serializations-rest-jaxrs">test serializations REST JAXRS</a></p>
  <p>The fact that weblogic would complain that it knows of know body writers that are capable of redering this mime type is suprising to me, being that any JEE 7 container should be able of doing this out of the box... but ok!</p>
  <p>On my pom for the sample application I pumped the following dependencies to be going into war, in the Web-inf/lib.</p>
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;com.fasterxml.jackson.jaxrs&lt;/groupId&gt;
      &lt;artifactId&gt;jackson-jaxrs-json-provider&lt;/artifactId&gt;
      &lt;version&gt;2.8.6&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;com.fasterxml.jackson.module&lt;/groupId&gt;
      &lt;artifactId&gt;jackson-module-jaxb-annotations&lt;/artifactId&gt;
      &lt;version&gt;2.8.6&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  <p>And problem solved.
  The rest web service goes back to working.
  On chrome I can control the http response metadata all perfect.</p>
  <p>Funy thing now, when I deploy the same application and take away the jackson provider library, the rest endpoint continues to work without any problems.
  Actually, I can no longer reproduce on my environment the weblogic complaint that I am not giving him any body writer that knows what to do with application/json replies.</p>
  <p>So, this is my first question?
  Does anybody know if for a basic rest service that deliver application/json where a sample application bundles no jackson library and jus uses jee7 apis, if weblogic is expected to be logging the error I quoted or not.
  Does anybody have any sort of oncept/explanation for the fact that when I take away the dependencies things are just working as one would normally have expected from the start ... but not as one expect after having been forced to google a solution for the no body writer problem?
  I really do not have an explanation for this...</p>
  <p>Now the second point is to do with the class being used a return object on the /ping API i have quoted.</p>
  <p>Originally, that endpoing API was returning a pure &quot;String&quot;.
  The ping message was not being wrapped in any sort of object.
  And of course the result object was no real JSON object The return object was just a &quot;some arbitrary string value&quot;.</p>
  <p>So this of course is a problem for a rest client, that is expecting to de-serialize valid json and instead of getting an object or array, is getting pure raw data on the pipe.</p>
  <p>For this reason, I then made the experiment of pumping the raw types like String and Integer under a support dto object.</p>
  <p>Here is the implementation.
  The implementation is important for the next question.</p>
  <pre><code>@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = As.PROPERTY, property = &quot;class&quot;)
  public class BasicJsonResponseDto&lt;T&gt; implements Serializable {
      T value;
      public BasicJsonResponseDto() {
          super();
      }
      public BasicJsonResponseDto(T value) {
          super();
          this.value = value;
      }
      public T getValue() {
          return value;
      }
      public void setValue(T value) {
          this.value = value;
      }
      @Override
      public String toString() {
          return &quot;BasicJsonResponseDto [value=&quot; + value + &quot;]&quot;;
      }
  }
  </code></pre>
  <p>For the sharper eyes, it will be immediately be obvious that when a response object to an endpoint is delivered via a class like this, the &quot;de-serialization&quot; logic is not a trivial task at all.
  This wrapper object for the basic types Integer/String has a little be of poison in there.
  Namely, the value T where we pump our ping string into gives no help for the de-serialization engine to figure out what object it is to expect to read out.</p>
  <p>So the ping service, technically, is not trivial at all for the client-side code.</p>
  <p>With that said, I now have two very different behaviors on Weblogic and Wildfly.
  And the different must be directly related with the serialization technology that each is using.</p>
  <p>When the ping service is executed on weblogic, right now, the reponse objects I get are of the form:</p>
  <blockquote>
  <p>{&quot;value&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;value&quot;:&quot;Ping-service invoked successfully.
  2017-08-12T09:08:45.455Z&quot;}}</p>
  </blockquote>
  <p>So you see that whatever ObjectMapper weblogic is using and that I have definitely not configured, is by default pumping additional metadata aboute the T value, namely declaring it as a string.
  (a) It is very cute that this done without my asking, but then on the client side I need to create an ObjectMapper to de-serialize that can interpret that same object medata.
  Most likely there is an adequate set of annotation such as @JsonInfo with @JsonSubtype that I can add to the T value field to make the de-serialization work on the client side, but in terms of the DTO object that I have written I have not asked for any such metadata to go out.</p>
  <p>(b) You will also notice, if you know jackson, that there is missing information on the object as well.
  namely, I do not see the class=&quot;full.qualified.name&quot; to  my object.
  But I have made sure I requested this metadata to go out on the response json by pumping this annotation into the class.</p>
  <pre><code>@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = As.PROPERTY, property = &quot;class&quot;)
  </code></pre>
  <p>So  my question here is:
  (1) What library exactly is weblogic using to serialize my json
  (2) What default configurations do they have in there
  (3) I have pumped into my pom.xml the &quot;jackson-jaxrs-json-provider&quot; dependency that originally make my endpoint work.
  I have looked at the source code of this library, and it looks to me like this library tries to be in charge of the rendering of the json responses.
  It does have a CDI @Provide @Consumes(<em>/</em>) Produces(<em>/</em>), and if I enable the debugger I can see during deployment that the jackson-jaxrs-json-provider gets invoked.</p>
  <p>What I cannot see happening in weblogic is the ObjectMapper of this class ever getting called.
  it is if I cannot override whatever default behavior is in charge right now.</p>
  <p>Does anybody understand the behavior.
  Are there ways to put the beast on a leash and take control of the situation?
  Or do I have to trivialize the code to such a degree where my String wrapped object is named&quot; StringWrappedDto and the  value field is trviailized into String value.
  I hope not, but right now I am struggling with this.</p>
  <p>Now, we switch to Wildfly 10.1.0.
  On Wildfly 10.1.0, my experience is things are going rather more according to expectation.</p>
  <p>(a) If you deploy a WAR with just the RestApplication and the Endpoint I have provided.
  Things work out of the box.
  No hassle, no messages of incapacity to render application/json.
  You are set to start working without taking control of any configuration.</p>
  <p>(b) If you for example want to override the rendering behavior for Json, you can define your own ObjectMapper provider.
  E.g.</p>
  <pre><code>public class ObjectMapperContextResolver implements ContextResolver&lt;ObjectMapper&gt; {
  
      private final ObjectMapper mapper;
  
      public ObjectMapperContextResolver() {
          mapper = new ObjectMapper();
          mapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
      }
  
      @Override
      public ObjectMapper getContext(Class&lt;?&gt; type) {
          return mapper;
      }
  
  }
  </code></pre>
  <p>And this guy here, if you debug it, you can see it get called on every call to the Ping service.
  So you can take charge of how the json response will be serialized, if you need such level of control.</p>
  <p>To conclude, on wildfly, the JSON response I get is what I expect as illustrated in the following quote:</p>
  <blockquote>
  <p>{&quot;class&quot;:&quot;entrypoint.rest.BasicJsonResponse&quot;,&quot;value&quot;:&quot;Ping-service
  invoked successfully. 2017-08-12T16:42:13.788Z&quot;}</p>
  </blockquote>
  <p>I have tried setting breakpoints on almost every classon from jackson 2 that is involved in serialization of data, and literrally nothing gets hit on weblogic.
  So I am pretty certain, something in the wlserver/modules is getting used.</p>
  <p>Anyone has an idea of how to force jackson2 declared as dependency to the war  to get used for serializaton and kill whatever default behavior is right now taking place?</p>
  <p>--
  It now starts being clear what is happening in the rendering.
  I have written the following unit test as an experiment:</p>
  <pre><code> @Test
      public void serializeJerseyTest() throws JsonProcessingException, JAXBException {
          // (a) class to be marshalled into json
          BasicJsonResponseDto&lt;String&gt; objectToSerialize = new BasicJsonResponseDto&lt;String&gt;(
                  &quot;Ping-service invoked successfully. &quot; + Instant.now().toString());
  
          // (b) setup a jaxbcontext
          Map&lt;String, Object&gt; properties = new HashMap&lt;String, Object&gt;(3);
          JAXBContext jc = JAXBContext.newInstance(BasicStringJsonResponseDto.class);
  
          // (c) Marshall to system out
          Marshaller marshaller = jc.createMarshaller();
          marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
          marshaller.setProperty(&quot;eclipselink.media-type&quot;, &quot;application/json&quot;);
          marshaller.setProperty(&quot;eclipselink.media-type&quot;, &quot;application/json&quot;);
          marshaller.marshal(objectToSerialize, System.out);
      }
  </code></pre>
  <p>And the output of the unit test looks quite familiar...</p>
  <pre><code>{
     &quot;value&quot; : {
        &quot;type&quot; : &quot;string&quot;,
        &quot;value&quot; : &quot;Ping-service invoked successfully. 2017-08-12T19:33:05.834Z&quot;
     }
  </code></pre>
  <p>Oracle is using Moxy to make the json...
  So now the question is, how do I make it use jackson2 instead?</p>
  <p>I am sure there is a way. Proably to be found on the jersey documentation, which I believe by default will want to use Moxy.</p>
  <p>For future, reference, I will be now posting a debug stack trace that speaks volumes.
  All the code I was trying to debug and could not find out how because I wasll the the time trying to set breakpoints on jackson when the implementation was jersey + moxy all along.
  So here is the answer to that.</p>
  <p>I came to this stack trace for the most rediculous reason in the world.
  Moxy out of the box canont deserialize the JSON object it is producing for this web service.
  Can anyone understand this?
  That moxy is serializing me som json on the POJO but then the unmarshall cannot properly unsmarshall the value field?
  So here is the stack trace:</p>
  <pre><code>Daemon Thread [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] (Suspended (breakpoint at line 51 in entrypoint.rest.ObjectAdapter)) 
      entrypoint.rest.ObjectAdapter.marshal(java.lang.Object) line: 51    
      entrypoint.rest.ObjectAdapter.marshal(java.lang.Object) line: 1 
      org.eclipse.persistence.internal.jaxb.XMLJavaTypeConverter.convertObjectValueToDataValue(java.lang.Object, org.eclipse.persistence.sessions.Session, org.eclipse.persistence.oxm.XMLMarshaller) line: 178   
      org.eclipse.persistence.oxm.mappings.XMLAnyObjectMapping.convertObjectValueToDataValue(java.lang.Object, org.eclipse.persistence.sessions.Session, org.eclipse.persistence.oxm.XMLMarshaller) line: 652 
      org.eclipse.persistence.oxm.mappings.XMLAnyObjectMapping.convertObjectValueToDataValue(java.lang.Object, org.eclipse.persistence.core.sessions.CoreSession, org.eclipse.persistence.internal.oxm.Marshaller) line: 1    
      org.eclipse.persistence.internal.oxm.XMLAnyObjectMappingNodeValue.marshalSingleValue(org.eclipse.persistence.internal.oxm.XPathFragment, org.eclipse.persistence.internal.oxm.record.MarshalRecord, java.lang.Object, java.lang.Object, org.eclipse.persistence.internal.core.sessions.CoreAbstractSession, org.eclipse.persistence.internal.oxm.NamespaceResolver, org.eclipse.persistence.internal.oxm.record.MarshalContext) line: 72    
      org.eclipse.persistence.internal.oxm.XMLAnyObjectMappingNodeValue.marshal(org.eclipse.persistence.internal.oxm.XPathFragment, org.eclipse.persistence.internal.oxm.record.MarshalRecord, java.lang.Object, org.eclipse.persistence.internal.core.sessions.CoreAbstractSession, org.eclipse.persistence.internal.oxm.NamespaceResolver, org.eclipse.persistence.internal.oxm.record.MarshalContext) line: 65 
      org.eclipse.persistence.internal.oxm.XMLAnyObjectMappingNodeValue(org.eclipse.persistence.internal.oxm.NodeValue).marshal(org.eclipse.persistence.internal.oxm.XPathFragment, org.eclipse.persistence.internal.oxm.record.MarshalRecord, java.lang.Object, org.eclipse.persistence.internal.core.sessions.CoreAbstractSession, org.eclipse.persistence.internal.oxm.NamespaceResolver, org.eclipse.persistence.internal.oxm.record.MarshalContext, org.eclipse.persistence.internal.oxm.XPathFragment) line: 102    
      org.eclipse.persistence.internal.oxm.record.ObjectMarshalContext.marshal(org.eclipse.persistence.internal.oxm.NodeValue, org.eclipse.persistence.internal.oxm.XPathFragment, org.eclipse.persistence.internal.oxm.record.MarshalRecord, java.lang.Object, org.eclipse.persistence.internal.core.sessions.CoreAbstractSession, org.eclipse.persistence.internal.oxm.NamespaceResolver, org.eclipse.persistence.internal.oxm.XPathFragment) line: 59  
      org.eclipse.persistence.internal.oxm.XPathNode.marshal(org.eclipse.persistence.internal.oxm.record.MarshalRecord, java.lang.Object, org.eclipse.persistence.internal.core.sessions.CoreAbstractSession, org.eclipse.persistence.internal.oxm.NamespaceResolver, org.eclipse.persistence.internal.oxm.Marshaller, org.eclipse.persistence.internal.oxm.record.MarshalContext, org.eclipse.persistence.internal.oxm.XPathFragment) line: 443  
      org.eclipse.persistence.internal.oxm.XPathObjectBuilder.buildRow(org.eclipse.persistence.internal.oxm.record.XMLRecord, java.lang.Object, org.eclipse.persistence.internal.core.sessions.CoreAbstractSession, org.eclipse.persistence.internal.oxm.Marshaller, org.eclipse.persistence.internal.oxm.XPathFragment) line: 243    
      org.eclipse.persistence.internal.oxm.TreeObjectBuilder.buildRow(org.eclipse.persistence.internal.oxm.record.XMLRecord, java.lang.Object, org.eclipse.persistence.internal.core.sessions.CoreAbstractSession, org.eclipse.persistence.internal.oxm.XMLMarshaller, org.eclipse.persistence.internal.oxm.XPathFragment) line: 118  
      org.eclipse.persistence.internal.oxm.TreeObjectBuilder.buildRow(org.eclipse.persistence.internal.oxm.record.XMLRecord, java.lang.Object, org.eclipse.persistence.internal.core.sessions.CoreAbstractSession, org.eclipse.persistence.internal.oxm.Marshaller, org.eclipse.persistence.internal.oxm.XPathFragment) line: 1   
      org.eclipse.persistence.oxm.XMLMarshaller(org.eclipse.persistence.internal.oxm.XMLMarshaller&lt;ABSTRACT_SESSION,CHARACTER_ESCAPE_HANDLER,CONTEXT,DESCRIPTOR,MARSHALLER_LISTENER,MEDIA_TYPE,NAMESPACE_PREFIX_MAPPER,OBJECT_BUILDER,SESSION&gt;).marshal(java.lang.Object, org.eclipse.persistence.oxm.record.MarshalRecord, ABSTRACT_SESSION, DESCRIPTOR, boolean) line: 766  
      org.eclipse.persistence.oxm.XMLMarshaller(org.eclipse.persistence.internal.oxm.XMLMarshaller&lt;ABSTRACT_SESSION,CHARACTER_ESCAPE_HANDLER,CONTEXT,DESCRIPTOR,MARSHALLER_LISTENER,MEDIA_TYPE,NAMESPACE_PREFIX_MAPPER,OBJECT_BUILDER,SESSION&gt;).marshalStreamOrWriter(java.lang.Object, org.eclipse.persistence.oxm.record.MarshalRecord, ABSTRACT_SESSION, DESCRIPTOR, boolean) line: 1147   
      org.eclipse.persistence.oxm.XMLMarshaller(org.eclipse.persistence.internal.oxm.XMLMarshaller&lt;ABSTRACT_SESSION,CHARACTER_ESCAPE_HANDLER,CONTEXT,DESCRIPTOR,MARSHALLER_LISTENER,MEDIA_TYPE,NAMESPACE_PREFIX_MAPPER,OBJECT_BUILDER,SESSION&gt;).marshal(java.lang.Object, java.io.OutputStream, ABSTRACT_SESSION, DESCRIPTOR) line: 934   
      org.eclipse.persistence.oxm.XMLMarshaller(org.eclipse.persistence.internal.oxm.XMLMarshaller&lt;ABSTRACT_SESSION,CHARACTER_ESCAPE_HANDLER,CONTEXT,DESCRIPTOR,MARSHALLER_LISTENER,MEDIA_TYPE,NAMESPACE_PREFIX_MAPPER,OBJECT_BUILDER,SESSION&gt;).marshal(java.lang.Object, java.io.OutputStream) line: 877 
      org.eclipse.persistence.jaxb.JAXBMarshaller.marshal(java.lang.Object, java.io.OutputStream) line: 496   
      org.glassfish.jersey.moxy.json.internal.ConfigurableMoxyJsonProvider(org.eclipse.persistence.jaxb.rs.MOXyJsonProvider).writeTo(java.lang.Object, java.lang.Class&lt;?&gt;, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap&lt;java.lang.String,java.lang.Object&gt;, java.io.OutputStream) line: 957 
      org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(javax.ws.rs.ext.WriterInterceptorContext, javax.ws.rs.ext.MessageBodyWriter) line: 265  
      org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(javax.ws.rs.ext.WriterInterceptorContext) line: 250 
      org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed() line: 162 
      org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(javax.ws.rs.ext.WriterInterceptorContext) line: 106   
      org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed() line: 162 
      org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(javax.ws.rs.ext.WriterInterceptorContext) line: 86   
      org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed() line: 162 
      weblogic.jaxrs.server.internal.ChunkedOutputWriter.aroundWriteTo(javax.ws.rs.ext.WriterInterceptorContext) line: 65 
      org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed() line: 162 
      org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(java.lang.Object, java.lang.Class&lt;?&gt;, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap&lt;java.lang.String,java.lang.Object&gt;, org.glassfish.jersey.internal.PropertiesDelegate, java.io.OutputStream, java.lang.Iterable&lt;javax.ws.rs.ext.WriterInterceptor&gt;) line: 1130 
      org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(org.glassfish.jersey.server.ContainerResponse) line: 711  
      org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(org.glassfish.jersey.server.ContainerResponse) line: 444    
      org.glassfish.jersey.server.ServerRuntime$Responder.process(org.glassfish.jersey.server.ContainerResponse) line: 434    
      org.glassfish.jersey.server.ServerRuntime$2.run() line: 329 
      org.glassfish.jersey.internal.Errors$1.call() line: 271 
      org.glassfish.jersey.internal.Errors$1.call() line: 267 
      org.glassfish.jersey.internal.Errors.process(java.util.concurrent.Callable&lt;T&gt;, boolean) line: 315   
      org.glassfish.jersey.internal.Errors.process(org.glassfish.jersey.internal.util.Producer&lt;T&gt;, boolean) line: 297 
      org.glassfish.jersey.internal.Errors.process(java.lang.Runnable) line: 267  
      org.glassfish.jersey.process.internal.RequestScope.runInScope(org.glassfish.jersey.process.internal.RequestScope$Instance, java.lang.Runnable) line: 317    
      org.glassfish.jersey.server.ServerRuntime.process(org.glassfish.jersey.server.ContainerRequest) line: 305   
      org.glassfish.jersey.server.ApplicationHandler.handle(org.glassfish.jersey.server.ContainerRequest) line: 1154  
      org.glassfish.jersey.servlet.WebComponent.serviceImpl(java.net.URI, java.net.URI, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) line: 471  
      org.glassfish.jersey.servlet.WebComponent.service(java.net.URI, java.net.URI, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) line: 425  
      org.glassfish.jersey.servlet.ServletContainer.service(java.net.URI, java.net.URI, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) line: 383  
      org.glassfish.jersey.servlet.ServletContainer.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) line: 336  
      org.glassfish.jersey.servlet.ServletContainer.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) line: 223    
      weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run() line: 286   
      weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run() line: 260   
      weblogic.servlet.internal.StubSecurityHelper.invokeServlet(javax.servlet.ServletRequest, javax.servlet.http.HttpServletRequest, weblogic.servlet.internal.ServletRequestImpl, javax.servlet.ServletResponse, javax.servlet.http.HttpServletResponse, javax.servlet.Servlet) line: 137   
      weblogic.servlet.internal.ServletStubImpl.execute(javax.servlet.ServletRequest, javax.servlet.ServletResponse, weblogic.servlet.internal.FilterChainImpl) line: 350 
      weblogic.servlet.internal.TailFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) line: 25  
      weblogic.servlet.internal.FilterChainImpl.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) line: 78    
      weblogic.servlet.internal.RequestEventsFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) line: 32 
      weblogic.servlet.internal.FilterChainImpl.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) line: 78    
      weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(weblogic.servlet.internal.ServletStub, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) line: 3683 
      weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run() line: 3649 
      weblogic.security.acl.internal.AuthenticatedSubject.doAs(weblogic.security.subject.AbstractSubject, java.security.PrivilegedAction) line: 326   
      weblogic.security.service.SecurityManager.runAsForUserCode(weblogic.security.acl.internal.AuthenticatedSubject, weblogic.security.acl.internal.AuthenticatedSubject, java.security.PrivilegedAction&lt;T&gt;) line: 197   
      weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(weblogic.security.acl.internal.AuthenticatedSubject, java.security.PrivilegedAction, weblogic.security.acl.internal.AuthenticatedSubject) line: 203  
      weblogic.servlet.provider.WlsSubjectHandle.run(java.security.PrivilegedAction) line: 71 
      weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(weblogic.servlet.internal.ServletInvocationContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean, boolean, boolean) line: 2433    
      weblogic.servlet.internal.WebAppServletContext.securedExecute(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) line: 2281    
      weblogic.servlet.internal.WebAppServletContext.execute(weblogic.servlet.internal.ServletRequestImpl, weblogic.servlet.internal.ServletResponseImpl) line: 2259  
      weblogic.servlet.internal.ServletRequestImpl.runInternal() line: 1691   
      weblogic.servlet.internal.ServletRequestImpl.run() line: 1651   
      weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run() line: 270   
      weblogic.invocation.ComponentInvocationContextManager._runAs(weblogic.invocation.ComponentInvocationContext, java.lang.Runnable) line: 348  
      weblogic.invocation.ComponentInvocationContextManager.runAs(java.security.Principal, weblogic.invocation.ComponentInvocationContext, java.lang.Runnable) line: 333  
      weblogic.work.LivePartitionUtility.doRunWorkUnderContext(java.lang.Runnable, weblogic.invocation.ComponentInvocationContext) line: 54   
      weblogic.work.PartitionUtility.runWorkUnderContext(java.lang.Runnable, weblogic.invocation.ComponentInvocationContext) line: 41 
      weblogic.work.ServerWorkManagerImpl(weblogic.work.SelfTuningWorkManagerImpl).runWorkUnderContext(weblogic.work.ExecuteThread, weblogic.work.WorkAdapter) line: 640  
      weblogic.work.ExecuteThread.execute(weblogic.work.WorkAdapter) line: 406    
      weblogic.work.ExecuteThread.run() line: 346 
  </code></pre>
  <p>I believe I will now search for the way to use jackson on weblogic, there is simply no way that I am going to be working around this issue by pumping the class full of jaxB annotation and on top of that be writing XmlAdapters for this.
  Jackson can do all of this for free.
  That is why when needed, Jackson will writen the @class attribute with all the neded metadata for the class to deserialize.
  It simply cannot be this bad. Cannot be.</p>