jexp / neo4j-shell-tools

A bunch of import/export tools for the neo4j-shell
288 stars 55 forks source link

export-graphml command not found in ne04j shell on windows #59

Open vikramkone opened 9 years ago

vikramkone commented 9 years ago

I'm trying to export the neo4j database as a graphml file on a windows machine. This is what I did

  1. Downloaded neo4j-shell zop file from github (this repo)
  2. Unzipped the *.jar files under "C:\Program Files (x86)\Neo4j Community\bin\"
  3. Started the shell from command prompt after starting the neo4j instance and loading my database
  4. I did this in the shell, and get unknown neo4j-sh (?)$ export-graphml Unknown command 'export-graphml'
  5. Next to debug, I turned on echo in the Ne04jshell.bat file under bin and I see this

C:\Users\$$\Documents\Neo4j>java -classpath ;"";"C:\Program Files (x86)\Neo4j Community\bin \geoff-0.5.0.jar";"C:\Program Files (x86)\Neo4j Community\bin \import-tools-2.1-SNAPSHOT.jar";"C:\Prog ram Files (x86)\Neo4j Community\bin \mapdb-0.9.3.jar";"C:\Program Files (x86)\Neo4j Community\bin \neo4j-desktop-2.2.0.jar";"C:\Program Files (x86)\Neo4j Community\bin \opencsv-2.3.jar" -Dapp.name="ne o4j-shell" -Dapp.repo="C:\Program Files (x86)\Neo4j Community\bin " -Dbasedir="C:\PROGRA~2\NEO4JC~1\bin.." org.neo4j.shell.StartClient Welcome to the Neo4j Shell! Enter 'help' for a list of commands NOTE: Remote Neo4j graph database service 'shell' at port 1337

So the class path is being set correctly for all the imported jar files. But still its

jexp commented 9 years ago

put the jars in lib not bin

also there are spaces in your path's that don't belong there.

vikramkone commented 9 years ago

I have put the files in lib folder also ..still no luck. The spaces are generated by the .bat file, I didn't do anything special to specify the paths. Also the .bat file is looking for jar files inside bin folder not lib folder. This seems like a bug in the tool script

jexp commented 9 years ago

Weird, as I don't have windows, I can't test it. Perhaps you can fix the batch-file to not generate spaces?

benjaminh commented 9 years ago

Hi,

Following the same steps but under Ubuntu 14.04, I have the same problem. export-graphml -o out.graphml gives Unknown command 'export-graphml.

jar files are under lib/ directory and the help command in the neo4j-shell displays available commands such as import-geoff import-graphml but no export-graphml

jexp commented 9 years ago

Can you check that you have the correct version that actually contains graphml-export?

jar tf import-tools-2.2.jar

should list ExportGraphML.class somewhere

benjaminh commented 9 years ago

org/neo4j/shell/tools/imp/ExportGraphMLApp.class appears in the list, is that the good one ?

Besides, for unknown reason, geoff-0.5.0.jar,import-tools-2.2.jar and mapdb-0.9.3.jar have different permissions compared to other jars:

jexp commented 9 years ago

This shouldn't matter

perhaps you can check also graph.db/messages.log for any error message?

the only other thing that I could imagine but is very unlikely is that META-INF/services/org.neo4j.shell.App

in your jar

contains: org.neo4j.shell.tools.imp.ExportGraphMLApp

Am 24.04.2015 um 09:05 schrieb benjaminh notifications@github.com:

org/neo4j/shell/tools/imp/ExportGraphMLApp.class appears in the list, is that the good one ?

yes

Besides, for unknown reason, geoff-0.5.0.jar,import-tools-2.2.jar and mapdb-0.9.3.jar have different permissions compared to other jars:

-rw-r--r-- for the 3 jars mentioned above -rwxr-xr-x for the others Does it matter ? I don't know the way jar files are used, are they just read or do they have to be executed ? — Reply to this email directly or view it on GitHub https://github.com/jexp/neo4j-shell-tools/issues/59#issuecomment-95828267.

benjaminh commented 9 years ago

There is no error messages in log.

You're right, META-INF/services/org.neo4j.shell.App contains org.neo4j.shell.tools.imp.ExportGraphMLApp... If I understand, this seems like a bad news ?

jexp commented 9 years ago

This sounds as if it is inexplicable to me. :(

Am 24.04.2015 um 10:03 schrieb benjaminh notifications@github.com:

There is no error messages in log.

You're right, META-INF/services/org.neo4j.shell.App contains contains: org.neo4j.shell.tools.imp.ExportGraphMLApp... If I understand, this seems like a bad news ?

— Reply to this email directly or view it on GitHub https://github.com/jexp/neo4j-shell-tools/issues/59#issuecomment-95842823.

benjaminh commented 9 years ago

But this page shows that the line mentioned above exists. As I downloaded the zip file from github, it seems logical to me that I have the same file, isn't it ?

Yet, I have no idea what the presence of this line implies. What would happen if I delete it ? Should I open a proper issue ?

krk commented 9 years ago

I have the issue too.

davidfauth commented 9 years ago

I had to recompile the jar file in Windows. After that, the export-graphml will work. Let me know if you need a copy of the updated jar file.

jcwill commented 9 years ago

It doesn't work for me either. I'm on windows too.

davidfauth commented 9 years ago

I've uploaded an updated zip file here:

http://neo4j-neo4j-shell-tools.s3.amazonaws.com/neo4j-shell-tools_2.2.zip

danpaulsmith commented 8 years ago

For neo4j 2.2.5, I had to put the jar files in libexec/lib ! screen shot 2015-10-04 at 15 04 17

Except now it just outputs "null".

screen shot 2015-10-04 at 15 08 05

Actually, got it, think it was the ordering of the flags

screen shot 2015-10-04 at 15 12 57

koolkao commented 8 years ago

I ran into the same issue as vikramkone on Windows. There is an extra space in the paths generated in CLASSPATH.

I manually fixed the paths and ran the generated command, but strangely the shell still cannot see the export-graphml function.

java -classpath ;"";"C:\Program Files\Neo4j CE 2.3.2\bin\geoff-0.5.0.jar";"C:\Program Files\Neo4j CE 2.3.2\bin\import-tools-2.3.2.jar";"C:\Program Files\Neo4j CE 2.3.2\bin\mapdb-0.9.3.jar";"C:\Program Files\Neo4j CE 2.3.2\bin\neo4j-desktop-2.3.2.jar";"C:\Program Files\Neo4j CE 2.3.2\bin\opencsv-2.3.jar" -Dapp.name="neo4j-shell" -Dapp.repo="C:\Program Files\Neo4j CE 2.3.2\bin" -Dbasedir="C:\Program Files\Neo4j CE 2.3.2" org.neo4j.shell.StartClient