Jump to content
We've recently updated our Privacy Statement, available here ×

I can't start iReport 0.2.3 or 0.2.3.1


2004 IR Help
Go to solution Solved by djohnson53,

Recommended Posts

By: Francisco Jose Chaves - fchaves
I can't start iReport 0.2.3 or 0.2.3.1
2004-03-14 15:28
When I try to run iReport I get the following null pointer exceprion:

(java) Exception in thread "main" java.lang.NullPointerException	(java) at it.businesslogic.ireport.gui.JMDIDesktopPane.addPropertyChangeListener(JMDIDesktopPane.java:90)	(java) at javax.swing.plaf.basic.BasicDesktopPaneUI.installListeners(BasicDesktopPaneUI.java:134)	(java) at javax.swing.plaf.basic.BasicDesktopPaneUI.installUI(BasicDesktopPaneUI.java:101)	(java) at javax.swing.JComponent.setUI(JComponent.java:624)	(java) at javax.swing.JDesktopPane.setUI(JDesktopPane.java:139)	(java) at javax.swing.JDesktopPane.updateUI(JDesktopPane.java:208)	(java) at javax.swing.JDesktopPane.(JDesktopPane.java:114)	(java) at it.businesslogic.ireport.gui.JMDIDesktopPane.(JMDIDesktopPane.java:59)	(java) at it.businesslogic.ireport.gui.MainFrame.initComponents(MainFrame.java:682)	(java) at it.businesslogic.ireport.gui.MainFrame.(MainFrame.java:133)	(java) at it.businesslogic.ireport.gui.MainFrame.main(MainFrame.java:4533)

I rebuild iReport and the exception persist

Thanks

Francisco Chaves

My configuration is
Mandrake Linux 9.1
java 1.4.2-b28 (alternatively I used java 1.5b )
ant 1.6.1

By: Michael Shane Funk - javaseeds
RE: I can't start iReport 0.2.3 or 0.2.3.1
2004-03-17 19:21
I get the same error under both of these environments:

Windows 2000 - JDK1.5.0b - ant 1.6.1
Mac OS X 10.2.8 - JDK1.4.1 - ant 1.6.1

By: Giulio Toffoli - gt78
RE: I can't start iReport 0.2.3 or 0.2.3.1
2004-03-18 14:26

Try to catch the exception adding a try and catch.
The problem could be only in interface handling (alias a minor bug).

Giulio

By: Kees Kuip - keeskuip
RE: I can't start iReport 0.2.3 or 0.2.3.1
2004-03-20 00:53

Don't know exactly what you mean Giulio but
if you look closely at the stacktrace you can
see the problem.

JMDIDesktopPane is being constructed (see line 9).De constructor of JMDIDesktopPane is :public JMDIDesktopPanel() {    super();    propertySupport = new PropertySupport(this);}

So the JVM is executing the super() and you see
that propertySupport is thus not initialized then.
But in super() the method addPropertyChangeListener()
(see line 2) is called. This method is overridden in JMDIDesktopPane
and uses the not yet initialised 'propertySupport'.
This is a case of a dangerous way to override methods.

Kees.

StackTrace with lines :

	 1 (java) Exception in thread "main" java.lang.NullPointerException	 2 (java) at it.businesslogic.ireport.gui.JMDIDesktopPane.addPropertyChangeListener(JMDIDesktopPane.java:90)	 3 (java) at javax.swing.plaf.basic.BasicDesktopPaneUI.installListeners(BasicDesktopPaneUI.java:134)	 4 (java) at javax.swing.plaf.basic.BasicDesktopPaneUI.installUI(BasicDesktopPaneUI.java:101)	 5 (java) at javax.swing.JComponent.setUI(JComponent.java:624)	 6 (java) at javax.swing.JDesktopPane.setUI(JDesktopPane.java:139)	 7 (java) at javax.swing.JDesktopPane.updateUI(JDesktopPane.java:208)	 8 (java) at javax.swing.JDesktopPane.(JDesktopPane.java:114)	 9 (java) at it.businesslogic.ireport.gui.JMDIDesktopPane.(JMDIDesktopPane.java:59)	10 (java) at it.businesslogic.ireport.gui.MainFrame.initComponents(MainFrame.java:682)	11 (java) at it.businesslogic.ireport.gui.MainFrame.(MainFrame.java:133)	12 (java) at it.businesslogic.ireport.gui.MainFrame.main(MainFrame.java:4533)

By: Giulio Toffoli - gt78
RE: I can't start iReport 0.2.3 or 0.2.3.1
2004-03-20 13:50

Great kees.

Giulio

Link to comment
Share on other sites

  • 6 years later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Solution

By: Francisco Jose Chaves - fchaves
RE: I can't start iReport 0.2.3 or 0.2.3.1
2004-03-22 16:49
Thanks Kees, whith your hint, I solve the problem changing the method addPropertyChangeListener by this:

public void addPropertyChangeListener(PropertyChangeListener listener) {    if ( propertySupport == null)    {        propertySupport = new PropertyChangeSupport( this );    }    propertySupport.addPropertyChangeListener(listener);}

Now, the program it's working.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...