Contact Us 1-800-596-4880

Troubleshooting the Scripting Module - Mule 4

To troubleshoot the Scripting 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 Scripting module is failing, temporarily enable verbose logging for the module.

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

To enable verbose logging in the configuration file:

  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:

    			<Loggers>
    				...
    				<AsyncLogger name="org.mule.plugin.scripting" 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 External Libraries for the Scripting Engine

When upgrading the Scripting module version 2.0.1 to 2.0.2, you can receive a SCRIPTING:UNKNOWN_ENGINE throw message at runtime if you did not specify a scripting language engine external library. To avoid receiving such a throw message, you must specify a compliant jsr-223 scripting language engine.

For instructions on how to configure the scripting language engine, refer to Add the Execute Operation to the Flow.

Understand Common Throws

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

  • SCRIPTING:COMPILATION

    The content of the property code had problems in the compilation stage. Check that your code is valid and export the classes used with the Scripting module.
  • SCRIPTING:UNKNOWN_ENGINE

    The engine name provided in the engine parameter is unknown.
  • SCRIPTING:EXECUTION

    An exception occurred during the execution stage. Set the log level in DEBUG mode and find more information in the log file.
View on GitHub