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

Setting request body on JAX-RS 2.0 Client API With RestEasy
Morphia #Version Not Working
Threadpool Deadlock: designing against or detecting
Random array from resource Android
JAXB: How to convert Map to array-like format
Can't get SQL query results to display on a JSP Page table?
Extended child object inheritance in Hibernate
Pass Data from Fragment to Fragment Through Button Click
Escaping individual characters in a character class
cannot compile a simple hbase java program
java.util.NoSuchElementException Error?
Java 8 Method references called on a local variable
Whenever I run the android login application it just crashes an a series of error messages in log
measure short distance android GPS
What does android:progressTintMode, android:secondaryProgressTintMode and android:progressDrawable do?
Exception in thread “main” java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering()Z

Categories

HOME
arduino-uno
zeromq
image-processing
fluentd
electron
google-docs
amortized-analysis
packages
blueprintjs
datastax-java-driver
paradox
slick-slider
iggrid
hapi
django-simple-history
aurigma
nhibernate-envers
plunker
reverse-proxy
riot.js
tokenize
errorlevel
mmap
tdd
url-scheme
replaceall
facebook-apps
http-status-code-503
caret
mapdb
jmonkeyengine
ios5
file-format
vxworks
android-browser
android-fingerprint-api
document.write
angularjs-factory
core-plot
arena-simulation
outlook-api
netcdf4
.net-4.6.2
wptoolkit
pnotify
clean-architecture
rdfs
git-diff
nstextview
ifs
python-cryptography
mcafee
quartz-composer
deadbolt-2
gridpane
mongocsharpdriver
jwplayer7
lttng
sigabrt
hover-over
freedesktop.org
separator
tmuxinator
notify
camanjs
cdt
undefined-reference
cloud-connect
farseer
mylyn
kyotocabinet
tinn-r
nsnetservice
cisco-jtapi
pysimplesoap
deobfuscation
javax.script
ecl
gin
iweb
mediarss

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