Hello everyone, please tell me what can be connected with the following error

There was an unexpected error (type=Internal Server Error, status=500). could not prepare statement; SQL [select count(user0_.id) as col_0_0_ from users user0_ cross join user_roles roles1_ where user0_.id=roles1_.user_id and (upper(user0_.first_name) like ?) and (upper(user0_.first_name) like ?) and (upper(user0_.last_name) like ?) and (upper(user0_.email) like ?) and user0_.enabled=1 and .=?]; nested exception is org.hibernate.exception.SQLGrammarException: could not prepare statement 

Occurs when calling this method.

 public Page<UserListingDTO> getAllUsersForListing(Pageable pageable, UserCriteria userCriteria) { PageRequest pageRequest = new PageRequest(pageable.getPageNumber(), pageable.getPageSize()); Page<User> userList; if (userCriteria == null) { userList = userRepository.findAll(pageRequest); } else { SpecificationBuilder<User> builder = buildUserSpecification(userCriteria); userList = userRepository.findAll(builder.buildSpecification(), pageRequest); } Page<UserListingDTO> userPage = userList.map(this::convertToListingDTO); return userPage; } 

and more specifically in this line

  userList = userRepository.findAll(builder.buildSpecification(), pageRequest); 
  • one
    What should this snippet mean: and .=? - Akina
  • Should there be more search criteria (role)? which apparently is not added - Anton
  • one
    But with this non-substitution and fight ... apparently, something is not right with an array of substitution criteria. - Akina
  • In this line there is an appeal to the database, if the tests pass successfully, then most likely it is related to the server infrastructure. - Roman C
  • everything is fine there until I add the type set to the search criteria which contains various roles for myself, probably the problem with processing this set by sql itself - Anton

0