Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-17913

Java.sql.SQLException: Argument data type ntext is invalid for argument 1 of lower function.

    Details

      Description

      Do a simple journal article search with the restriction factory.

      ie:
      Criterion criterion = RestrictionsFactoryUtil.or(RestrictionsFactoryUtil.ilike("title", "%" + value + "%"),
      RestrictionsFactoryUtil.ilike("description", "%" + value + "%"));

      Using mysql, everything works fine but using sql 2008 i get :

      17:27:48,297 ERROR [jsp:154] java.sql.SQLException: Argument data type ntext is invalid for argument 1 of lower function.
      at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
      at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820)
      at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258)
      at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:632)
      at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:477)
      at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:776)
      at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
      at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
      at org.hibernate.loader.Loader.getResultSet(Loader.java:1849)
      at org.hibernate.loader.Loader.doQuery(Loader.java:718)
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270)
      at org.hibernate.loader.Loader.doList(Loader.java:2294)
      at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2172)
      at org.hibernate.loader.Loader.list(Loader.java:2167)
      at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:119)
      at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1706)
      at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347)
      at com.liferay.portal.dao.orm.hibernate.DynamicQueryImpl.list(DynamicQueryImpl.java:88)
      at com.liferay.portal.dao.orm.hibernate.DynamicQueryImpl.list(DynamicQueryImpl.java:83)
      at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.findWithDynamicQuery(BasePersistenceImpl.java:117)

        Attachments

          Activity

            People

            • Assignee:
              mika.koivisto Mika Koivisto
              Reporter:
              lacricas tom mahy
              Participants of an Issue:
              Recent user:
              Esther Sanz
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 31 weeks, 6 days ago

                Packages

                Version Package
                6.0.6 GA