Property Key with given name does not exist

587 views
Skip to first unread message

Alina Arm

unread,
Mar 19, 2015, 8:26:16 AM3/19/15
to gremli...@googlegroups.com
Hi 

I have written an application that makes Vertexes and edges in Titan database using Frames. 

public interface TopoNode {

@Property("node_label")
public void setNodeLabel(String node_label);
@Property("node_label")
public String getNodeLabel();
@Property("customer_id")
public void setCustomerId(String customer_id);
@Property("customer_id")
public String getCustomerId();
@Property("x_coord")
public void setXCoord(String x_coord);
@Property("x_coord")
public String getXCoord();
@Property("y_coord")
public void setYCoord(String y_coord);
@Property("y_coord")
public String getYCoord();
@Adjacency(label="located", direction=Direction.OUT)
public Iterable<Location> getLocation();
@Adjacency(label="located", direction=Direction.OUT)
public void addLocation(Location location);
}

Everything worked fine until I reinstalled Titan on the machine. Now after running the code

     TopoNode toponode = (TopoNode) framedGraph.addVertex(index++, TopoNode.class);
toponode.setNodeLabel("TopoNode");
toponode.setCustomerId(attributes.getValue(1));
toponode.setXCoord(attributes.getValue(2));
toponode.setYCoord(attributes.getValue(3)); 

I get an exception

java.lang.IllegalArgumentException: Property Key with given name does not exist: node_label
at com.thinkaurelius.titan.graphdb.types.typemaker.DisableDefaultSchemaMaker.makePropertyKey(DisableDefaultSchemaMaker.java:27)
at com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx.getOrCreatePropertyKey(StandardTitanTx.java:902)
at com.thinkaurelius.titan.graphdb.vertices.AbstractVertex.setProperty(AbstractVertex.java:239)
at com.tinkerpop.frames.annotations.PropertyAnnotationHandler.processElement(PropertyAnnotationHandler.java:34)
at com.tinkerpop.frames.annotations.PropertyAnnotationHandler.processElement(PropertyAnnotationHandler.java:11)
at com.tinkerpop.frames.FramedElement.invoke(FramedElement.java:89)
at com.sun.proxy.$Proxy49.setNodeLabel(Unknown Source)
at com.services.load$1.startElement(load.java:138)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1363)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:648)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:332)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:274)
at com.services.load.parseXML(load.java:241)
at com.services.load.loadNodes(load.java:57)
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:606)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:151)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:171)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:195)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:402)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:349)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:106)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:259)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:318)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:236)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1010)
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:373)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:382)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:345)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:220)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:745)
I am using Titan 0.5.3 with Hadoop 1 (the same version before an d after reinstallation)


Bryn Cooke

unread,
Mar 24, 2015, 5:56:50 AM3/24/15
to gremli...@googlegroups.com
Hi,
Do you have autotype set to 'none' in your configuration?

If this is the case then you will get an exception if you haven't explicitly created then you will have to explicitly create them via makeLabel.


Bryn

Alina Arm

unread,
Mar 24, 2015, 10:17:45 AM3/24/15
to gremli...@googlegroups.com

Hi Bryn

Thank you for the reply. This actually started to happen after I put storage.batch-loading=true in the configuration 

I was trying to make property keys before loading vertices, but I get an exception

rexster[groovy]> g.makeKey("node_label").dataType(String.class).make()
==>An error occurred while processing the script for language [groovy]. All transactions across all graphs in the session have been concluded with failure: java.util.concurrent.ExecutionException: javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: groovy.lang.MissingMethodException.makeKey() is applicable for argument types: () values: []
Possible solutions: any(), every()

Do you know what it means?

вторник, 24 марта 2015 г., 10:56:50 UTC+1 пользователь Bryn Cooke написал:

Bryn Cooke

unread,
Mar 24, 2015, 11:29:50 AM3/24/15
to gremli...@googlegroups.com
Hi Alina,
Can I ask what version of Titan you are using?

Assuming it is the latest of the 0.5.x then please take a look at http://s3.thinkaurelius.com/docs/titan/0.5.4/schema.html

The way to create types has changed over the versions. The error message you are getting indicates that the method you are trying to call does not exist.

Bryn
Reply all
Reply to author
Forward
0 new messages