I am getting the following exception when I try to serialize an instance of org.primefaces.component.tabview.Tab,
"Unable to make field private java.lang.ref.Reference java.beans.PropertyDescriptor.propertyTypeRef accessible: module java.desktop does not "opens java.beans" to unnamed module @5ea8d39"
I have succesfully serialized each element of the tab, i means its content, one by one. However when i try to serialize the whole tab I get the error.
The code that I use to serialize is:
Gson gson = new Gson();
String json = null;
try {
json = gson.toJson(tabs);
} catch (Exception e) {
e.printStackTrace();
}
System.out.println("INFO: " + new Date()+ " --> " +json);
It is the same code that I use to serialize successfully each child element of the tab.
I should be getting a String with a list of child elements.
JSF component instances are per spec not serializable, neither PrimeFaces are. What are you trying to archive?