Hide Forgot
I am consistently seeing this: Caused by: com.google.gwt.user.client.rpc.SerializationException: Type 'org.rhq.core.domain.resource.Resource_$$_javassist_30' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized.: instance = Resource[id=10501, type=ABC, key=Processor, name=Processor, parent=XYZ] at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:610) After some debugging, here's the root cause: 21:06:40,196 ERROR [HibernateDetachUtility] java.lang.UnsupportedOperationException at java.util.AbstractCollection.add(AbstractCollection.java:221) at java.util.AbstractCollection.addAll(AbstractCollection.java:305) at org.rhq.enterprise.server.util.HibernateDetachUtility.nullOutUninitializedFields(HibernateDetachUtility.java:117) at org.rhq.enterprise.server.util.HibernateDetachUtility.nullOutFieldsByFieldAccess(HibernateDetachUtility.java:274) at org.rhq.enterprise.server.util.HibernateDetachUtility.nullOutFieldsByFieldAccess(HibernateDetachUtility.java:174) at org.rhq.enterprise.server.util.HibernateDetachUtility.nullOutUninitializedFields(HibernateDetachUtility.java:159) at org.rhq.enterprise.server.util.HibernateDetachUtility.nullOutFieldsByFieldAccess(HibernateDetachUtility.java:274) at org.rhq.enterprise.server.util.HibernateDetachUtility.nullOutFieldsByFieldAccess(HibernateDetachUtility.java:174) at org.rhq.enterprise.server.util.HibernateDetachUtility.nullOutUninitializedFields(HibernateDetachUtility.java:159) at org.rhq.enterprise.server.util.HibernateDetachUtility.nullOutFieldsByFieldAccess(HibernateDetachUtility.java:267) at org.rhq.enterprise.server.util.HibernateDetachUtility.nullOutFieldsByFieldAccess(HibernateDetachUtility.java:174) at org.rhq.enterprise.server.util.HibernateDetachUtility.nullOutUninitializedFields(HibernateDetachUtility.java:159) at org.rhq.enterprise.server.util.HibernateDetachUtility.nullOutFieldsByFieldAccess(HibernateDetachUtility.java:203) at org.rhq.enterprise.server.util.HibernateDetachUtility.nullOutFieldsByFieldAccess(HibernateDetachUtility.java:174) at org.rhq.enterprise.server.util.HibernateDetachUtility.nullOutUninitializedFields(HibernateDetachUtility.java:159) at org.rhq.enterprise.server.util.HibernateDetachUtility.nullOutUninitializedFields(HibernateDetachUtility.java:99) at org.rhq.enterprise.server.util.HibernateDetachUtility.nullOutUninitializedFields(HibernateDetachUtility.java:61) at org.rhq.enterprise.gui.coregui.server.util.SerialUtility.prepare(SerialUtility.java:41) at org.rhq.enterprise.gui.coregui.server.gwt.ResourceGWTServiceImpl.getResourceLineageAndSiblings(ResourceGWTServiceImpl.java:169) This is really bad. We are trying to scrub HashMap$KeySet sets but we can't call addAll. I tried several ways to work around this but can't figure it out yet.
i had this replicatable. but I uninventoried some things and now I can't see it again. I thought it had to do with deep hierarchies, but I have a test plugin with 4-levels deep of resources and I'm not seeing this anymore. I know this problem still exists. We need replication steps to figure out how to get this to happen on demand.
fyi: this code was introduced in the last checkin to the hib detach util: commit ce0ad5c39ee6dae175d0771751b00863e8b775e4
Created attachment 486094 [details] test plugin
commit 189da6b we put all the elements of the Set in an intermediate list, recurse through that list to null out the elements, then we put those list elements (now converted) into a Set that we put into the field (since the field's type is really a Set). The only way I was able to test this was with a deep hierarchy. You can try the attached test plugin. Deploy this new plugin, when the agent picks it up and auto-detects the "Top Server", import it from the auto-discovery queue. Then manually add a "Child" resource under Top Server. After a while, there will be GrandChild and GreatGrandChild resources under the Child resource. Navigate all the way to a GreatGrandChild resource and select its node from the left hand tree. Then hit F5 in the browser. It should refresh and still show you the left hand tree that is drilled down all the way to the selected GreatGrandChild resource.
verifying RHQ 4.0 community release as follows: uploaded the attached plugin, did "plugins update" on the agent, imported the resource "My Top Server". added a child resource, waited ... went to the grandchild, hit F5. reviewed server logs, all good.
Bookkeeping - closing bug - fixed in recent release.