Bug 35476 - Null pointer exception in org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage
Summary: Null pointer exception in org.eclipse.jdt.internal.compiler.lookup.Scope.getT...
Status: RESOLVED DUPLICATE of bug 35731
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: 2.1 RC4   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-21 10:55 EST by Leonard Theivendra CLA
Modified: 2003-03-27 07:07 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leonard Theivendra CLA 2003-03-21 10:55:57 EST
When deploying EJB and the builder is invoked on the generated code, the 
compiler throws a NPE (trace is below).  Please contact Leonard Theivendra at 
theivend@ca.ibm.com for a testcase.

The eclipse driver used in this build of IBM Websphere Studio is based on the 
Eclipse RC1 build.  I realize this will be hard for you to reproduce given that 
you don't have our plugins, runtimes, etc.  Hopefully the following stack trace 
helps, if it does not, please contact me and I will attempt to put together a 
simple .java source file that reproduced this compiler NPE.

Trace from our tool:

java.lang.NullPointerException
	at java.lang.String.<init>(String.java(Compiled Code))
	at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage
(Scope.java(Compiled Code))
	at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage
(Scope.java(Compiled Code))
	at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage
(Scope.java(Compiled Code))
	at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage
(Scope.java(Compiled Code))
	at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage
(Scope.java(Compiled Code))
	at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage
(Scope.java(Compiled Code))
	at org.eclipse.jdt.internal.compiler.lookup.Scope.getType
(Scope.java:973)
	at 
org.eclipse.jdt.internal.compiler.ast.SingleTypeReference.getTypeBinding
(SingleTypeReference.java:39)
	at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType
(TypeReference.java:97)
	at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resolve
(LocalDeclaration.java:149)
	at 
org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatement
s(AbstractMethodDeclaration.java:324)
	at 
org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements
(MethodDeclaration.java:127)
	at 
org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve
(AbstractMethodDeclaration.java:313)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve
(TypeDeclaration.java:789)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve
(TypeDeclaration.java:830)
	at 
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve
(CompilationUnitDeclaration.java:251)
	at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:538)
	at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:338)
	at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile
(AbstractImageBuilder.java:195)
	at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile
(AbstractImageBuilder.java:145)
	at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build
(BatchImageBuilder.java:51)
	at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll
(JavaBuilder.java:194)
	at org.eclipse.jdt.internal.core.builder.JavaBuilder.build
(JavaBuilder.java:122)
	at org.eclipse.core.internal.events.BuildManager$2.run
(BuildManager.java:424)
	at org.eclipse.core.internal.runtime.InternalPlatform.run
(InternalPlatform.java:867)
	at org.eclipse.core.runtime.Platform.run(Platform.java:413)
	at org.eclipse.core.internal.events.BuildManager.basicBuild
(BuildManager.java:125)
	at org.eclipse.core.internal.events.BuildManager.basicBuild
(BuildManager.java:181)
	at org.eclipse.core.internal.events.BuildManager.basicBuild
(BuildManager.java:191)
	at org.eclipse.core.internal.events.BuildManager$1.run
(BuildManager.java:151)
	at org.eclipse.core.internal.runtime.InternalPlatform.run
(InternalPlatform.java:867)
	at org.eclipse.core.runtime.Platform.run(Platform.java:413)
	at org.eclipse.core.internal.events.BuildManager.basicBuild
(BuildManager.java:165)
	at org.eclipse.core.internal.events.BuildManager.build
(BuildManager.java:265)
	at org.eclipse.core.internal.resources.Project.build(Project.java:85)
	at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.buildProject
(BatchExtension.java:561)
	at 
com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.internalJarProcess
(BatchExtension.java:525)
	at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.runJarDeploy
(BatchExtension.java:429)
	at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.access$1
(BatchExtension.java:394)
	at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension$RunDeploy.run
(BatchExtension.java:245)
	at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1588)
	at 
com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension$RunDeploy.execute
(BatchExtension.java:227)
	at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.run
(BatchExtension.java:190)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.ibm.etools.ejbdeploy.batch.impl.BootLoaderLoader.run
(BootLoaderLoader.java:255)
	at com.ibm.etools.ejbdeploy.batch.impl.BatchDeploy.execute
(BatchDeploy.java:133)
	at com.ibm.etools.ejbdeploy.EJBDeploy.execute(EJBDeploy.java:82)
	at com.ibm.etools.ejbdeploy.EJBDeploy.main(EJBDeploy.java:309)
	at com.ibm.etools.ejbdeploy.batch.impl.Test.run(Test.java:63)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:845)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:431)
	at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:24)
  (Found: 1 error, 2 warnings) Compiling 239586.jar/ejbModule/stinh/ejb11
  (Found: 1 error, 2 warnings) Build done
  Invoking Validation on /239586.jar.
  Invoking Library Copying Builder on /239586.jar.
  Updating.
[*Error] An unexpected exception was thrown.  Halting execution.
Shutting down workbench.

An error occurred while compiling the .java code. Correct the code, and try 
again.
>com.ibm.etools.ejbdeploy.EJBDeploymentException (An error occurred while 
compiling the .java code. Correct the code, and try again.)
<0>java.lang.NullPointerException encountered while running 
org.eclipse.jdt.internal.core.builder.JavaBuilder.
org.eclipse.core.internal.resources.ResourceException: Errors during build.
	at org.eclipse.core.internal.events.BuildManager.build
(BuildManager.java:267)
	at org.eclipse.core.internal.resources.Project.build(Project.java:85)
	at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.buildProject
(BatchExtension.java:561)
	at 
com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.internalJarProcess
(BatchExtension.java:525)
	at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.runJarDeploy
(BatchExtension.java:429)
	at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.access$1
(BatchExtension.java:394)
	at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension$RunDeploy.run
(BatchExtension.java:245)
	at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1588)
	at 
com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension$RunDeploy.execute
(BatchExtension.java:227)
	at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.run
(BatchExtension.java:190)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.ibm.etools.ejbdeploy.batch.impl.BootLoaderLoader.run
(BootLoaderLoader.java:255)
	at com.ibm.etools.ejbdeploy.batch.impl.BatchDeploy.execute
(BatchDeploy.java:133)
	at com.ibm.etools.ejbdeploy.EJBDeploy.execute(EJBDeploy.java:82)
	at com.ibm.etools.ejbdeploy.EJBDeploy.main(EJBDeploy.java:309)
	at com.ibm.etools.ejbdeploy.batch.impl.Test.run(Test.java:63)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:845)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:431)
	at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:24)
EJBDeploy level: 20030319_2000-WB210-AD-V51D-W2
Comment 1 Philipe Mulet CLA 2003-03-21 11:13:10 EST
Leonard - a testcase would be much appreciated.
I don't think we would have directly addressed a NPE since then in this area.
Comment 2 Olivier Thomann CLA 2003-03-21 11:19:45 EST
Which VM are you using?
IBM JDK1.3.1 SR2?
Comment 3 Leonard Theivendra CLA 2003-03-21 12:27:45 EST
- Using IBM JRE 1.3.1 SR2
- This problem does not occur when JIT is disabled
Comment 4 Philipe Mulet CLA 2003-03-21 12:33:07 EST
Thanks, closing then as JIT bug.
Comment 5 Philipe Mulet CLA 2003-03-27 07:06:33 EST
Reopen to workaround
Comment 6 Philipe Mulet CLA 2003-03-27 07:07:07 EST

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