You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting following error when trying to persist java object in Orient DB version "3.0.15"
Mar 29, 2019 12:34:05 PM com.orientechnologies.common.log.OLogManager log
INFO: Windows OS is detected, 262144 limit of open files will be set for the disk cache.
Exception in thread "main" com.orientechnologies.orient.core.exception.OSerializationException: Error serializing object of class class com.bt.OrientdBNSD.ParseParse1111.beans.NodeParams
DB name="NSDObjStore"
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.serializeObject(OObjectEntitySerializer.java:150)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.typeToStream(OObjectEntitySerializer.java:819)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.multiValueToStream(OObjectEntitySerializer.java:1402)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.typeToStream(OObjectEntitySerializer.java:810)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.toStream(OObjectEntitySerializer.java:1221)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.serializeObject(OObjectEntitySerializer.java:148)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.typeToStream(OObjectEntitySerializer.java:819)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.toStream(OObjectEntitySerializer.java:1221)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.serializeObject(OObjectEntitySerializer.java:148)
at com.orientechnologies.orient.object.db.OObjectDatabaseTx.save(OObjectDatabaseTx.java:499)
at com.orientechnologies.orient.object.db.OObjectDatabaseTx.save(OObjectDatabaseTx.java:444)
at com.bt.OrientdBNSD.ParseParse1111.beans.Main.createDOC(Main.java:39)
at com.bt.OrientdBNSD.ParseParse1111.beans.Main.parseYaml(Main.java:33)
at com.bt.OrientdBNSD.ParseParse1111.beans.Main.main(Main.java:21)
Caused by: java.lang.IllegalArgumentException: Type EMBEDDED must be a multi value type (collection or map)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.multiValueToStream(OObjectEntitySerializer.java:1381)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.typeToStream(OObjectEntitySerializer.java:810)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.multiValueToStream(OObjectEntitySerializer.java:1402)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.typeToStream(OObjectEntitySerializer.java:810)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.multiValueToStream(OObjectEntitySerializer.java:1402)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.typeToStream(OObjectEntitySerializer.java:810)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.multiValueToStream(OObjectEntitySerializer.java:1402)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.typeToStream(OObjectEntitySerializer.java:810)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.multiValueToStream(OObjectEntitySerializer.java:1402)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.typeToStream(OObjectEntitySerializer.java:810)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.toStream(OObjectEntitySerializer.java:1221)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.serializeObject(OObjectEntitySerializer.java:148)
... 13 more
The text was updated successfully, but these errors were encountered:
public static void main(String args[]) throws FileNotFoundException, YamlException{
Main main = new Main();
main.parseYaml();
}
/**
* @param fileName
* @throws FileNotFoundException
* @throws YamlException
* This method will be parsing yaml file and create NetworkServiceDescriptor Object to store in OrientDB
*/
public void parseYaml() throws FileNotFoundException, YamlException{
Yaml yaml = new Yaml(new Constructor(NetworkServiceDescriptor.class));
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("Test.yaml");
NetworkServiceDescriptor nsd = (NetworkServiceDescriptor) yaml.load(inputStream);
System.out.println(nsd);
//DB call
createDOC(nsd);
}
/**
* @param nsd
* get DB connection and store value in OrientDB
*/
private void createDOC(NetworkServiceDescriptor nsd) {
OObjectDatabaseTx db = getDBConnection();
db.getEntityManager().registerEntityClasses("com.bt.OrientdBNSD.ParseParse1111.beans");
db.save(nsd);
db.commit();
}
/**
* @return
* DB Connection created using OObjectDatabaseT
*/
public static OObjectDatabaseTx getDBConnection() {
OObjectDatabaseTx db = new OObjectDatabaseTx("remote:localhost/NSDObjStore").open("root", "root");
return db;
}
}
package com.bt.OrientdBNSD.ParseParse1111.beans;
public class NetworkServiceDescriptor {
public TopologyTemplate topology_template;
public TopologyTemplate getTopology_template() {
return topology_template;
}
public void setTopology_template(TopologyTemplate topology_template) {
this.topology_template = topology_template;
}
I am getting following error when trying to persist java object in Orient DB version "3.0.15"
Mar 29, 2019 12:34:05 PM com.orientechnologies.common.log.OLogManager log
INFO: Windows OS is detected, 262144 limit of open files will be set for the disk cache.
Exception in thread "main" com.orientechnologies.orient.core.exception.OSerializationException: Error serializing object of class class com.bt.OrientdBNSD.ParseParse1111.beans.NodeParams
DB name="NSDObjStore"
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.serializeObject(OObjectEntitySerializer.java:150)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.typeToStream(OObjectEntitySerializer.java:819)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.multiValueToStream(OObjectEntitySerializer.java:1402)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.typeToStream(OObjectEntitySerializer.java:810)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.toStream(OObjectEntitySerializer.java:1221)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.serializeObject(OObjectEntitySerializer.java:148)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.typeToStream(OObjectEntitySerializer.java:819)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.toStream(OObjectEntitySerializer.java:1221)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.serializeObject(OObjectEntitySerializer.java:148)
at com.orientechnologies.orient.object.db.OObjectDatabaseTx.save(OObjectDatabaseTx.java:499)
at com.orientechnologies.orient.object.db.OObjectDatabaseTx.save(OObjectDatabaseTx.java:444)
at com.bt.OrientdBNSD.ParseParse1111.beans.Main.createDOC(Main.java:39)
at com.bt.OrientdBNSD.ParseParse1111.beans.Main.parseYaml(Main.java:33)
at com.bt.OrientdBNSD.ParseParse1111.beans.Main.main(Main.java:21)
Caused by: java.lang.IllegalArgumentException: Type EMBEDDED must be a multi value type (collection or map)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.multiValueToStream(OObjectEntitySerializer.java:1381)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.typeToStream(OObjectEntitySerializer.java:810)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.multiValueToStream(OObjectEntitySerializer.java:1402)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.typeToStream(OObjectEntitySerializer.java:810)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.multiValueToStream(OObjectEntitySerializer.java:1402)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.typeToStream(OObjectEntitySerializer.java:810)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.multiValueToStream(OObjectEntitySerializer.java:1402)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.typeToStream(OObjectEntitySerializer.java:810)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.multiValueToStream(OObjectEntitySerializer.java:1402)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.typeToStream(OObjectEntitySerializer.java:810)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.toStream(OObjectEntitySerializer.java:1221)
at com.orientechnologies.orient.object.enhancement.OObjectEntitySerializer.serializeObject(OObjectEntitySerializer.java:148)
... 13 more
The text was updated successfully, but these errors were encountered: