Skip to content
This repository has been archived by the owner on Jul 20, 2022. It is now read-only.

Get error "No such property: TitanFactory for class: groovysh_evaluate" #34

Closed
itman85 opened this issue Dec 18, 2015 · 11 comments
Closed

Comments

@itman85
Copy link

itman85 commented Dec 18, 2015

i follow the instruction and got error as below

gremlin> conf = new BaseConfiguration()
==>org.apache.commons.configuration.BaseConfiguration@70fab835
gremlin> conf.setProperty("storage.backend", "com.amazon.titan.diskstorage.dynamodb.DynamoDBStoreManager")
==>null
gremlin> conf.setProperty("storage.dynamodb.client.endpoint", "http://localhost:4567")
==>null
gremlin> conf.setProperty("index.search.backend", "elasticsearch")
==>null
gremlin> conf.setProperty("index.search.directory", "/tmp/searchindex")
==>null
gremlin> conf.setProperty("index.search.elasticsearch.client-only", "false")
==>null
gremlin> conf.setProperty("index.search.elasticsearch.local-mode", "true")
==>null
gremlin> conf.setProperty("index.search.elasticsearch.inteface", "NODE")
==>null
gremlin> g = TitanFactory.open(conf)
No such property: TitanFactory for class: groovysh_evaluate

How can i solve this problem? Thank you.

@joshblack
Copy link

Ran into a similar problem today after following the article on Graph Databases using Dynamo DB. Did you ever find a solution?

@NickCorbett
Copy link
Contributor

Hi @joshblack

Thanks for your comment - what OS are you running this on?

Thanks

Nick

@joshblack
Copy link

Hi @NickCorbett! I'm running this on OSX.

@itman85
Copy link
Author

itman85 commented Jan 21, 2016

hi @joshblack It worked for me. You should clone project from here https://github.com/awslabs/dynamodb-titan-storage-backend/tree/1.0.0. I downloaded gremlin server by using shell file in "src/test/resources/install-gremlin-server.sh" Then i started gremlin console in "bin/gremlin.sh" from gremlin server folder just downloaded . It will load all extension libs and this problem is solved.

@NickCorbett
Copy link
Contributor

Hi @joshblack - can you confirm that @itman85's process worked for you?

@itman85 - thanks for taking the time to respond to this.

Nick

@itman85 itman85 closed this as completed Jan 26, 2016
@pbhatIIT
Copy link

pbhatIIT commented Mar 3, 2016

I am getting same error in eclipse on Windows 10 laptop.
Any alternative steps?

@pbhatIIT
Copy link

On Macbook I am getting following err. Let me know how to proceed. Thx

gremlin> g = TitanFactory.open(conf)
No such property: TitanFactory for class: groovysh_evaluate

To address above issue, if I run src/test/resources/install-gremlin-server.sh
I get following err:

[INFO] Installing /Users/gto624/dev/grdb/dynamodb-titan-storage-backend/pom.xml to /Users/gto624/.m2/repository/com/amazonaws/dynamodb-titan100-storage-backend/1.0.0/dynamodb-titan100-storage-backend-1.0.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:22 min
[INFO] Finished at: 2016-03-24T15:22:40-04:00
[INFO] Final Memory: 42M/500M
[INFO] ------------------------------------------------------------------------
~/dev/grdb/dynamodb-titan-storage-backend/server ~/dev/grdb/dynamodb-titan-storage-backend

unzip: cannot find or open titan-1.0.0-hadoop1.zip, titan-1.0.0-hadoop1.zip.zip or titan-1.0.0-hadoop1.zip.ZIP.
mv: rename titan-1.0.0-hadoop1 to dynamodb-titan100-storage-backend-1.0.0-hadoop1/titan-1.0.0-hadoop1: No such file or directory
rm: titan-1.0.0-hadoop1.zip: No such file or directory
mkdir: /Users/gto624/dev/grdb/dynamodb-titan-storage-backend/server/dynamodb-titan100-storage-backend-1.0.0-hadoop1/badlibs: File exists
src/test/resources/install-gremlin-server.sh: line 59: pushd: /Users/gto624/dev/grdb/dynamodb-titan-storage-backend/server/dynamodb-titan100-storage-backend-1.0.0-hadoop1/lib: No such file or directory
mv: rename joda-time-1.6.2.jar to /Users/gto624/dev/grdb/dynamodb-titan-storage-backend/server/dynamodb-titan100-storage-backend-1.0.0-hadoop1/badlibs/joda-time-1.6.2.jar: No such file or directory
mv: rename jackson-annotations-2.3.0.jar to /Users/gto624/dev/grdb/dynamodb-titan-storage-backend/server/dynamodb-titan100-storage-backend-1.0.0-hadoop1/badlibs/jackson-annotations-2.3.0.jar: No such file or directory
mv: rename jackson-core-2.3.0.jar to /Users/gto624/dev/grdb/dynamodb-titan-storage-backend/server/dynamodb-titan100-storage-backend-1.0.0-hadoop1/badlibs/jackson-core-2.3.0.jar: No such file or directory
mv: rename jackson-databind-2.3.0.jar to /Users/gto624/dev/grdb/dynamodb-titan-storage-backend/server/dynamodb-titan100-storage-backend-1.0.0-hadoop1/badlibs/jackson-databind-2.3.0.jar: No such file or directory
mv: rename jackson-datatype-json-org-2.3.0.jar to /Users/gto624/dev/grdb/dynamodb-titan-storage-backend/server/dynamodb-titan100-storage-backend-1.0.0-hadoop1/badlibs/jackson-datatype-json-org-2.3.0.jar: No such file or directory
~/dev/grdb/dynamodb-titan-storage-backend
cp: /Users/gto624/dev/grdb/dynamodb-titan-storage-backend/server/dynamodb-titan100-storage-backend-1.0.0-hadoop1/conf/gremlin-server/gremlin-server.yaml: No such file or directory
cp: /Users/gto624/dev/grdb/dynamodb-titan-storage-backend/server/dynamodb-titan100-storage-backend-1.0.0-hadoop1/conf/gremlin-server/gremlin-server-local.yaml: No such file or directory
cp: /Users/gto624/dev/grdb/dynamodb-titan-storage-backend/server/dynamodb-titan100-storage-backend-1.0.0-hadoop1/conf/gremlin-server/dynamodb.properties: No such file or directory
cp: /Users/gto624/dev/grdb/dynamodb-titan-storage-backend/server/dynamodb-titan100-storage-backend-1.0.0-hadoop1/conf/gremlin-server/dynamodb-local.properties: No such file or directory
cp: /Users/gto624/dev/grdb/dynamodb-titan-storage-backend/server/dynamodb-titan100-storage-backend-1.0.0-hadoop1/bin/gremlin-server-service.sh: No such file or directory

Change directories to the server root:
cd server/dynamodb-titan100-storage-backend-1.0.0-hadoop1

Start Gremlin Server against us-east-1 with the following command (uses the default credential provider chain):
bin/gremlin-server.sh /Users/gto624/dev/grdb/dynamodb-titan-storage-backend/server/dynamodb-titan100-storage-backend-1.0.0-hadoop1/conf/gremlin-server/gremlin-server.yaml

Start Gremlin Server against DynamoDB Local with the following command (remember to start DynamoDB Local first with mvn test -Pstart-dynamodb-local):
bin/gremlin-server.sh /Users/gto624/dev/grdb/dynamodb-titan-storage-backend/server/dynamodb-titan100-storage-backend-1.0.0-hadoop1/conf/gremlin-server/gremlin-server-local.yaml

Connect to Gremlin Server using the Gremlin console:
bin/gremlin.sh

Connect to the graph on Gremlin Server:
:remote connect tinkerpop.server conf/remote.yaml

zip error: Nothing to do! (try: zip -rq dynamodb-titan100-storage-backend-1.0.0-hadoop1.zip . -i dynamodb-titan100-storage-backend-1.0.0-hadoop1)
src/test/resources/install-gremlin-server.sh: line 93: popd: directory stack empty
f45c8994528b:dynamodb-titan-storage-backend gto624$
f45c8994528b:dynamodb-titan-storage-backend gto624$
f45c8994528b:dynamodb-titan-storage-backend gto624$

@itman85
Copy link
Author

itman85 commented Mar 28, 2016

@pbhatIIT you got this error because libraries are not loaded. You can refer my comment above. You don't need to install gremlin server if you only want to use gremlin console.

@kometen
Copy link

kometen commented Oct 5, 2016

@itman85 Hi, thank you for your short guide. I was able to enter this to the gremlin console.

graph = TitanFactory.open(conf)

But executing the next line gives the following error. Changing makeLabel() to makeEdgeLabel() produces a different error.

graph.makeLabel("is").oneToOne().make()

No signature of method: com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.makeLabel() is applicable for argument types: (java.lang.String) values: [is]
Possible solutions: makeEdgeLabel(java.lang.String)
Display stack trace? [yN] y
groovy.lang.MissingMethodException: No signature of method: com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.makeLabel() is applicable for argument types: (java.lang.String) values: [is]
Possible solutions: makeEdgeLabel(java.lang.String)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:56)
at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:122)
at groovysh_evaluate.run(groovysh_evaluate:3)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:69)
at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:185)
at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:119)
at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:94)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:123)
at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:58)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run(InteractiveShellRunner.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:82)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.apache.tinkerpop.gremlin.console.Console.(Console.groovy:144)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:303)

This is on macOS Sierra with JDK 8 (build 1.8.0_101-b13) and cloned repo from https://github.com/awslabs/dynamodb-titan-storage-backend.

@NickCorbett
Copy link
Contributor

Hi @kometen

The post was written when v0.5.4 of the DynamoDB Titan Storage Backend was the most recent version - if you want to get the demo up and running quickly, then the easiest way is to clone from that branch - for the command in step 4 of the instructions use:

git clone https://github.com/awslabs/dynamodb-titan-storage-backend.git -b 0.5.4

If you want to run with v1.0.0 then you will need to follow the instructions here to install and run a Titan Server on your local machine. Once you've made a remote connection (step 9 in the instructions in the above documentation), you can create the conf object and load the data (step 9 in the instructions on the blog).

HTH

Nick

@kometen
Copy link

kometen commented Oct 11, 2016

Hi @NickCorbett.

Thank you for your reply. I also found the newer instructions you link to after looking for solutions and was able to perform the queries in the examples. My next step is to try to add own data that I can experiment with. :-)

regards
Claus

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants