neo4j-contrib / neo4j-apoc-procedures

Awesome Procedures On Cypher for Neo4j - codenamed "apoc"                     If you like it, please ★ above ⇧            
https://neo4j.com/labs/apoc
Apache License 2.0
1.71k stars 494 forks source link

Failed to invoke procedure `apoc.load.driver` #1119

Closed mading0817 closed 5 years ago

mading0817 commented 5 years ago

Hi guys,

Guidelines

Please note that GitHub issues are only meant for bug reports/feature requests. If you have questions on how to use APOC, please ask on the Neo4j Discussion Forum instead of creating an issue here.

Expected Behavior (Mandatory)

Just want to make apoc.load.driver works.

Actual Behavior (Mandatory)

It just not works anyway, the error information is:

Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke procedure apoc.load.driver: Caused by: java.lang.RuntimeException: Could not load driver class com.mysql.jdbc.Driver com.mysql.jdbc.Driver

How to Reproduce the Problem

Simple Dataset (where it's possibile)

//Insert here a set of Cypher statements that helps us to reproduce the problem
call apoc.load.driver('com.mysql.jdbc.Driver')

Steps (Mandatory)

  1. Download the JDBC for mysql: https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.11.zip

  2. put "mysql-connector-java-8.0.11.zip" into my "plugins": E:\Neo4j_data\neo4jDatabases\database-775bd186-d5e4-4dff-8112-f0909109dcc7\installation-3.5.2\plugins

  3. run the query: call apoc.load.driver('com.mysql.jdbc.Driver')

  4. I got the error message: Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke procedure apoc.load.driver: Caused by: java.lang.RuntimeException: Could not load driver class com.mysql.jdbc.Driver com.mysql.jdbc.Driver

Screenshots (where it's possibile)

How do I upload a image here?

Specifications (Mandatory)

Versions

Neo4j: Neo4j Browser version: 3.2.17 Neo4j Server version: 3.5.2 (enterprise)

mysql: Ver 14.14 Distrib 5.7.23, for Win64 (x86_64)

OS: win10 64

Apoc: 3.5.0.1

Regards,

jexp commented 5 years ago

Did you restart the server after placing the jar file?

mading0817 commented 5 years ago

Did you restart the server after placing the jar file?

Yes, I even restarted the computer..

jexp commented 5 years ago

Did you make it work?

mading0817 commented 5 years ago

Did you make it work?

Yes it works, the reason is quite stupid.. I did not put the .jar file in the correct file

Thanks!

biodun73 commented 2 years ago

It worked for me too, but how can I directly import data from MYSQL workbench to neo4j.

jexp commented 2 years ago

You can use the etl tool from neo4j desktop.

https://neo4j.com/developer/neo4j-etl/

biodun73 commented 2 years ago

Alright, thanks.