Filtro do Componente
-
Estou tentando filtrar um componente e recebo esse erro, o que pode ser?
ERROR: operator does not exist: integer = character varying
Dica: No operator matches the given name and argument types. You might need to add explicit type casts.
Posição: 502Exceção Gerada: org.postgresql.util.PSQLException: ERROR: operator does not exist: integer = character varying Dica: No operator matches the given name and argument types. You might need to add explicit type casts. Posição: 502 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2497) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2233) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:310) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:446) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:370) at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149) at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:108) at wfr.database.PagedResultSet.a(SourceFile:135) at wfr.database.PagedResultSet.open(SourceFile:89) at wfr.database.WFRResultSet.open(SourceFile:126) at wfr.database.DBConnection.getResultSet2(SourceFile:1118) at wfr.sys.WFRData.search(SourceFile:2054) at wfr.sys.WFRData.search(SourceFile:1903) at wfr.sys.WFRData.search(SourceFile:1866) at wfr.sys.WFRData.getFormResultSet(SourceFile:662) at wfr.sys.HTMLInterface.HTMLForm.create(SourceFile:317) at wfr.sys.HTMLInterface.HTMLForm.<init>(SourceFile:267) at wfr.sys.HTMLInterface.HTMLInterface.createForm(SourceFile:640) at wfr.web.actions.OpenformAction.execute(SourceFile:62) at wfr.web.Action.doAction(SourceFile:128) at wfr.web.Controller.process(SourceFile:135) at wfr.web.Controller.doGet(SourceFile:62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) 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 wfr.web.ContextFilter.doFilter(SourceFile:117) 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:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1598) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)
-
Já passei por isso antes, isso ai é pq o postgres nas versões mais atuais não faz conversão implícita de valores, tem uma doc falando a respeito disso, vou te enviar: https://manual.softwell.com.br/#/erros_solucoes_banco_de_dados?id=operator-does-not-exist-integer-character-varying
Ai tem um procedimento para forçar a conversão, que pode te ajudar.
-
Sim, em cada projeto que vc tiver em uma base de dados diferente, vc executa esse script que dá certo.