ObjectDB ObjectDB

Issue #1357: com.objectdb.o.InternalException: null

Type: Bug ReoprtPriority: NormalStatus: ActiveReplies: 5
#1

After an error in a @PrePersist method in an Entity class, the database stopped working.

Fortunately this was in development, but still worrying!

The Entity class


@Entity

@Table(uniqueConstraints = {
    @UniqueConstraint(columnNames = "personalNumber")})
public class Customer extends PersistableObject {

    @OneToOne(mappedBy = "spouse")
    private Customer spouse = null;
    private Date dateOfBirth = null;
    private String firstName = null;
    private String lastName = null;
    private String personalNumber = null;
    private String street = null;
    private String careOf = null;
    private String zipCode = null;
    private String city = null;
    private String email = null;
    private String phoneNumber = null;
    private Payment.Periodicity paymentPeriodicity = Payment.Periodicity.QUARTERLY;
    @OneToMany(mappedBy = "customer", fetch = FetchType.EAGER)
    private List<Insurance> insurances = new ArrayList<>();

    public Customer getSpouse() {
        return spouse;
    }

    @PrePersist
    private void setDateOfBirth() throws ParseException {
        String dateOfBirthStr = personalNumber.substring(0, 8);
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
        dateOfBirth = sdf.parse(dateOfBirthStr);
    }
// Getter/setters omitted
}

 

Below in the stacktrace from ObjectDB Explorer when trying to execute the Query "select c from Customer c".

 

Exception in thread "AWT-EventQueue-0" [ObjectDB 2.5.4_01] Unexpected exception (Error 990)
  Generated by Java HotSpot(TM) 64-Bit Server VM 1.8.0 (on Mac OS X 10.9.2).
Please report this error on http://www.objectdb.com/database/issue/new
com.objectdb.o.InternalException: null
com.objectdb.o.InternalException
at com.objectdb.o.BYR.o(BYR.java:113)
at com.objectdb.o.BYR.v(BYR.java:194)
at com.objectdb.o.NLT.readAndAdjust(NLT.java:109)
at com.objectdb.o.UMR.readAndAdjust(UMR.java:653)
at se.firstinsurance.persistence.organization.Customer.__odbReadContent(Unknown Source)
at com.objectdb.o.MMM.ag(MMM.java:1064)
at com.objectdb.o.UTY.aH(UTY.java:1305)
at com.objectdb.o.UTY.aG(UTY.java:1277)
at com.objectdb.o.ENH.b(ENH.java:102)
at com.objectdb.o.LDR.J(LDR.java:800)
at com.objectdb.o.LDR.U1(LDR.java:1027)
at com.objectdb.o.CST.ab(CST.java:491)
at com.objectdb.o.CST.U8(CST.java:408)
at com.objectdb.o.LDR.F(LDR.java:536)
at com.objectdb.o.LDR.E(LDR.java:470)
at com.objectdb.jdo.PMImpl.retrieve(PMImpl.java:795)
at com.objectdb.jdo.PMImpl.retrieve(PMImpl.java:811)
at com.objectdb.o.PEI.getChildCount(PEI.java:110)
at com.objectdb.o.ITM.isLeaf(ITM.java:188)
at javax.swing.tree.DefaultTreeModel.isLeaf(DefaultTreeModel.java:203)
at javax.swing.plaf.basic.BasicTreeUI.paint(BasicTreeUI.java:1185)
at com.apple.laf.AquaTreeUI.paint(AquaTreeUI.java:129)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
at javax.swing.JComponent.paintComponent(JComponent.java:777)
at javax.swing.JComponent.paint(JComponent.java:1053)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JViewport.paint(JViewport.java:744)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5217)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1532)
at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1455)
at javax.swing.RepaintManager.paint(RepaintManager.java:1252)
at javax.swing.JComponent._paintImmediately(JComponent.java:5165)
at javax.swing.JComponent.paintImmediately(JComponent.java:4976)
at javax.swing.RepaintManager$3.run(RepaintManager.java:811)
at javax.swing.RepaintManager$3.run(RepaintManager.java:794)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:794)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:769)
at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:718)
at javax.swing.RepaintManager.access$1100(RepaintManager.java:62)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1680)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:714)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0" [ObjectDB 2.5.4_01] Unexpected exception (Error 990)
  Generated by Java HotSpot(TM) 64-Bit Server VM 1.8.0 (on Mac OS X 10.9.2).
Please report this error on http://www.objectdb.com/database/issue/new
com.objectdb.o.InternalException: null
com.objectdb.o.InternalException
at com.objectdb.o.BYR.o(BYR.java:113)
at com.objectdb.o.BYR.v(BYR.java:194)
at com.objectdb.o.NLT.readAndAdjust(NLT.java:109)
at com.objectdb.o.UMR.readAndAdjust(UMR.java:653)
at se.firstinsurance.persistence.organization.Customer.__odbReadContent(Unknown Source)
at com.objectdb.o.MMM.ag(MMM.java:1064)
at com.objectdb.o.UTY.aH(UTY.java:1305)
at com.objectdb.o.UTY.aG(UTY.java:1277)
at com.objectdb.o.ENH.b(ENH.java:102)
at com.objectdb.o.LDR.J(LDR.java:800)
at com.objectdb.o.LDR.U1(LDR.java:1027)
at com.objectdb.o.CST.ab(CST.java:491)
at com.objectdb.o.CST.U8(CST.java:408)
at com.objectdb.o.LDR.F(LDR.java:536)
at com.objectdb.o.LDR.E(LDR.java:470)
at com.objectdb.jdo.PMImpl.retrieve(PMImpl.java:795)
at com.objectdb.jdo.PMImpl.retrieve(PMImpl.java:811)
at com.objectdb.o.PEI.getChildCount(PEI.java:110)
at com.objectdb.o.ITM.isLeaf(ITM.java:188)
at javax.swing.tree.DefaultTreeModel.isLeaf(DefaultTreeModel.java:203)
at javax.swing.plaf.basic.BasicTreeUI.paint(BasicTreeUI.java:1185)
at com.apple.laf.AquaTreeUI.paint(AquaTreeUI.java:129)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
at javax.swing.JComponent.paintComponent(JComponent.java:777)
at javax.swing.JComponent.paint(JComponent.java:1053)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JViewport.paint(JViewport.java:744)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JViewport.paint(JViewport.java:744)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5217)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1532)
at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1455)
at javax.swing.RepaintManager.paint(RepaintManager.java:1252)
at javax.swing.JComponent._paintImmediately(JComponent.java:5165)
at javax.swing.JComponent.paintImmediately(JComponent.java:4976)
at javax.swing.RepaintManager$3.run(RepaintManager.java:811)
at javax.swing.RepaintManager$3.run(RepaintManager.java:794)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:794)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:769)
at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:718)
at javax.swing.RepaintManager.access$1100(RepaintManager.java:62)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1680)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:714)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0" [ObjectDB 2.5.4_01] Unexpected exception (Error 990)
  Generated by Java HotSpot(TM) 64-Bit Server VM 1.8.0 (on Mac OS X 10.9.2).
Please report this error on http://www.objectdb.com/database/issue/new
com.objectdb.o.InternalException: null
com.objectdb.o.InternalException
at com.objectdb.o.BYR.o(BYR.java:113)
at com.objectdb.o.BYR.v(BYR.java:194)
at com.objectdb.o.NLT.readAndAdjust(NLT.java:109)
at com.objectdb.o.UMR.readAndAdjust(UMR.java:653)
at se.firstinsurance.persistence.organization.Customer.__odbReadContent(Unknown Source)
at com.objectdb.o.MMM.ag(MMM.java:1064)
at com.objectdb.o.UTY.aH(UTY.java:1305)
at com.objectdb.o.UTY.aG(UTY.java:1277)
at com.objectdb.o.ENH.b(ENH.java:102)
at com.objectdb.o.LDR.J(LDR.java:800)
at com.objectdb.o.LDR.U1(LDR.java:1027)
at com.objectdb.o.CST.ab(CST.java:491)
at com.objectdb.o.CST.U8(CST.java:408)
at com.objectdb.o.LDR.F(LDR.java:536)
at com.objectdb.o.LDR.E(LDR.java:470)
at com.objectdb.jdo.PMImpl.retrieve(PMImpl.java:795)
at com.objectdb.jdo.PMImpl.retrieve(PMImpl.java:811)
at com.objectdb.o.PEI.getChildCount(PEI.java:110)
at com.objectdb.o.ITM.isLeaf(ITM.java:188)
at javax.swing.tree.DefaultTreeModel.isLeaf(DefaultTreeModel.java:203)
at javax.swing.plaf.basic.BasicTreeUI.paint(BasicTreeUI.java:1185)
at com.apple.laf.AquaTreeUI.paint(AquaTreeUI.java:129)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
at javax.swing.JComponent.paintComponent(JComponent.java:777)
at javax.swing.JComponent.paint(JComponent.java:1053)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JViewport.paint(JViewport.java:744)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JViewport.paint(JViewport.java:744)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5217)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1532)
at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1455)
at javax.swing.RepaintManager.paint(RepaintManager.java:1252)
at javax.swing.JComponent._paintImmediately(JComponent.java:5165)
at javax.swing.JComponent.paintImmediately(JComponent.java:4976)
at javax.swing.RepaintManager$3.run(RepaintManager.java:811)
at javax.swing.RepaintManager$3.run(RepaintManager.java:794)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:794)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:769)
at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:718)
at javax.swing.RepaintManager.access$1100(RepaintManager.java:62)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1680)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:714)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0" [ObjectDB 2.5.4_01] Unexpected exception (Error 990)
  Generated by Java HotSpot(TM) 64-Bit Server VM 1.8.0 (on Mac OS X 10.9.2).
Please report this error on http://www.objectdb.com/database/issue/new
com.objectdb.o.InternalException: null
com.objectdb.o.InternalException
at com.objectdb.o.BYR.o(BYR.java:113)
at com.objectdb.o.BYR.v(BYR.java:194)
at com.objectdb.o.NLT.readAndAdjust(NLT.java:109)
at com.objectdb.o.UMR.readAndAdjust(UMR.java:653)
at se.firstinsurance.persistence.organization.Customer.__odbReadContent(Unknown Source)
at com.objectdb.o.MMM.ag(MMM.java:1064)
at com.objectdb.o.UTY.aH(UTY.java:1305)
at com.objectdb.o.UTY.aG(UTY.java:1277)
at com.objectdb.o.ENH.b(ENH.java:102)
at com.objectdb.o.LDR.J(LDR.java:800)
at com.objectdb.o.LDR.U1(LDR.java:1027)
at com.objectdb.o.CST.ab(CST.java:491)
at com.objectdb.o.CST.U8(CST.java:408)
at com.objectdb.o.LDR.F(LDR.java:536)
at com.objectdb.o.LDR.E(LDR.java:470)
at com.objectdb.jdo.PMImpl.retrieve(PMImpl.java:795)
at com.objectdb.jdo.PMImpl.retrieve(PMImpl.java:811)
at com.objectdb.o.PEI.getChildCount(PEI.java:110)
at com.objectdb.o.ITM.isLeaf(ITM.java:188)
at javax.swing.tree.DefaultTreeModel.isLeaf(DefaultTreeModel.java:203)
at javax.swing.plaf.basic.BasicTreeUI.paint(BasicTreeUI.java:1185)
at com.apple.laf.AquaTreeUI.paint(AquaTreeUI.java:129)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
at javax.swing.JComponent.paintComponent(JComponent.java:777)
at javax.swing.JComponent.paint(JComponent.java:1053)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JViewport.paint(JViewport.java:744)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JViewport.paint(JViewport.java:744)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5217)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1532)
at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1455)
at javax.swing.RepaintManager.paint(RepaintManager.java:1252)
at javax.swing.JComponent._paintImmediately(JComponent.java:5165)
at javax.swing.JComponent.paintImmediately(JComponent.java:4976)
at javax.swing.RepaintManager$3.run(RepaintManager.java:811)
at javax.swing.RepaintManager$3.run(RepaintManager.java:794)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:794)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:769)
at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:718)
at javax.swing.RepaintManager.access$1100(RepaintManager.java:62)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1680)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:714)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0" [ObjectDB 2.5.4_01] Unexpected exception (Error 990)
  Generated by Java HotSpot(TM) 64-Bit Server VM 1.8.0 (on Mac OS X 10.9.2).
Please report this error on http://www.objectdb.com/database/issue/new
com.objectdb.o.InternalException: null
com.objectdb.o.InternalException
at com.objectdb.o.BYR.o(BYR.java:113)
at com.objectdb.o.BYR.v(BYR.java:194)
at com.objectdb.o.NLT.readAndAdjust(NLT.java:109)
at com.objectdb.o.UMR.readAndAdjust(UMR.java:653)
at se.firstinsurance.persistence.organization.Customer.__odbReadContent(Unknown Source)
at com.objectdb.o.MMM.ag(MMM.java:1064)
at com.objectdb.o.UTY.aH(UTY.java:1305)
at com.objectdb.o.UTY.aG(UTY.java:1277)
at com.objectdb.o.ENH.b(ENH.java:102)
at com.objectdb.o.LDR.J(LDR.java:800)
at com.objectdb.o.LDR.U1(LDR.java:1027)
at com.objectdb.o.CST.ab(CST.java:491)
at com.objectdb.o.CST.U8(CST.java:408)
at com.objectdb.o.LDR.F(LDR.java:536)
at com.objectdb.o.LDR.E(LDR.java:470)
at com.objectdb.jdo.PMImpl.retrieve(PMImpl.java:795)
at com.objectdb.jdo.PMImpl.retrieve(PMImpl.java:811)
at com.objectdb.o.PEI.getChildCount(PEI.java:110)
at com.objectdb.o.ITM.isLeaf(ITM.java:188)
at javax.swing.tree.DefaultTreeModel.isLeaf(DefaultTreeModel.java:203)
at javax.swing.plaf.basic.BasicTreeUI.paint(BasicTreeUI.java:1185)
at com.apple.laf.AquaTreeUI.paint(AquaTreeUI.java:129)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
at javax.swing.JComponent.paintComponent(JComponent.java:777)
at javax.swing.JComponent.paint(JComponent.java:1053)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JViewport.paint(JViewport.java:744)
at javax.swing.JComponent.paintChildren(JComponent.java:886)
at javax.swing.JComponent.paint(JComponent.java:1062)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5217)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1532)
at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1455)
at javax.swing.RepaintManager.paint(RepaintManager.java:1252)
at javax.swing.JComponent._paintImmediately(JComponent.java:5165)
at javax.swing.JComponent.paintImmediately(JComponent.java:4976)
at javax.swing.RepaintManager$3.run(RepaintManager.java:811)
at javax.swing.RepaintManager$3.run(RepaintManager.java:794)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:794)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:769)
at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:718)
at javax.swing.RepaintManager.access$1100(RepaintManager.java:62)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1680)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:714)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

 

edit
delete
#2

Please provide more information about this error. What was the error in PrePersist? Do you still get the same exception after restarting the server? What happens when you access the database directly in embedded mode? Could you please check the database file with the Doctor and post the result report?

ObjectDB Support
edit
delete
#3

The cause of the original error was that an java.text.ParseException was thrown in the execution of the @PrePersist method. Although it's bad design/coding, it's something that can happen, in my opinion, shouldn't corrupt the database.

I did 2 restarts of the database and the error persisted, I receive the same error in embedded mode. The result of the Doctor check is:

%> java -cp bin/objectdb.jar com.objectdb.Doctor db/firstinsurance.odb_corrupt db/firstinsurance.odb_corrupt2
ObjectDB Doctor [version 2.5.4_01]
Copyright (c) 2014, ObjectDB Software. All rights reserved.

Scanning the database file...
0MB (total)

Analyzing database structure...
10% 20% 30% 40% 50% 60% 70% 80% 90% 100%

Page Content Errors
-------------------

[1] Page #10 entry 5 has unexpected field count (1 instead of 12)
  se.firstinsurance.persistence.organization.Customer(4):64

Creating a database copy...
  31 entity objects (total) have been migrated.

New database copy is ready at: db/firstinsurance.odb_corrupt2

Unfortunately the database file contains some information that we cannot share.

edit
delete
#4

Obviously the database should not be corrupted because of an exception in a callback method. An exception in a PrePersist method marks the transaction as read only and changes in that transaction are not saved in the database.

If you have the full stack trace of the PrePersist exception please post it.

Unfortunately the cause of this issue is unclear. The only known issues that can corrupt database (except your new report now) is when using different versions of the same class concurrently.

Could you please check if you can reproduce the problem with a clean database by throwing an exception from PrePersist?

Any additional details may help. If possible, please post the ObjectDB server configuration file.

ObjectDB Support
edit
delete
#5

I believe that the "different versions of the same class concurrently" could be what happened. After trying to replay the scenario, this is what we think could have happened:

  1. A exception was thrown in @PrePersist, but did not corrupt the database
  2. The cause of the error was fixed while the application was still running in Tomcat, and we're running JRebel.
  3. The class was reloaded by JRebel and runtime enhanced by the Enhancer (exception was thrown by ObjectDB since the class wasn't enhanced and then the application enhanced the class).
  4. The operation was retried.

I don't have that deep insight in how JRebel work, but it's not unlikely that there could be two versions of the class concurrently.

 

edit
delete
#6

OK. Thanks for the update. Please report if this issue happens again.

Improving ObjectDB so it will be able to handle multiple versions of the same class concurrently is in a very high priority, but it requires some structural changes that will take some time.

Meanwhile, caution is required when updating entity classes, and both the server and the web application should be restarted, especially in production environment.

ObjectDB Support
edit
delete

Reply

To post on this website please sign in.