3 Replies Latest reply on Oct 26, 2012 4:28 PM by User696-Oracle

    Problem with weblogic-application.xml generated by jwsc task

      My project is upgrading from WL 10.3.2 to WL 12.1.1. The jwsc ant tasks are failing because of an attribute that is added to weblogic-application.xml. This didn't happen with 10.3.

      Our project contains EJBs, a web app, and web services. Our build.xml generates the web service artifacts using jwsc. The first jwsc task modifies our original weblogic-application.xml by adding an xsi:type attribute to the prefer-application-packages element:

      <weblogic-application xmlns="http://xmlns.oracle.com/weblogic/weblogic-application"
      xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.4/weblogic-application.xsd">
      <prefer-application-packages xsi:type="prefer-application-packagesType"> <!--***** jwsc added xsi:type ******-->

      Aside from the xsi:type attribute, this file is the same as the original.

      However, when the second jwsc task runs, it throws a validation error:
      java.io.IOException: The existing descriptor at C:\...\build\META-INF\weblogic-application.xml is corrupted.
      C:\lsm\incubator-weblogic12c-upgrade-jsf12\ear\<unknown>:33:2: problem: failed to load java type corresponding
      to t=prefer-application-packagesType:<<unknown>>

      Initially I thought it was a namespace problem. I noticed that the 1.4 version of weblogic-application.xsd does not define prefer-application-packagesType itself; instead, it includes weblogic-javaee.xsd, which defines prefer-application-packagesType. But weblogic-javaee.xsd does not have a targetNamespace, so types it defines should be coerced into the target namespace of the including schema.

      If I omit the schemaLocation attribute from my original weblogic-application.xml, jwsc adds it when it modifies the file.

      If I delete the xsi:type attribute after each jwsc task except the final one, the app builds and deploys successfully.

      What changed in jwsc between 10.3 and 12.1? I can't find anything in the WebLogic docs about this.