On payara JPA named query with CASE and WHEN condition causes illegal argument exception. This was working fine with glassfish3.
EclipseLink bug id https://bugs.eclipse.org/bugs/show_bug.cgi?id=462663
Payara Github https://github.com/payara/Payara/issues/1941
Any help ?
Exception is as below
Caused by: java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.invokeConstructor(PrivilegedAccessHelper.java:471) at org.eclipse.persistence.queries.ReportQueryResult.buildResult(ReportQueryResult.java:122) at org.eclipse.persistence.queries.ReportQueryResult.(ReportQueryResult.java:79) at org.eclipse.persistence.queries.ReportQuery.buildObject(ReportQuery.java:598) at org.eclipse.persistence.queries.ReportQuery.buildObjects(ReportQuery.java:649) at org.eclipse.persistence.queries.ReportQuery.executeDatabaseQuery(ReportQuery.java:852) at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:904) at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1134) at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:460) at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1222) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1857) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1839) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1804) at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:258) at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:473)