jexp / neo4j-shell-tools

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

NoSuchMethodError exception in exporting with neo4j 3.0 #88

Closed miromarchi closed 8 years ago

miromarchi commented 8 years ago

Hi there. I used neo4j-shell-tools in previous neo4j version to export graphML and importing in Gephi. Is the new 3.0 supported? Is there another way to do it?

When I run the command export-graphml -o out.graphml I get this output

Error occurred in server thread; nested exception is: 
    java.lang.NoSuchMethodError: org.neo4j.shell.kernel.GraphDatabaseShellServer.getDb()Lorg/neo4j/kernel/GraphDatabaseAPI;

Same error using import-cypher command.

I also have noticed that with the 3.0 version I don't see anymore the export csv button on the browser results frame. I still see the export json button.

Also, I have noticed that when installing neo4j-shell-tools the extract command asked me to replace the opencsv-2.3.jar.

Edit: I forgot to say that if I install a neo4j-2.3 instance, I cas see the export csv button back in place, and I can run neo4j-shell-tools with success.

Thanks!

miromarchi commented 8 years ago

Update: as answered by stdob-- here, the missing export to csv button in neo4j browser was a problem of my version of chrome browser, changing browser the button was again reachable.

yourpalal commented 8 years ago

In a branch on my fork, I have the code updated and running well with neo4j v3. I also ripped out everything but GraphML, so I wouldn't suggest a pull request, but the changes were mostly:

jexp commented 8 years ago

I pushed a 3.0 branch this morning

Von meinem iPhone gesendet

Am 27.05.2016 um 18:41 schrieb Alex Wilson notifications@github.com:

In a branch on my fork, I have the code updated and running well with neo4j v3. I also ripped out everything but GraphML, so I wouldn't suggest a pull request, but the changes were mostly:

use GraphDatabaseService instead of GraphDatabaseAPI (which is now internal, but still used in the tests on my branch) use import org.neo4j.helpers.collection.Iterables instead of IteratorUtil — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

yourpalal commented 8 years ago

@jexp It looks like the only difference is that it builds with the 2.3.3 neo4j libraries. Is that really enough to achieve compatibility with Neo4j 3.0.1?

jexp commented 8 years ago

https://github.com/jexp/neo4j-shell-tools/tree/3.0

burgosl commented 8 years ago

I'm stil experiencing this problem when trying to export to graphml even after downloading neo4j-shell-tools 3.0.1. This is what I've tried:

In all instances, I still get this error: java.lang.NoSuchMethodError: org.neo4j.shell.kernel.GraphDatabaseShellServer.getDb()Lorg/neo4j/kernel/GraphDatabaseAPI;

By the way, this error occurs with export-cypher, export-graphml, but doesn't seem to happen with import-graphml or import-cypher

I'm using Neo4j 3.01 Enterprise 30 day trial. Can anyone suggest a resolution path, even if it's a workaround?

Thanks,

Luis

yourpalal commented 8 years ago

@burgosl My fork has import-graphml and export-graphml, and works with 3.0.1 enterprise. I deleted all the other import/exports instead of fixing them since I don't use them. Obviously a temporary solution, but it works for now. There's a release from my 3.0.1 branch if you want to use it, or you can build one yourself with ant compile && ./zip.sh.

jexp commented 8 years ago

@yourpalal on the 3.0 branch is the fix for all the API changes, as you can see here:

https://github.com/jexp/neo4j-shell-tools/commit/adf80ccedc86effcd04b3b4f915e60ea681ce01b

yourpalal commented 8 years ago

@jexp awesome!! thanks for the update :)

burgosl commented 8 years ago

Got it, thanks! For some reason, I also had a version 2.2 in the /lib folder. After I deleted it, it started working correctly.

Thanks everyone!

steveshi7 commented 6 years ago

Hi, currently getting this error on neo4j version 3.3.3. Similar to above, when I try to run export-graphml -o out.graphml, I'm getting the error:

Error occurred in server thread; nested exception is: java.lang.NoSuchMethodError: org.neo4j.shell.kernel.GraphDatabaseShellServer.getDb()Lorg/neo4j/kernel/GraphDatabaseAPI;