Community
Participate
Working Groups
Tested EclipseLink MBean in trunk(2.2.0) recently, found that: these two methods throw "java.rmi.UnmarshalException". 1. exception for "getObjectsInIdentityMap" java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: org.eclipse.persistence.testing.models.jpa.relationships.Customer (no security manager: RMI class loader disabled) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:178) at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source) 2. exception for "getObjectsInIdentityMapSubCacheAsMap" java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.eclipse.persistence.internal.helper.linkedlist.ExposedNodeLinkedList at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:173) at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl_Stub.invoke(Unknown Source) at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(RMIConnector.java:993) at com.jrockit.mc.console.ui.mbeanbrowser.operations.OperationModel.invokeOperation(OperationModel.java:81) at com.jrockit.mc.console.ui.mbeanbrowser.operations.InvokeOperationAction.invokeMBeanOperation(InvokeOperationAction.java:84) at com.jrockit.mc.console.ui.mbeanbrowser.operations.InvokeOperationAction.run(InvokeOperationAction.java:55) at com.jrockit.mc.console.ui.mbeanbrowser.operations.OperationsSectionPart$InvokeSelection.widgetSelected(OperationsSectionPart.java:54) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:229) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3474) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at com.jrockit.mc.rcp.application.Application.start(Application.java:27) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
Note: (1). the exceptions stated here for WebLogic, exceptions on GlassFish are exactly same as WebLogic's (2). For JBOSS, the first operation returns "[org.eclipse.persistence.testing.models.jpa.relationships.Customer@b63ed5]" which seems right; the second operation returns "org.eclipse.persistence.internal.helper.linkedlist.ExposedNodeLinkedList@1bdacbe" which seems wierd
>This exception does not occur on a JRockit/JRMC combination - so far >I need to retest my SSB application on SUN/JConsole to see if it is app related However, I do get the CNFException if I do not do a [getNumberOfObjectsInIdentityMap()] first In this case I get 55 null entries (which is still wrong)
>verify on SUN-JConsole/JRockit-JRMC and formal-test-EAR/tutorial-EAR as there are differences between the EAR architecture and possibly the JVM/JMX-viewer combination Scheduled for more in-depth investigation (debug session) and possible inclusion in the next release. Tracking of this issue will be in conjuction with the other 23 open issues on parent bug # 316513
>The 2nd error I get on WebLogic/JRMC - even though my Entity is serializable Caused by: java.io.NotSerializableException: org.eclipse.persistence.internal.helper.linkedlist.ExposedNodeLinkedList public class Cell implements Serializable { private static final long serialVersionUID = -8865917134914502125L; >It is not related to the model - it is the IdentityMap which used ExposedNodeLinkedList in the WeakIdentityMap public class HardCacheWeakIdentityMap extends WeakIdentityMap { /** A subset of cache entries have hard references maintained in this list to reduce garbage collection frequency */ protected ExposedNodeLinkedList referenceCache; >where the class is not serializable because the fields are transient public class ExposedNodeLinkedList implements List { private transient LinkedNode header; private transient int size; >Summary: Since the object needs to be transmitted to JRMC via RMI - it needs to be serializable However, serialization will introduce performance and security hits on general caching if we implement Serializable in ExposedNodeLinkedList >See line 363 - we are returning a List of ENLinkedList instances subCache = ((HardCacheWeakIdentityMap)map).getReferenceCache(); >Either returning the LinkedList for all identityMap operations never worked >Or ExposedNodLinkedList was modified so that serialization is no longer possible >Fix: 1) convert to another serializable ArrayList 2) convert to an array of strings (will change function definition) >An alternative would be to transmit a String representation of the List instead
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink