Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » CompareUIPlugin throws a NullPointerException
CompareUIPlugin throws a NullPointerException [message #695832] Tue, 12 July 2011 16:01 Go to next message
dali  is currently offline dali
Messages: 2
Registered: July 2011
Junior Member
Hi,

i tried to test the Compare API according to this guide "FAQ_How_do_I_create_a_compare_editor" in the eclipse wiki but it was unsuccessful. The CompareUIPlugin throws everytime a NullPointerException at
new CompareConfiguration()
.

Hier the complete error stack:
Exception in thread "main" java.lang.ExceptionInInitializerError
	at org.eclipse.compare.CompareEditorInput.<clinit>(CompareEditorInput.java:161)
	at MainClass.main(MainClass.java:10)
Caused by: java.lang.NullPointerException
	at org.eclipse.compare.internal.CompareUIPlugin.getPluginId(CompareUIPlugin.java:309)
	at org.eclipse.compare.internal.ICompareUIConstants.<clinit>(ICompareUIConstants.java:15)
	... 2 more


I use Eclipse 3.5.1 and the Compare Plugin "org.eclipse.compare_3.5.0.I20090514-0808.jar".

Any idea why?

Thanks
Re: CompareUIPlugin throws a NullPointerException [message #696047 is a reply to message #695832] Wed, 13 July 2011 07:18 Go to previous messageGo to next message
Dani Megert is currently offline Dani Megert
Messages: 3801
Registered: July 2009
Senior Member
On 12.07.2011 18:01, dali wrote:
> Hi,
>
> i tried to test the Compare API according to this guide
> "FAQ_How_do_I_create_a_compare_editor" in the eclipse wiki but it was
> unsuccessful. The CompareUIPlugin throws everytime a
> NullPointerException at new CompareConfiguration().

It looks like you try to start your code as normal Java application
instead of using an 'Eclipse Application' launch configuration.

Dani
>
> Hier the complete error stack:
>
> Exception in thread "main" java.lang.ExceptionInInitializerError
> at
> org.eclipse.compare.CompareEditorInput.<clinit>(CompareEditorInput.java:161)
> at MainClass.main(MainClass.java:10)
> Caused by: java.lang.NullPointerException
> at
> org.eclipse.compare.internal.CompareUIPlugin.getPluginId(CompareUIPlugin.java:309)
> at
> org.eclipse.compare.internal.ICompareUIConstants.<clinit>(ICompareUIConstants.java:15)
> ... 2 more
>
>
> I use Eclipse 3.5.1 and the Compare Plugin
> "org.eclipse.compare_3.5.0.I20090514-0808.jar".
>
> Any idea why?
>
> Thanks
>
Re: CompareUIPlugin throws a NullPointerException [message #696054 is a reply to message #696047] Wed, 13 July 2011 07:46 Go to previous messageGo to next message
dali  is currently offline dali
Messages: 2
Registered: July 2011
Junior Member
Hi Dani,

i integrated the code snippet in Eclipse RCP-based application and it has a debug and run "Eclipse Application" launch configuration. The problem occurs when i start the code with the eclipse configuration! So i dont think thats play a role.




[Updated on: Wed, 13 July 2011 07:46]

Report message to a moderator

Re: CompareUIPlugin throws a NullPointerException [message #696299 is a reply to message #696054] Wed, 13 July 2011 16:30 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26089
Registered: July 2009
Senior Member
The stack doesn't seem to indicate that you're running as an Eclipse
application. It seems to indicate you're running main directly. You'll
want to check into that more carefully.

On 13/07/2011 12:46 AM, dali wrote:
> Hi Dani,
>
> i integrated the code snippet in Eclipse RCP-based application and it
> has a debug and run "Eclipse Application" launch configuration. The
> problem occurs when i start the code with the eclipse configuration!
> So i dont think thats play a role.
>
>
>
>
>
Previous Topic:Custom javadoc
Next Topic:My Java project disappeared!
Goto Forum:
  


Current Time: Thu Oct 02 16:49:19 GMT 2014

Powered by FUDForum. Page generated in 0.01781 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software