title: Spring Boot / Weblogic 12c - JSR-310 and Joda issues
body: <p>I want to deploy a Spring Boot .war application to a Weblogic 12c server. I have created the initializer as desrcibed in the documentation and have also added a <code>weblogic.xml</code> with the following structure:</p>
  
  <p>http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd
                        <a href="http://xmlns.oracle.com/weblogic/weblogic-web-app" rel="nofollow">http://xmlns.oracle.com/weblogic/weblogic-web-app</a>
                        <a href="http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd" rel="nofollow">http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd</a>">
      12.1.3</p>
  
  <pre><code>&lt;wls:container-descriptor&gt;
      &lt;wls:prefer-application-packages&gt;
  
          &lt;wls:package-name&gt;org.slf4j.*&lt;/wls:package-name&gt;
          &lt;wls:package-name&gt;org.joda.*&lt;/wls:package-name&gt;
          &lt;wls:package-name&gt;com.fasterxml.*&lt;/wls:package-name&gt;
          &lt;wls:package-name&gt;org.apache.commons.*&lt;/wls:package-name&gt;
          &lt;wls:package-name&gt;org.apache.xmlbeans.*&lt;/wls:package-name&gt;
  
      &lt;/wls:prefer-application-packages&gt;
  
      &lt;wls:prefer-application-resources&gt;
          &lt;wls:resource-name&gt;org.slf4j.*&lt;/wls:resource-name&gt;
          &lt;wls:resource-name&gt;javax.persistence.*&lt;/wls:resource-name&gt;
          &lt;wls:resource-name&gt;META-INF/services/javax.servlet.ServletContainerInitializer&lt;/wls:resource-name&gt;
          &lt;wls:resource-name&gt;com.fasterxml.*&lt;/wls:resource-name&gt;
  
      &lt;/wls:prefer-application-resources&gt;
  &lt;/wls:container-descriptor&gt;
  
  
  &lt;wls:context-root&gt;myapp&lt;/wls:context-root&gt;
  </code></pre>
  
  <p></p>
  
  <p>I have also included the following dependencies in my pom.xml:</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-java8&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.datatype&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-datatype-jsr310&lt;/artifactId&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>This type of configuration serializes dates normally on a Tomcat server. However it seems that the weblogic server does not include the JSR-310 library. Actually when I do this in a @Configuration file:</p>
  
  <pre><code>@Bean
  public JavaTimeModule javaTimeModule() {
      return new JavaTimeModule();
  }
  </code></pre>
  
  <p>I get the following exception:</p>
  
  <pre><code>weblogic.application.ModuleException: java.lang.ClassNotFoundException: com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
      at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
      at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
      at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:216)
      at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:211)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
  Truncated. see log file for complete stacktrace
  </code></pre>
  
  <p>So I said ok, lets just try with <code>Joda Time</code>. But even though as you can see I have declared it in my <code>weblogic.xml</code>, it cant even find the <code>DateTime class</code>.</p>
  
  <p>So any idea what's wrong here?</p>