Skip to content

Category Archives: Java

Subversion, JavaHL, and Eclipse on Linux

I normally use emacs and command line svn when working at home on Linux. Eclipse to me, in principle, is a necessary evil of programming with larger groups. But a recent volunteer project I’ve been working on for the Philippine Scholars of Minnesota is forcing me out of this habit. And with this change, I’ve [...]

Debugging MySQL ERROR1025 – Error on rename of

If you ever executed the following command in mysql: alter table table drop column; and got the following error: 1025 – Error on rename of ‘.\\#sql-880_3c’ to ‘.\\ ’ (errno: 150), Don’t panic. It’s probably because you’re trying to drop a column that’s a foreign key. Execute this command: SHOW ENGINE INNODB STATUS to debug more. [...]

Migrating from Hibernate 3.3.2, JPA 1 to Hibernate 3.5 CR2 and JPA 2

Starting with version 3.5 (currently CR2), Hibernate Annotations 3.x and Hibernate EntityManager projects have been merged into the Hibernate Core codebase as invidual modules. As a surprising addition, Hibernate Envers subproject is added as well (that’s a great thing as you get Auditing, out of box hereafter). So if you’re stuck with Hibernate 3.3.x and [...]

Upgrading to Hsqldb 2rc8, part 1, Maven Integration

At my current client engagement, we make full use of hsqldb both in our unit tests and for local development. It’s a great tool, and the changes made since the last release 4 long years ago will make it an even better tool. My project has hundreds of tests making use of hsqldb, and getting [...]

Accessing Drools 5 rules via a restful API using Drools Server and Groovy RestClient

If you haven’t heard about drools, you should have a look at it now. It provides multiple ways to write rules: DSL (drl files), groovy, java, excel spreadsheets or via a web interface (Guvnor). I recommend the book, Drools – JBoss Rules 5.0 by Michael Bali as its the only comprehensive documentation available on drools. [...]

an interesting class loading issue with quartz scheduler timing (NoClassDefFoundError)

My quartz job schedulers had a startDelay of 0 ms and a repeatInterval of 10 mins and 5 mins each. On my local environment (win/mac) and sandbox (unix) the scheduler works just fine. But in our production environment (unix), we were getting spurious java.lang.NoClassDefFoundError: Could not initialize class Foo. Now Foo was one of the [...]

Follow RTC on Twitter

We only tweet from the console! http://www.twitter.com/reverttoconsole

Integrating JavaScript Tests with Continuous Integration

At my current client I’ve been building a rather complex rich client app using ExtJs. The team has written a lot of JavaScript code, and has been writing a lot of JavaScript unit tests as well. We’ve gone through several unit testing tools along the way trying to solve some logistical problems. We started with [...]

The best 59$, a java developer can ever invest

If you don’t buy this now, you’re either dumb. Or just plainly stupid. For the impatient: it’s a small jar that lets you compile/run/deploy java instantly, like php. I’ts the real HOT DEPLOY that jvm lacks out of the box. No more restarting the server, ever again, even after reconfiguring Spring beans. I used this [...]

Unit Testing JavaScript with HtmlUnit and Screw.Unit

Writing apps with today's rich client libraries such as Extjs , YUI , and JQuery really shows how much potential is still left in web development. But it takes a lot of code, and the amount of technical debt can get heavy, quickly. Good tests can help reduce this technical debt, and there are a lot of testing [...]