The following is not only a personal reminder for me but also a first try to answer some questions on Stack Overflow… You can create custom object types in an Oracle database like so: CREATE TYPE t_demo_object AS OBJECT ( some_number NUMBER, some_string varchar2(32) ) /CREATE TYPE t_demo_object AS OBJECT ( some_number number, some_string varchar2(32) […]
Update: Please take a note of comment #5 by DSurber. He works for Oracle and sheds some light on named parameters. In short: The names of the parameter do not refer to named placeholders in statement (like in JPA for example) but to PL/SQL named parameters!. Thank you very much. You might have wondered what […]
Every 8 hours i got a Hibernate exception “Cannot release connection” within a Java application using Hibernate, Apache DBCP on Tomcat: org.hibernate.exception.GenericJDBCException: Cannot release connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29) .. .. Caused by: java.sql.SQLException: Already closed. Not only that the messages polluted my inbox, the exception was visible to the enduser, […]
With the current and latest Oracle JDBC Drivers it’s possible to retrieve one automatically generated key based on a sequence or any other arbitrary value (autogenerated-keys or identity columns in other databases). Certainly it isn’t as simple as just use using Statement.html#getGeneratedKeys() as it simply returns an emtpy resultset. After browsing around, i saw that […]