SYMPTOM
I am using Studio 7.18 and noticing issues with the embedded JDK 17. When I debug an application using the embedded JDK 17, a "field not accessible" error occurs and the error logs and warnings are abbreviated.
I changed the JDK to the embedded JDK 8, and noticed that there are no errors and the error messages look normal/are not abbreviated.
Why is there a difference between JDK 17 and 8?
Error:
com.mulesoft.mule.debugger.builder.ObjectFieldDefinitionFactory: Field 'private static final java.lang.Throwable[] java.lang.Throwable.EMPTY_THROWABLE_ARRAY' is not accessible. Error message: class com.mulesoft.mule.debugger.builder.ObjectFieldDefinitionFactory cannot access a member of class java.lang.Throwable (in module java.base) with modifiers "private static final" Field not accessible and could not find public methods to get its value.
CAUSE
This behavior is happening because we are unable to get access to private fields using Java 17.
In Java 17, we cannot get access to the internal state while debugging. When a private field is found, we try to access it via reflection. If it is not possible, we send the message you are receiving.
SOLUTION
A potential workaround is to open the package using an --add-opens parameter.
If you would like us to expand the package on your behalf in Studio, please make a feature request in our Ideas Portal:
https://ideas.salesforce.com/s/search#t=All&sort=relevancy&f:@sfcategoryfull=[MuleSoft]
002473645

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.