Comments (10)
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.
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.
Bug is fix in master branch for Bolt & HTTP
from neo4j-jdbc.
Thanks a lot @sim51 ! @mvitz can you confirm that it's fixed?
from neo4j-jdbc.
👍
from neo4j-jdbc.
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.
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.
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.
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.
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)
- Test / provide connection pooling via `PooledConnection` and related infrastructure
- Implement an internal `Bookmarkmanager`
- Add more detailed information to the (bolt) user-agent
- Add support for `java.sql.Connection#setNetworkTimeout` HOT 1
- Inserts can only be translated into node creation, not relationships.
- Add support for DML statements HOT 1
- Add support for expressions HOT 1
- Add support for predicates / operators HOT 7
- Implement some test / report that checks which jOOQ API / Cypher DSL API is already covered by tests HOT 2
- Add integration tests HOT 2
- Add support for row value expression predicands HOT 2
- Add support for quantified comparison predicates
- Feature: Connection lifetime
- Feature: Make database metadata pluggable, too.
- Feature: Add BOM project.
- Refactor: Remove trailing dots from exception messages.
- Stubkit tests fails if another database is running on localhost:7687
- Add support for alternate authentication methods.
- qStudio - SQL GUI support
- Enhance the raw config passed to the translators to contain the full, merged but unprocessed config.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neo4j-jdbc.