Loading

Access rules for Java library

Veröffentlichungsdatum: Sep 25, 2024
Lösung

SYMPTOM

Some java libraries may not be accessible by your project. 

Error:
Access restriction: The type 'DocumentBuilder' is not API (restriction on required library
Access restriction: The type 'DocumentBuilderFactory' is not API (restriction on required library
User-added image

CAUSE

Mule runtime engine is developed using Java and many other third-party libraries. The default class-loading mechanism of the JVM makes it possible to have conflicting versions of the same JAR files. 

Some libraries will need to be granted access in order to be used. 

SOLUTION

  1. Right-click your project
  2. Go to Java Build Path --> Libraries --> Mule Server {VERSION_HERE} --> Edit.. button
  3. Click Add... button
  4. Set Resolution to Accessible
  5. Set Rule Pattern to your specific package (example: "org/w3c/dom/**")
  6. Click OK and Apply and Close
User-added image
Nummer des Knowledge-Artikels

001119236

 
Laden
Salesforce Help | Article