252 words

Issue #157 - [ObjectDB 2.4.1] Unexpected exception (Error 990) on getObjectById

BugVersion: 2.4.1Priority: NormalStatus: ClosedReplies: 3
#1
2012-06-27 13:05

In this code:

String id = "my key";
ABC itemDb = pm.getObjectById(ABC.class, id);

I get this:

[ObjectDB 2.4.1] Unexpected exception (Error 990)
  Generated by Java HotSpot(TM) Client VM 1.6.0_29 (on Windows 7 6.1).
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.InternalException.f(InternalException.java:236)
at com.objectdb.o.STA.K(STA.java:348)
at com.objectdb.o.ENT.y(ENT.java:493)
at com.objectdb.o.ENT.H(ENT.java:641)
at com.objectdb.o.LDR.w(LDR.java:411)
at com.objectdb.o.LDR.v(LDR.java:293)
at com.objectdb.o.LDR.s(LDR.java:211)
at com.objectdb.o.OBC.aN(OBC.java:1075)
at com.objectdb.o.OBC.aL(OBC.java:988)
at com.objectdb.o.OBC.aF(OBC.java:716)
at com.objectdb.jdo.PMImpl.getObjectById(PMImpl.java:410)

...

Ideas welcome.

experimenter
experimenter's picture
Joined on 2012-06-26
User Post #3
#2
2012-06-27 20:21

The stack trace indicates an internal ObjectDB bug (unexpected state).

If you can post a test case that causes this exception it would be very helpful. 

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #1,130
#3
2012-06-28 15:53

Unfortunately I was trying to retrofit ObjectDB into an existing rather complex app, rather than start from scratch, so it isn't feasible to extract a test case in the time I have available.

For information, the problem exhibited itself in a scenario when all the database records had been deleted in a successful transaction immediately prior to executing the get which errored.

experimenter
experimenter's picture
Joined on 2012-06-26
User Post #5
#4
2012-06-30 19:04

It is unclear what you are trying to retrieve just after deleting all the objects from the database.

The following test program tries to reproduce it but with no success:

import javax.jdo.*;
import javax.jdo.annotations.*;
 
public class I157 {
 
    public static void main(String[] args) {
 
        PersistenceManagerFactory pmf =
            JDOHelper.getPersistenceManagerFactory("objectdb:d:\\temp\\test.tmp;drop");
        PersistenceManager pm = pmf.getPersistenceManager();
 
        try {
            Object oid = null;
            pm.currentTransaction().begin();
            for (int i = 0; i < 3; i++) {
                A a = new A();
                pm.makePersistent(a);
                oid = pm.getObjectId(a);
            }
            pm.currentTransaction().commit();
 
            pm.currentTransaction().begin();
            pm.newQuery("SELECT a FROM A a").deletePersistentAll();
            pm.currentTransaction().commit();
 
            pm.getObjectById(oid);
        }
 
        finally {
            pm.close();
            pmf.close();
        }
    }
 
    @PersistenceCapable
    public static class A {
    }
}

A way to reproduce the exception is required in order to proceed with working on this issue.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #1,136

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Attachments:
Maximum file size: 32 MB
Cancel