Loading
시스템 관리자에 대한 피싱 방지 MFA 및 전 직원사용자 MFA 적용 안내 더 많이 읽기

NullPointerException in Mule Runtime with Salesforce Connector (OAuth JWT) due to Unpopulated Token Endpoint

게시 일자: Jul 30, 2026
상세 설명

You observe a `java.lang.NullPointerException` from Mule Runtime when invoking the Salesforce Connector. This typically occurs after migrating a Salesforce integration from basic authentication to OAuth JWT/ECA, specifically when the token endpoint configuration for the JWT connection is not correctly populated or referenced.

솔루션

CAUSE

The `java.lang.NullPointerException` arises when the Salesforce Connector, configured for OAuth JWT/ECA, attempts to utilize a token endpoint that is either unpopulated, incorrectly referenced, or resolves to a null value. This often stems from a misconfiguration, such as a typo in property or variable names used to define or retrieve the token endpoint, preventing the connector from properly initializing its OAuth JWT connection. The connector's internal logic expects a valid token endpoint URL to be present for successful authentication.

SOLUTION

1.  **Review Salesforce Connector Configuration:** Examine the configuration of your Salesforce Connector in your Mule application's XML or properties.
2.  **Locate JWT Connection:** If you are using an OAuth JWT connection, identify the `<salesforce:jwt-connection>` element.
3.  **Verify `tokenEndpoint` Attribute:** Ensure that the `tokenEndpoint` attribute within this configuration is correctly populated. This value should point to your Salesforce instance's token endpoint (e.g., `https://login.salesforce.com/services/oauth2/token` for production or `https://test.salesforce.com/services/oauth2/token` for sandbox).
    *   **Example Configuration:**
        ```xml
        <salesforce:jwt-connection name="Salesforce_JWT_Connection" doc:name="Salesforce JWT Connection">
            <salesforce:jwt-oauth-connection
                keyStore="${secure::salesforce.keystore.path}"
                keyStorePassword="${secure::salesforce.keystore.password}"
                keyAlias="${secure::salesforce.key.alias}"
                keyPassword="${secure::salesforce.key.password}"
                principal="${secure::salesforce.principal}"
                tokenEndpoint="${secure::salesforce.token.endpoint}"
                audience="https://login.salesforce.com"
                expiration="300000"
                reconnectionAttempts="3"
                reconnectionFrequency="5000" />
        </salesforce:jwt-connection>
        ```
4.  **Check Property/Variable Resolution:** If the `tokenEndpoint` value is being retrieved from a property or variable (e.g., `${secure::salesforce.token.endpoint}`), perform the following checks:
    *   **Typo Check:** Verify that the property/variable name is spelled correctly and matches its definition in your configuration files (e.g., `mule-app.properties`, `config.yaml`, secure properties).
    *   **Definition and Accessibility:** Confirm that the property/variable is correctly defined and accessible in the environment where the application is deployed (e.g., CloudHub properties, local properties).
    *   **Value Validation:** Ensure that the property/variable resolves to a valid, non-null URL for the token endpoint.
5.  **Correct Misconfigurations:** Rectify any typos or incorrect references in the `tokenEndpoint` attribute or the properties/variables it references.
6.  **Redeploy Application:** Redeploy your Mule application with the corrected configuration.

APPLIES TO

- Mule Runtime 4.x (specifically observed on 4.9.19:8)
- Salesforce Connector 11.4.0 and later versions using OAuth JWT connection
- CloudHub deployment model

Knowledge 기사 번호

005390249

 
로드 중
Salesforce Help | Article