Does anybody happen to know what the problem is? Could the interfaces InstantiationHelper and ParameterHelper help us here? We are new to neodatis and the documentation didn't help us….
Thanks in advance!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2011-05-06
Does nobody know the reasen or even better a solution to this problem?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2011-05-06
*reason
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The error indicates that odb don't know Certificate class.
You are saving entire thread and odb tries to store its internal state.
Its not a good direction. Why you need to store so heavyweight object? (i don't see much sence in this operation)
Use simple pojos (as with any orm solution).
If you really need to store thread, i think it is better to simply use serialization.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
we solved this problem now by implementing Runnable instead of inheriting Thread.
But now we are getting an another problem, which I suppose is a bug in Neodatis.
I've got a custom class (OuterClass) containing a Hashtable of String as key and another custom class (InnerClass) as value. This class is containing a Hashtable, too. This has a custom class (KeyClass) as key and a string as value.
I have a little example of code which shows exactly the same structur as in my project.
When i now build a instance of the OuterClass with some values and i take the same instance of KeyClass for two different entries in the Hashtable in two different InnerClass objects i get an NullPointerException when i try to store the OuterClass object. If i take two different instances of the KeyClass this Exception isnt thrown.
Example Main Class which has the described behavior:
Exception in thread "main" java.lang.NullPointerException
at org.neodatis.odb.impl.core.layers.layer3.engine.AbstractObjectWriter.writeMap(AbstractObjectWriter.java:2705)
at org.neodatis.odb.impl.core.layers.layer3.engine.AbstractObjectWriter.writeNativeObjectInfo(AbstractObjectWriter.java:916)
at org.neodatis.odb.impl.core.layers.layer3.engine.AbstractObjectWriter.insertNativeObject(AbstractObjectWriter.java:1842)
at org.neodatis.odb.impl.core.layers.layer3.engine.AbstractObjectWriter.internalStoreObject(AbstractObjectWriter.java:1926)
at org.neodatis.odb.impl.core.layers.layer3.engine.AbstractObjectWriter.writeNonNativeObjectInfo(AbstractObjectWriter.java:1193)
at org.neodatis.odb.impl.core.layers.layer3.engine.AbstractObjectWriter.insertNonNativeObject(AbstractObjectWriter.java:1815)
at org.neodatis.odb.impl.core.layers.layer3.engine.AbstractObjectWriter.storeObject(AbstractObjectWriter.java:1906)
at org.neodatis.odb.impl.core.layers.layer3.engine.AbstractObjectWriter.internalStoreObjectWrapper(AbstractObjectWriter.java:2738)
at org.neodatis.odb.impl.core.layers.layer3.engine.AbstractObjectWriter.writeMap(AbstractObjectWriter.java:2708)
at org.neodatis.odb.impl.core.layers.layer3.engine.AbstractObjectWriter.writeNativeObjectInfo(AbstractObjectWriter.java:916)
at org.neodatis.odb.impl.core.layers.layer3.engine.AbstractObjectWriter.insertNativeObject(AbstractObjectWriter.java:1842)
at org.neodatis.odb.impl.core.layers.layer3.engine.AbstractObjectWriter.internalStoreObject(AbstractObjectWriter.java:1926)
at org.neodatis.odb.impl.core.layers.layer3.engine.AbstractObjectWriter.writeNonNativeObjectInfo(AbstractObjectWriter.java:1193)
at org.neodatis.odb.impl.core.layers.layer3.engine.AbstractObjectWriter.insertNonNativeObject(AbstractObjectWriter.java:1815)
at org.neodatis.odb.core.layers.layer3.engine.AbstractStorageEngine.internalStore(AbstractStorageEngine.java:564)
at org.neodatis.odb.core.layers.layer3.engine.AbstractStorageEngine.store(AbstractStorageEngine.java:438)
at org.neodatis.odb.core.layers.layer3.engine.AbstractStorageEngine.store(AbstractStorageEngine.java:420)
at org.neodatis.odb.impl.main.ODBAdapter.store(ODBAdapter.java:113)
at MainClass.main(MainClass.java:30)
I've debugged the NeoDatis-code at the point the exception is thrown and i recognized that the problem is at AbstractObjectWriter.java:2702 : AbstractObjectInfo value = map.get(key);
At the point where the Hashtable of the second InnerClass shoul be stored the map return null for the given key although the map contains the key and the value.
Greetings
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
we get an exception when trying to do the following :
This is just example code, we realized the behavior in another class inheriting from thread.
this is the stack trace
Does anybody happen to know what the problem is? Could the interfaces InstantiationHelper and ParameterHelper help us here? We are new to neodatis and the documentation didn't help us….
Thanks in advance!
Does nobody know the reasen or even better a solution to this problem?
*reason
hi,
The error indicates that odb don't know Certificate class.
You are saving entire thread and odb tries to store its internal state.
Its not a good direction. Why you need to store so heavyweight object? (i don't see much sence in this operation)
Use simple pojos (as with any orm solution).
If you really need to store thread, i think it is better to simply use serialization.
Hi,
we solved this problem now by implementing Runnable instead of inheriting Thread.
But now we are getting an another problem, which I suppose is a bug in Neodatis.
I've got a custom class (OuterClass) containing a Hashtable of String as key and another custom class (InnerClass) as value. This class is containing a Hashtable, too. This has a custom class (KeyClass) as key and a string as value.
I have a little example of code which shows exactly the same structur as in my project.
When i now build a instance of the OuterClass with some values and i take the same instance of KeyClass for two different entries in the Hashtable in two different InnerClass objects i get an NullPointerException when i try to store the OuterClass object. If i take two different instances of the KeyClass this Exception isnt thrown.
Example Main Class which has the described behavior:
This is the Exception which is thrown:
I've debugged the NeoDatis-code at the point the exception is thrown and i recognized that the problem is at AbstractObjectWriter.java:2702 : AbstractObjectInfo value = map.get(key);
At the point where the Hashtable of the second InnerClass shoul be stored the map return null for the given key although the map contains the key and the value.
Greetings