Loading

Anypoint Studio JDK 17 error logs and warnings are abbreviated and getting error, "Field not accessible"

Julkaisupäivä: Aug 2, 2024
Kuvaus

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]

Knowledge-artikkelin numero

002473645

 
Ladataan
Salesforce Help | Article