Shiiko
Hi

5.5.0.6.-b
j 1.6.0_14
XP

Created a report selecting orphan thoughts.  Was in the process of deleting an orphan thought that was shown attached to a virtual thought.  Upon delete I was presented the warning shown in the image.

Restarted and was asked if I wanted to rebuild the index (search index lock).   I believe that the index was rebuilding at the time of the warning since I was asked to rebuild the index upon upgrading from 5.5.0.5-b.   So far no further problems.

Cheers! 

Log:
PersonalBrain Pro Version 5506
Java 1.6.0_14
Sep 5, 2009 7:12 PM
Database error encountered.
SQL: DELETE FROM Thoughts WHERE id = ?
org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: CONSTRAINT_451: PUBLIC.LINKS FOREIGN KEY(IDA) REFERENCES PUBLIC.THOUGHTS(ID); SQL statement:
DELETE FROM Thoughts WHERE id = ? [23003-115]
    at org.h2.message.Message.getSQLException(Message.java:105)
    at org.h2.message.Message.getSQLException(Message.java:116)
    at org.h2.message.Message.getSQLException(Message.java:75)
    at org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:377)
    at org.h2.constraint.ConstraintReferential.checkRowRefTable(ConstraintReferential.java:394)
    at org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:273)
    at org.h2.table.Table.fireConstraints(Table.java:761)
    at org.h2.table.Table.fireAfterRow(Table.java:776)
    at org.h2.command.dml.Delete.update(Delete.java:75)
    at org.h2.command.CommandContainer.update(CommandContainer.java:72)
    at org.h2.command.Command.executeUpdate(Command.java:208)
    at org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:175)
    at com.thebrain.d.d.h.a(DBHelper.java:275)
    at com.thebrain.d.d.h.if(DBHelper.java:240)
    at com.thebrain.d.d.h.if(DBHelper.java:196)
    at com.thebrain.personal.model.phoenix.b.by.a(DeleteThoughtCommand.java:122)
    at com.thebrain.personal.model.phoenix.b.ca.a(RemoveThoughtCommand.java:134)
    at com.thebrain.personal.model.phoenix.b.bf.a(CommandManager.java:100)
    at com.thebrain.personal.model.phoenix.v.u(PhoenixBrainStore.java:5767)
    at com.thebrain.personal.model.phoenix.v.a(PhoenixBrainStore.java:633)
    at com.thebrain.personal.model.phoenix.PhoenixAPI.deleteThought(PhoenixAPI.java:259)
    at com.thebrain.personal.view.b.j.a(BrainAction.java:1590)
    at com.thebrain.personal.view.b.j.a(BrainAction.java:539)
    at com.thebrain.personal.view.b.j.actionPerformed(BrainAction.java:511)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.AbstractButton.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
    at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at com.thebrain.personal.e.c.c.dispatchEvent(TextContextMenuEventQueue.java:69)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)


Click image for larger version - Name: DB_Error.jpg, Views: 103, Size: 59.75 KB
Quote
Harlan

Shiiko, I was able to repeat this. Thanks for reporting it. The problem happens if you create a parent from a virtual thought and then attempt to delete it. You do not need to do a DB rebuild after the error. To delete the thought, unlink it from the virtual thought first and then the delete will proceed normally.

Regards,
-Harlan
Quote

Newsletter Signup  Newsletter        Visit TheBrain Blog   Blog       Follow us on Twitter   Twitter       Like Us on Facebook   Facebook         Watch Us on Youtube  YouTube       

TheBrain Mind Map & Mindmapping Software     Download TheBrain Mind Mapping Software