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

Vaadin Navigator NPE
Couldn't read row 0, col -1 from CursorWindow Displaying Records
repaint doesn't work in serial event
Spring boot and configuration profile
How to Filter ListAdapter using getFilter() within a fragment
How to get column specifications from MySQL with Java? [closed]
Java - String to number [closed]
Jersey invoking sub resource wrongly
How to recursively run through a tree, creating nodes, calling functions, and dive deeper?
Named parameter doesn't work with MySql LIKE statement
Parse large JSON file with JSON Simple (OutOfMemoryError)
How to convert a json string to an array of known types using Gson?
Is it possible to get the mac addresses of all connected device in my home network?
Axis: createCall with params
Options for getting referral history from App invite?
how to add a fragment in your activity by selecting items from the dropdown menu?

Categories

HOME
compiler-construction
sendgrid
deployment
omnet++
zeromq
react-virtualized
iot
analysis
jxls
windows-server
android-youtube-api
maude-system
tomcat6
spring-xd
dax
modelica
postgres-xl
moonmail
ibm-odm
lombok
django-simple-history
progressive-web-apps
visjs
language-agnostic
format-specifiers
qhull
poltergeist
nhapi
linkerd
tinymce-4
oracle-fusion-middleware
wallpaper
jmonkeyengine
web-mining
dynamics-crm-2013
abstract-class
service-discovery
code-search-engine
az-application-insights
janrain
firebase-admin
flashair
scorm
apple-news
avconv
lowpass-filter
recursive-datastructures
tactic
libusb-win32
namecoin
mako
minimization
cubes
ableton-live
static-ip-address
xml-attribute
revolution-r
cartesian-product
marching-cubes
tarjans-algorithm
jsapi
device-orientation
tween
winddk
mesa
dml
mechanize-ruby
datagridviewcolumn
hyprlinkr
algebraic-data-types
java.nio.file
industrial
dexterity
jplaton
random-seed
plasma
tinn-r
typoscript2
pvrtc
libstdc++
chrono
nsdatecomponents
f#-powerpack
javax.script
table-footer
inotifycollectionchanged
zend-translate
routedevent
preference
javap
premature-optimization
project-hosting
aquaticprime
post-build





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