Getting IllegalArgumentException after hibernate upgrade

After upgrading hibernate-core from 5.3.14.Final to 5.4.29.Final I have started seeing this “warning” while booting up my application which shuts down by itself afterwards:

... @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Validation failed for query for method public abstract com.testApp.repository.FlashMessageByZipCodeRepository.searchByText(java.lang.String,!

This error is pointing to repository (and below shown query):

public interface FlashMessageByZipCodeRepository extends JpaRepository<FlashMessageByZipCodeEntity, FlashMessageByZipCodeKey>, Searchable<FlashMessageByZipCodeEntity> {

    @EntityGraph(attributePaths = "flashMessageEntity.applicationParameter")
    @Query("select x from FlashMessageByZipCodeEntity x where x.flashMessageEntity.comments like ?1 or x.flashMessageEntity.applicationParameter.parameterName like ?1 or x.zipCode like ?1 or x.userUpdated like ?1")
    Page<FlashMessageByZipCodeEntity> searchByText(String searchText, Pageable pageable);


For more reference

These are the two entities used in above query:

@Table(name = "FLSH_MSG_ZIP")
public class FlashMessageByZipCodeEntity implements Serializable {

    @OneToOne(fetch = FetchType.LAZY)
            @JoinColumn(name = "APPL_C", referencedColumnName = "APPL_C"
                    , nullable = false),
            @JoinColumn(name = "FLSH_MSG_PARM_I", referencedColumnName = "FLSH_MSG_PARM_I"
                    , nullable = false)

    private FlashMessageEntity flashMessageEntity;


@Table(name = "FLSH_MSG")
public class FlashMessageEntity {

    @Column(name = "APPL_C", nullable = false)
    private ApplicationCode applicationCode;

    @OneToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "FLSH_MSG_PARM_I", nullable = false)
    private ApplicationParameterEntity applicationParameter;



Any help would be much appreciated.

I don’t know what Spring Data is doing here exactly so maybe it’s better to ask this in the Spring forums. If you can share the full stack trace and maybe even reproduce the issue with plain Hibernate, I can provide you further help. From what I see in the information you gave me, this is an issue with Spring.