java


No suitable driver found for jdbc Neo4j


I already checked the other question about my issue, but none of them solved.
I imported the Neo4j Jar by configuring the build path, but still I get this error.
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class TestNeo4j {
public static void main(String[] args) throws SQLException {
Connection c = DriverManager.getConnection("jdbc:neo4j://localhost:7474/", "neo4j", "neo4j");
Statement st = c.createStatement();
String cql = "match (m)-[:IS_ALLERGIC_TO]->(n:Product) where n.name = 'gluten' return m.name";
ResultSet rs = st.executeQuery(cql);
while(rs.next())
System.out.println(rs.getString(1));
c.close();
}
}
This is my code. Can you figure out what the problem is?
As suggested here, use neo4j jar with dependencies (neo4j-jdbc-2.1.4-jar-with-dependencies.jar).
You can grab it from neo4j release repository, here

Related Links

Are all instance variables declared outside functions?
Trying to add dependency to Atlassian pom.xml using IntelliJ
Dependency not found in Spring Boot project
RadioButton returns false after first run [closed]
EJB #PostConstruct not called
Interactive Brokers orders synched in both Gateway and TWS?
Whole JSONObject sent as JSON key using HttpURLConnection in Android
How to bypass the hosts file when doing an nslookup in Java using InetAddress
What are possible causes of ErrorMessage: Dynamic Backend Host Not Specified?
Grid does not follow “Platform” requirements during test run
What is the scope of a static object in a web application
NonRepeatableRequestException using jersey and apache httpClient for a REST call
Java bouncycastle decrypt error that Unknown object in stream : 12
Mark Gradle source folder as test source in IntelliJ
Implementing setup and teardown in JUNIT4 dynamic testsuite
How to use c + + call mediaplayer API to play an MP4 file

Categories

HOME
winforms
magnific-popup
bpmn
webstorm
cvs
analysis
installshield
multiple-records
nstableview
dtrace
vaadin7
systemc
saxon
pythonanywhere
custom-wordpress-pages
riot.js
physics-engine
h2db
facebook-access-token
social-media
react-chartjs
.net-4.0
http-get
uiswipegesturerecognizer
openoffice.org
xcode-extension
automake
occlusion
nomethoderror
http-redirect
fault
hibernate-tools
drupal-6
typed-lambda-calculus
np-complete
nbconvert
spring-android
passport-google-oauth
azure-sdk
infix-notation
bstr
actionbardrawertoggle
master-slave
dataview
livequery
independentsoft
lemon
libressl
pundit
sframe
riak-cs
0xdbe
cakephp-3.1
ibaction
sniffer
streambase
e10s
modalpopup
nsbutton
preferences
issuu
jboss-weld
resty-gwt
concurrent-collections
app42
cloud-connect
c18
ccss
ms-project-server-2010
html4
ember-app-kit
cassini-dev
robotics-studio
specification-pattern
hamiltonian-cycle
dice
adk
libc++
zpt
genshi
lang
dmx512
ext3
kdbg
virtual-functions
project-hosting
geneva-server
.net-1.0
paul-graham

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App