Giter Site home page Giter Site logo

Comments (10)

jexp avatar jexp commented on June 13, 2024

With which transport?

Von meinem iPhone gesendet

Am 04.06.2016 um 15:37 schrieb Michael Vitz [email protected]:

I expected that
Statement stmt = connection.createStatement();
stmt.executeQuery("fooBar"):
throws an SQLException but instead a Neo4J Internal Exception is thrown.

See mvitz@53eb06f for a failing test.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

from neo4j-jdbc.

mvitz avatar mvitz commented on June 13, 2024

I tested IT with bolt. But looking at the implementation I guess HTTP throws an internal exception instead of SQLException as well

from neo4j-jdbc.

sim51 avatar sim51 commented on June 13, 2024

Bug is fix in master branch for Bolt & HTTP

from neo4j-jdbc.

jexp avatar jexp commented on June 13, 2024

Thanks a lot @sim51 ! @mvitz can you confirm that it's fixed?

from neo4j-jdbc.

mvitz avatar mvitz commented on June 13, 2024

👍

from neo4j-jdbc.

mvitz avatar mvitz commented on June 13, 2024

I don't know why but suddenly the bug occurs again (but on a slightly different position:

Stacktrace was: org.neo4j.driver.v1.exceptions.ClientException: Invalid input 't': expected <init> (line 1, column 1 (offset: 0))
"toto"
 ^
    at org.neo4j.driver.internal.connector.socket.SocketResponseHandler.handleFailureMessage(SocketResponseHandler.java:68)
    at org.neo4j.driver.internal.messaging.PackStreamMessageFormatV1$Reader.unpackFailureMessage(PackStreamMessageFormatV1.java:456)
    at org.neo4j.driver.internal.messaging.PackStreamMessageFormatV1$Reader.read(PackStreamMessageFormatV1.java:417)
    at org.neo4j.driver.internal.connector.socket.SocketClient.receiveOne(SocketClient.java:127)
    at org.neo4j.driver.internal.connector.socket.SocketConnection.receiveOne(SocketConnection.java:135)
    at org.neo4j.driver.internal.connector.ConcurrencyGuardingConnection.receiveOne(ConcurrencyGuardingConnection.java:150)
    at org.neo4j.driver.internal.pool.PooledConnection.receiveOne(PooledConnection.java:142)
    at org.neo4j.driver.internal.InternalStatementResult.tryFetchNext(InternalStatementResult.java:303)
    at org.neo4j.driver.internal.InternalStatementResult.hasNext(InternalStatementResult.java:181)
    at org.neo4j.jdbc.bolt.BoltResultSet.<init>(BoltResultSet.java:79)
    at org.neo4j.jdbc.bolt.BoltStatement.executeQuery(BoltStatement.java:88)

from neo4j-jdbc.

sim51 avatar sim51 commented on June 13, 2024

It's weird ... and I cant' reproduce it, even with the unit test (https://github.com/neo4j-contrib/neo4j-jdbc/blob/master/neo4j-jdbc-bolt/src/test/java/org/neo4j/jdbc/bolt/BoltStatementIT.java#L101-L112)

@mvitz What query have you used ?

from neo4j-jdbc.

mvitz avatar mvitz commented on June 13, 2024

I'm investigating this...
The Test has a small bug btw. the URL doesn't contain the new jdbc:neo4j:-Prefix but even after fixing this I'm not able to produce it with this test...

from neo4j-jdbc.

mvitz avatar mvitz commented on June 13, 2024

It has to do with setAutoComit(false...

Add the following snippet for a failing test:

    @Test public void executeBadCypherQueryWithoutAutoCommitShouldReturnAnSQLException() throws
            SQLException {
        expectedEx.expect(SQLException.class);

        Connection connection = DriverManager.getConnection("jdbc:neo4j:" + neo4j.getBoltUrl());
        connection.setAutoCommit(false);
        Statement statement = connection.createStatement();
        try {
            statement.execute("AZERTYUIOP");
        }
        finally {
            connection.close();
        }
    }

from neo4j-jdbc.

sim51 avatar sim51 commented on June 13, 2024

Thanks a lot @mvitz !

PS: I have seen the little bug on the url, so I have added a condition on the error message.

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.