Ubuntu, NetBeans and Sun’s Application Server (Glassfish)

I have recently read that Sun and the folks behind the Ubuntu Linux distro are getting some sort of strategic partnership and closer cooperation.

Well, not one day too soon, say I.

For the poor souls like myself that have been struggling to get Ubuntu to be a bit more co-operative and let the Sun App Server (SJAS) do its stuff, it’s been quite trying.

For a start, although I may intellectually agree with Ubuntu’s desire not to let root roam free and cause havoc, that is hardly helpful when people like myself spend 90% of their time on a Linux box doing exactly the kind of stuff root is supposed to be doing (set-up the server, install and remove stuff, create/delete/fiddle endlessly with configuration options, firewall, user access rights, and other highly amusing stuff…)

The novelty of having to type endlessly sudo/gksudo sort of wears thing after the 900th time you’ve done it in two hours….

However, having decided to endure it for a while and see whether that would lead to a better world, I made a fundamental mistake…

I installed NetBeans, SJAS and MySQL (server) as root

Now, isn’t this what you are supposed to do?
As root, you install the applications, and then create ‘safe zones’ for the users (or, equivalently, assign rights to mysql users) so that they won’t mess up with the installation and other users’ data.

Well, if you do that, NetBeans, SJAS and MySQL won’t love each other, in fact they’ll loathe each other, the world and, most critically, you!

For example, SJAS will start (well, sort of), but NetBeans won’t be able to figure it and will sit there endlessly until it times out (and, by the way, whoever set the timeout value must have a Buddhist monk, as it takes forever to do so!)

MySQL for its part will install and start well enough, but then won’t let you create new databases and/or new tables on existing ones – unless, that is, you go manually in /var/lib/mysql and change (chown) ownership to the user.
Something I don’t particularly like, but let’s face it, who else is going to fiddle with that dir?
Hackers? never!

So there you have it: if you want NB, SJAS and mysql to happily talk to each other, the only solution I have found is to create a /development folder in which to install them – whose ownership is for the ‘users‘ group, and install them both as one of the ‘users
As per mysql, it would seem that by keeping mysql:mysql as the user:group for /var/lib/mysql location makes it all work.

However, to be totally, honest, I’m rather sick and tired of Ubuntu: I have installed it on a Sony Vaio laptop (not exactly a rare or exotic choice of hardware) and almost nothing seems to work as intended:

  • I can’t get it to hibernate / standby, as the display won’t come back;
  • I can’t get it to see the “special function” keys (brightness, function keys, external display, etc.);
  • the battery meter is a confused little guy (how for a battery meter that tells you that there is 63% left – correctly – and then goes on to state that “only 5 minutes ” are left?);
  • sometimes, when the screen saver comes on, the display colours palette gets entirely messed up and the only way to get back a sembiance of normality is to log off and log back in (effectively, restarting the X server).

Apparently, you can update and rebuild the kernel to make it all work – but, as self-inflicted pain goes, I prefer a walk to the dungeon downtown to get whipped…

I mean, none of this is reason enough to go back to Microsoft Windows (one thing is not being able to hibernate, another is having to reboot every couple of hours or so, and having your server wide open to anyone who’s bothering to hack into it) – so I’ve ordered Sun Solaris 10, one would hope that its integration with Sun’s Application Server and NetBeans is slightly better.

Watch this space…


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: