{noformat}Java.lang.NullPointerException: Cannot invoke "org.hibernate.sql.ast.tree.expression.CaseSearchedExpression$WhenFragment.getPredicate()" because "whenFragment" is null at org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.visitAnsiCaseSearchedExpression(AbstractSqlAstTranslator.java:6431){noformat}
We recently updated to 6.2.4 from 5.x and started occasionally seeing large spikes of errors with this stacktrace. One pod, out of dozens, will suddenly start getting this error for about 10% of findById queries on a specific Repository and continue until it is manually killed. We’ve been unable to figure out how to reproduce the issue, but it seems to correlate with high system load.
{noformat} @Query("SELECT p FROM TblEntity e WHERE e.id = :id") Optional<TblEntity> findById(@Param("id") long id);{noformat}
This the line in the code where the NPE occurs
{noformat} for ( CaseSearchedExpression.WhenFragment whenFragment : caseSearchedExpression.getWhenFragments() ) { ... whenFragment.getPredicate().accept( this ); // <-- NPE, whenFragment is null somehow ... }{noformat} |
|