---
schema_version: "1"
id: 9d851a4e06c3674c96d1fc01d51a3c16c02c93d93256e0e60ef88ae05618efae
title: Limitations of DataWeave in Apex
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexcode/DataWeaveInApex_limitations.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/DataWeaveInApex_limitations.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7b25cf0b1fe7ca8f7be161bcfd1e4ceb7f73d3ab8e755eb1847bf472c2307b2b
description: DataWeave in Apex has these limitations.
---
# Limitations of DataWeave in Apex

DataWeave in Apex has these limitations.

- The DataWeave Java bridge, that is, the ability to bind to static Java methods is disabled. See [Introduction to Mule 4](https://docs.mulesoft.com/mule-runtime/4.2/intro-java-integration "HTML (New Window)"). Features that interact with the environment such as the readURL and envVar functions are also disabled. These checks are done at script creation time instead of at runtime.
- You must specify an encoding for binary input (Apex Blobs) to be coerced to strings: binaryVariable as String {encoding: 'utf8' }".
- DataWeave is constrained to disallow the loading of additional libraries. Therefore, scripts must be self-contained.
- DataWeave modules and importing other scripts aren’t supported. For example, import modules::MyMapping as per [Using a Mapping File](https://docs.mulesoft.com/dataweave/2.4/dataweave-create-module#using-a-mapping-file-in-a-dataweave-script "HTML (New Window)") in a DataWeave Script isn’t supported.
    
    ![Note](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/images/icon_note.png)
    
    #### Note
    
    The feature supports built-in modules. See [DataWeave Reference](https://docs.mulesoft.com/dataweave/2.3/dw-functions "HTML (New Window)").
- DataWeave in Apex doesn’t support these content types.
    - [Flat File Format](https://docs.mulesoft.com/dataweave/2.4/dataweave-formats-flatfile "HTML (New Window)") (application/flatfile)
    - [Excel](https://docs.mulesoft.com/dataweave/2.4/dataweave-formats-excel "HTML (New Window)") (application/xlsx)
    - [Avro](https://docs.mulesoft.com/dataweave/2.4/dataweave-formats-avro "HTML (New Window)") (application/avro)
- Apex classes must be at API version 53.0 or later to access DataWeave integration methods.
- There’s a maximum of 50 DataWeave scripts per org.
- The maximum body size of one DataWeave script is 100,000 (one hundred thousand) characters.

![Note](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/images/icon_note.png)

#### Note

XML Entity Expansion isn’t supported, either currently or in the future, as a guard against denial of service attacks.