Created
September 20, 2011 03:39
-
-
Save espeed/1228266 to your computer and use it in GitHub Desktop.
Blueprints/Jython setProperty error when value is of type java.util.ArrayList
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> from com.tinkerpop.blueprints.pgm.impls.neo4j import Neo4jGraph | |
>>> from com.tinkerpop.rexster import AbstractSubResource | |
>>> from com.tinkerpop.rexster import RexsterApplicationProvider | |
>>> class BatchResource(AbstractSubResource): | |
... pass | |
... | |
>>> class BatchRap(RexsterApplicationProvider): | |
... pass | |
... | |
>>> batch_resource = BatchResource(BatchRap()) | |
>>> g = Neo4jGraph('/tmp/g') | |
>>> v = g.addVertex(None) | |
>>> value = batch_resource.getTypedPropertyValue("(list,((string,able to swim),(string,she was able to program her computer),(string,we were at last able to buy a car),(string,able to get a grant for the project)))") | |
>>> value | |
[able to swim, she was able to program her computer, we were at last able to buy a car, able to get a grant for the project] | |
>>> type(value) | |
<type 'java.util.ArrayList'> | |
>>> v.setProperty("examples",value) | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
at org.neo4j.kernel.impl.nioneo.store.PropertyStore.encodeValue(PropertyStore.java:551) | |
at org.neo4j.kernel.impl.nioneo.xa.WriteTransaction.nodeChangeProperty(WriteTransaction.java:1240) | |
at org.neo4j.kernel.impl.persistence.PersistenceManager.nodeChangeProperty(PersistenceManager.java:145) | |
at org.neo4j.kernel.impl.core.NodeManager.nodeChangeProperty(NodeManager.java:854) | |
at org.neo4j.kernel.impl.core.NodeImpl.changeProperty(NodeImpl.java:95) | |
at org.neo4j.kernel.impl.core.Primitive.setProperty(Primitive.java:407) | |
at org.neo4j.kernel.impl.core.NodeProxy.setProperty(NodeProxy.java:120) | |
at com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jElement.setProperty(Neo4jElement.java:47) | |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) | |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | |
at java.lang.reflect.Method.invoke(Method.java:616) | |
java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Unknown property type on: [able to swim, she was able to program her computer, we were at last able to buy a car, able to get a grant for the project] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment