-
Notifications
You must be signed in to change notification settings - Fork 19
jdbc: NPE when trying to execute update #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The problem is simpler. |
Tarantol connector do not send any `metadata` and `rows` in case of SQL ddl and dml. Before this patch absence of those attributes lead to a NullPointerException. Closes #39
Tarantol connector do not send any `metadata` and `rows` in case of SQL ddl and dml. Before this patch absence of those attributes lead to a NullPointerException. Closes #39
Hi! |
Great! Patches are welcome) P.S. I did not investigate the issue deeply. My patch just let me run my own tests. |
Sure, I will prepare a patch. |
Updated constants be in sync with tarantool IPROTO. Added tests for the working JDBC functionality. Closes tarantool#39
@ztarvos Any updates? I see you created the patch. Are you going to open the pull request? It seems the constants was changed on tarantool side? So, we'll break compatibility with older version if will update them here. What version of tarantool changes it? |
Hi!
I was hoping to see the test infrastructure merged to the jdbc branch first (PR#50) so I can base my changes on it. My fix contains integration tests which require a tarantool instance running. It will not work without it.
These constants are related to SQL and only present on the connector-1.8jdbc branch of tarantool-java, so I guess nothing is broken. For tarantool itself, I think they appeared in 2.0. |
Merged initial test infrastructure with #50. |
Updated constants to be in sync with tarantool IPROTO. Added integration tests for the working JDBC functionality. Fixed travis script to use tarantool 2.0 which is required for SQL. Fixed failing user permission calls in tarantool initialization script. Closes tarantool#39
Updated constants to be in sync with tarantool IPROTO. Added integration tests for the working JDBC functionality. Fixed travis script to use tarantool 2.0 which is required for SQL. Fixed failing user permission calls in tarantool initialization script. Closes tarantool#39
@Totktonada Thanks! I rebased my fix and am ready to submit it. |
@ztarvos Feel free to use PRs or the mailing list as you wish. I don't think we should enforce community to follow tarantool engineers' policy. Please, let me in To or CC when a review from me is needed. To be honest I think that PRs are better for small projects (at least), because allows to catch all related discussions within the one place and don't fragment it across issues and a mailing list. GitHub works great with interlinking anything with anything related :) |
Updated constants to be in sync with tarantool IPROTO. Added integration tests for the working JDBC functionality. Fixed travis script to use tarantool 2.0 which is required for SQL. Fixed failing user permission calls in tarantool initialization script. Closes tarantool#39
Updated constants to be in sync with tarantool IPROTO. Added integration tests for the working JDBC functionality. Fixed travis script to use tarantool 2.0 which is required for SQL. Fixed failing user permission calls in tarantool initialization script. Closes #39
Fixed by 8aad007 |
Updated constants to be in sync with tarantool IPROTO. Added integration tests for the working JDBC functionality. Fixed travis script to use tarantool 2.0 which is required for SQL. Fixed failing user permission calls in tarantool initialization script. Closes #39
Updated constants to be in sync with tarantool IPROTO. Added integration tests for the working JDBC functionality. Fixed travis script to use tarantool 2.0 which is required for SQL. Fixed failing user permission calls in tarantool initialization script. Closes #39 ---- Rebase fixes (Alexander Turenko): * Perform cleanup of the test directory once before all tests (move it from the TarantoolControl constructor). * Added starting of jdk-testing instance using TarantoolControl to JDBC tests. * Wait for the instance to be started in setupEnv().
Updated constants to be in sync with tarantool IPROTO. Added integration tests for the working JDBC functionality. Fixed travis script to use tarantool 2.0 which is required for SQL. Fixed failing user permission calls in tarantool initialization script. Closes #39 ---- Rebase fixes (Alexander Turenko): * Perform cleanup of the test directory once before all tests (move it from the TarantoolControl constructor). * Added starting of jdk-testing instance using TarantoolControl to JDBC tests. * Wait for the instance to be started / stopped in setupEnv() / cleanupEnv().
Updated constants to be in sync with tarantool IPROTO. Added integration tests for the working JDBC functionality. Fixed travis script to use tarantool 2.0 which is required for SQL. Fixed failing user permission calls in tarantool initialization script. Closes #39 ---- Rebase fixes (Alexander Turenko): * Perform cleanup of the test directory once before all tests (move it from the TarantoolControl constructor). * Added starting of jdk-testing instance using TarantoolControl to JDBC tests. * Wait for the instance to be started / stopped in setupEnv() / cleanupEnv().
Updated constants to be in sync with tarantool IPROTO. Added integration tests for the working JDBC functionality. Fixed travis script to use tarantool 2.0 which is required for SQL. Fixed failing user permission calls in tarantool initialization script. Closes #39 ---- Rebase fixes (Alexander Turenko): * Perform cleanup of the test directory once before all tests (move it from the TarantoolControl constructor). * Start tarantool from the Java code in JDBC tests (use TarantoolControl). * Wait for the instance to be started / stopped in setupEnv() / cleanupEnv(); add waiting into startTarantool() / stopTarantool() also should fix races in testLongParallelCloseReconnects when an instance tried to be started against an instance that is already run.
Updated constants to be in sync with tarantool IPROTO. Added integration tests for the working JDBC functionality. Fixed travis script to use tarantool 2.0 which is required for SQL. Fixed failing user permission calls in tarantool initialization script. Closes #39 ---- Rebase fixes (Alexander Turenko): * Start tarantool from the Java code in JDBC tests (use TarantoolControl).
Driver throws null pointer exception when trying to execute update (either DML or DDL).
Statement stmt = conn.createStatement();
int count = stmt.executeUpdate("CREATE TABLE test(id INT PRIMARY KEY, val VARCHAR(20))");
Exception in thread "main" java.lang.NullPointerException at org.tarantool.JDBCBridge.update(JDBCBridge.java:38) at org.tarantool.jdbc.SQLStatement.executeUpdate(SQLStatement.java:35) at TestJdbcUpdate.main(TestJdbcUpdate.java:18)
Probably the constants related to IPROTO in the driver are somewhat obsolete.
The text was updated successfully, but these errors were encountered: