Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » DistributedSession cause NPE in InstanceVariableAttributeAccessor
DistributedSession cause NPE in InstanceVariableAttributeAccessor [message #894883] Tue, 10 July 2012 22:08 Go to next message
Dragomir Zoranovic is currently offline Dragomir ZoranovicFriend
Messages: 7
Registered: February 2012
Junior Member
Method DistributedSession.getDescriptor(Class) cause NPE in InstanceVariableAttributeAccessor.getAttributeValueFromObject(Object) line 80:return this.attributeField.get(anObject);

public ClassDescriptor getDescriptor(Class domainClass) {
ClassDescriptor descriptor = getDescriptors().get(domainClass);

// If the descriptor is null then this means that descriptor must now be read from the server.
if (descriptor == null) {
descriptor = getRemoteConnection().getDescriptor(domainClass);
if (descriptor == null) {
return null;
}
getDescriptors().put(domainClass, descriptor);
descriptor.remoteInitialization(this);
}

return descriptor;
}

This method put class descriptor in a map before it is remotely initialized. Using that descriptor in a other thread gives NPE in InstanceVariableAttributeAccessor. Field InstanceVariableAttributeAccessor.attributeField is initialized in a method ClassDescriptor.remoteInitialization()
Re: DistributedSession cause NPE in InstanceVariableAttributeAccessor [message #899628 is a reply to message #894883] Wed, 01 August 2012 15:50 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Please log a bug, but in general usage of RemoteSession's are rare, and a RemoteSession is intended for a single client, not multiple threads.


James : Wiki : Book : Blog : Twitter
Previous Topic:Eclipselink JPA named query not ignoring white spaces.
Next Topic:(no subject)
Goto Forum:
  


Current Time: Thu Apr 18 12:06:16 GMT 2024

Powered by FUDForum. Page generated in 0.02317 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top