ALTERthought Blogs Archives: How-Tos
· previous page
2 April 2006
Better jUnit-ing
jUnit has been around for a long time. But there are always better techniques to implement old ways. I have provided below an efficient junit aprroach integrated with DbUnit and Spring with support for transaction and hibernate open session. Significant features are:
Integration with DbUnit: DbUnit puts database into a known state between test runs. Pre-loads [...]
continue reading... » 5 Comments
29 March 2006
Java Puzzler: Thine Stack Overfloweth
THE PROBLEM:
A buddy of mine chatted me up over IM the other day with the following, seemingly simple problem:
He has a class that extends the standard Java 1.4 Exception class (BaseException)
Whenever he catches a thrown BaseException, and tries to print the stacktrace (via BaseException.printStackTrace()) he gets a java.lang.StackOverflow error.
If he calls getCause().printStackTrace() everything is [...]
continue reading... » 2 Comments
13 March 2006
Access denied error in MySQL
Have you been frustrated with Access denied for user ‘chinnu’@’localhost’ errors even though as root you granted following privileges:
GRANT ALL PRIVILEGES ON MyDb.* to ‘chinnu’@'%’ WITH GRANT OPTION;
While % means any host, you probably did not see the behavior you expected.
MySQL performs access control in two stages. First, it tries to connect you with the [...]

