November 18, 2010

MDS-00515 and XML-20201 when deploying artifacts to the MDS

Oracle SOA Suite 11g provides an ANT target to import artifacts such as WSDLs, schemas, fault policies, and configuration files to the MDS.

Problem:

When using ANT to deploy artifacts to the MDS, you may get the following error:
deploy:
    [input] skipping input as property serverURL has already been set.
    [input] skipping input as property sarLocation has already been set.
[deployComposite] setting user/password..., user=weblogic
[deployComposite] Processing sar=/tmp/AhmedMetaData/AhmedMetaData_mds.zip
[deployComposite] created temp dir =/tmp/deploy_client_1290133613336
[deployComposite] Adding shared data file - /tmp/deploy_client_1290133613336/AhmedMetaData_mds.jar
[deployComposite] Creating HTTP connection to host:soa11gdev, port:8001
[deployComposite] Enter username and password for realm 'default' on host soa11gdev:8001
[deployComposite] Authentication Scheme: Basic
[deployComposite] Username:
weblogic
[deployComposite] Password:

[deployComposite] Received HTTP response from the server, response code=500
[deployComposite] ---->response code=500, error:Error during deployment: Data transfer error in MDS.:
[deployComposite] MDS-00001: exception in Metadata Services layer
[deployComposite] MDS-00515: failure to create document /apps/AhmedMetaData/Order/Order.wsdl in the metadata repository
[deployComposite] <Line 25, Column 7>: XML-20201: (Fatal Error) Expected name instead of <.
[deployComposite] .

BUILD SUCCESSFUL
Total time: 25 seconds
Solution:

To avoid MDS errors when importing artifacts, check the following:
  • Make sure that the you have enough disk space in your temporary directory. Every time you run ANT, a new JAR file is created (but never cleaned up).
  • You cannot import any type of file to the MDS. For example, .doc and .html files are not allowed.
  • All files must be valid (i.e., no malformed XML).
If you have a single error, it will impact the entire import.

As for the error above, the MDS-00515 error, which is caused by the XML-20201 error, is very misleading.

What I was trying to do was import numerous WSDLs and XSDs into the MDS. However, within those subfolders, I had some .html files. Recall that .html files are not allowed in the MDS. As a result, I made sure to delete all .html files, reran ANT and everything worked fine.

Now you see why the error is misleading?

A correct execution would look like the following:
deploy:
    [input] skipping input as property serverURL has already been set.
    [input] skipping input as property sarLocation has already been set.
[deployComposite] setting user/password..., user=weblogic
[deployComposite] Processing sar=/tmp/AhmedMetaData/AhmedMetaData_mds.zip
[deployComposite] created temp dir =/tmp/deploy_client_1290133969195
[deployComposite] Adding shared data file - /tmp/deploy_client_1290133969195/AhmedMetaData_mds.jar
[deployComposite] Creating HTTP connection to host:soa11gdev, port:8001
[deployComposite] Enter username and password for realm 'default' on host soa11gdev:8001
[deployComposite] Authentication Scheme: Basic
[deployComposite] Username:
weblogic
[deployComposite] Password:

[deployComposite] Received HTTP response from the server, response code=200
[deployComposite] clean up temp dir: /tmp/deploy_client_1290133969195
[deployComposite] ---->Deploying composite success.

BUILD SUCCESSFUL
Total time: 17 seconds
Applicable Versions:
  • Oracle SOA Suite 11g (11.1.1.x)

No comments:

Post a Comment