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

Bug 328659

Summary: Help!
Product: [WebTools] WTP Java EE Tools Reporter: SoftDed <softded>
Component: jst.j2eeAssignee: jst.j2ee <jst.j2ee-inbox>
Status: RESOLVED NOT_ECLIPSE QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 CC: ccc, kaloyan, remy.suen
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description SoftDed CLA 2010-10-25 16:56:30 EDT
What steps will reproduce the problem?
1. 
2. 
3. 


-- Error Details --
Date: Tue Oct 26 00:51:48 MSD 2010
Message: Problems occurred when invoking code from plug-in: "org.eclipse.jdt.core".
Severity: Error
Product: Eclipse 1.2.2.20100122-1337 (org.eclipse.epp.package.jee.product)
Plugin: org.eclipse.jdt.core
Session Data:
eclipse.buildId=
java.version=1.6.0_22
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=ru_RU
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product


Exception Stack Trace:
java.lang.NullPointerException
	at com.sun.enterprise.jst.server.sunappsrv.v3.Web30AnnotationReader.addUrlPatternsAsRunAs(Web30AnnotationReader.java:209)
	at com.sun.enterprise.jst.server.sunappsrv.v3.Web30AnnotationReader.analyzeCompilationUnit(Web30AnnotationReader.java:160)
	at com.sun.enterprise.jst.server.sunappsrv.v3.Web30AnnotationReader.processAddedCompilationUnit(Web30AnnotationReader.java:339)
	at com.sun.enterprise.jst.server.sunappsrv.v3.Web30AnnotationReader.processChangedCompilationUnit(Web30AnnotationReader.java:352)
	at org.eclipse.jst.jee.model.internal.common.AbstractAnnotationModelProvider.recursevilyProcessCompilationUnits(AbstractAnnotationModelProvider.java:535)
	at org.eclipse.jst.jee.model.internal.common.AbstractAnnotationModelProvider.internalPostReconcile(AbstractAnnotationModelProvider.java:448)
	at org.eclipse.jst.jee.model.internal.common.AbstractAnnotationModelProvider.elementChanged(AbstractAnnotationModelProvider.java:428)
	at org.eclipse.jdt.internal.core.DeltaProcessor$3.run(DeltaProcessor.java:1557)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.jdt.internal.core.DeltaProcessor.notifyListeners(DeltaProcessor.java:1547)
	at org.eclipse.jdt.internal.core.DeltaProcessor.fireReconcileDelta(DeltaProcessor.java:1399)
	at org.eclipse.jdt.internal.core.DeltaProcessor.fire(DeltaProcessor.java:1358)
	at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:769)
	at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:788)
	at org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:1244)
	at org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:1205)
	at com.google.gwt.eclipse.core.editors.java.JsniMethodBodyCompletionProposalComputer.computeCompletionProposals(JsniMethodBodyCompletionProposalComputer.java:238)
	at org.eclipse.jdt.internal.ui.text.java.CompletionProposalComputerDescriptor.computeCompletionProposals(CompletionProposalComputerDescriptor.java:316)
	at org.eclipse.jdt.internal.ui.text.java.CompletionProposalCategory.computeCompletionProposals(CompletionProposalCategory.java:264)
	at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.collectProposals(ContentAssistProcessor.java:286)
	at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.computeCompletionProposals(ContentAssistProcessor.java:246)
	at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1832)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:556)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeFilteredProposals(CompletionProposalPopup.java:1432)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$4(CompletionProposalPopup.java:1421)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run(CompletionProposalPopup.java:372)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3885)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3506)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
	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:368)
	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:559)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Comment 1 Remy Suen CLA 2010-10-29 17:02:32 EDT
(In reply to comment #0)
> What steps will reproduce the problem?
> 1. 
> 2. 
> 3. 

There is not a lot to go on here about this problem you are seeing. You may also want to check with the GWT folks as you appear to be using GWT.
Comment 2 Walter Harley CLA 2010-11-12 12:02:01 EST
The NPE is coming from com.sun.enterprise.jst.server.sunappsrv.v3.Web30AnnotationReader.addUrlPatternsAsRunAs().  Without knowing that code it is impossible to determine what might be going wrong.

You've assigned this to the APT component, but this has nothing to do with Eclipse JDT annotation processing, and actually nothing to do with JDT as far as I can tell except that it is happening within a compilation.  From the call stack it appears that org.eclipse.jst.jee.model.internal.common.AbstractAnnotationModelProvider (which is part of the WTP project) has registered a change listener, that is getting triggered because somebody edited some code.  That change listener is in turn calling the Web30AnnotationReader, which is then getting the NPE.  It is possible the NPE is coming from a call to JDT, but I doubt it since it is not likely that there would be any Sun code calling Eclipse methods.

I'm going to move this to WTP.  But Remy is right, you will probably have to say a bit more about how to reproduce the problem.
Comment 3 Carl Anderson CLA 2010-11-12 14:10:30 EST
From what I can see, this comes from the class:

com.sun.enterprise.jst.server.sunappsrv.v3.Web30AnnotationReader

That class is not within Eclipse.  (Perhaps the Glassfish server adapter?)  You will need to work with whoever provides that class to resolve this NPE.