Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312609 - NullPointerException in Views.collectViews() when opening a workflow model
Summary: NullPointerException in Views.collectViews() when opening a workflow model
Status: RESOLVED FIXED
Alias: None
Product: JWT
Classification: SOA
Component: WE (show other bugs)
Version: 0.7.0   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-12 09:12 EDT by Marc Dutoo CLA
Modified: 2010-06-30 07:25 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Dutoo CLA 2010-05-12 09:12:01 EDT
So can't work with JWT at all right now ;_;

Happened when running all JWT plugins from within Eclipse using CVS HEAD.


full stack :

12 mai 2010 14:13:45 org.eclipse.jwt.we.misc.views.Views collectViews
ATTENTION: error loading external views
java.lang.NullPointerException
	at org.eclipse.jwt.we.misc.views.Views.collectViews(Views.java:290)
	at org.eclipse.jwt.we.misc.views.Views.<init>(Views.java:125)
	at org.eclipse.jwt.we.misc.views.Views.getInstance(Views.java:183)
	at org.eclipse.jwt.we.Plugin.getFactoryRegistry(Plugin.java:169)
	at org.eclipse.jwt.we.editors.actions.internalActions.DirectEditAction.<init>(DirectEditAction.java:73)
	at org.eclipse.jwt.we.editors.WEEditor.createActions(WEEditor.java:1465)
	at org.eclipse.jwt.we.editors.WEEditor.initializeActionRegistry(WEEditor.java:1538)
	at org.eclipse.jwt.we.editors.WEEditor.init(WEEditor.java:1524)
	at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:798)


It is caused by the internalName of the "vD" view org.eclipse.jwt/we/jwt-we-plugins/jwt-we-view-example/src/org/eclipse/jwt/we/plugins/viewexample/ExampleView2/NoData.view
 being null in Views.java line 355 :
if(vD.getInternalName().equals(viewDesc.getInternalName()))

=> Is it OK if a views's internalName is null ??
If it's not, then why not change the view metamodel to give it a default value and forbid to set it to null (unset) ?
If it is, then is internalName the right attribute to test the equality of two views on ? If yes, then everywhere in Views.java, it should be first checked that it is not null, and possibly log it as WARN.
Comment 1 Marc Dutoo CLA 2010-05-12 09:19:41 EDT
OK, seems it was because I was using the old view examples (below jwt) rather than org.eclipse.jwt/examples/jwt-we-example-extensions .

I put this bug in "minor" mode for now, we'll close it once the CVS and its wiki doc have been fully cleaned.
Comment 2 Christian Saad CLA 2010-06-30 07:25:22 EDT
cvs should be cleaned