Bug 31380 - NPE setting classpath
Summary: NPE setting classpath
Status: RESOLVED WORKSFORME
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 RC1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-07 17:31 EST by DJ Houghton CLA
Modified: 2003-02-13 08:20 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 DJ Houghton CLA 2003-02-07 17:31:47 EST
build i0206 (1700), win2k, j9sc20030205

I: 
- created Java project aaa
- created Java project bbb
- right-click properties on aaa and changed the Java Build Path to reference 
project bbb
- hit ok
- right-click properties on bbb and changed the Java Build Path to reference 
project aaa
- hit ok

Got a message saying that an error occurred and got the following in my log 
file.

!ENTRY org.eclipse.jdt.ui 4 10001 Feb 07, 2003 17:24:53.959
!MESSAGE Internal Error
!STACK 0
java.lang.reflect.InvocationTargetException: java.lang.NullPointerException
        at java.lang.Throwable.<init>(Throwable.java)
        at java.lang.Throwable.<init>(Throwable.java)
        at java.lang.NullPointerException.<init>(NullPointerException.java:63)
        at org.eclipse.jdt.internal.core.SetClasspathOperation$2.run(SetClasspat
hOperation.java)
        at org.eclipse.jdt.internal.core.JavaModelOperation.runPostActions(JavaM
odelOperation.java)
        at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperati
on.java)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java)
        at org.eclipse.jdt.internal.core.JavaElement.runOperation(JavaElement.ja
va)
        at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject
.java:2078)
        at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject
.java:2042)
        at org.eclipse.jdt.internal.ui.wizards.buildpaths.BuildPathsBlock.intern
alConfigureJavaProject(BuildPathsBlock.java:653)
        at org.eclipse.jdt.internal.ui.wizards.buildpaths.BuildPathsBlock.config
ureJavaProject(BuildPathsBlock.java:588)
        at org.eclipse.jdt.internal.ui.preferences.BuildPathsPropertyPage$1.run(
BuildPathsPropertyPage.java:145)
        at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(Wor
kspaceModifyDelegatingOperation.java:39)
        at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModify
Operation.java:65)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java)
        at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOp
eration.java:79)
        at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalCont
ext.java:296)
        at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246)
        at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDi
alog.java:351)
        at org.eclipse.jdt.internal.ui.preferences.BuildPathsPropertyPage.perfor
mOk(BuildPathsPropertyPage.java:153)
        at org.eclipse.jface.preference.PreferenceDialog.okPressed(PreferenceDia
log.java:629)
        at org.eclipse.jface.preference.PreferenceDialog.buttonPressed(Preferenc
eDialog.java:184)
        at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417)
        at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java)

        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java)
        at org.eclipse.jface.window.Window.runEventLoop(Window.java)
        at org.eclipse.jface.window.Window.open(Window.java:541)
        at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.
java:158)
        at org.eclipse.jface.action.Action.runWithEvent(Action.java:804)
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
(ActionContributionItem.java:450)
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(Act
ionContributionItem.java)
        at org.eclipse.jface.action.ActionContributionItem.access$0(ActionContri
butionItem.java)
        at org.eclipse.jface.action.ActionContributionItem$ActionListener.handle
Event(ActionContributionItem.java)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1289)
        at org.eclipse.ui.internal.Workbench.run(Workbench.java:1272)
        at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoa
der.java:845)
        at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
        at java.lang.reflect.AccessibleObject.invokeL(AccessibleObject.java:203)

        at java.lang.reflect.Method.invoke(Method.java:271)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:247)
        at org.eclipse.core.launcher.Main.run(Main.java:703)
        at org.eclipse.core.launcher.Main.main(Main.java:539)
Comment 1 DJ Houghton CLA 2003-02-07 17:43:12 EST
Increasing severity as this is easily reproducable. (not marking as critical 
since projects with cyclic build orders aren't common)

On a side note, it looks like it prevents people from creating projects with 
cyclic dependancies so perhaps we can remove the new project build cycle 
support? :-)
Comment 2 Philipe Mulet CLA 2003-02-08 04:21:10 EST
Some cycles are working (we have regression tests for these), will investigate.
Comment 3 Philipe Mulet CLA 2003-02-08 07:25:02 EST
Cannot reproduce on jdk1.4.1_01. Could you give it a try on a different JRE ?
If not reproduceable, then we should show your test case to j9 folks.
Comment 4 DJ Houghton CLA 2003-02-09 19:54:30 EST
Works ok for me on IBM JRE 1.3.1 build cn131-20020403.
Comment 5 Philipe Mulet CLA 2003-02-13 08:20:33 EST
Closing as VM issue.