MergeChangeSetCommand NullPointerException" in remote EclipseLink Session [message #478727] |
Thu, 06 August 2009 10:53  |
Eclipse User |
|
|
|
I am using EclipseLink 1.0.2.
I have Parent & Child with 1:m relationship. When I delete a child object
which is held in Parent's child collection (ValuHolder)I am getting
"command type MergeChangeSetCommand Internal Exception:
java.lang.NullPointerException" in remote EclipseLink session. I didn't
get this kind of error in toplink.
Parent has 1: m with Child.
OneToManyMapping childsMapping = new OneToManyMapping();
childsMapping.setAttributeName("childs");
childsMapping.setReferenceClass(Child.class);
childsMapping.setRelationshipPartnerAttributeName("parent");
childsMapping.privateOwnedRelationship();
childsMapping.useBasicIndirection();
Child has back reference to Parent.
DirectToFieldMapping parentIdMapping = new DirectToFieldMapping();
parentIdMapping.setAttributeName("parentId");
parentIdMapping.setFieldName("t_Child.parent_id");
descriptor.addMapping(parentIdMapping);
OneToOneMapping parentMapping = new OneToOneMapping();
parentMapping.setAttributeName("parent");
parentMapping.setReferenceClass(Parent.class);
parentMapping.setRelationshipPartnerAttributeName("childs");
parentMapping.useBasicIndirection();
parentMapping.addForeignKeyFieldName("t_Child.parent_id", "t_Parent.id");
I am using ValueHolder for holding relationship object.
When I remove child from Parent's child collection, everything works fine
in local session. But following exception occures in remote EclipseLink
session. In remote session, When Eclipselink tries to remove child object,
it doesn't get entry of child object in its identityMap. Hence while
removing child object,following excpetion comes.
command type MergeChangeSetCommand
Internal Exception: java.lang.NullPointerException
at
org.eclipse.persistence.exceptions.RemoteCommandManagerExcep tion.errorProcessingRemoteCommand(RemoteCommandManagerExcept ion.j
ava:208)
at
org.eclipse.persistence.internal.sessions.coordination.broad cast.BroadcastRemoteConnection.processReceivedObject(Broadca stRem
oteConnection.java:184)
at
org.eclipse.persistence.internal.sessions.coordination.jms.J MSTopicRemoteConnection.onMessage(JMSTopicRemoteConnection.j ava:1
79)
at
org.eclipse.persistence.internal.sessions.coordination.jms.J MSTopicRemoteConnection$JMSOnMessageHelper.run(JMSTopicRemot eConn
ection.java:348)
at
org.eclipse.persistence.internal.queries.MapContainerPolicy. keyFrom(MapContainerPolicy.java:277)
at
org.eclipse.persistence.internal.queries.MapContainerPolicy. removeFrom(MapContainerPolicy.java:339)
at
org.eclipse.persistence.internal.queries.ContainerPolicy.mer geChanges(ContainerPolicy.java:653)
at
org.eclipse.persistence.mappings.CollectionMapping.mergeChan gesIntoObject(CollectionMapping.java:756)
at
org.eclipse.persistence.internal.descriptors.ObjectBuilder.m ergeChangesIntoObject(ObjectBuilder.java:2476)
at
org.eclipse.persistence.internal.sessions.MergeManager.merge ChangesIntoDistributedCache(MergeManager.java:417)
at
org.eclipse.persistence.internal.sessions.MergeManager.merge Changes(MergeManager.java:247)
at
org.eclipse.persistence.internal.sessions.MergeManager.merge ChangesFromChangeSet(MergeManager.java:344)
Can anyone please give suggestions?
Thanks for any help.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05604 seconds