Hard gcj dependency instead of using java alternative

Bug #1097034 reported by Andreas Häber
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
hsqldb (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I struggled to get hsqldb-server running, and even apt-get remove hsqldb-server did not work.

Finally, first I removed gcj-jre* from my system. Secondly, I edited /etc/hsqldb.conf and set the JAVA_EXECUTABLE to point to /usr/bin/java instead of the hardcoded GCJ bin. Now hsqldb apparently starts and stops fine.

What I believe is a bug here is that hsqldb.conf points to GCJ instead of using the system configured Java alternative (controlled using update-alternative).

Here is output from trying to purge hsqldb-server. I don't know the internals of hsqldb, but apparently it tries to invoke hsqldb's init.d script to stop(?) the server. The same exception occurs when doing "sudo service hsqldb-server start|stop".

$ sudo apt-get purge hsqldb-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  hsqldb-server*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 125 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 294919 files and directories currently installed.)
Removing hsqldb-server ...
Exception in thread "main" java.lang.NoClassDefFoundError: org.hsqldb.jdbcDriver
   at java.lang.Class.initializeClass(libgcj.so.13)
   at java.lang.Class.forName(libgcj.so.13)
   at org.hsqldb.util.RCData.getConnection(Unknown Source)
   at org.hsqldb.util.SqlTool.objectMain(Unknown Source)
   at org.hsqldb.util.SqlToolSprayer.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: java.sql.SQLFeatureNotSupportedException not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/share/java/hsqldb.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
   at java.net.URLClassLoader.findClass(libgcj.so.13)
   at java.lang.ClassLoader.loadClass(libgcj.so.13)
   at java.lang.ClassLoader.loadClass(libgcj.so.13)
   at java.lang.Class.forName(libgcj.so.13)
   at java.lang.Class.initializeClass(libgcj.so.13)
   ...4 more
WARNING: hsqldb is still running!
invoke-rc.d: initscript hsqldb-server, action "stop" failed.
dpkg: error processing hsqldb-server (--purge):
 subprocess installed pre-removal script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              There is already a hsqldb server running with pid 10511.
invoke-rc.d: initscript hsqldb-server, action "start" failed.
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 hsqldb-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in hsqldb (Ubuntu):
status: New → Confirmed
Revision history for this message
Mike Spainhower (mcspainhower) wrote :

This workaround fixed my issue. Thanks Andreas!

Revision history for this message
Jeff (carpenter-jeff+alert) wrote :

In /etc/hsqldb.conf, I set JAVA_EXECUTABLE=/usr/bin/java and I was able to remove hsqldb.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.