Error while upgrading from Confluence Wiki 3.5.1 to 4.0.5

I am getting the below error in my atlassian-confluence.log :

2012-10-07 09:18:30,242 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: Upgrade task com.atlassian.confluence.upgrade.upgradetask.LoginInfoUpgradeTask@225c8c05 failed during the UPGRADE phase due to: More than one row with the given identifier was found: BucketPropertySetItem[entityId=0,entityName=CWD_progers,key=confluence.user.last.login.date,type=7,boolean=false,string=<null>,text=<null>,int=0,double=0.0,long=0,date=2007-09-27 09:58:17.704], for class: bucket.user.propertyset.BucketPropertySetItem; nested exception is net.sf.hibernate.HibernateException: More than one row with the given identifier was found: BucketPropertySetItem[entityId=0,entityName=CWD_progers,key=confluence.user.last.login.date,type=7,boolean=false,string=<null>,text=<null>,int=0,double=0.0,long=0,date=2007-09-27 09:58:17.704], for class: bucket.user.propertyset.BucketPropertySetItem

com.atlassian.confluence.upgrade.UpgradeException: Upgrade task com.atlassian.confluence.upgrade.upgradetask.LoginInfoUpgradeTask@225c8c05 failed during the UPGRADE phase due to: More than one row with the given identifier was found: BucketPropertySetItem[entityId=0,entityName=CWD_progers,key=confluence.user.last.login.date,type=7,boolean=false,string=<null>,text=<null>,int=0,double=0.0,long=0,date=2007-09-27 09:58:17.704], for class: bucket.user.propertyset.BucketPropertySetItem; nested exception is net.sf.hibernate.HibernateException: More than one row with the given identifier was found: BucketPropertySetItem[entityId=0,entityName=CWD_progers,key=confluence.user.last.login.date,type=7,boolean=false,string=<null>,text=<null>,int=0,double=0.0,long=0,date=2007-09-27 09:58:17.704], for class: bucket.user.propertyset.BucketPropertySetItem

at com.atlassian.confluence.upgrade.AbstractUpgradeManager.executeUpgradeStep(AbstractUpgradeManager.java:212)

at com.atlassian.confluence.upgrade.AbstractUpgradeManager.runUpgradeTasks(AbstractUpgradeManager.java:148)

at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:98)

at com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener.contextInitialized(UpgradeLauncherServletContextListener.java:45)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)

at org.apache.catalina.core.StandardService.start(StandardService.java:525)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)

at org.apache.catalina.startup.Catalina.start(Catalina.java:595)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

Caused by: org.springframework.orm.hibernate.HibernateSystemException: More than one row with the given identifier was found: BucketPropertySetItem[entityId=0,entityName=CWD_progers,key=confluence.user.last.login.date,type=7,boolean=false,string=<null>,text=<null>,int=0,double=0.0,long=0,date=2007-09-27 09:58:17.704], for class: bucket.user.propertyset.BucketPropertySetItem; nested exception is net.sf.hibernate.HibernateException: More than one row with the given identifier was found: BucketPropertySetItem[entityId=0,entityName=CWD_progers,key=confluence.user.last.login.date,type=7,boolean=false,string=<null>,text=<null>,int=0,double=0.0,long=0,date=2007-09-27 09:58:17.704], for class: bucket.user.propertyset.BucketPropertySetItem

at org.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:597)

at org.springframework.orm.hibernate.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:353)

at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:375)

at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:337)

at bucket.user.persistence.dao.hibernate.BucketPropertySetDAO.findByKey(BucketPropertySetDAO.java:92)

at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)

at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)

at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)

at $Proxy65.findByKey(Unknown Source)

at bucket.user.propertyset.BucketPropertySet.getByKey(BucketPropertySet.java:209)

at bucket.user.propertyset.BucketPropertySet.get(BucketPropertySet.java:168)

at com.opensymphony.module.propertyset.AbstractPropertySet.getDate(AbstractPropertySet.java:258)

at com.atlassian.crowd.embedded.propertyset.DebugLoggingPropertySet.getDate(DebugLoggingPropertySet.java:89)

at com.atlassian.user.impl.cache.properties.CachedPropertySet.getDate(CachedPropertySet.java:221)

at com.atlassian.user.impl.cache.properties.CachingPropertySetFactory$RecacheOnWritePropertySet.getDate(CachingPropertySetFactory.java:132)

at com.atlassian.confluence.upgrade.upgradetask.LoginInfoUpgradeTask$1.apply(LoginInfoUpgradeTask.java:91)

at com.atlassian.confluence.upgrade.upgradetask.LoginInfoUpgradeTask$1.apply(LoginInfoUpgradeTask.java:78)

at com.atlassian.confluence.core.persistence.hibernate.HibernateSessionManager$1.doInTransaction(HibernateSessionManager.java:110)

at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)

at com.atlassian.confluence.core.persistence.hibernate.HibernateSessionManager.executeWithSessionClearing(HibernateSessionManager.java:105)

at com.atlassian.confluence.upgrade.upgradetask.LoginInfoUpgradeTask.doUpgrade(LoginInfoUpgradeTask.java:67)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)

at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)

at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)

at $Proxy33.doUpgrade(Unknown Source)

at com.atlassian.confluence.upgrade.AbstractUpgradeManager$UpgradeStep$4.execute(AbstractUpgradeManager.java:492)

at com.atlassian.confluence.upgrade.AbstractUpgradeManager.executeUpgradeStep(AbstractUpgradeManager.java:188)

... 18 more

Caused by: net.sf.hibernate.HibernateException: More than one row with the given identifier was found: BucketPropertySetItem[entityId=0,entityName=CWD_progers,key=confluence.user.last.login.date,type=7,boolean=false,string=<null>,text=<null>,int=0,double=0.0,long=0,date=2007-09-27 09:58:17.704], for class: bucket.user.propertyset.BucketPropertySetItem

at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:71)

at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:51)

at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:413)

at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:2129)

at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1999)

at net.sf.hibernate.impl.SessionImpl.get(SessionImpl.java:1935)

at sun.reflect.GeneratedMethodAccessor73.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.springframework.orm.hibernate.HibernateTemplate$CloseSuppressingInvocationHandler.invoke(HibernateTemplate.java:1123)

at $Proxy99.get(Unknown Source)

at bucket.user.persistence.dao.hibernate.BucketPropertySetDAO$2.doInHibernate(BucketPropertySetDAO.java:98)

at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370)

... 55 more

2012-10-07 09:18:30,249 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1 errors were encountered during upgrade:

2012-10-07 09:18:30,249 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1: More than one row with the given identifier was found: BucketPropertySetItem[entityId=0,entityName=CWD_progers,key=confluence.user.last.login.date,type=7,boolean=false,string=<null>,text=<null>,int=0,double=0.0,long=0,date=2007-09-27 09:58:17.704], for class: bucket.user.propertyset.BucketPropertySetItem; nested exception is net.sf.hibernate.HibernateException: More than one row with the given identifier was found: BucketPropertySetItem[entityId=0,entityName=CWD_progers,key=confluence.user.last.login.date,type=7,boolean=false,string=<null>,text=<null>,int=0,double=0.0,long=0,date=2007-09-27 09:58:17.704], for class: bucket.user.propertyset.BucketPropertySetItem

2012-10-07 09:18:30,250 WARN [main] [atlassian.confluence.plugin.PluginFrameworkContextListener] contextInitialized Not starting full plugin system due to upgrade or licensing errors

2012-10-07 09:18:33,414 INFO [main] [com.atlassian.confluence.lifecycle] init Confluence is ready to serve

I tried to resolve this error but could not. Please guide me to resolve this issue. I got the same error when I tried to upgrade to 4.3.
Thanks,
alok

1 answer

Hello Alok!

I've seen this before. Usually this happens when you run the upgrade task twice.

The error above is complaining about a user already in a table:

application will not start: Upgrade task com.atlassian.confluence.upgrade.upgradetask.LoginInfoUpgradeTask@225c8c05 failed during the UPGRADE phase due to: More than one row with the given identifier was found: BucketPropertySetItem[entityId=0,entityName=CWD_progers,key=confluence.user.last.login.date,type=7,boolean=false,string=&lt;null&gt;,text=&lt;null&gt;,int=0,double=0.0,long=0,date=2007-09-27 09:58:17.704], for class: bucket.user.propertyset.BucketPropertySetItem; nested exception is net.sf.hibernate.HibernateException

I would suggest rolling back to a previous state of this upgrade, and double checking if this version has not been upgraded.

In another scearnio we could try to delete the affected rows:

delete from logininfo;

This will clean the affected Row which the upgrade is complaining. But please before proceeding backup, and if you encounter any problems revert it again.

Cheers,

Guilherme

Hi Guilherme,

Thank you for your inputs.

Yes you are correct that it is upgraded twice but that is my need. I upgraded this instance from 2.10 to 3.5.13. Now I am upgrading it to 4.3. This is where I am getting this error. Can't I upgrade a confluence instance twice? How do I do that?

I do not see any table called logininfo in my db.

Thanks & Regards,

Alok

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Confluence

Three common content challenges + how to manage them

An efficient enterprise content management system, or ECM, is a must-have for companies that create work online (cough   cough, all companies). If content calendars, marketing plans, and bu...

61 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you