Fast Object Database for Java - with JPA/JDO support

Getting java.lang.ArithmeticException: / by zero



I am using ObjectDb 1.x and getting the following exception while calling the following code

PersistenceManager pm = getPersistenceManager();

if (!pm.isClosed()){

Most of the times, the above code works fine, but sometimes it is observed that calling pm.close() is throwing the following exception

ava.lang.ArithmeticException: / by zero
at com.objectdb.jdo.PMImpl.close(

Can you please let me know what could be the reason of the above exception.


Thanks & regards,
Binit Bhaskar





ObjectDB 1.x is not supported anymore and it is highly recommended to upgrade to ObjectDB 2.

But I can check the stack trace if you provide the exact build number that you use (or upload the ObjectDB jar file).

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Please find the attached object db jar.


I couldn't find the build number. It may be a very old jar.

Please try the attached jar, which is the last build of ObjectDB 1.x embedded.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)


Thanks for the jar. May be we use the latest jar in the next release.

The build number of the odbee jar which is being used is 2302

Binit Bhaskar


This division by zero occurs in some hash table that happens to have a 0 size (but I don't know why). You are using version 1.0.3 which is almost 7 years old. Many bugs have been fixed since then also in versions 1.0.4 and 1.0.5. But upgrading to ObjectDB 2.x would be better, if possible.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply