Thursday, December 16, 2010

"oracle.xml.parser.v2.XMLParseException" when deploying composites via Ant

Problem:

We deployed some SOA Suite 11g composites using Ant as follows:
ant -f ant-sca-deploy.xml -DserverURL=http://oradev:8001 -DsarLocation=$CODE_DIR/HelloWorld/deploy/sca_HelloWorld_rev1.0.jar -Dpartition=default -Doverwrite=true -Duser=$USERNAME -Dpassword=$PASSWORD -Dconfigplan=cfgplan_dev.xml
You may get one of the following errors:
[deployComposite] ---->response code=500, error:Error during deployment: Error occurs in applying deployment plan /tmp/sar_base_dir_1292266763149/cfgplan_dev.xml to sar file: /tmp/sar_base_dir_1292266763149/sca_HelloWorld_rev1.0.jar.: oracle.xml.parser.v2.XMLParseException: Can not find definition for element 'soaConfigPlan'.
[deployComposite] ---->response code=500, error:Error during deployment: Error occurs in applying deployment plan /tmp/sar_base_dir_1292266941676/cfgplan_dev.xml to sar file: /tmp/sar_base_dir_1292266941676/sca_HelloWorld_rev1.0.jar.: oracle.xml.parser.v2.XMLParseException: Element 'imports' not expected..

Solution:

The Oracle® Fusion Middleware Developer’s Guide for Oracle SOA Suite 11g Release 1 (11.1.1) E10224-01 May 2009 documentation is incorrect in 2 locations.


Incorrect:
<imports>
  <searchReplace>
    <search>http://oradev:8001</search>
    <replace>http://oradev:8888</replace>
  </searchReplace>
</imports>
Correct:
<import>
  <searchReplace>
    <search>http://oradev:8001</search>
    <replace>http://oradev:8888</replace>
  </searchReplace>
</import>
Incorrect:
<SOAConfigPlan xmlns:jca="http://platform.integration.oracle/blocks/adapter/fw/metadata" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:orawsp="http://schemas.oracle.com/ws/2006/01/policy" xmlns:edl="http://schemas.oracle.com/events/edl" xmlns="http://schemas.oracle.com/soa/configplan">
</SOAConfigPlan>
Correct:
<soaConfigPlan xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/">
</soaConfigPlan>
Applicable Versions:
  • Oracle SOA Suite 11g (11.1.1.x)

1 comment:

thomas said...

I am happy to find this post very useful for me, as it contains lot of information.