Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 328293

Summary: testUpdateWithProxy() failed with NPE in J2SE and J2EE in EclipseLink trunk
Product: z_Archived Reporter: Yiping Zhao <yiping.zhao>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
proposed fix none

Description Yiping Zhao CLA 2010-10-20 16:26:21 EDT
The test is in org.eclipse.persistence.testing.tests.jpa.proxyauthentication.ProxyAuthenticationServerTestSuite.java, it seems that it's related to changes Chris made on Oct 18th as for fix of bug 323370.

The exception is:

java.lang.NullPointerException
at org.eclipse.persistence.internal.sessions.AbstractSession.writesCompleted(AbstractSession.java:3393)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.writesCompleted(UnitOfWorkImpl.java:5568)
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.writeChanges(RepeatableWriteUnitOfWork.java:421)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:742)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.performPreQueryFlush(EJBQueryImpl.java:1237)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:430)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:714)
at org.eclipse.persistence.testing.tests.jpa.proxyauthentication.ProxyAuthenticationServerTestSuite.testUpdateWithProxy(ProxyAuthenticationServerTestSuite.java:231)
at org.eclipse.persistence.testing.framework.junit.JUnitTestCase.runBareServer(JUnitTestCase.java:534)
at org.eclipse.persistence.testing.framework.server.TestRunnerBean.runTest(TestRunnerBean.java:87)
at com.oracle.pitchfork.util.aop.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:15)
at com.oracle.pitchfork.aop.internal.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:90)
at com.oracle.pitchfork.aop.internal.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:74)
at com.oracle.pitchfork.aop.internal.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:58)
at com.oracle.pitchfork.aop.internal.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:78)
at com.oracle.pitchfork.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:34)
at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
Comment 1 Chris Delahunt CLA 2010-10-21 11:11:12 EDT
Created attachment 181408 [details]
proposed fix
Comment 2 Chris Delahunt CLA 2010-10-21 14:38:07 EDT
Checked into 2.2, revision 8382

-AbstractSession's writesCompleted now checks if the value from getAccessor() is null before calling writesCompleted on it.  
This would be null only when an ExclusiveIsolatedClientSession is used, and flush is called without any changes being made.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:23:45 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink