Comments (3)
Here is the trace
java.lang.Error: Could not instanciate class
at net.kotek.jdbm.SerialClassInfo.readObject(SerialClassInfo.java:312)
at net.kotek.jdbm.Serialization.deserialize(Serialization.java:881)
at net.kotek.jdbm.Serialization.deserialize(Serialization.java:597)
at net.kotek.jdbm.BTreeLazyRecord.fastDeser(BTreeLazyRecord.java:69)
at net.kotek.jdbm.HTreeBucket.readExternal(HTreeBucket.java:340)
at net.kotek.jdbm.HTree$1.deserialize(HTree.java:41)
at net.kotek.jdbm.DBStore.fetch2(DBStore.java:378)
at net.kotek.jdbm.DBStore.fetch(DBStore.java:348)
at net.kotek.jdbm.DBCache.fetch(DBCache.java:278)
at net.kotek.jdbm.HTreeDirectory.get(HTreeDirectory.java:148)
at net.kotek.jdbm.HTree.get(HTree.java:183)
at net.kotek.jdbm.HTree.put(HTree.java:161)
at JDBMSerializationTest.test2(JDBMSerializationTest.java:72)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.IndexOutOfBoundsException
at net.kotek.jdbm.Serialization$FastArrayList.get(Serialization.java:1234)
at net.kotek.jdbm.Serialization.deserialize(Serialization.java:884)
at net.kotek.jdbm.SerialClassInfo.readObject(SerialClassInfo.java:307)
... 36 more
from jdbm3.
I have fixed the problem, see below.
In file Serialization.java, on line 606 :
/** first try to deserialize object without allocating object stack*/
switch (head) {
case NULL:
return null;
the NULL case should be replaced by a break :
/** first try to deserialize object without allocating object stack*/
switch (head) {
case NULL:
break;
Then on line 868 :
if (ret != null) {
if (objectStack != null)
objectStack.add(ret);
return ret;
}
should be replaced by:
if (ret != null || head == NULL) {
if (objectStack != null)
objectStack.add(ret);
return ret;
}
from jdbm3.
I used your fix, thanks
from jdbm3.
Related Issues (20)
- Not Serializable Exception HOT 1
- Corruption of index files (double get and IndexOutOfBounds errors) HOT 8
- Found setting where I lose part of a List value 'silently' HOT 1
- DB.defrag(false) ALWAYS increases the size of i.0 file HOT 1
- java.lang.OutOfMemoryError: Map failed HOT 3
- I'm confused about the record, slot, page, physical and logical list. Is there any document?
- Not working with JDK11
- BTree.java is a b plus tree or b tree?
- is someway to repair corrupt data file ? HOT 1
- JDBM and Scala HOT 5
- TreeMap#size() returns wrong values after rollback
- DBMaker#openFile should take a "File" as argument HOT 1
- Support serializing/deserializing Hadoop keys and values HOT 1
- java.lang.OutOfMemoryError: Map failed HOT 2
- NPE on Array deserialization
- floorEntry on BTreeMap behaves incorrectly on border cases
- Null retrieval of inserted keys HOT 1
- Unable to add an element to the beginning of a list HOT 1
- Does not work with JodaTime
- deserialization of HashSet fails HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jdbm3.