Skip to content

AdvancedJunitTest.testCoalesceJPQLQueryWithNullParameterValue fails on Derby #1679

Open
@lukasj

Description

@lukasj

1 test in org.eclipse.persistence.testing.tests.jpa.advanced.AdvancedJunitTest is failing on Derby:

[ERROR] Errors: 
[ERROR]   AdvancedJunitTest>JUnitTestCase.runBare:719->testCoalesceJPQLQueryWithNullParameterValue:576 » Persistence Exception [EclipseLink-4002] (Eclipse Persistence Services - 4.0.0.v202208281634): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLSyntaxErrorException: Syntax error: Encountered "NULL" at line 1, column 126.
Error Code: 30000
Call: SELECT COUNT(1) FROM CMP3_EMPLOYEE t0, CMP3_SALARY t1 WHERE (((t0.L_NAME = 'Johanssen') AND (t1.SALARY = COALESCE(t1.SALARY, NULL))) AND (t1.EMP_ID = t0.EMP_ID))
Query: ReportQuery(referenceClass=Employee sql="SELECT COUNT(?) FROM CMP3_EMPLOYEE t0, CMP3_SALARY t1 WHERE (((t0.L_NAME = ?) AND (t1.SALARY = COALESCE(t1.SALARY, ?))) AND (t1.EMP_ID = t0.EMP_ID))")
[INFO] 
[ERROR] Tests run: 185, Failures: 0, Errors: 1, Skipped: 0

to reproduce, update test to run on all platforms and run:
mvn test -pl :org.eclipse.persistence.jpa.testapps.advanced -Dtest=AdvancedJunitTest

The test has been introduced as part of the fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=469182

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtest

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions