iReport java.lang.NullPointerException
I was facing some problem to start iReport in my Debiansalahuddin@crab:~/iReport-2.0.3$ ./iReport.sh
Exception in thread "main" java.lang.NullPointerException
at java.util.Hashtable.put(libgcj.so.70)
at javax.swing.plaf.basic.BasicToolBarUI.setBorderToRollover(libgcj.so.70)
at javax.swing.plaf.basic.BasicToolBarUI$ToolBarContListener.componentAdded(libgcj.so.70)
at java.awt.Container.addImpl(libgcj.so.70)
at javax.swing.JToolBar.addImpl(libgcj.so.70)
at java.awt.Container.add(libgcj.so.70)
at it.businesslogic.ireport.gui.ToolbarFormatPanel.initComponents(ToolbarFormatPanel.java:170)
at it.businesslogic.ireport.gui.ToolbarFormatPanel.
at it.businesslogic.ireport.gui.MainFrame.
at it.businesslogic.ireport.gui.MainFrame.main(MainFrame.java:8020)
salahuddin@crab:~/iReport-2.0.3$
Here is my .bashrc
export CVSROOT=:ext:salahuddin@paq:/home/cvs
export CVS_RSH=/usr/bin/ssh
export ANT_OPTS=-Xmx512m
export ANT_HOME=/usr/ant
export JAVA_HOME=/usr/jdk1.5.0_03
export CLASS_PATH=$JAVA_HOME/lib/:$JAVA_HOME/jre/lib
export CLASSPATH=$JAVA_HOME/lib/:$JAVA_HOME/jre/lib
export PATH=$PATH:$ANT_HOME/bin:$JAVA_HOME/bin
export CATALINA_HOME=/usr/tomcat
export CVSEDITOR=vim
Note: My /usr/java is soft linked with /usr/jdk1.5.0_03
Main problem /usr/bin/java was linked with /etc/alternatives/java
salahuddin@crab:/usr/bin$ ls -l java*
lrwxrwxrwx 1 root root 22 2008-04-30 22:29 java -> /etc/alternatives/java
lrwxrwxrwx 1 root root 23 2008-06-26 15:52 javac -> /etc/alternatives/javac
lrwxrwxrwx 1 root root 25 2008-07-01 15:58 javadoc -> /etc/alternatives/javadoc
lrwxrwxrwx 1 root root 23 2008-06-26 15:52 javah -> /etc/alternatives/javah
The main problem was it was using java from the gij package/
#cd /usr/bin/
#mv java java2
#mv javac javac2
#mv javah javah2
#mv javadoc javadoc2
#ln -s /usr/java/bin/java /usr/bin/java
#ln -s /usr/java/bin/javac /usr/bin/javac
#ln -s /usr/java/bin/javah /usr/bin/javah
#ln -s /usr/java/bin/javadoc /usr/bin/javadoc
It simply solve the problem.
No comments:
Post a Comment