Add java-jdbc-0.3.x profile for testing.

Also fix 0.3.x compatibility in tests.