2 Replies Latest reply on Jun 13, 2008 11:27 AM by Prabhat Jha

    Duplicate entry '13-portal.user.last-login-date' within Port

    Stephan Eisermann Newbie

      Hi,

      using this setup:

      • Version: jboss-portal-ha-2.6.1.GA-bundled
      • Download Version
      • JBoss AS Version: 4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA date=200707131605)]
      • Database: Mysql 5.0.26 (SLES10)
      • JDBC Connector and Version: mysql-connector-java-5.0.5-bin.jar
      • OS Platform: SUSE Linux Enterprise Server 10 (i586)
      • Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)


        I have three jboss portal instances in a cluster setup. Sometimes a user gets a strange error when he tries to log out:

        java.sql.BatchUpdateException: Duplicate entry '13-portal.user.last-login-date' for key 1
         com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1213)
         com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:912)
         org.jboss.resource.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:519)
         org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
         org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
         org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:237)
         org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:144)
         org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
         org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
         org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
         org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
         org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:59)
         com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:114)
         com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:247)
         com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:86)
         com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
         com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1382)
         com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
         com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
         org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)
         org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
         org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:262)
         org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
         org.jboss.portal.core.aspects.server.TransactionInterceptor.invoke(TransactionInterceptor.java)
         org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
         org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
         org.jboss.portal.server.aspects.LockInterceptor$InternalLock.invoke(LockInterceptor.java:70)
         org.jboss.portal.server.aspects.LockInterceptor.invoke(LockInterceptor.java:131)
         org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
         org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
         org.jboss.portal.server.servlet.PortalServlet.service(PortalServlet.java:380)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         de.materna.sinfonia.jbossportal.portalServerWar.servletfilter.ParameterFilter.doFilter(ParameterFilter.java:107)
         org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
         org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        


        The error seems to happen randomly, but i can reproduce it (sometimes) this way:

        • Login on the three systems as the same user (e.g. "foo")
        • Logout on one system, this does work
        • Logout on a other system, this produces the above error


          Is this a problem related to the setup or a not allowed use case? Has some else witnessed this error?

          Thanks in advance!