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

Update JTextArea to show progress
Repeating an effect on blocks in a world
What does the leak period means in sonarQube
Spring-Security with two authentication managers
Generate unique int whenever a new object is created
How to parse the Google search result in a specific date range?
How to list both Numbers and Contact in a single row
Spring Boot MVC/Rest controller and enum deserialization converter
Redraw/refresh layout after changing Activity's theme/style
Webview android application crashes with error “java.lang.NullPointerException”
Find unique element in an arraylist error
Mouse Motion Listener
Refresh a jTable from another window but another window is opning [closed]
ERROR: Cannot find symbol — How do I get my class to compile when it depends on a class in a subfolder?
Changing content of system file using Process output stream [Android]
How to specify swagger parameter “format” using rest dsl?

Categories

HOME
ibm-bluemix
pypi
image-processing
deezer
platform-builder
sd-card
spagobi
fancybox
add
awesome-wm
n-gram
moonmail
windows-phone-7
clearcase-ucm
pythonanywhere
google-cloud-speech
riot.js
graphicsmagick
cultureinfo
poltergeist
fluentvalidation
typo3-6.2.x
replaceall
opentype
unboundid
javascriptcore
key-value-observing
vsts-build-task
protovis
xmlreader
overlap
main
mixture-model
ensembles
fedex
unixodbc
.net-4.6.2
eclipse-gef
babel-core
setter
android-cursor
spring-mongodb
django-scheduler
orthogonal
root-framework
firmata
radtreelist
slicknav
asp.net-4.5
multiple-regression
flash-cs5
javax.sound.midi
separator
reactive-banana
python-3.2
wireshark-dissector
operation
key-management
device-orientation
lustre
c++03
bigbluebutton
google-style-guide
issuu
resty-gwt
mbr
ms-project-server-2010
eventual-consistency
padarn
robotics-studio
funscript
broken-links
tridion-worldserver
jspinclude
objective-c-2.0
reddot
dotnethighcharts
gwt-ext
fluent-interface
paster
audio-capture
sef
microsoft-virtualization
swing-app-framework
privilege
sustainable-pace
w3wp
msdev
signal-handling
lzh

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