org.postgresql.util.PSQLException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • {quote} org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not delete: [com.atlassian.confluence.labels.Label#2031993]; SQL []; ERROR: update or delete on table "label" violates foreign key constraint "fk594acc827072aef" on table "notifications" Detail: Key (labelid)=(2031993) is still referenced from table "notifications".; nested exception is org.postgresql.util.PSQLException: ERROR: update or delete on table "label" violates foreign key constraint "fk594acc827072aef" on table "notifications" Detail: Key (labelid)=(2031993) is still referenced from table "notifications". at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:100) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) at org.springframework.orm.hibernate.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:364) at org.springframework.orm.hibernate.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:351) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:375) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:337) at com.atlassian.confluence.labels.persistence.dao.hibernate.HibernateLabelDao.findByLabel(HibernateLabelDao.java:117) at com.atlassian.confluence.labels.DefaultLabelManager.getLabel(DefaultLabelManager.java:623) at com.atlassian.confluence.labels.DefaultLabelManager.deleteLabel(DefaultLabelManager.java:561) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) ... {quote}
    via by Matthew Erickson [Atlassian],
  • {quote} org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not delete: [com.atlassian.confluence.labels.Label#2031993]; SQL []; ERROR: update or delete on table "label" violates foreign key constraint "fk594acc827072aef" on table "notifications" Detail: Key (labelid)=(2031993) is still referenced from table "notifications".; nested exception is org.postgresql.util.PSQLException: ERROR: update or delete on table "label" violates foreign key constraint "fk594acc827072aef" on table "notifications" Detail: Key (labelid)=(2031993) is still referenced from table "notifications". at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:100) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) at org.springframework.orm.hibernate.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:364) at org.springframework.orm.hibernate.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:351) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:375) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:337) at com.atlassian.confluence.labels.persistence.dao.hibernate.HibernateLabelDao.findByLabel(HibernateLabelDao.java:117) at com.atlassian.confluence.labels.DefaultLabelManager.getLabel(DefaultLabelManager.java:623) at com.atlassian.confluence.labels.DefaultLabelManager.deleteLabel(DefaultLabelManager.java:561) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) ... {quote}
    via by Matthew Erickson [Atlassian],
  • When *attachmentVersion* is set to *replace*, it errors out if used in conjunction with the TOC macro. Error Produced: {code} org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not delete: [com.atlassian.confluence.pages.Attachment#46497891]; SQL []; ERROR: update or delete on table "attachments" violates foreign key constraint "fka768048734a4917e" on table "imagedetails" Detail: Key (attachmentid)=(46497891) is still referenced from table "imagedetails".; nested exception is org.postgresql.util.PSQLException: ERROR: update or delete on table "attachments" violates foreign key constraint "fka768048734a4917e" on table "imagedetails" Detail: Key (attachmentid)=(46497891) is still referenced from table "imagedetails". at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:100) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) at org.springframework.orm.hibernate.HibernateTransactionManager.convertJdbcAccessException(HibernateTransactionManager.java:619) at org.springframework.orm.hibernate.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:605) at org.springframework.orm.hibernate.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:518) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:732) ... Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "attachments" violates foreign key constraint "fka768048734a4917e" on table "imagedetails" Detail: Key (attachmentid)=(46497891) is still referenced from table "imagedetails". at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:334) at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22) at net.sf.hibernate.persister.EntityPersister.delete(EntityPersister.java:581) at net.sf.hibernate.impl.ScheduledDeletion.execute(ScheduledDeletion.java:29) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2464) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2450) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2412) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2276) at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61) at org.springframework.orm.hibernate.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:510) ... 298 more {code} h2. Reproduction # Create a new page # Add a table of contents macro # Add a chart macro # Edit the properties of the Chart macro and: ## Add an attachment name ## Set Attachment Version to Replace # Save the page #- Note that the page will not display (Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error) and the above error will appear in the logs. Alternatively use this XML to create a page to create the error: {code} <p> <ac:macro ac:name="toc"/> </p> <p> </p> <ac:macro ac:name="chart"> <ac:parameter ac:name="attachmentVersion">replace</ac:parameter> <ac:parameter ac:name="title">Test</ac:parameter> <ac:parameter ac:name="height">600</ac:parameter> <ac:parameter ac:name="width">1200</ac:parameter> <ac:parameter ac:name="datadisplay">after</ac:parameter> <ac:parameter ac:name="attachment">new.png</ac:parameter> <ac:parameter ac:name="categoryLabelPosition">up45</ac:parameter> <ac:rich-text-body> <table> <tbody> <tr> <th> </th> <th>A</th> <th>B</th> </tr> <tr> <td>TEST</td> <td>1</td> <td>2</td> </tr> </tbody> </table> </ac:rich-text-body> </ac:macro> {code}
    via by David Yu,
  • GitHub comment 1#176573154
    via GitHub by carast
    ,
  • Deployment error
    via by Félix Navarro Guirado,
    • org.postgresql.util.PSQLException: ERROR: update or delete on table "label" violates foreign key constraint "fk594acc827072aef" on table "notifications" Detail: Key (labelid)=(2031993) is still referenced from table "notifications". at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:100) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) at org.springframework.orm.hibernate.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:364) at org.springframework.orm.hibernate.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:351) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:375) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:337) at com.atlassian.confluence.labels.persistence.dao.hibernate.HibernateLabelDao.findByLabel(HibernateLabelDao.java:117) at com.atlassian.confluence.labels.DefaultLabelManager.getLabel(DefaultLabelManager.java:623) at com.atlassian.confluence.labels.DefaultLabelManager.deleteLabel(DefaultLabelManager.java:561) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    eilonreshef
    1 times, last one,