<-- Back

Connection fails in External Database Connector: E038 Unable to register and connect to live preview actions

Issue

Connecting to a database from the External Database Connector while the app runs locally fails with the following error. This occurs with any action that connects to the database, such as Test Connection, loading the database tables, or Run Query:

E038: Unable to register and connect to live preview actions

Environment

External Database Connector (all versions)

Cause

E038 is a generic message that does not name the underlying problem. One cause is an invalid Application root URL in the active run configuration.

When the External Database Connector connects to a database, Studio Pro uses the Application root URL to register the live preview with the locally running app. If the URL is not valid, the registration fails before it starts. The Studio Pro log shows the failure as follows:

System.UriFormatException: Invalid URI: Invalid port specified

A missing trailing slash at the end of the URL, such as http://localhost:8080 instead of http://localhost:8080/, causes this failure. A new app receives a valid default value for this setting. An app that was upgraded several times, or whose URL was edited, can end up with an invalid value.

Solution / Workaround

To fix this issue, set a valid Application root URL in the active configuration:

  1. In the App Explorer, double-click Settings under the app name to open the App Settings dialog. Go to the Configurations tab and edit the active configuration.
  2. On the Server tab, set Application root URL to a valid URL that ends with a /, for example http://localhost:8080/. Use the runtime port of the configuration and make sure the value contains no spaces or extra characters.
  3. Click OK.
  4. Restart the app with Run Locally.
  5. Connect to the database again, for example with Test Connection.

Internal information related

  • 292868
  • ADCDB-99, ADCDB-94
  • C02SSNWKKH8/p1795610021548179

Additional information

Mendix documentation: Connect to an External Database

Have more questions? Submit a request

0 Comments

Article is closed for comments.

To provide feedback, please open a ticket here. Don't forget to include the article's URL along with the feedback you would like to provide.