Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with nested collections #7548

Closed
dominik-kopczynski opened this issue Jul 14, 2017 · 5 comments
Closed

Problem with nested collections #7548

dominik-kopczynski opened this issue Jul 14, 2017 · 5 comments
Assignees
Labels
Milestone

Comments

@dominik-kopczynski
Copy link

OrientDB Version: 2.2.18

Java Version: 1.8

OS: ubuntu 16.04

Hi folks,

Thank you for providing this very lovely database. Currently, I am restructuring our program, that it utilizes orientDB but I stuck in a problem I cannot solve. Within my class (say MyClass1) I have a nested collection, for instance: HashMap<String, ArrayList>
When storing in the database, I get the following error:
Exception in thread "main" java.lang.NullPointerException
at com.orientechnologies.orient.core.record.ORecordInternal.track(ORecordInternal.java:127)
at com.orientechnologies.orient.core.db.record.OTrackedList.addOwnerToEmbeddedDoc(OTrackedList.java:125)
at com.orientechnologies.orient.core.db.record.OTrackedList.add(OTrackedList.java:67)
at com.orientechnologies.orient.core.db.record.ORecordLazyList.add(ORecordLazyList.java:178)
at com.orientechnologies.orient.core.db.record.ORecordLazyList.add(ORecordLazyList.java:48)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.multiValueToStream(OObjectEntitySerializer.java:1378)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.typeToStream(OObjectEntitySerializer.java:796)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.multiValueToStream(OObjectEntitySerializer.java:1391)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.typeToStream(OObjectEntitySerializer.java:799)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.toStream(OObjectEntitySerializer.java:1211)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.serializeObject(OObjectEntitySerializer.java:145)
at com.orientechnologies.orient.object.db.OObjectDatabaseTx.save(OObjectDatabaseTx.java:453)
at com.orientechnologies.orient.object.db.OObjectDatabaseTx.save(OObjectDatabaseTx.java:398)

I checked, both classes MyClass1 and MyClass2 have correct getters and setters for all attributes. When I use one flat collection, everything works fine. Could you give me a suggestion how to solve this error? Do you need more information? Thank you very much.

Cheers,
Dominik

@tglman
Copy link
Member

tglman commented Jul 17, 2017

hi @dominik-kopczynski,

Do you have a example test case for reproduce the issue ? Looking to the trace I think I found the reason of the problem, but I would like to have a test to prove the fix.

Regards.

@dominik-kopczynski
Copy link
Author

dominik-kopczynski commented Jul 17, 2017 via email

@tglman
Copy link
Member

tglman commented Jul 17, 2017

Hi @dominik-kopczynski,

I think github removed the attachment in your email, could you put them on a gist ?

Thank you

@dominik-kopczynski
Copy link
Author

dominik-kopczynski commented Jul 17, 2017 via email

@tglman
Copy link
Member

tglman commented Jul 17, 2017

hi @dominik-kopczynski,

Thanks for the case, I could reproduce the issue and verify the fix, pushed everything right now, I'll close this issue, the fix will be released with 2.2.24 and with 3.0.0.

Regards

@tglman tglman closed this as completed Jul 17, 2017
@santo-it santo-it added this to the 2.2.24 milestone Jul 17, 2017
@santo-it santo-it added the bug label Jul 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants