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

Bug 351811

Summary: [exceptions] java.lang.NullPointerException on InferredType#resolveType()
Product: [WebTools] JSDT Reporter: Pablo <paregs>
Component: GeneralAssignee: Project Inbox <jsdt.javascript-inbox>
Status: RESOLVED WORKSFORME QA Contact: Chris Jaun <cmjaun>
Severity: minor    
Priority: P3 CC: cmjaun
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Pablo CLA 2011-07-12 06:32:16 EDT
Build Identifier: 20100617-1415

I can't find where it fails. I am working at this about 3 days.
I get this calendar for my web from dhtmgoodies and this have a nullpointexception that i can't find. I don't know where i need to go to request for help. It isn't a bug of Eclipse, it's a problem of the code i think.
Please give a watch on it, i don't want to disable the JSValidator.
A lot of thanks for all.

Reproducible: Always

Steps to Reproduce:
Simply, put that js in a dynamic web project and when building... BOOM!
http://www.dhtmlgoodies.com/scripts/js_calendar/dhtmlgoodies_calendar.zip?version=20080418

Thank you another time more.
Comment 1 Nitin Dahyabhai CLA 2011-07-12 16:26:51 EDT
You seem to be using Helios.  Please retry it with Indigo.
Comment 2 Chris Jaun CLA 2011-07-13 16:35:46 EDT
I can reproduce the following error in 3.2.5. Is this what you were seeing, Pablo?

!ENTRY org.eclipse.wst.jsdt.ui 4 0 2011-07-13 16:34:56.578
!MESSAGE Error in JSDT Core during AST creation
!STACK 0
java.lang.NullPointerException
	at org.eclipse.wst.jsdt.core.infer.InferredType.resolveType(InferredType.java:309)
	at org.eclipse.wst.jsdt.internal.compiler.ast.LocalDeclaration.resolveVarType(LocalDeclaration.java:128)
	at org.eclipse.wst.jsdt.internal.compiler.lookup.CompilationUnitScope$DeclarationVisitor.visit(CompilationUnitScope.java:83)
	at org.eclipse.wst.jsdt.internal.compiler.ast.LocalDeclaration.traverse(LocalDeclaration.java:305)
	at org.eclipse.wst.jsdt.internal.compiler.ast.SwitchStatement.traverse(SwitchStatement.java:210)
	at org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:584)
	at org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:545)
	at org.eclipse.wst.jsdt.internal.compiler.lookup.CompilationUnitScope.buildTypeBindings(CompilationUnitScope.java:392)
	at org.eclipse.wst.jsdt.internal.compiler.lookup.LookupEnvironment.buildTypeBindings(LookupEnvironment.java:320)
	at org.eclipse.wst.jsdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:572)
Comment 3 Pablo CLA 2011-07-15 06:42:22 EDT
Yep, i have that.

I just now try it with Indigo and I get the same Exception.

I dont know how to do for no disble JSValidator.

Anyone see something wrong?
Thanks for ur time.
Comment 4 Pablo CLA 2011-07-20 03:03:28 EDT
I think i solved it.

I get out the switch/case sentences and it will work properly.

I dont know why but it is not getting the exception.

Thank you for all.
Comment 5 Chris Jaun CLA 2013-08-01 13:40:48 EDT
Working in WTP 3.5.1. Checked against 7/18 build.