model: Configuracao
package br.com.ghnetsoft.forca_venda.model;
import static lombok.AccessLevel.PROTECTED;
import static org.hibernate.annotations.CacheConcurrencyStrategy.NONSTRICT_READ_WRITE;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.GenericGenerator;
import br.com.ghnetsoft.principal.auditoria.AuditableBase;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
@ToString(of = { "id", "diaAtraso", "periodoGratuidade", "vencimentoBoleto" })
@EqualsAndHashCode(of = "id", callSuper = false)
@Entity
@Setter
@Getter
@Builder
@Table(name = "TAB_CONFIGURACAO")
@NoArgsConstructor(access = PROTECTED)
@AllArgsConstructor(access = PROTECTED)
@Cache(usage = NONSTRICT_READ_WRITE)
public class Configuracao extends AuditableBase {
private static final long serialVersionUID = 4288218905625388936L;
@Id
@Column(name = "PK_CONFIGURACAO")
@GeneratedValue(generator = "UUID")
@GenericGenerator(name = "UUID", strategy = "org.hibernate.id.UUIDGenerator")
private String id;
@Column(name = "NR_DIA_ATRASO")
private Long diaAtraso;
@Column(name = "NR_PERIODO_GRATUIDADE")
private Long periodoGratuidade;
@Column(name = "NR_VENCIMENTO_BOLETO")
private Long vencimentoBoleto;
}
AuditableBase
package br.com.ghnetsoft.principal.auditoria;
import javax.persistence.Column;
import javax.persistence.EntityListeners;
import javax.persistence.MappedSuperclass;
import javax.persistence.Version;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
**AuditableBase**
@ToString(of = { "versao" })
@Getter
@Setter
@NoArgsConstructor
@MappedSuperclass
@EntityListeners({ Auditor.class })
public abstract class AuditableBase extends Principal {
private static final long serialVersionUID = 3026068998520990814L;
@Version
@Column(name = "NR_VERSAO")
private Integer versao;
}
Principal
package br.com.ghnetsoft.principal.auditoria;
import static javax.persistence.AccessType.FIELD;
import static javax.persistence.EnumType.STRING;
import static lombok.AccessLevel.PROTECTED;
import java.io.Serializable;
import java.time.LocalDateTime;
import javax.persistence.Access;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Enumerated;
import javax.persistence.MappedSuperclass;
import org.springframework.data.annotation.CreatedDate;
import br.com.ghnetsoft.principal.enuns.OperacacoBancoLogEnum;
import br.com.ghnetsoft.principal.enuns.SituacaoRegistroEnum;
import br.com.ghnetsoft.principal.enuns.StatusDoRegistroEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
@ToString(of = { "dataHoraCadastro", "dataHoraMovimentacao", "loginMovimentacao", "ipMovimentacao", "tipoOperacao", "statusDoRegistro", "dsSituacao" })
@MappedSuperclass
@Getter
@Setter
@Embeddable
@Access(FIELD)
@NoArgsConstructor(access = PROTECTED)
@AllArgsConstructor(access = PROTECTED)
public class Principal implements Serializable {
private static final long serialVersionUID = -7494237554968808847L;
@Column(name = "TS_CADASTRO")
@CreatedDate
private LocalDateTime dataHoraCadastro;
@Column(name = "TS_MOVIMENTACAO")
private LocalDateTime dataHoraMovimentacao;
@Column(name = "CD_LOGIN_MOVIMENTACAO")
private String loginMovimentacao;
@Column(name = "IP_MOVIMENTACAO")
private String ipMovimentacao;
@Column(name = "TP_OPERACAO")
@Enumerated(STRING)
private OperacacoBancoLogEnum tipoOperacao;
@Enumerated(STRING)
@Column(name = "ST_REGISTRO")
private StatusDoRegistroEnum statusDoRegistro;
@Enumerated(STRING)
@Column(name = "ST_SITUACAO")
private SituacaoRegistroEnum dsSituacao;
}
ConfiguracaoRepository
package br.com.ghnetsoft.forca_venda.repository;
import java.time.LocalDateTime;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import br.com.ghnetsoft.forca_venda.model.Configuracao;
@Repository
public interface ConfiguracaoRepository extends JpaRepository<Configuracao, String> {
@Query(value = "SELECT e FROM Configuracao e WHERE (e.statusDoRegistro = 'ATIVO') ")
Collection<Configuracao> buscarUltimasConfiguracoes();
@Query(value = "SELECT e FROM Configuracao e WHERE (e.diaAtraso = :diaAtraso or :diaAtraso is null) AND (e.periodoGratuidade = :periodoGratuidade or :periodoGratuidade is null) AND (e.dataHoraCadastro >= cast(:dataDe as timestamp) OR :dataDe is null) AND (e.dataHoraCadastro <= cast(:dataAte as timestamp) OR :dataAte is null) AND (e.vencimentoBoleto = :vencimentoBoleto or :vencimentoBoleto is null)")
Page<Configuracao> pesquisar(@Param("diaAtraso") Long diaAtraso, @Param("periodoGratuidade") Long periodoGratuidade, @Param("vencimentoBoleto") Long vencimentoBoleto, @Param("dataDe") LocalDateTime dataDe, @Param("dataAte") LocalDateTime dataAte, Pageable pageable);
}
Consulta gerada:
select configurac0_.pk_configuracao as pk_confi1_2_, configurac0_.ts_cadastro as ts_cadas2_2_, configurac0_.ts_movimentacao as ts_movim3_2_, configurac0_.st_situacao as st_situa4_2_, configurac0_.ip_movimentacao as ip_movim5_2_, configurac0_.cd_login_movimentacao as cd_login6_2_, configurac0_.st_registro as st_regis7_2_, configurac0_.tp_operacao as tp_opera8_2_, configurac0_.nr_versao as nr_versa9_2_, configurac0_.nr_dia_atraso as nr_dia_10_2_, configurac0_.nr_periodo_gratuidade as nr_peri11_2_, configurac0_.nr_vencimento_boleto as nr_venc12_2_ from tab_configuracao configurac0_ where (configurac0_.nr_dia_atraso=? or ? is null) and (configurac0_.nr_periodo_gratuidade=? or ? is null) and (configurac0_.ts_cadastro>=cast(? as timestamp) or ? is null) and (configurac0_.ts_cadastro<=cast(? as timestamp) or ? is null) and (configurac0_.nr_vencimento_boleto=? or ? is null) order by configurac0_.ts_cadastro desc limit ?
Erro no console:
2022-11-29 15:31:37 - b.c.g.f.s.s.ConfiguracaoService - pesquisar dto: ConfiguracaoPesquisaEnvioDTO(diaAtraso=0, periodoGratuidade=0, vencimentoBoleto=0, filtrarData=false, dataDe=null, dataAte=null)
2022-11-29 15:31:37 - b.c.g.p.service.PrincipalService - Metodo que ajusta a a ordenacao e paginacao por campos da consulta
Hibernate: select configurac0_.pk_configuracao as pk_confi1_2_, configurac0_.ts_cadastro as ts_cadas2_2_, configurac0_.ts_movimentacao as ts_movim3_2_, configurac0_.st_situacao as st_situa4_2_, configurac0_.ip_movimentacao as ip_movim5_2_, configurac0_.cd_login_movimentacao as cd_login6_2_, configurac0_.st_registro as st_regis7_2_, configurac0_.tp_operacao as tp_opera8_2_, configurac0_.nr_versao as nr_versa9_2_, configurac0_.nr_dia_atraso as nr_dia_10_2_, configurac0_.nr_periodo_gratuidade as nr_peri11_2_, configurac0_.nr_vencimento_boleto as nr_venc12_2_ from tab_configuracao configurac0_ where (configurac0_.nr_dia_atraso=? or ? is null) and (configurac0_.nr_periodo_gratuidade=? or ? is null) and (configurac0_.ts_cadastro>=cast(? as timestamp) or ? is null) and (configurac0_.ts_cadastro<=cast(? as timestamp) or ? is null) and (configurac0_.nr_vencimento_boleto=? or ? is null) order by configurac0_.ts_cadastro desc limit ?
2022-11-29 15:31:37 - o.h.e.jdbc.spi.SqlExceptionHelper - SQL Error: 0, SQLState: 42P18
2022-11-29 15:31:37 - o.h.e.jdbc.spi.SqlExceptionHelper - ERROR: could not determine data type of parameter $6
2022-11-29 15:31:37 - b.c.g.p.resource.MensagensRetorno - could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet
org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:281)
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:255)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:528)
at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61)
at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:154)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:149)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy471.pesquisar(Unknown Source)
at br.com.ghnetsoft.forca_venda.site.service.ConfiguracaoService.pesquisar(ConfiguracaoService.java:115)
at br.com.ghnetsoft.forca_venda.site.service.ConfiguracaoService$$FastClassBySpringCGLIB$$c18297c3.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:687)
at br.com.ghnetsoft.forca_venda.site.service.ConfiguracaoService$$EnhancerBySpringCGLIB$$99cbc4dd.pesquisar(<generated>)
at br.com.ghnetsoft.forca_venda.site.resource.ConfiguracaoResource.pesquisar(ConfiguracaoResource.java:55)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:878)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:792)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:626)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:118)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:158)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter.doFilter(OAuth2AuthenticationProcessingFilter.java:176)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:92)
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:77)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at br.com.ghnetsoft.forca_venda.site.config.SmpleCORSFilter.doFilter(SmpleCORSFilter.java:48)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:103)
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:67)
at org.hibernate.loader.Loader.getResultSet(Loader.java:2304)
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2057)
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2019)
at org.hibernate.loader.Loader.doQuery(Loader.java:948)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:349)
at org.hibernate.loader.Loader.doList(Loader.java:2850)
at org.hibernate.loader.Loader.doList(Loader.java:2832)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2664)
at org.hibernate.loader.Loader.list(Loader.java:2659)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:506)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:400)
at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:219)
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1414)
at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1565)
at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1533)
at org.hibernate.query.Query.getResultList(Query.java:165)
at org.springframework.data.jpa.repository.query.JpaQueryExecution$PagedExecution.doExecute(JpaQueryExecution.java:177)
at org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:88)
at org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:154)
at org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:142)
at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor$QueryMethodInvoker.invoke(QueryExecutorMethodInterceptor.java:195)
at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.doInvoke(QueryExecutorMethodInterceptor.java:152)
at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.invoke(QueryExecutorMethodInterceptor.java:130)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:80)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:367)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139)
... 103 common frames omitted
Caused by: org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $6
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2553)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2285)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:323)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:473)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:393)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:164)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:114)
at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:57)
... 133 common frames omitted
O que pode ser ?