Code Monkey home page Code Monkey logo

Comments (8)

sim51 avatar sim51 commented on August 22, 2024

Step 1: Driver

  • On the Database panel, click on the icon that correspond to Data Source Properties
  • Create a new Driver (called 'Neo4j' for example)
  • In the Driver files panel, add Neo4j JDBC Driver jar
  • Choose org.neo4j.jdbc.Driver into Class list
  • Choose <Generic> into Dialect list

Setp 2: Data Source

  • On the Database panel, create a new Data Source and choose the Neo4j driver
  • Fulfill the form with those information
  • User: neo4j
  • Password : the one of your database
  • Url : the jdbc bolt or http one : jdbc:neo4j:bolt://localhost/?noSsl or jdbc:neo4j:http://localhost

Step 3: Query

  • On the Database panel, double click on the datasource, and create the query
  • Select your query, and click on run

intellij

from neo4j-jdbc.

mvitz avatar mvitz commented on August 22, 2024

I basically did the same step as you but I used a CREATE statement CREATE (:Bar {name: "Foo"}). Executing this results in a never ending process in IntelliJ (In the Output View a spinner keeps spinning). Cancelling this statement via IntelliJ results in an exception:

sql> CREATE (:Foo {name: "bar"})
[2016-06-05 22:41:04] Cancelling...
[2016-06-05 22:41:04] java.lang.UnsupportedOperationException: Not implemented yet.
    at org.neo4j.jdbc.Statement.cancel(Statement.java:246)
    at com.intellij.database.remote.jdbc.impl.RemoteStatementImpl.cancel(RemoteStatementImpl.java:78)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323)
    at sun.rmi.transport.Transport$1.run(Transport.java:200)
    at sun.rmi.transport.Transport$1.run(Transport.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:276)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:253)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162)
    at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227)
    at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179)
    at com.sun.proxy.$Proxy127.cancel(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.execution.rmi.RemoteUtil.invokeRemote(RemoteUtil.java:124)
    at com.intellij.execution.rmi.RemoteUtil.access$100(RemoteUtil.java:36)
    at com.intellij.execution.rmi.RemoteUtil$RemoteInvocationHandler.invoke(RemoteUtil.java:229)
    at com.sun.proxy.$Proxy128.cancel(Unknown Source)
    at com.intellij.database.console.JdbcEngine$3.run(JdbcEngine.java:168)

However the node is created.

from neo4j-jdbc.

jexp avatar jexp commented on August 22, 2024

I got something similar with match (n) return count(*)

org.neo4j.driver.v1.exceptions.NoSuchRecordException: Cannot peek past the last record at org.neo4j.driver.internal.InternalStatementResult.peek(InternalStatementResult.java:238) at org.neo4j.jdbc.bolt.BoltResultSetMetaData.getColumnTypeName(BoltResultSetMetaData.java:120) at com.intellij.database.remote.jdbc.impl.RemoteResultSetImpl.tryGetObject(RemoteResultSetImpl.java:1251) at com.intellij.database.remote.jdbc.impl.RemoteResultSetImpl.getObject(RemoteResultSetImpl.java:1236) at com.intellij.database.remote.jdbc.impl.RemoteResultSetImpl.getCurrentRow(RemoteResultSetImpl.java:1229) at com.intellij.database.remote.jdbc.impl.RemoteResultSetImpl.getObjects(RemoteResultSetImpl.java:1213) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323) at sun.rmi.transport.Transport$1.run(Transport.java:200) at sun.rmi.transport.Transport$1.run(Transport.java:197) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:196) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

from neo4j-jdbc.

jexp avatar jexp commented on August 22, 2024

neo4j - localhost sql - neo4j-jdbc-parent - _java_neo_neo4j-jdbc - intellij idea 2016 2 eap

from neo4j-jdbc.

sim51 avatar sim51 commented on August 22, 2024

Now it should be ok (except for the cancel part that is not implemented).
Can you test it and tell me ?

from neo4j-jdbc.

mvitz avatar mvitz commented on August 22, 2024

👍

sql> CREATE (:Foo {name: "bar"})
[2016-06-08 07:15:54] 1 row affected in 375ms
sql> MATCH (n) RETURN n
[2016-06-08 07:16:02] 1 row retrieved starting from 1 in 112ms (execution: 64ms, fetching: 48ms)

Just as a hint/reminder. I used the following URL templates:

  • bolt -> jdbc:neo4j:bolt://{host::localhost}[:{port::7687}][\?<&,noSsl>]
  • http -> jdbc:neo4j:http://{host::localhost}[:{port::7474}]

from neo4j-jdbc.

jexp avatar jexp commented on August 22, 2024

org neo4j jdbc driver - jdbc_neo4j_bolt___localhost sql - apoc - _java_neo_procs_apoc - intellij idea 2016 2 eap

from neo4j-jdbc.

sim51 avatar sim51 commented on August 22, 2024

I don't see anymore error : getUsername and other generic methods have been implemented.

So I close this issue, but feel free to reopen it if you have some errors.

from neo4j-jdbc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.