"function lower(integer) does not exist" error using Hibernate

Solution Verified - Updated -

Issue

INFO  [STDOUT] Hibernate: 
    select
        exoshellmo0_.category_id as category1_97_,
        exoshellmo0_.category_editor as category2_97_,
        exoshellmo0_.category_image as category3_97_,
        exoshellmo0_.category_meta_description as category4_97_,
        exoshellmo0_.category_meta_keywords as category5_97_,
        exoshellmo0_.category_url as category6_97_,
        exoshellmo0_.child_category_id as child7_97_,
        exoshellmo0_.content_category_name as content8_97_,
        exoshellmo0_.edit_lock as edit9_97_,
        exoshellmo0_.module_id as module18_97_,
        exoshellmo0_.user_roles_id as user19_97_,
        exoshellmo0_.expires as expires97_,
        exoshellmo0_.inherit_template as inherit11_97_,
        exoshellmo0_.ip_address as ip12_97_,
        exoshellmo0_.last_update as last13_97_,
        exoshellmo0_.page_template as page14_97_,
        exoshellmo0_.parent_category_id as parent15_97_,
        exoshellmo0_.post as post97_,
        exoshellmo0_.visible as visible97_ 
    from
        public.exoshell_mod_content_manager_categories exoshellmo0_ 
    where
        lower(exoshellmo0_.category_editor) like (lower(?)||'%')
00:35:22,651 WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: 42883
00:35:22,651 ERROR [JDBCExceptionReporter] ERROR: function lower(integer) does not exist
00:35:22,669 ERROR [viewhandler] Error Rendering View[/admin/adminconsole.xhtml]
javax.faces.FacesException: javax.el.ELException: /mods/exoshellcontentmanager/ExoshellModContentManagerCategoriesList.xhtml @28,92 rendered="#{exoshellModContentManagerCategoriesList.resultList.size lt 1}": Error reading 'resultList' on type com.domain.exoshellcms.session.ExoshellModContentManagerCategoriesList_$$_javassist_161
  ...
Caused by: javax.el.ELException: /mods/exoshellcontentmanager/ExoshellModContentManagerCategoriesList.xhtml @28,92 rendered="#{exoshellModContentManagerCategoriesList.resultList.size lt 1}": Error reading 'resultList' on type com.domain.exoshellcms.session.ExoshellModContentManagerCategoriesList_$$_javassist_161
     at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
     at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:390)
     ... 82 more
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
     at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:637)
     at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:74)
     ... 83 more
Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
     at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
     at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
     at org.hibernate.loader.Loader.doList(Loader.java:2223)
     at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
     at org.hibernate.loader.Loader.list(Loader.java:2099)
     at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
     at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
     at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
     at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
     at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
     at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:65)
     ... 117 more
Caused by: org.postgresql.util.PSQLException: ERROR: function lower(integer) does not exist
     at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1592)
     at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1327)
     at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:192)
     at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451)
     at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350)
     at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
     at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:255)
     at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:187)
     at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
     at org.hibernate.loader.Loader.doQuery(Loader.java:674)
     at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
     at org.hibernate.loader.Loader.doList(Loader.java:2220)
     ... 125 more

Environment

  • Hibernate

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content