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

Hibernate QUERY inconsistent with 0
Injecting enum using spring dependency injection
edited source code of hadoop is not showing changes in eclipse luna
Can a knowledge base be used to replace some parts of the code [closed]
How to select distinct table from joined tables with Hibernate Criteria API?
how to write Java testNG test class for API call in java
After switching WebDriver to alert Marionette stops working
Can't start Spring project
java adjacency matrix implementation of a graph
Java Swing Variable Not Displaying, What can I do differently? [on hold]
Why is java.util.Random slowing later lines of code?
How do you call things from other methods and classes in Java? [on hold]
Kali linux shell scripting and java on the same app possible? [on hold]
Where is located http://www.springframework.org/schema/p that appear with 404
Spring Boot - Static resources from war file are not loading
Maven with Spring boot builds but won't run

Categories

HOME
log4j
debugging
keras
angular-material
bookshelf.js
amazon-ecs
sharepoint-designer
jgroups
disassembler
retrofit
in-app-purchase
slick-slider
metatrader4
reveal.js
handsontable
event-handling
hapi
foselasticabundle
saxon
lucene.net
grails3
jquery-ajaxq
errorlevel
p-value
vlsi
buck
subdomains
c++-amp
form-data
rotational-matrices
cloud-code
vxworks
swisscomdev
android-browser
twitch
az-application-insights
angularjs-factory
android-tabhost
nand2tetris
http-redirect
domain-model
git-diff
elgg
snmptrapd
gcsfuse
query-performance
quartz-composer
url-masking
intrusion-detection
xml-attribute
lua-5.1
superstack
pickadate
nessus
tform
independentsoft
eclipse-clp
varargs
responsive-images
generic-programming
nsmutabledictionary
block-device
coldbox
asp.net-dynamic-data
rdtsc
ceil
article
aapt
jubula
jquery-layout
concurrent-collections
flexmojos
multiprocessor
file-locking
cos
gwt-rpc
pushbackinputstream
limejs
jelly
coderush
punbb
assembly-loading
gnu-prolog
javax.script
recent-documents
celltable
datareader
paster
castle-monorail
zend-tool
project-hosting
scripting-languages

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile