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

Maven build failure : could not transfer metadata
How to proccess/read java objects from xmlrpc received by a server
Trying to input values into a 2d array and print it, code not running
Popup DatePicker using DialogFragment and saving selection to TextView or EditText
Write out all Spring Boot metrics to Stdout or aggregator?
Passing string from load operation to Pig UDF
Android programmatically update application when a new version is available in api 24 and api 25
Calendar Event via Intent does not set Start Date and End Date
Combining two accounts [closed]
Casting list of objects to list of maps in java [duplicate]
JComboBox to display multiple lines of text
RotatedRect to Java Ellipse2D or similar - OpenCV
Need to restart Java method up to three times for username & password log-in system
How can I change default elements color android layout?
Guice Request-scoped injection without a servlet (in an RPC server)
RPN Calculator Using Stacks

Categories

HOME
java
pandas
sendgrid
twitter
dot
callback
pheatmap
webrequest
windows-10-universal
vifm
numeral.js
event-handling
fallback
vaadin7
openrefine
textfield
immutable.js
conemu
orleans
autosys
android-widget
angular2-aot
poltergeist
selectedindexchanged
chromebook
uninstall
maquette
libuv
google-cloud-nl
unboundid
nameservers
yadcf
.net-4.0
titanium-mobile
noraui
windows-dev-center
openoffice.org
rotational-matrices
hexo
wixsharp
code-search-engine
angularjs-factory
opshub
elmah
firebase-admin
spring-security-kerberos
eclipse-gef
scorm
xml-documentation
komodoedit
worker-thread
crypt
np-complete
sybase-asa
zendesk-app
arrow-keys
nbconvert
word-vba-mac
time-and-attendance
libpng
infix-notation
file-writing
nsviewcontroller
actionbardrawertoggle
pickadate
dlna
wapiti
cloudbees
browser-link
pervasive-sql
spim
prerequisites
lib.web.mvc
qdialog
atk4
dundas
angular-local-storage
system.reflection
offloading
p4java
valueconverter
hyprlinkr
monomac
shellexecute
mqx
interface-orientation
http-unit
rdoc
twrequest
buildr
ohm
removeclass
code-cleanup
actionview
remember-me
lpeg
nhibernate.search
zend-decorators
msdev
multiple-languages
signal-handling

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