title: How do I set up a jdbc connection to neo4j?
body: <p>My understanding is that while jdbc is typically used for SQL queries, because an SQL query is essentially just a string, JDBC isn't going to know whether it's an SQL query or a cypher query. </p>
  
  <p>From what I can see I just need to import the neo4j jdbc driver, and use that to pass my cypher query to the neo4j database. </p>
  
  <p><strong>pom.xml</strong></p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.neo4j&lt;/groupId&gt;
          &lt;artifactId&gt;neo4j-jdbc&lt;/artifactId&gt;
          &lt;version&gt;2.1.4&lt;/version&gt;
          &lt;type&gt;pom&lt;/type&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>Now I'm trying something like this:</p>
  
  <pre><code>    this.dataSource = new DriverManagerDataSource(this.DBURL,this.USERNAME, this.PASSWORD);
  
  
      this.dataSource.setDriverClassName("org.neo4j.jdbc.Driver");        
      this.jdbcTemplate  = new JdbcTemplate(this.dataSource); 
  
      String qq = "MATCH (n:Individual) RETURN n LIMIT 25;";      
      Map&lt;String,Object&gt; res = jdbcTemplate.queryForMap(qq); //I actually just want to return a JSON string, but this is the only example I can find for now
  </code></pre>
  
  <p>This code will give me: </p>
  
  <pre><code>java.lang.ClassNotFoundException: org.neo4j.jdbc.Driver
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:274)
      at org.springframework.jdbc.datasource.DriverManagerDataSource.setDriverClassName(DriverManagerDataSource.java:127)
  </code></pre>
  
  <p>What am I doing wrong here? What is the correct name of the driver class?</p>
  
  <p>I've also tried </p>
  
  <pre><code>Class.forName("org.neo4j.jdbc.Driver");
  </code></pre>
  
  <p>and I get:</p>
  
  <pre><code>java.lang.ClassNotFoundException: org.neo4j.jdbc.Driver
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:191) 
  </code></pre>