maven - Error in neo4j connectivity with Java -
on adding "dependencies" given above pom file got following error message.
dependencies:
<dependencies> ... <dependency> <groupid>org.neo4j</groupid> <artifactid>neo4j-jdbc</artifactid> <version>1.9</version> </dependency> </dependencies> <repositories> <repository> <id>neo4j-maven</id> <name>neo4j maven</name> <url>http://m2.neo4j.org</url> </repository> </repositories>
code :
package javaapplication2; import java.sql.*; import java.io.*; import java.util.*; import java.sql.*; import javax.swing.joptionpane; /** * @author shanal */ public class neo { public static void main(string[] args) throws exception { // make sure neo4j driver registered class.forname("org.neo4j.jdbc.driver"); // connect connection con = drivermanager.getconnection("jdbc:neo4j://localhost:7474/"); // querying try (statement stmt = con.createstatement()) { resultset rs = stmt.executequery("match (n:user) return n.name"); while (rs.next()) { system.out.println(rs.getstring("n.name")); } } } }
error :
run: starting apache http client executing query: match (n:user) return n.name params {} starting apache http client errors-next-token = field_name null unexpected token end_array
this bug in neo4j-jdbc. has been fixed now. take @ github issue. matches case.
Comments
Post a Comment