问题
I am working with neo4j to create graph, taking data from mongodb as document. Standalone code is working fine without storm. But while integrating it with storm, I am getting -
java.io.NotSerializableException: org.neo4j.kernel.EmbeddedGraphDatabase
exception. Dont know the exact reason why i am getting this. If anybody faced such issue please let me know how to resolve it.
回答1:
Because you are trying to pass an object to the serializer that does not implement Serializable interface.
回答2:
You have to share more details. Most probably you're trying to serialize a Neo4j Node
or Relationship
object which holds a reference to a non-serializable GraphDatabaseService
.
回答3:
All classes that are used for attributes/fields in Storm must implement the interface Serializable
. I assume that you are using a object of type EmbeddedGraphDatabase
within Collector.emit(new Values(...))
(either directly or in a nested way).
来源:https://stackoverflow.com/questions/33871998/notserializableexception-org-neo4j-kernel-embeddedgraphdatabase