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

NoSuchMethodError exception in exporting with neo4j 3.0 #88

Closed
miromarchi opened this issue May 6, 2016 · 11 comments
Closed

NoSuchMethodError exception in exporting with neo4j 3.0 #88

miromarchi opened this issue May 6, 2016 · 11 comments

Comments

@miromarchi
Copy link

miromarchi commented May 6, 2016

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
Copy link
Author

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
Copy link

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

@jexp
Copy link
Owner

jexp commented May 27, 2016

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
Copy link

@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
Copy link
Owner

jexp commented May 27, 2016

@jexp jexp closed this as completed May 27, 2016
@burgosl
Copy link

burgosl commented Jun 7, 2016

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:

  • download the neo4j-shell-tools manually and copying the jars to the lib directory, and changing permissions to 755 to match the original ones
  • revert to original install and installing the tools through:
    NEO4J_HOME=$(neo4j-shell -c 'dbinfo -g Kernel StoreDirectory' | grep -oE '/.lib.?/') && curl -Lk -o neo4j-shell-tools.zip http://dist.neo4j.org/jexp/shell/neo4j-shell-tools_3.0.1.zip && unzip neo4j-shell-tools.zip -d ${NEO4J_HOME}lib
  • overwriting existing libraries
  • not overwriting existing libraries
  • shutting down the server and connecting the shell locally $neo4j-shell -p /path-to-db
  • adding lib folder manually to the CLASSPATH

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
Copy link

@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
Copy link
Owner

jexp commented Jun 7, 2016

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

adf80cc

@yourpalal
Copy link

@jexp awesome!! thanks for the update :)

@burgosl
Copy link

burgosl commented Jun 7, 2016

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
Copy link

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;

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