Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 358430

Summary: WPE Properties is throwing NullPointer Exception in Eclipse Indigo Version
Product: [WebTools] Java Server Faces Reporter: bunta Choudhary <abhishek.choudhary>
Component: UIAssignee: Ian Trimble <ian.trimble>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: achima123, cimfalab, legume1, raghunathan.srinivasan, thatnitind
Version: unspecified   
Target Milestone: 3.4.0 M6   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Eclipse Indigo NullpointerException screenshot none

Description bunta Choudhary CLA 2011-09-21 10:38:18 EDT
Build Identifier: 20110609-2236

1.Create a Dynamic Project
2. Create an HTML File.
3. Open thw HTML File witH Wep Page Editor.
4. Drag and Drop any HTML 4.0 Component over the Design/Editor.
5. Right click on the components and show>Properties
5. Go to Properties View and select Attributes tab

"It will throw Null Pointer Exception "
!ENTRY org.eclipse.ui.views.properties.tabbed 4 2 2011-09-21 19:59:46.092
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.views.properties.tabbed".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.jst.pagedesigner.properties.AttributePropertySource.getAttrPropertyDescriptor(AttributePropertySource.java:244)
	at org.eclipse.jst.pagedesigner.properties.AttributePropertySource.getPropertyDescriptors(AttributePropertySource.java:208)
	at org.eclipse.ui.views.properties.PropertySheetEntry.computeMergedPropertyDescriptors(PropertySheetEntry.java:167)
	at org.eclipse.ui.views.properties.PropertySheetEntry.refreshChildEntries(PropertySheetEntry.java:530)
	at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:760)
	at org.eclipse.ui.views.properties.PropertySheetViewer.setInput(PropertySheetViewer.java:973)
	at org.eclipse.ui.views.properties.PropertySheetPage.selectionChanged(PropertySheetPage.java:510)
	at org.eclipse.jst.pagedesigner.properties.AllPropertySection.setInput(AllPropertySection.java:101)
	at org.eclipse.ui.views.properties.tabbed.TabContents$5.run(TabContents.java:181)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.ui.views.properties.tabbed.TabContents.setInput(TabContents.java:184)
	at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage$SelectionChangedListener.selectionChanged(TabbedPropertySheetPage.java:212)
	at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:164)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:162)
	at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2188)
	at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1211)
	at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1241)
	at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:239)
	at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:233)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:403)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
	at org.eclipse.ui.internal.views.properties.tabbed.view.TabbedPropertyList.select(TabbedPropertyList.java:664)
	at org.eclipse.ui.internal.views.properties.tabbed.view.TabbedPropertyList$2.mouseUp(TabbedPropertyList.java:156)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:219)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

!ENTRY org.eclipse.ui.views.properties.tabbed 4 2 2011-09-21 19:59:46.140
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.views.properties.tabbed".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.jst.pagedesigner.properties.AttributePropertySource.getAttrPropertyDescriptor(AttributePropertySource.java:244)
	at org.eclipse.jst.pagedesigner.properties.AttributePropertySource.getPropertyDescriptors(AttributePropertySource.java:208)
	at org.eclipse.ui.views.properties.PropertySheetEntry.computeMergedPropertyDescriptors(PropertySheetEntry.java:167)
	at org.eclipse.ui.views.properties.PropertySheetEntry.refreshChildEntries(PropertySheetEntry.java:530)
	at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:760)
	at org.eclipse.ui.views.properties.PropertySheetViewer.setInput(PropertySheetViewer.java:973)
	at org.eclipse.ui.views.properties.PropertySheetPage.refresh(PropertySheetPage.java:491)
	at org.eclipse.jst.pagedesigner.properties.AllPropertySection.refresh(AllPropertySection.java:128)
	at org.eclipse.ui.views.properties.tabbed.TabContents$6.run(TabContents.java:217)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.ui.views.properties.tabbed.TabContents.refresh(TabContents.java:220)
	at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage$SelectionChangedListener.selectionChanged(TabbedPropertySheetPage.java:222)
	at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:164)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:162)
	at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2188)
	at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1211)
	at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1241)
	at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:239)
	at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:233)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:403)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
	at org.eclipse.ui.internal.views.properties.tabbed.view.TabbedPropertyList.select(TabbedPropertyList.java:664)
	at org.eclipse.ui.internal.views.properties.tabbed.view.TabbedPropertyList$2.mouseUp(TabbedPropertyList.java:156)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:219)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)


Reproducible: Always

Steps to Reproduce:
1.Create a Dynamic Project
2. Create an HTML File.
3. Open thw HTML File witH Wep Page Editor.
4. Drag and Drop any HTML 4.0 Component over the Design/Editor.
5. Right click on the components and show>Properties
5. Go to Properties View and select Attributes tab
Comment 1 bunta Choudhary CLA 2011-09-21 10:40:54 EDT
Created attachment 203779 [details]
Eclipse Indigo NullpointerException screenshot
Comment 2 pieceoflena CLA 2011-11-12 02:21:13 EST
I have the same problem, too.

But I'm using Static Web Project.
In case of Dynamic Web Project, I think the error is occurred due to JSF Facet.
If you create Dynamic Web Project, select "Configuration" to "JavaServer Faces v2.0 Project" in Project Wizard.
It will work with no error.

But I could use Attributes in Eclipse 3.6 although I had Static Web Project.

In 3.6 AttributePropertySource code:
 private IPropertyDescriptor getAttrPropertyDescriptor(String attrName){
  Entity attrEntity = TaglibDomainMetaDataQueryHelper.getEntity(_tagEntity, attrName);

In 3.7 AttributePropertySource code:
 private IPropertyDescriptor getAttrPropertyDescriptor(String attrName){
  Entity attrEntity = _query.getEntity(_tagEntity, attrName);

But _query in not instantiated in getTagEntity() because ITaglibContextResolver is null (lack of JSF Facet). That result is NullPointerException.

So I think it needs to be rollbacked because many users will want to use Web Page Editor in Static Web Project also.
Comment 3 Harry Hyeongseok Heo CLA 2011-11-14 22:47:39 EST
(In reply to comment #2)
> I have the same problem, too.
> 
> But I'm using Static Web Project.
> In case of Dynamic Web Project, I think the error is occurred due to JSF Facet.
> If you create Dynamic Web Project, select "Configuration" to "JavaServer Faces
> v2.0 Project" in Project Wizard.
> It will work with no error.
> 
> But I could use Attributes in Eclipse 3.6 although I had Static Web Project.
> 
> In 3.6 AttributePropertySource code:
>  private IPropertyDescriptor getAttrPropertyDescriptor(String attrName){
>   Entity attrEntity = TaglibDomainMetaDataQueryHelper.getEntity(_tagEntity,
> attrName);
> 
> In 3.7 AttributePropertySource code:
>  private IPropertyDescriptor getAttrPropertyDescriptor(String attrName){
>   Entity attrEntity = _query.getEntity(_tagEntity, attrName);
> 
> But _query in not instantiated in getTagEntity() because ITaglibContextResolver
> is null (lack of JSF Facet). That result is NullPointerException.
> 
> So I think it needs to be rollbacked because many users will want to use Web
> Page Editor in Static Web Project also.

I agree with you!!!
Comment 4 Ian Trimble CLA 2011-11-17 19:02:36 EST
From Raghu:
"Please review, if valid, we have to fix this in Indigo SR2 also."
Comment 5 Ian Trimble CLA 2012-01-06 19:51:24 EST

*** This bug has been marked as a duplicate of bug 364667 ***