Skip to content

JRuby fails to commit #100

@javornikolov

Description

@javornikolov

That issue emerged while testing a change in #98.

Java::JavaSql::SQLException: Could not commit with auto-commit set on
oracle.jdbc.driver.PhysicalConnection.commit(oracle/jdbc/driver/PhysicalConnection.java:4439)
oracle.jdbc.driver.PhysicalConnection.commit(oracle/jdbc/driver/PhysicalConnection.java:4486)
java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:606)
RUBY.commit(/home/user/RubymineProjects/ruby-plsql/spec/../lib/plsql/jdbc_connection.rb:65)
RUBY.(root)(/home/user/RubymineProjects/ruby-plsql/spec/plsql/procedure_spec.rb:1848)
ruby.__dash_e__.(root)(-e:1)
ruby.__dash_e__.(root)(ruby/-e:1)

Two observations so far:

  • JRuby connections are currently auto-commit by default (that's JDBC default)
  • commit is failing when invoked in auto-commit mode. Maybe that's OK, yet it's good to see what's the behavior in case of MRI ruby and ruby-oci8. As per JDBC docs commit, rollback, setAutocommit are not supported in autocommit=true mode.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions