All posts tagged with 'MySQL'

Fixing hibernate “Cannot release connection” exception using DBCP and MySQL.

21-Nov-11

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, […]

Read the complete article »

MySql compatible AES encryption / decryption in Java

18-Jul-11

MySQL has an aes_encrypt/aes_decrypt pair of functions (Encryption and Compression Functions) that enable encryption and decryption of data using the official AES algorithm. The functions are easy to use (select AES_ENCRYPT(‘text’,’password’)) and the result is easy to store (insert into secrets values HEX(AES_ENCRYPT(‘text’,’password’))) as hex values. I used this technique for a while but i […]

Read the complete article »

Create reusable MySQL schema dumps

16-Sep-10

In case you need a MySQL schema transferred from one host to another and the schema names differ, you can ran into problems with a standard MySQL dump. Use the following statement to create a schema dump that contains all table and view definitions as well as all stored procedures without a reference to the […]

Read the complete article »

Different day, same shit: MySQL Gem again

11-Dec-08

Again, the MySQL ruby gem totally annyoed me trying to install it on a fresh Mac OS X 10.5.5 install and MySQL 5.0.67. This time the following command brought it to life: sudo env ARCHFLAGS="-arch i386" gem install mysql — \ –with-mysql-dir=/usr/local/mysql –with-mysql-lib=/usr/local/mysql/lib \ –with-mysql-include=/usr/local/mysql/includesudo env ARCHFLAGS="-arch i386" gem install mysql — \ –with-mysql-dir=/usr/local/mysql –with-mysql-lib=/usr/local/mysql/lib […]

Read the complete article »

Projektdokumentationen und Anwendungsdesign

19-May-07

In den letzten Tagen habe ich einige ganz interessante, deutsche Projektdokumentationen gefunden. Zum einen die zur Zeiterfassung Mite gehörende Diplomarbeit, die hier zum Download angeboten wird. Zum anderen einen Aufsatz von Thomas Bachem, einem der Macher von sevenload.de Ich finde beide Dokumentationen hochgradig interessant zu lesen, nichts desto habe ich einige Anmerkungen und Gedanken dazu: […]

Read the complete article »