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

Bug 328377

Summary: Three criteria tests failed on Spring and WebLogic
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 CC: eclipselink.orm-inbox, guy.pelletier
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Test fix none

Description Yiping Zhao CLA 2010-10-21 11:33:10 EDT
Guy added these tests recently, these tests failed on GlassFish V3 due to GlassFish bug 14054, but these tests failed on Spring and WebLogic main which are JPA 2.0 compatible servers with following exception:

1. org.eclipse.persistence.testing.tests.jpa.advanced.AdvancedJPAJunitTest.testAdditionalCriteriaWithParameterFromEM1

Incorrect number of students were returned [5], expected [8] 

junit.framework.AssertionFailedError: Incorrect number of students were returned [5], expected [8]
at org.eclipse.persistence.testing.tests.jpa.advanced.AdvancedJPAJunitTest.testAdditionalCriteriaWithParameterFromEM1(AdvancedJPAJunitTest.java:383)

2. org.eclipse.persistence.testing.tests.jpa.advanced.AdvancedJPAJunitTest.testAdditionalCriteriaWithParameterFromEM2

Incorrect number of students were returned [5], expected [18] 

junit.framework.AssertionFailedError: Incorrect number of students were returned [5], expected [18]
at org.eclipse.persistence.testing.tests.jpa.advanced.AdvancedJPAJunitTest.testAdditionalCriteriaWithParameterFromEM2(AdvancedJPAJunitTest.java:412)


3. org.eclipse.persistence.testing.tests.jpa.advanced.AdvancedJPAJunitTest.testComplexAdditionalCriteria

Exception Description: No value was provided for the additional criteria query parameter [NUT_COLOR]. Additional criteria parameters must be set through Entity Manager, Entity Manager Factory or persistence unit properties. If using native EclipseLink, these properties should be set directly on the session. 

Local Exception Stack: 
Exception [EclipseLink-6170] (Eclipse Persistence Services - 2.2.0.v20101021-r8380): org.eclipse.persistence.exceptions.QueryException
Exception Description: No value was provided for the additional criteria query parameter [NUT_COLOR]. Additional criteria parameters must be set through Entity Manager, Entity Manager Factory or persistence unit properties. If using native EclipseLink, these properties should be set directly on the session.
at org.eclipse.persistence.exceptions.QueryException.argumentFromAdditionalCriteriaMissing(QueryException.java:244)
at org.eclipse.persistence.queries.DatabaseQuery.rowFromArguments(DatabaseQuery.java:1757)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1257)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:479)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:714)
at weblogic.persistence.QueryProxyImpl.invoke(QueryProxyImpl.java:56)
at $Proxy100.getResultList(Unknown Source)
at org.eclipse.persistence.testing.tests.jpa.advanced.AdvancedJPAJunitTest.testComplexAdditionalCriteria(AdvancedJPAJunitTest.java:459)
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)
Comment 1 Guy Pelletier CLA 2010-10-22 11:11:21 EDT
Created attachment 181508 [details]
Test fix
Comment 2 Guy Pelletier CLA 2010-10-22 11:14:03 EDT
Fix submitted.

Reviewed/verified by: Gordon Yorke, Yiping Zhao
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:19:20 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink