title: Weblogic migration from 11g to 12c, missing libraries and failing deployment
body: <p>We are migrating out project from java 6 to java 8, and as part of the migration we are upgrading weblogic server from 11g R1 to 12c R2.</p>
  
  <p>There are some weblogic libraries missing in the new release, that our project seems to depend on. In particular, these libraries are</p>
  
  <pre><code>modules\com.oracle.ws.orawsdl_1.4.0.0.jar
  modules\com.oracle.ws.http_client_1.4.0.0.jar
  </code></pre>
  
  <p>They are defined in the <code>PRE_CLASSPATH</code> variable on <code>setDomainEnv.sh</code> of the previous weblogic installation. I don't know what their purpose is and where they are used (is there some trick to track their usage in the project source?), and they can't be found with the new installation.</p>
  
  <p>I tried to search them as such starting from the <code>Oracle_home</code> directory</p>
  
  <pre><code>find . -type f -iname "*orawsdl*"
  ./oracle_common/modules/com.oracle.webservices.orawsdl-api.jar
  ./oracle_common/plugins/maven/com/oracle/fmwshare/com.oracle.webservices.orawsdl-api/12.2.1/com.oracle.webservices.orawsdl-api-12.2.1.location
  ./oracle_common/plugins/maven/com/oracle/fmwshare/com.oracle.webservices.orawsdl-api/12.2.1/com.oracle.webservices.orawsdl-api-12.2.1.pom
  ./oracle_common/plugins/maven/com/oracle/fmwshare/oracle.webservices.orawsdl/12.2.1/oracle.webservices.orawsdl-12.2.1.pom
  ./oracle_common/plugins/maven/com/oracle/fmwshare/orawsdl/12.2.1/orawsdl-12.2.1.pom
  ./inventory/featuresets/resources/modules/orawsdl_12.2.1.2.0.jar
  ./inventory/featuresets/orawsdl_12.2.1.2.0.xml
  ./inventory/refcounts/featuresets/orawsdl_12.2.1.2.0.ref
  ./inventory/refcounts/components/oracle.webservices.orawsdl_12.2.1.2.0.ref
  
  find . -type f -iname "*http_client*"
  ./oracle_common/http_client_12.jar
  ./oracle_common/modules/com.oracle.http_client.http_client.jar
  ./oracle_common/ccr/lib/http_client_12.jar
  ./oracle_common/ccr/lib/http_client_11116.jar
  ./oracle_common/plugins/maven/com/oracle/fmwshare/oracle.http_client/12.2.1/oracle.http_client-12.2.1.pom
  ./oracle_common/plugins/maven/com/oracle/fmwshare/com.oracle.http_client.http_client/12.2.1/com.oracle.http_client.http_client-12.2.1.pom
  ./oracle_common/plugins/maven/com/oracle/fmwshare/com.oracle.http_client.http_client/12.2.1/com.oracle.http_client.http_client-12.2.1.location
  ./oracle_common/http_client_11116.jar
  ./inventory/refcounts/components/oracle.http_client_12.2.1.2.0.ref
  ./oui/modules/http_client.jar
  </code></pre>
  
  <p>Nothing refers to the same package, but is some of these proper alternative?</p>
  
  <p>Also, when I try to deploy to the new server installation, I get the following error.</p>
  
  <pre><code>java.lang.ClassNotFoundException: org.apache.commons.pool2.BasePooledObjectFactory
  </code></pre>
  
  <p>After dropping the apache <code>commons-pool</code> lib in weblogic classpath (Which was never needed in the previous installation), I get a different error</p>
  
  <p><code>Unable to find policy: "usernamedigest.xml", please make sure to use dynamic wsdl when initializing the service stub</code></p>
  
  <p><strong>Important note</strong></p>
  
  <p>Deploy succeeds if I define <code>metadata-complete=true</code> to all <code>web.xml</code> files, but I'm sure this is not clever, as it may bypass some important configuration I'm not aware of. So how do I troubleshoot the cause of this problem?</p>
  
  <p>I think it has something to do with how weblogic tries to take control of the web services it should not. In the project <code>axis</code> is used as the web service implementation. In the succeeded deployment (old weblogic, and new weblogic with <code>metadata-complete=true</code> set), only one web service is shown in under <em>Web Services section</em> of the deployment overview.</p>
  
  <p>However, with the failed deployment (the userdigest.xml error) <strong>all</strong> web services are shown under this tab, as if weblogic tries to take control of them due to some annotation scanning, I guess.</p>
  
  <p>Here is the error message from log file</p>
  
  <pre><code>&lt;24.7.2017, 11:16:55,876 ap. EEST&gt; &lt;Error&gt; &lt;HTTP&gt; &lt;BEA-101216&gt; &lt;Servlet: "fi.sysopen.hekopassi.vrk.tv.TV_DATA2HekopassiImpl" failed to preload on startup in Web application: "/hekopassi".
  javax.xml.ws.WebServiceException: Unable to find policy: "usernamedigest.xml", please make sure to use dynamic wsdl when initializing the service stub
  
      at weblogic.wsee.jaxws.WLSTubelineAssemblerFactory$WLSTubelineAssemblerImpl.createServer(WLSTubelineAssemblerFactory.java:374)
      at com.sun.xml.ws.server.WSEndpointImpl.&lt;init&gt;(WSEndpointImpl.java:193)
      at weblogic.wsee.jaxws.WLSContainer$WLSEndpointFactory$WLSEndpointImpl.&lt;init&gt;(WLSContainer.java:774)
      at weblogic.wsee.jaxws.WLSContainer$WLSEndpointFactory.create(WLSContainer.java:725)
      at com.sun.xml.ws.server.EndpointFactory.create(EndpointFactory.java:332)
      Truncated. see log file for complete stacktrace
  Caused By: Unable to find policy: "usernamedigest.xml", please make sure to use dynamic wsdl when initializing the service stub
  
      at weblogic.wsee.policy.runtime.PolicyServer.loadPolicy(PolicyServer.java:183)
      at weblogic.wsee.policy.runtime.PolicyServer.getPolicy(PolicyServer.java:118)
      at weblogic.wsee.policy.deployment.PolicyRef.getPolicy(PolicyRef.java:216)
      at weblogic.wsee.policy.deployment.PolicyReferenceWsdlExtension.getEffectivePolicy(PolicyReferenceWsdlExtension.java:129)
      at weblogic.wsee.policy.deployment.WsdlPolicySubject.getEffectivePolicyFromWsdlExtensible(WsdlPolicySubject.java:489)
      Truncated. see log file for complete stacktrace
  &gt; 
  INFO [OpenFrame] FrontEnd logging service shutdown completed
  INFO [OpenFrame] FrontEnd logging service shutdown completed
  INFO [OpenFrame] BackEnd Log4 Logging service is going down!
  INFO [OpenFrame] BackEnd Logging service shutdown completed
  &lt;24.7.2017, 11:17:01,540 ap. EEST&gt; &lt;Error&gt; &lt;Deployer&gt; &lt;BEA-149231&gt; &lt;Unable to set the activation state to true for the application "hekopassi".
  weblogic.application.ModuleException: Unable to find policy: "usernamedigest.xml", please make sure to use dynamic wsdl when initializing the service stub
  
      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:233)
      at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:228)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
      Truncated. see log file for complete stacktrace
  Caused By: Unable to find policy: "usernamedigest.xml", please make sure to use dynamic wsdl when initializing the service stub
  
      at weblogic.wsee.policy.runtime.PolicyServer.loadPolicy(PolicyServer.java:183)
      at weblogic.wsee.policy.runtime.PolicyServer.getPolicy(PolicyServer.java:118)
      at weblogic.wsee.policy.deployment.PolicyRef.getPolicy(PolicyRef.java:216)
      at weblogic.wsee.policy.deployment.PolicyReferenceWsdlExtension.getEffectivePolicy(PolicyReferenceWsdlExtension.java:129)
      at weblogic.wsee.policy.deployment.WsdlPolicySubject.getEffectivePolicyFromWsdlExtensible(WsdlPolicySubject.java:489)
      Truncated. see log file for complete stacktrace
  </code></pre>