com.atlassian.confluence.upgrade.UpgradeException: java.lang.RuntimeException: net.sf.hibernate.exception.ConstraintViolationException: could not insert: [com.atlassian.crowd.embedded.hibernate2.HibernateMembership#168012238]

Atlassian JIRA | Daniel Kjellin | 5 years ago
  1. 0

    https://bamboo.extranet.atlassian.com/browse/PERFENG-PERFREINDEXTOMCAT6PGSQL16/ currently hangs due to this. Checking the logs shows that there are duplicate memberships in the dataset. We should handle that more gracefully. {noformat} 2011-06-29 12:22:13,755 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: java.lang.RuntimeException: net.sf.hibernate.exception.ConstraintViolationException: could not insert: [com.atlassian.crowd.embedded.hibernate2.HibernateMembership#168012238] com.atlassian.confluence.upgrade.UpgradeException: java.lang.RuntimeException: net.sf.hibernate.exception.ConstraintViolationException: could not insert: [com.atlassian.crowd.embedded.hibernate2.HibernateMembership#168012238] at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:110) at com.atlassian.confluence.upgrade.impl.DefaultUpgradeManager.upgrade(DefaultUpgradeManager.java:156) at com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener.contextInitialized(UpgradeLauncherServletContextListener.java:28) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: java.lang.RuntimeException: net.sf.hibernate.exception.ConstraintViolationException: could not insert: [com.atlassian.crowd.embedded.hibernate2.HibernateMembership#168012238] at com.atlassian.confluence.upgrade.upgradetask.SessionClearingRowCallbackHandler.flushAndClear(SessionClearingRowCallbackHandler.java:54) at com.atlassian.confluence.upgrade.upgradetask.SessionClearingRowCallbackHandler.processRow(SessionClearingRowCallbackHandler.java:41) at org.springframework.jdbc.core.JdbcTemplate$RowCallbackHandlerResultSetExtractor.extractData(JdbcTemplate.java:1368) at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:448) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:396) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:458) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:462) at com.atlassian.confluence.user.migration.AtlassianUserDataMigrator.migrateGroupMemberships(AtlassianUserDataMigrator.java:210) at com.atlassian.confluence.upgrade.upgradetask.AtlassianUserToEmbeddedCrowdDataUpgradeTask.doUpgrade(AtlassianUserToEmbeddedCrowdDataUpgradeTask.java:74) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) 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.doUpgrade(AbstractUpgradeManager.java:190) at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:93) ... 17 more {noformat}

    Atlassian JIRA | 5 years ago | Daniel Kjellin
    com.atlassian.confluence.upgrade.UpgradeException: java.lang.RuntimeException: net.sf.hibernate.exception.ConstraintViolationException: could not insert: [com.atlassian.crowd.embedded.hibernate2.HibernateMembership#168012238]
  2. 0

    https://bamboo.extranet.atlassian.com/browse/PERFENG-PERFREINDEXTOMCAT6PGSQL16/ currently hangs due to this. Checking the logs shows that there are duplicate memberships in the dataset. We should handle that more gracefully. {noformat} 2011-06-29 12:22:13,755 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: java.lang.RuntimeException: net.sf.hibernate.exception.ConstraintViolationException: could not insert: [com.atlassian.crowd.embedded.hibernate2.HibernateMembership#168012238] com.atlassian.confluence.upgrade.UpgradeException: java.lang.RuntimeException: net.sf.hibernate.exception.ConstraintViolationException: could not insert: [com.atlassian.crowd.embedded.hibernate2.HibernateMembership#168012238] at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:110) at com.atlassian.confluence.upgrade.impl.DefaultUpgradeManager.upgrade(DefaultUpgradeManager.java:156) at com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener.contextInitialized(UpgradeLauncherServletContextListener.java:28) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: java.lang.RuntimeException: net.sf.hibernate.exception.ConstraintViolationException: could not insert: [com.atlassian.crowd.embedded.hibernate2.HibernateMembership#168012238] at com.atlassian.confluence.upgrade.upgradetask.SessionClearingRowCallbackHandler.flushAndClear(SessionClearingRowCallbackHandler.java:54) at com.atlassian.confluence.upgrade.upgradetask.SessionClearingRowCallbackHandler.processRow(SessionClearingRowCallbackHandler.java:41) at org.springframework.jdbc.core.JdbcTemplate$RowCallbackHandlerResultSetExtractor.extractData(JdbcTemplate.java:1368) at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:448) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:396) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:458) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:462) at com.atlassian.confluence.user.migration.AtlassianUserDataMigrator.migrateGroupMemberships(AtlassianUserDataMigrator.java:210) at com.atlassian.confluence.upgrade.upgradetask.AtlassianUserToEmbeddedCrowdDataUpgradeTask.doUpgrade(AtlassianUserToEmbeddedCrowdDataUpgradeTask.java:74) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) 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.doUpgrade(AbstractUpgradeManager.java:190) at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:93) ... 17 more {noformat}

    Atlassian JIRA | 5 years ago | Daniel Kjellin
    com.atlassian.confluence.upgrade.UpgradeException: java.lang.RuntimeException: net.sf.hibernate.exception.ConstraintViolationException: could not insert: [com.atlassian.crowd.embedded.hibernate2.HibernateMembership#168012238]
  3. 0

    Store Pig outputdata to Oracle

    pig-user | 11 months ago | Divya Gehlot
    java.lang.RuntimeException: could not instantiate 'org.apache.pig.piggybank.storage.DBStorage' with arguments '[oracle.jdbc.driver.OracleDriver, jdbc:oracle:thin:@54.254.166.90:1521:ORCL, riskinsightengine, rie, insert into TEST]'
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Store Pig outputdata to Oracle

    pig-user | 11 months ago | Divya Gehlot
    java.lang.RuntimeException: could not instantiate 'org.apache.pig.piggybank.storage.DBStorage' with arguments '[oracle.jdbc.driver.OracleDriver, jdbc:oracle:thin:@54.254.166.90:1521:ORCL, riskinsightengine, rie, insert into TEST]'
  6. 0

    Store Pig outputdata to Oracle

    pig-user | 11 months ago | Divya Gehlot
    java.lang.RuntimeException: could not instantiate 'org.apache.pig.piggybank.storage.DBStorage' with arguments '[oracle.jdbc.driver.OracleDriver, jdbc:oracle:thin:@54.254.166.90:1521:ORCL, riskinsightengine, rie, insert into TEST]'

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.RuntimeException

      net.sf.hibernate.exception.ConstraintViolationException: could not insert: [com.atlassian.crowd.embedded.hibernate2.HibernateMembership#168012238]

      at com.atlassian.confluence.upgrade.upgradetask.SessionClearingRowCallbackHandler.flushAndClear()
    2. com.atlassian.confluence
      SessionClearingRowCallbackHandler.processRow
      1. com.atlassian.confluence.upgrade.upgradetask.SessionClearingRowCallbackHandler.flushAndClear(SessionClearingRowCallbackHandler.java:54)
      2. com.atlassian.confluence.upgrade.upgradetask.SessionClearingRowCallbackHandler.processRow(SessionClearingRowCallbackHandler.java:41)
      2 frames
    3. Spring Framework
      JdbcTemplate.query
      1. org.springframework.jdbc.core.JdbcTemplate$RowCallbackHandlerResultSetExtractor.extractData(JdbcTemplate.java:1368)
      2. org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:448)
      3. org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:396)
      4. org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:458)
      5. org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:462)
      5 frames
    4. com.atlassian.confluence
      AtlassianUserToEmbeddedCrowdDataUpgradeTask.doUpgrade
      1. com.atlassian.confluence.user.migration.AtlassianUserDataMigrator.migrateGroupMemberships(AtlassianUserDataMigrator.java:210)
      2. com.atlassian.confluence.upgrade.upgradetask.AtlassianUserToEmbeddedCrowdDataUpgradeTask.doUpgrade(AtlassianUserToEmbeddedCrowdDataUpgradeTask.java:74)
      2 frames
    5. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    6. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      3 frames
    7. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      1 frame
    8. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      2 frames
    9. Unknown
      $Proxy33.doUpgrade
      1. $Proxy33.doUpgrade(Unknown Source)
      1 frame
    10. com.atlassian.confluence
      UpgradeLauncherServletContextListener.contextInitialized
      1. com.atlassian.confluence.upgrade.AbstractUpgradeManager.doUpgrade(AbstractUpgradeManager.java:190)
      2. com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:93)
      3. com.atlassian.confluence.upgrade.impl.DefaultUpgradeManager.upgrade(DefaultUpgradeManager.java:156)
      4. com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener.contextInitialized(UpgradeLauncherServletContextListener.java:28)
      4 frames
    11. Glassfish Core
      Catalina.start
      1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
      2. org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
      3. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      4. org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
      5. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      6. org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
      7. org.apache.catalina.core.StandardService.start(StandardService.java:516)
      8. org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      9. org.apache.catalina.startup.Catalina.start(Catalina.java:566)
      9 frames
    12. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    13. Glassfish Core
      Bootstrap.main
      1. org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
      2. org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      2 frames