Products
Berkeley DB
In JE 3.0.11 we introduced a new Plain Old Java Object (POJO)-based persistent object model which we called the Persistence API. Since then, we've decided to rename this API to the Direct Persistence Layer, to avoid confusion with the EJB3 Java Persistence API.
Version 3.0.12 contains bug fixes to the Direct Persistence Layer beta released in version 3.0.11. The changes between 3.0.11 and 3.0.12 are described directly below. A full list of all changes since JE 2.1.34 is also available below.
"UnsupportedOperationException: Class evolution is not supported" was thrown when performing class enhancement. This problem would occur when creating a store
without enhancing classes and then using enhancement later, or when creating a store
with class enhancement and then
not using enhancement later. [#14651]
"ArrayIndexOutOfBoundsException: 2147483646" was thrown when updating a record with a secondary key. The problem occurred when a single instance was used for both the primary key and secondary key fields. [#14665]
"IllegalArgumentException: Class is not persistent" was thrown for a class that was correctly made persistent using a proxy class. The problem occurred when one proxy class referenced another. [#14665]
All changes from JE 3.0.11, 3.0.12 are listed here.
For additional details, please see the documentation and Release Notes included in your download package or on our website.
com.sleepycat.je.DatabaseException: JE 3.0.11: searchResult=class com.sleepycat.
je.tree.IN nodeId=479 nEntries=0
at com.sleepycat.je.tree.Tree.getParentBINForChildLN(Tree.java:1031)
...
Caused by: java.lang.ClassCastException: com.sleepycat.je.tree.IN
at com.sleepycat.je.tree.Tree.getParentBINForChildLN(Tree.java:1021)
com.sleepycat.je.util.DbBackup is a new helper class which simplifies backups by managing JE background activity in an open environment. See the Getting Started Guide, Chapter 7 (Backing up and Restoring Berkeley DB Java Edition Applications) and the Javadoc for DbBackup for more information. [#14022]
com.sleepycat.collections package is now fully compatible with the Java Collections framework. In previous releases,
Collections.size() was not supported, and collection iterators had to be explicitly closed. These incompatibilities have been addressed to provide full interoperability with other Java libraries that use the Java Collections Framework interfaces. [#14154] [#12986]
com.sleepycat.bind.tuple package now has bindings that correctly sort negative floating point numbers. See the following new APIs:
SortedFloatBinding, SortedDoubleBinding, TupleInput.readSortedFloat, TupleInput.readSortedDouble, TupleOutput.writeSortedFloat, TupleOutput.writeSortedDouble.[#14127]
java.lang.NullPointerException
at com.sleepycat.je.cleaner.UtilizationProfile.getCheapestFileToClean(UtilizationProfile.java:201)
at com.sleepycat.je.cleaner.FileSelector.selectFileForCleaning(FileSelector.java:205)
at com.sleepycat.je.cleaner.FileProcessor.doClean(FileProcessor.java:201)
at com.sleepycat.je.cleaner.FileProcessor.onWakeup(FileProcessor.java:143)
[#14431]
The workaround for the user was to use -Dje.disable.java.adler32=true at runtime. This forces JE to its own, slower Adler32 implementation. It's an existing flag that was used to work around a Java 1.4 problem with the Adler32 implementation.
While this is not an implementation change, the situation and workaround may be of interest to our users. See the sleepycat blog entry on this topic for more details. [#14149]
"UnsupportedOperationException: Class evolution is not supported" was thrown when performing class enhancement. This problem would occur when creating a store
without enhancing classes and then using enhancement later, or when creating a store
with class enhancement and then
not using enhancement later. [#14651]
"ArrayIndexOutOfBoundsException: 2147483646" was thrown when updating a record with a secondary key. The problem occurred when a single instance was used for both the primary key and secondary key fields. [#14665]
"IllegalArgumentException: Class is not persistent" was thrown for a class that was correctly made persistent using a proxy class. The problem occurred when one proxy class referenced another. [#14665]
If you are upgrading from a release of JE that is 2.0.90 or earlier, then you should ensure that you call Environment.close() prior to upgrading. If you do not close the environment cleanly, and you have very recently created a new database, you may see the following exception:
com.sleepycat.je.DatabaseException: JE 3.0.11: searchResult=class
com.sleepycat. je.tree.IN nodeId=479 nEntries=0
at com.sleepycat.je.tree.Tree.getParentBINForChildLN(Tree.java:1031)
...
Caused by: java.lang.ClassCastException: com.sleepycat.je.tree.IN
at
com.sleepycat.je.tree.Tree.getParentBINForChildLN(Tree.java:1021)
The data in the environment was not corrupted, and the environment can be successfully opened with the following steps which remove any new files create by JE 3.0.11, and then call Environment.close() prior to upgrading.
To remove any data created by JE 3.0.11:
-rwx------ 1 cwl other 19629 May 5 11:26 00000000.jdb -rw-r--r-- 1 cwl other 3014 May 8 11:36 00000001.jdb <-- new file
java com.sleepycat.je.util.DbPrintLog -h <envhome> -s <lastfilenumber>where <lastfilenumber> is a hex number of the last file (e.g. '-s 0x1' in the case above). You should see output like this:
<DbPrintLog>
<entry lsn="0x1/0x0" type="FileHeader/0" prev="0x0" size="24" cksum="800588407"><FileHeader num="0x1" lastEntryInPrevFileOffset="0x4c87"
logVersion="0x4" time=" 2006-05-08 12:50:20.63"/></entry>
...
The first file header record shows a logVersion of 0x4. These files were written during the attempted upgrade and can be deleted.
To close the environment cleanly after any JE 3.0.11 data has been removed:
java -cp "je-1.7.1.jar:je-3.0.11.jar" com.sleepycat.je.util.DbRunAction -h <envdir>Since DbRunAction is not present in releases prior to 2.1.30, you should include the latest release in the classpath, but after the old release. That will run a checkpoint on the old environment using the old version of JE. Several lines of output will be produced. Verify that the last log file was written to by taking a directory listing.
java -cp "je-3.0.11.jar" com.sleepycat.je.util.DbRunAction -h <envdir>