I have installed an ireport on my RHEL server. When I try to start the ireport it gives an error as
Exception in thread "main" java.lang.NullPointerException
But I am able to use netbeans for development so I came to a conclusion that there cannot be a problem with java, and I assume that it cannot be a bug of ireports, because I have a server with identical configuration which ireports works perfectly.
I checked the /usr/bin java link
[root@krisha ~]# cd /usr/bin/
[root@ krisha bin]# ls -l java
lrwxrwxrwx 1 root root 26 2008-07-02 14:56 java -> /etc/alternatives/java
[root@shaamil bin]#
Oh... That's the problem. My java installation is located on /usr/java/jdk6, but the link (/usr/bin) is pointed to some other place.
I corrected and pointed as follows.
[root@krisha ~]# cd /usr/bin/
[root@ krisha bin]# mv java java.back
[root@shaamil bin]# ln -s /usr/java/jdk6/bin/java /usr/bin/java
PROBLEM SOLVED…
Special Thanks to shaamil who edit this article ;)