> For the complete documentation index, see [llms.txt](https://docs.pentaho.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pentaho.com/pdia-admin/9.3-administer/troubleshooting-overview-cp/pentaho-server-issues/unable-to-run-xaction-when-using-javascript-component.md).

# Unable to run XAction when using JavaScript component

Using the JavaScriptAction allows arbitrary JavaScript code to be executed within the Pentaho Server environment. It has, therefore, been decided the disable the JavaScriptAction by default. If you understand the risk of enabling the JavaScriptAction, it may be enabled by following the steps described below.

Perform the following steps to enable the JavaScript:

1. Stop the server, if it is running.
2. Navigate to `/tomcat/webapps/pentaho/WEB-INF/classes/org/pentaho/platform/engine/services/runtime`.
3. Open the `plugins.properties` file with any text editor.
4. Locate the following component names and remove the hash (#) at the beginning of each line:

   ```javascript
    # org.pentaho.component.JavascriptRule = !org.pentaho.platform.plugin.action.javascript.JavascriptRule

   ```

   ```javascript
   # JavascriptRule = org.pentaho.platform.plugin.action.javascript.JavascriptRule

   ```

   ```javascript
   # org.pentaho.plugin.javascript.JavascriptRule = !org.pentaho.platform.plugin.action.javascript.JavascriptRule

   ```
5. Save and close the file.
6. Restart the server.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pentaho.com/pdia-admin/9.3-administer/troubleshooting-overview-cp/pentaho-server-issues/unable-to-run-xaction-when-using-javascript-component.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
