Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-43495

Chat: Multi node issue when deleting a room

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: OPEN
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 20.0, 21.0 [Tentative]
    • Fix Version/s: None
    • Component/s: Chat
    • Labels:
      None
    • 20 status:
      Please Merge
    • Test Plan:
      Hide

      See description.

      Show
      See description.

      Description

      1. Enter as a instructor in a node
      2. Go to Chat tool
      3. Enter as a student in a differente node
      4. Go to Chat tool
      5. As instructor, delete the room
      6. As student, try to chat.

      A message appears.

      On log you can see:

      30-mar-2020 08:41:45.191 ERROR [ajp-nio-8014-exec-8] org.sakaiproject.entitybroker.impl.external.SakaiExternalIntegrationProvider.handleEntityError Direct request failure: DataIntegrityViolationException:could not execute statement; SQL [n/a]; constraint [SAKAI_PR.FK720F9882555E0B79]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement:Direct request failure: DataIntegrityViolationException:could not execute statement; SQL [n/a]; constraint [SAKAI_PR.FK720F9882555E0B79]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement:
       Sakai version: 12.4 (5b3167f0)(AV)
       
      Server: aulavirtualtest.um.es(av12test_2_1) [av12test_2_1-1585541495779]
       
      Request URI: /direct/chat-message/new
       Path Info: /chat-message/new
       Context path: /direct
       Method: POST
       
      Server: av12test_2_1-1585541495779
       User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36
       Browser ID: Win-Mozilla
       IP address: 155.54.215.17
       User ID: da8c610c-43dc-4d76-a9b7-f7cada73d5c3
       User EID: jesus.mendez@ticarum.es
       User Display ID: jesus.mendez@ticarum.es
       
      Full stacktrace:
      DataIntegrityViolationException:could not execute statement; SQL [n/a]; constraint [SAKAI_PR.FK720F9882555E0B79]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement:
      
      30-mar-2020 08:41:45.191 WARN [ajp-nio-8014-exec-8] org.sakaiproject.entitybroker.util.servlet.DirectServlet.dispatch Direct request failure: DataIntegrityViolationException:could not execute statement; SQL [n/a]; constraint [SAKAI_PR.FK720F9882555E0B79]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement:Direct request failure: DataIntegrityViolationException:could not execute statement; SQL [n/a]; constraint [SAKAI_PR.FK720F9882555E0B79]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement:
       Sakai version: 12.4 (5b3167f0)(AV)
       
      Server: aulavirtualtest.um.es(av12test_2_1) [av12test_2_1-1585541495779]
       
      Request URI: /direct/chat-message/new
       Path Info: /chat-message/new
       Context path: /direct
       Method: POST
       
      Server: av12test_2_1-1585541495779
       User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36
       Browser ID: Win-Mozilla
       IP address: 155.54.215.17
       User ID: da8c610c-43dc-4d76-a9b7-f7cada73d5c3
       User EID: jesus.mendez@ticarum.es
       User Display ID: jesus.mendez@ticarum.es
        :{}
      org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [SAKAI_PR.FK720F9882555E0B79]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement
      	at org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:163)
      	at org.springframework.orm.hibernate4.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:730)
      	at org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:592)
      	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761)
      	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730)
      	at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:518)
      	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:292)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
      	at com.sun.proxy.$Proxy288.updateMessage(Unknown Source)
      	at org.sakaiproject.chat2.model.impl.ChatMessageEntityProvider.createEntity(ChatMessageEntityProvider.java:203)
      	at org.sakaiproject.entitybroker.rest.EntityHandlerImpl.handleEntityAccess(EntityHandlerImpl.java:673)
      	at org.sakaiproject.entitybroker.util.servlet.DirectServlet.dispatch(DirectServlet.java:189)
      	at org.sakaiproject.entitybroker.servlet.SakaiDirectServlet.dispatch(SakaiDirectServlet.java:148)
      	at org.sakaiproject.entitybroker.util.servlet.DirectServlet.handleRequest(DirectServlet.java:159)
      	at org.sakaiproject.entitybroker.util.servlet.DirectServlet.service(DirectServlet.java:134)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.sakaiproject.oauth.filter.OAuthPostFilter.doFilter(OAuthPostFilter.java:76)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:467)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.sakaiproject.oauth.filter.OAuthPreFilter.doFilter(OAuthPreFilter.java:74)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      	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:198)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
      	at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:677)
      	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
      	at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:479)
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468)
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: org.hibernate.exception.ConstraintViolationException: could not execute statement
      	at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:72)
      	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
      	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
      	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)
      	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:211)
      	at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:62)
      	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3124)
      	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3581)
      	at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:104)
      	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:465)
      	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:351)
      	at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:350)
      	at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56)
      	at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1258)
      	at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:425)
      	at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)
      	at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:177)
      	at org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:584)
      	... 47 more
      Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-02291: restricción de integridad (SAKAI_PR.FK720F9882555E0B79) violada - clave principal no encontrada
      
      	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
      	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
      	at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
      	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
      	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
      	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
      	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
      	at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1010)
      	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)
      	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
      	at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3657)
      	at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)
      	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
      	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
      	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208)
      	... 60 mor
      
      
      

      7. After 7 or 8 minutos (when the student node knows the channel has been deleted) 
      8. As student, click again Chat tool An error appears

      30-mar-2020 08:43:41.739 WARN [ajp-nio-8014-exec-3] org.sakaiproject.portal.util.ErrorReporter.logAndMail Reportar Error bug-id: f71f4bdb-888a-43ed-8a4b-a98f9e6ccc73 usuario: 4d0fa263-1527-4027-9e1d-1e2898b2cc18 usage-session: 51d939a7-ecff-450d-8d71-3691d3ed15a9 hora: 30-mar-2020 08:43:41 comentario del usuario: null traza de la pila
      org.sakaiproject.portal.api.PortalHandlerException: org.sakaiproject.tool.api.ToolException: org.apache.jasper.JasperException: Ha sucedido una excepción al procesar la página JSP [/jsp/main.jsp] en línea [2]
      
      1: <f:view>
      2:     <sakai:view title="#{ChatTool.enterTool}">
      3: 		<!-- This page doesn't really matter as it will redirect the user to the "select a room" page or the "chat room" page  -->
      4:     </sakai:view>
      5: </f:view>
      
      
      Stacktrace:
          at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:856)
      caused by: org.sakaiproject.tool.api.ToolException: org.apache.jasper.JasperException: Ha sucedido una excepción al procesar la página JSP [/jsp/main.jsp] en línea [2]
      
      1: <f:view>
      2:     <sakai:view title="#{ChatTool.enterTool}">
      3: 		<!-- This page doesn't really matter as it will redirect the user to the "select a room" page or the "chat room" page  -->
      4:     </sakai:view>
      5: </f:view>
      
      
      Stacktrace:
          at org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1487)
      caused by: org.apache.jasper.JasperException: Ha sucedido una excepción al procesar la página JSP [/jsp/main.jsp] en línea [2]
      
      1: <f:view>
      2:     <sakai:view title="#{ChatTool.enterTool}">
      3: 		<!-- This page doesn't really matter as it will redirect the user to the "select a room" page or the "chat room" page  -->
      4:     </sakai:view>
      5: </f:view>
      
      
      Stacktrace:
          at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:481)
      caused by: javax.faces.el.EvaluationException: javax.faces.el.EvaluationException: Error getting property 'enterTool' from bean of type org.sakaiproject.chat2.tool.ChatTool: org.springframework.orm.hibernate4.HibernateObjectRetrievalFailureException: No row with the given identifier exists: [org.sakaiproject.chat2.model.ChatChannel#db126960-5e35-4965-abff-9c545eb7c259]; nested exception is org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.sakaiproject.chat2.model.ChatChannel#db126960-5e35-4965-abff-9c545eb7c259]
          at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:143)
      caused by: javax.faces.el.EvaluationException: Error getting property 'enterTool' from bean of type org.sakaiproject.chat2.tool.ChatTool: org.springframework.orm.hibernate4.HibernateObjectRetrievalFailureException: No row with the given identifier exists: [org.sakaiproject.chat2.model.ChatChannel#db126960-5e35-4965-abff-9c545eb7c259]; nested exception is org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.sakaiproject.chat2.model.ChatChannel#db126960-5e35-4965-abff-9c545eb7c259]
          at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:187)
      caused by: org.springframework.orm.hibernate4.HibernateObjectRetrievalFailureException: No row with the given identifier exists: [org.sakaiproject.chat2.model.ChatChannel#db126960-5e35-4965-abff-9c545eb7c259]; nested exception is org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.sakaiproject.chat2.model.ChatChannel#db126960-5e35-4965-abff-9c545eb7c259]
          at org.springframework.orm.hibernate4.HibernateTemplate.doExecute(HibernateTemplate.java:344)
      caused by: org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.sakaiproject.chat2.model.ChatChannel#db126960-5e35-4965-abff-9c545eb7c259]
          at org.hibernate.internal.SessionFactoryImpl$1$1.handleEntityNotFound(SessionFactoryImpl.java:253)
          at org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:219)
          at org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:275)
          at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:151)
          at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1106)
          at org.hibernate.internal.SessionImpl.internalLoad(SessionImpl.java:1025)
          at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:716)
          at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:282)
          at org.hibernate.cache.internal.StandardQueryCache.get(StandardQueryCache.java:204)
          at org.hibernate.loader.Loader.getResultFromQueryCache(Loader.java:2481)
          at org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2389)
          at org.hibernate.loader.Loader.list(Loader.java:2362)
          at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:497)
          at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:387)
          at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:236)
          at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1300)
          at org.hibernate.internal.QueryImpl.list(QueryImpl.java:103)
          at org.springframework.orm.hibernate4.HibernateTemplate$33.doInHibernate(HibernateTemplate.java:971)
          at org.springframework.orm.hibernate4.HibernateTemplate$33.doInHibernate(HibernateTemplate.java:961)
          at org.springframework.orm.hibernate4.HibernateTemplate.doExecute(HibernateTemplate.java:341)
          at org.springframework.orm.hibernate4.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:309)
          at org.springframework.orm.hibernate4.HibernateTemplate.findByNamedQueryAndNamedParam(HibernateTemplate.java:961)
          at org.springframework.orm.hibernate4.HibernateTemplate.findByNamedQueryAndNamedParam(HibernateTemplate.java:950)
          at org.sakaiproject.chat2.model.impl.ChatManagerImpl.getContextChannels(ChatManagerImpl.java:735)
          at sun.reflect.GeneratedMethodAccessor795.invoke(null:-1)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
          at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
          at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
          at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
          at com.sun.proxy.$Proxy288.getContextChannels(null:-1)
          at org.sakaiproject.chat2.tool.ChatTool.getSiteChannels(ChatTool.java:1331)
          at org.sakaiproject.chat2.tool.ChatTool.setupTool(ChatTool.java:162)
          at org.sakaiproject.chat2.tool.ChatTool.getEnterTool(ChatTool.java:182)
          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.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:99)
          at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:187)
          at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:171)
          at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263)
          at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:160)
      

       

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  • Assignee:
                    maintenanceteam Core Team
                    Reporter:
                    jesusmmp Jesus Maria Mendez
                  • Votes:
                    0 Vote for this issue
                    Watchers:
                    5 Start watching this issue

                    Dates

                    • Created:
                      Updated:

                      Git Integration