Eclipse or SUNrise...

Eclipse or SUNrise...
...JAVA for sure

Tuesday, November 30, 2010

Running RAD 7.5.4 on Linux

Well, finally the 3GB RAM limit under Windows XP forced me to change my work environment to Linux (in my case it is Ubuntu 10.10). Unfortunately after installing Rational Application Developer I received a following error message:

Error: java.lang.RuntimeException: Widget disposed too early

I followed many solutions on IBM's pages and tried different versions of my software (it said that it was a Firefox fault), but nothing helped me. Finally I tried with overriding the .metadata folder from my old RAD's workspace and it actually worked!

I found also on the Developer Works forum ( that some other people tried the same as well and it also worked for them.

At the end I have to say that under Linux RAD works twice as fast (but not as fast as it should and could) so I can highly recommend Linux as the platform for these havy-waight Eclipse tools.

Friday, November 26, 2010

Configuration of WebSphere Application Server and IBM HTTP Server Plugin

Several times I came across problematic configuration of IBM HTTP Server with WebSphere Application Server. Most of the times it works out of the box, but sometimes, especially when these components are installed separately or works in different versions it somehow brings trouble. I guess the configuration propagation isn't perfect for these components.

The standard way to create a IHS instance with WAS console, mapping each modules of applications and then propagating WAS Plugin works fine, but although that it turns out that IHS won't redirect you to the apps. Standard error for this is (in this example the request was made for snoop servlet - a sample application which is bundled with WAS):

[error] [client 9.x.x.x] File does not exist: /opt/IBM/HTTPServer/htdocs/snoop

To resolve this problem you can simply add this lines to the httpd.conf file:

LoadModule was_ap22_module /opt/IBM/HTTPServer/Plugins/bin/

WebSpherePluginConfig /opt/IBM/HTTPServer/Plugins/config/webserver1/plugin-cfg.xml

where the was_ap22_module varies from your IHS and WAS version (IHS 7.0 for example is build upon Apache 2.2 so it uses was_ap22_module, older IHS built upon Apache 2.0 would use was_ap20_module). The second line loads the plugin-cfg.xml file which is propagated from WAS (is copied to IHS location to be strict).

Another common problem with IHS is that, WAS by default is configured to map its application on port 80 (the virtual host mapping * is set to 80). If the IHS will use different port then 80, be sure to correct this in the WAS.

Monday, November 22, 2010

Oracle datasource configuration on WAS

Lately, while configuring WebSphere Application Server 6.1 to Oracle 11g database connectivity via datasource I found that there is very little information in WAS documentation explaining couple of things.

The creation of datasource is very similar to other DBs but, the docs really don't say anything about the URL convenience. Sure, there is a sample but without any additional explanation.

  • jdbc:oracle:thin:@host:port:SID

Maybe for Oracle specialist it is clear but it wasn't for me ;-). Firs of all - what does 'thin' mean? Well, it means that we use the standard JDBC type 4 driver (which by default translate JDBC calls into DB calls). We can type also use 'thick', which would mean that we want to use older type (1 or 2) of ODBC drivers.

While configuring the datasource for Oracle on WAS you have to remember also that you have to supply user information (name of user in Oracle is related with database schema). If you won't supply the 'JAAS - J2C authentication data', WAS will report a confusing error about incorrect Oracle destination address. It is because you lack a valid user account.

The last thing about the Oracle configuration is the server. You will have to set a special variable for this:
, which points to a directory with a driver jar. There are couple of versions available: ojdbc14.jar, ojdbc5.jar and ojdbc6.jar (build with Java version 1.4, 5 and 6).

Hope that helped someone :-).

Wednesday, November 17, 2010

How to find out what is consumig most of resources under UNIX

Today just a couple of handy UNIX commands, which I often use under AIX/Linux OS.

To list the 20 biggest files in the /opt file system:

find /opt -xdev -ls | sort +6 -nr | head -20

To list top 10 processes which consume most of CPU

ps aux | head -1; ps aux | sort -rn +2 | head -10

Additionally you can use top on Linux or topas or nmon on AIX.

To list top 10 processes which consume most memory

ps aux | head -1; ps aux | sort -rn +3 | head

And finally to find out java application processes (i.e. application servers)

ps -ef | grep java