title: WAS 8.5.5. web app getting NoSuchFieldError during startup
body: <p>I have a maven web app, using WAS 8.5.5.</p>
  
  <p>On app startup I'm getting the following error:</p>
  
  <blockquote>
    <p>Caused by: java.lang.NoSuchFieldError:
    org/apache/http/message/BasicLineFormatter.INSTANCE</p>
  </blockquote>
  
  <p>This means there's some sort of mismatch of jars (httpclient &amp; httpcore) in my classpath.</p>
  
  <p>To get more info, I ran the following code:</p>
  
  <pre><code>ClassLoader classLoader = Test.class.getClassLoader();
  URL resource = classLoader.getResource("org/apache/http/message/BasicLineFormatter.class");
  log.info("Outputting resoure info: " + resource.getFile() + " " + resource.getPath() + " " + resource.getRef());
            try {
                   log.info(FileLocator.resolve(resource));
                   log.info(FileLocator.toFileURL(resource));
            } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
            }
  </code></pre>
  
  <p>This gave me the following output:</p>
  
  <blockquote>
    <p>start Outputting resoure info:
    /org/apache/http/message/BasicLineFormatter.class
    /org/apache/http/message/BasicLineFormatter.class null  start
    jar:file:/C:/RAD9.0/IBM/WebSphere/AppServer_2/plugins/com.ibm.ws.prereq.jaxrs.jar!/org/apache/http/message/BasicLineFormatter.class
    start
    file:/C:/RAD9.0/IBM/WebSphere/AppServer_2/profiles/AppSrv01/servers/server1/configuration/org.eclipse.osgi/bundles/105/1/.cp/org/apache/http/message/BasicLineFormatter.class</p>
  </blockquote>
  
  <p>These are both obviously loaded to WAS on startup. How do I stop this from happening? I tried changing the priority of the module loading in the app settings by setting load parent last, but that stopped the app from coming up at all.</p>
  
  <p>Any ideas?</p>