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

Error when sending e-mail notifications for announcements and alerts

Details

    Description

      Steps

      1. Set the following portal properties:
        [email protected]
        announcements.email.from.name=Admin User
        announcements.entry.check.interval=1
        company.security.strangers.verify=false
        mail.send.blacklist=
        
      1. Navigate to Control Panel > Server Administration > Mail and configure settings for outgoing mail
      2. Create a new user with a valid e-mail address
      3. As the new user, navigate to Account Settings > Preferences > Alerts and Announcements Delivery
      4. Enable the Email option for every Type
      5. Add an Announcements or Alerts widget to the page
      6. Create a new Announcement or Alert

      Expected Result
      After a brief moment, the new user receives an e-mail notification for the Announcement/Alert
      Actual Result

      2021-05-18 20:41:13.803 ERROR [liferay/scheduler_dispatch-4][JDBCExceptionReporter:234] Parameter index out of range (15 > number of parameters, which is 14).
      2021-05-18 20:41:13.807 ERROR [liferay/scheduler_dispatch-4][ParallelDestination:59] Unable to process message {destinationName=liferay/scheduler_dispatch, response=null, responseDestinationName=null, responseId=null, payload=null, values={GROUP_NAME=com.liferay.announcements.web.internal.messaging.CheckEntryMessageListener, companyId=20097, groupId=0, DESTINATION_NAME=liferay/scheduler_dispatch, EXCEPTIONS_MAX_SIZE=0, [email protected], STORAGE_TYPE=MEMORY_CLUSTERED, JOB_NAME=com.liferay.announcements.web.internal.messaging.CheckEntryMessageListener}}
      com.liferay.portal.kernel.messaging.MessageListenerException: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.GenericJDBCException: could not execute query
      	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:41)
      	at com.liferay.portal.kernel.scheduler.messaging.SchedulerEventMessageListenerWrapper._processMessage(SchedulerEventMessageListenerWrapper.java:127)
      	at com.liferay.portal.kernel.scheduler.messaging.SchedulerEventMessageListenerWrapper.receive(SchedulerEventMessageListenerWrapper.java:98)
      	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
      	at com.liferay.portal.messaging.internal.ParallelDestination$1.run(ParallelDestination.java:56)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.GenericJDBCException: could not execute query
      	at com.liferay.portal.service.persistence.impl.UserFinderImpl.findByC_FN_MN_LN_SN_EA_S(UserFinderImpl.java:879)
      	at com.liferay.portal.service.persistence.impl.UserFinderImpl.findByKeywords(UserFinderImpl.java:653)
      	at com.liferay.portal.service.impl.UserLocalServiceImpl.search(UserLocalServiceImpl.java:3158)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66)
      	at com.sun.proxy.$Proxy925.search(Unknown Source)
      	at com.liferay.portal.kernel.service.UserLocalServiceWrapper.search(UserLocalServiceWrapper.java:2370)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66)
      	at com.sun.proxy.$Proxy926.search(Unknown Source)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
      	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
      	at com.sun.proxy.$Proxy41.search(Unknown Source)
      	at com.liferay.portlet.announcements.service.impl.AnnouncementsEntryLocalServiceImpl.lambda$notifyUsers$0(AnnouncementsEntryLocalServiceImpl.java:499)
      	at com.liferay.portal.kernel.interval.IntervalActionProcessor.performIntervalActions(IntervalActionProcessor.java:108)
      	at com.liferay.portal.kernel.interval.IntervalActionProcessor.performIntervalActions(IntervalActionProcessor.java:81)
      	at com.liferay.portlet.announcements.service.impl.AnnouncementsEntryLocalServiceImpl.notifyUsers(AnnouncementsEntryLocalServiceImpl.java:513)
      	at com.liferay.portlet.announcements.service.impl.AnnouncementsEntryLocalServiceImpl.notifyUsers(AnnouncementsEntryLocalServiceImpl.java:467)
      	at com.liferay.portlet.announcements.service.impl.AnnouncementsEntryLocalServiceImpl.checkEntries(AnnouncementsEntryLocalServiceImpl.java:148)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
      	at com.liferay.change.tracking.internal.aop.CTTransactionAdvice.invoke(CTTransactionAdvice.java:80)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
      	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
      	at com.sun.proxy.$Proxy193.checkEntries(Unknown Source)
      	at com.liferay.announcements.web.internal.messaging.CheckEntryMessageListener.doReceive(CheckEntryMessageListener.java:97)
      	at com.liferay.portal.kernel.messaging.BaseMessageListener.doReceive(BaseMessageListener.java:48)
      	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:34)
      	... 7 more
      Caused by: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.GenericJDBCException: could not execute query
      	at com.liferay.portal.service.persistence.impl.UserFinderImpl.doFindByC_FN_MN_LN_SN_EA_S(UserFinderImpl.java:964)
      	at com.liferay.portal.service.persistence.impl.UserFinderImpl.findByC_FN_MN_LN_SN_EA_S(UserFinderImpl.java:863)
      	... 51 more
      Caused by: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.GenericJDBCException: could not execute query
      	at com.liferay.portal.dao.orm.hibernate.ExceptionTranslator.translate(ExceptionTranslator.java:39)
      	at com.liferay.portal.dao.orm.hibernate.SQLQueryImpl.list(SQLQueryImpl.java:188)
      	at com.liferay.portal.dao.orm.hibernate.SQLQueryImpl.list(SQLQueryImpl.java:168)
      	at com.liferay.portal.kernel.dao.orm.QueryUtil.list(QueryUtil.java:84)
      	at com.liferay.portal.kernel.dao.orm.QueryUtil.list(QueryUtil.java:53)
      	at com.liferay.portal.service.persistence.impl.UserFinderImpl.doFindByC_FN_MN_LN_SN_EA_S(UserFinderImpl.java:960)
      	... 52 more
      Caused by: org.hibernate.exception.GenericJDBCException: could not execute query
      	at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140)
      	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128)
      	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
      	at org.hibernate.loader.Loader.doList(Loader.java:2545)
      	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
      	at org.hibernate.loader.Loader.list(Loader.java:2271)
      	at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:316)
      	at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1842)
      	at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:165)
      	at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:157)
      	at com.liferay.portal.dao.orm.hibernate.SQLQueryImpl.list(SQLQueryImpl.java:176)
      	... 56 more
      Caused by: java.sql.SQLException: Parameter index out of range (15 > number of parameters, which is 14).
      	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
      	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
      	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
      	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
      	at com.mysql.cj.jdbc.ClientPreparedStatement.checkBounds(ClientPreparedStatement.java:1372)
      	at com.mysql.cj.jdbc.ClientPreparedStatement.getCoreParameterIndex(ClientPreparedStatement.java:1385)
      	at com.mysql.cj.jdbc.ClientPreparedStatement.setInt(ClientPreparedStatement.java:1573)
      	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.setInt(HikariProxyPreparedStatement.java)
      	at org.hibernate.loader.Loader.bindLimitParameters(Loader.java:1812)
      	at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1719)
      	at org.hibernate.loader.Loader.doQuery(Loader.java:801)
      	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
      	at org.hibernate.loader.Loader.doList(Loader.java:2542)
      	... 63 more
      

      Attachments

        Activity

          People

            jeremy.chen Jeremy Chen
            jesse.yeh Jesse Yeh (Inactive)
            Kiyoshi Lee Kiyoshi Lee
            Jesse Yeh Jesse Yeh (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              1 year, 15 weeks, 5 days ago

              Packages

                Version Package
                7.3.10.3 DXP SP3
                7.3.X
                7.4.1 CE GA2 DXP 7,4
                7.4.13 DXP GA1
                Master