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

Searching a Calendar resource throws error

    Details

      Description

      Steps to reproduce:

      1. Add Calendar portlet to page
      2. Go to Resource tab
      3. Add Resource whose name has two parts separated by a whitespace (e.g. "Room 1" instead of "Room1")
      4. Search for added resource in the Calendar Resource search bar using at least two words separated by a whitespace.

      Expected result:
      User is able to search calendar resource with no issues.

      Actual result:
      An error is thrown in the console and the Calendar resource page does not load correctly. Refer to attached image.

      16:36:37,142 ERROR [http-bio-8080-exec-9][IncludeTag:128] Current URL /web/guest/test?_com_liferay_calendar_web_portlet_CalendarPortlet_formDate=1445531791551&p_p_id=com_liferay_calendar_web_portlet_CalendarPortlet&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&_com_liferay_calendar_web_portlet_CalendarPortlet_mvcPath=%2Fview.jsp&_com_liferay_calendar_web_portlet_CalendarPortlet_tabs1=resources&_com_liferay_calendar_web_portlet_CalendarPortlet_keywords=resource+1&_com_liferay_calendar_web_portlet_CalendarPortlet_advancedSearch=false&_com_liferay_calendar_web_portlet_CalendarPortlet_andOperator=true&_com_liferay_calendar_web_portlet_CalendarPortlet_code=&_com_liferay_calendar_web_portlet_CalendarPortlet_name=&_com_liferay_calendar_web_portlet_CalendarPortlet_description=&_com_liferay_calendar_web_portlet_CalendarPortlet_active=true&_com_liferay_calendar_web_portlet_CalendarPortlet_scope=20146 generates exception: com.liferay.portal.kernel.exception.SystemException: java.lang.IllegalArgumentException: Positional parameter does not exist: 14 in query:   SELECT COUNT(DISTINCT calendarResourceId) AS COUNT_VALUE FROM CalendarResource WHERE (companyId = ?) AND (groupId = ?) AND (classNameId = ?) AND ( ((code_ LIKE ? AND ? IS NOT NULL) OR (code_ LIKE ? AND ? IS NOT NULL)) OR ((name LIKE ? AND ? IS NOT NULL) OR (name LIKE ? AND ? IS NOT NULL)) OR (description LIKE ? AND ? IS NOT NULL) ) AND (active_ = ?)
      java.lang.IllegalArgumentException: Positional parameter does not exist: 14 in query:   SELECT COUNT(DISTINCT calendarResourceId) AS COUNT_VALUE FROM CalendarResource WHERE (companyId = ?) AND (groupId = ?) AND (classNameId = ?) AND ( ((code_ LIKE ? AND ? IS NOT NULL) OR (code_ LIKE ? AND ? IS NOT NULL)) OR ((name LIKE ? AND ? IS NOT NULL) OR (name LIKE ? AND ? IS NOT NULL)) OR (description LIKE ? AND ? IS NOT NULL) ) AND (active_ = ?)
              at org.hibernate.impl.AbstractQueryImpl.setParameter(AbstractQueryImpl.java:382)
              at org.hibernate.impl.AbstractQueryImpl.setString(AbstractQueryImpl.java:504)
              at com.liferay.portal.dao.orm.hibernate.SQLQueryImpl.setString(SQLQueryImpl.java:378)
              at com.liferay.portal.kernel.dao.orm.QueryPos.add(QueryPos.java:313)
              at com.liferay.portal.kernel.dao.orm.QueryPos.add(QueryPos.java:323)
              at com.liferay.calendar.service.persistence.impl.CalendarResourceFinderImpl.doCountByC_G_C_C_N_D_A(CalendarResourceFinderImpl.java:306)
              at com.liferay.calendar.service.persistence.impl.CalendarResourceFinderImpl.filterCountByC_G_C_C_N_D_A(CalendarResourceFinderImpl.java:146)
              at com.liferay.calendar.service.persistence.impl.CalendarResourceFinderImpl.filterCountByKeywords(CalendarResourceFinderImpl.java:121)
              at com.liferay.calendar.service.impl.CalendarResourceServiceImpl.searchCount(CalendarResourceServiceImpl.java:122)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:93)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
              at com.liferay.calendar.service.CalendarResourceServiceUtil.searchCount(CalendarResourceServiceUtil.java:115)
              at org.apache.jsp.view_005fcalendar_005fresources_jsp._jspService(view_005fcalendar_005fresources_jsp.java:849)

      Reproduced on:
      Tomcat 7.0.62 + MYSQL 5.6.27
      Portal master GIT ID 0f85e0437c9022756cdc1b756b2520907d0f6cd6

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 32 weeks ago

                Packages

                Version Package
                7.0.0 Alpha 2