---
schema_version: "1"
id: 5b59dfa9a0037d45cb3b867080ccdfe4bdd24ecdd83108ef736eff57ae455a1e
title: Troubleshooting XML Module
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/xml-module/1.3/xml-module-troubleshooting.md
canonical_url: https://docs.mulesoft.com/xml-module/1.3/xml-module-troubleshooting
source_site: docs.mulesoft.com
content_type: documentation
content_hash: f5050f7f755b66f234fc48f0245350861e61957e8434873c2cf2a9dfbfaa192e
description: MuleSoft Documentation Site
release: "1.3"
latest: false
---
---
product: XML Module
version: 1.3
---

# Troubleshooting XML Module

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

To troubleshoot XML module, become familiar with the information about enabling verbose logging and
interpreting commonly thrown messages.

## Enable Verbose Logging

To get a better understanding of why an application’s interaction with the XML Module is failing,
temporarily enable verbose logging for XML module.

Remember to always disable the enhanced verbosity after troubleshooting because it affects your Mule
application performance.

To enable verbose logging:

1.  Access Anypoint Studio and navigate to the **Package Explorer** view.

2.  Open your application’s project name.

3.  Open the `src/main/resources` path folder.

4.  Open the `log4j2.xml` file inside the folder.

5.  Add an `<AsyncLogger>` tag inside the `<Loggers>` tag:

    ```xml
    			<Loggers>
    				...
    				<AsyncLogger name="org.mule.module.xml" level="DEBUG"/>
    				...
    			</Loggers>
    ```

6.  Save your application changes.

7.  Click the project name in **Package Explorer** and then click **Run** > **Run As** > **Mule
    Application**.

## Troubleshoot Validation Against Schema Issues

When using the XML module to validate against a schema that has references to other local schema
files, the validation can fail with the error:

```none
The supplied schemas were not valid. schema_reference: Failed to read schema document schemadocumentname.xsd, because file access is not allowed due to restriction set by the accessExternalSchema property
```

In the Studio Console, the error looks like this:

```none
ERROR 2021-03-25 18:42:34,499 [[MuleRuntime].uber.03: [bug-xsd-schema-not-found-support].bug-xsd-schema-not-foundFlow.CPU_INTENSIVE @52ec9ec0] [processor: ; event: 026a10a0-8db3-11eb-80a6-3c22fb270222] org.mule.runtime.core.internal.exception.DefaultSystemExceptionStrategy:
********************************************************************************
Message               : The supplied schemas were not valid. schema_reference: Failed to read schema document 'schemadocumentname.xsd', because 'file' access is not allowed due to restriction set by the accessExternalSchema property.
Element               : bug-xsd-schema-not-foundFlow/processors/2 @ bug-xsd-schema-not-found-support:main.xml:16 (Validate schema)
Element DSL           : <xml-module:validate-schema schemas="ref/despatchAdviceMessages/despatchAdviceMessage.xsd"></xml-module:validate-schema>
Error type            : XML-MODULE:INVALID_SCHEMA
FlowStack             : at bug-xsd-schema-not-foundFlow(bug-xsd-schema-not-foundFlow/processors/2 @ bug-xsd-schema-not-found-support:main.xml:16 (Validate schema))
  (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************
```

This error occurs because the access was restricted in the XML module global element configuration
by setting the **Expand entities** field to the default value of **NEVER**. This value prevents XXE
(XML External Entity) and DoS (Denial of Service) attacks.

To resolve this issue, set the **Expand entities** field to **INTERNAL**:

1.  In Studio, open your project and access your Mule app flow.

2.  Navigate to the **Global Element** tab.

3.  Select the **XML Config** configuration and click **Edit**.

4.  In the **Global Element Properties** window, set the **Expand entities** field to **INTERNAL**.

5.  Click **OK**.

![XML module global configuration Expand entities field](/mulesoft/current/en-us/xml-module/1.3/_images/xml-validate-schema-4.png)

In the **Configuration XML** editor, the `<expandEntities>` configuration looks like this:

```xml
<xml-module:config name="XML_Config" expandEntities="INTERNAL"/>
```

## Understand Common Throws

Here is a list of common throw messages and how to interpret them:

- XML-MODULE:INVALID\_INPUT\_XML

  The input document is not a valid XML.

- XML-MODULE:INVALID\_SCHEMA

  The supplied schema is invalid.

- XML-MODULE:INVALID\_XPATH\_EXPRESSION

  The supplied XPath expression is invalid.

- XML-MODULE:NULL\_CONTEXT\_PROPERTY

  A context property with a null value was supplied.

- XML-MODULE:SCHEMA\_NOT\_HONOURED

  The input XML document does not honor its schema.

- XML-MODULE:SCHEMA\_NOT\_FOUND

  The schema could not be found.

- XML-MODULE:TRANSFORMATION

  There was an error transforming an XML document.

## See Also

- [Salesforce Help](https://help.salesforce.com)

- [XML Module Reference](https://docs.mulesoft.com/xml-module/1.3/xml-reference)
