java - ClassCastException when trying to get ORecordBytes with OrientDB via Graph API -
I use Oriantdibi to store images / byte data and try to follow this tutorial: (I chose it "to shop with" Orkardbits I <<>
Vertex Vertex = db.addVertex ("category: item"). ; ... orcrbits Imejrekord = new Orkerrdbaits (stream. to Batare ()); Imejrekord Sav (); Vertex Ksetproprti ( "Image" Image Record); ... dB code Erase ();
However, when I try to recover data in this way:
ORecordBytes imageRecord = vertex.getProperty ( "image" );
.. I get it for the above line:
Exception in thread "main" java.lang.ClassCastException: com. orientechnologies.orient.core.record.impl.orecordBytes can not be inserted into the com com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.getElement (Oriantbesegrafkjav) on .orientechnologies.orient.core.record.impl.odocument a : 1145) com.dk.ink.epp.blueprints.impls.orient.OrientElement.getProperty (Orient on service.database.DAO.OrientDBGraphAPIItemDAO.vertexToItem On serviceDatabase.DAO.OrientDBGraphAPIItemDAO on Element.java:186) (OrientDBGraphAPIItemDAO.java:154) .create (OrientDBGraphAPIItemDAO.java:68) test. Test applications. Meine (Test Application. Java: 69)
I do not really know which point I'm putting in the oddcast but I do not know the interior db's internal address The tutorial document is written for the API, I am thinking this could be the reason? Or am I missing something else now?
You can follow Luigi's suggestions, but it has already been decided Release 1.7. In 8:
Comments
Post a Comment