Bug 3037 - Core error compiling a java class (1GEJK8Q)
Summary: Core error compiling a java class (1GEJK8Q)
Status: RESOLVED DUPLICATE of bug 6799
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All Linux
: P3 major (vote)
Target Milestone: 2.0 M3   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 22:48 EDT by Veronika Irvine CLA
Modified: 2002-02-12 06:23 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 Veronika Irvine CLA 2001-10-10 22:48:15 EDT
0) Turn auto build off
1) Import a class with the same name as an existing class
2) Open the java editor on this class.
3) Ctrl B in editor to cause build

The exception below occurs.

I then did "Rebuild Project" from the packages view context menu and the class compiled without an error.

2 org.eclipse.core.resources 2 Problems occurred when invoking code from plug-in: org.eclipse.core.resources.
org.eclipse.core.internal.resources.ResourceException: Problems encountered while copying resources.
	at org.eclipse.core.internal.localstore.FileSystemResourceManager.copy(FileSystemResourceManager.java:68)
	at org.eclipse.core.internal.resources.Resource.copy(Resource.java:318)
	at org.eclipse.jdt.internal.core.builder.impl.ProjectResourceCopier.copyToOutput(ProjectResourceCopier.java:66)
	at org.eclipse.jdt.internal.core.builder.impl.ProjectResourceCopier.visit(ProjectResourceCopier.java:229)
	at org.eclipse.core.internal.resources.Resource.accept(Resource.java(Compiled Code))
	at org.eclipse.core.internal.resources.Resource.accept(Resource.java(Compiled Code))
	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:50)
	at org.eclipse.jdt.internal.core.builder.impl.ProjectResourceCopier.copyAllResourcesOnClasspath(ProjectResourceCopier.java:38)
	at org.eclipse.jdt.internal.core.builder.impl.BatchImageBuilder.build(BatchImageBuilder.java(Compiled Code))
	at org.eclipse.jdt.internal.core.builder.impl.JavaDevelopmentContextImpl.createState(JavaDevelopmentContextImpl.java:116)
	at org.eclipse.jdt.internal.core.builder.impl.JavaBuilder.fullBuild(JavaBuilder.java:141)
	at org.eclipse.jdt.internal.core.builder.impl.JavaBuilder.build(JavaBuilder.java:47)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:83)
	at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java(Compiled Code))
	at org.eclipse.core.runtime.Platform.run(Platform.java(Compiled Code))
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:104)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:48)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:58)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:129)
	at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java(Compiled Code))
	at org.eclipse.core.runtime.Platform.run(Platform.java(Compiled Code))
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:143)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:166)
	at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:101)
	at org.eclipse.ui.internal.GlobalBuildAction.build(GlobalBuildAction.java:37)
	at org.eclipse.ui.internal.GlobalBuildAction$1.run(GlobalBuildAction.java:143)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:98)
Log: Wed May 30 08:25:16 EDT 2001
2 org.eclipse.core.resources 2 Problems occurred when invoking code from plug-in: org.eclipse.core.resources.
java.lang.NullPointerException
	at org.eclipse.jdt.internal.core.JavaProject.getClasspathAsXMLString(JavaProject.java:435)
	at org.eclipse.jdt.internal.core.JavaProject.saveClasspath(JavaProject.java:1245)
	at org.eclipse.jdt.internal.core.JavaProject.saveClasspath(JavaProject.java:1215)
	at org.eclipse.jdt.internal.core.DeltaProcessor.checkProjectPropertyFileUpdate(DeltaProcessor.java:174)
	at org.eclipse.jdt.internal.core.DeltaProcessor.checkProjectPropertyFileUpdate(DeltaProcessor.java:227)
	at org.eclipse.jdt.internal.core.DeltaProcessor.checkProjectPropertyFileUpdate(DeltaProcessor.java:227)
	at org.eclipse.jdt.internal.core.JavaModelManager.resourceChanged(JavaModelManager.java:956)
	at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:92)
	at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java(Compiled Code))
	at org.eclipse.core.runtime.Platform.run(Platform.java(Compiled Code))
	at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:107)
	at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:30)
	at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:44)
	at org.eclipse.core.internal.resources.Workspace.broadcastChanges(Workspace.java:91)
	at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java(Compiled Code))
	at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:104)
	at org.eclipse.ui.internal.GlobalBuildAction.build(GlobalBuildAction.java:37)
	at org.eclipse.ui.internal.GlobalBuildAction$1.run(GlobalBuildAction.java:143)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:98)


NOTES:

PM (5/30/2001 4:12:50 PM)
	Failing to copy resource would leave inconsistent state, thus it is fine to fail the build altogether.
	However, need to investigate if failure copying the resource was reasonable.

	Moving to ITPCORE.

JM (6/4/2001 2:24:21 PM)
	Investigate for possible naming/discovery issues on Linux.

JM (05/06/2001 6:12:35 PM)
	KM says Yes!

JM (05/06/2001 8:01:57 PM)
	RTP

JM (6/12/2001 5:59:56 PM)
	move to deferred.  confirm with PM that things are ok
Comment 1 John Arthorne CLA 2001-10-22 14:40:53 EDT
I tried again in build 20011018.

I used a simpler case:

A.java contains:
public class A {}
class B {}

B.java contains:
public class B{}

If I compile A.java, then compile B.java using Ctrl-B from the java editor, I 
get an image builder assertion failure.  Stack trace is below.  The 
ResourceException in the stack trace of the original PR looks like expected 
behaviour.  If you try to copy a file to a destination that is occupied, you 
will get a resource exception.

Thread [ModalContext] (Suspended (exception RuntimeException))
	Assert.isTrue(boolean, String) line: 82
	Assert.isTrue(boolean) line: 69
	UnmodifiedBuilderType.computeIndictments(IndictmentSet) line: 28
	IncrementalImageBuilder.updateState(ConvertedCompilationResult[]) line: 
1869
	IncrementalImageBuilder(AbstractImageBuilder).compile(Vector) line: 101
	IncrementalImageBuilder.applySourceDelta(Hashtable) line: 263
	JavaBuilder.incrementalBuild(JavaDevelopmentContextImpl, Hashtable, 
IProgressMonitor) line: 208
	JavaBuilder.build(int, Map, IProgressMonitor) line: 54
	BuildManager$2.run() line: 332
	InternalPlatform.run(ISafeRunnable) line: 812
	Platform.run(ISafeRunnable) line: 395
	BuildManager.basicBuild(int, IncrementalProjectBuilder, Map, 
MultiStatus, IProgressMonitor) line: 88
	BuildManager.basicBuild(IProject, int, String, Map, MultiStatus, 
IProgressMonitor) line: 153
	BuildManager.basicBuild(IProject, int, ICommand[], MultiStatus, 
IProgressMonitor) line: 163
	BuildManager$1.run() line: 112
	InternalPlatform.run(ISafeRunnable) line: 812
	Platform.run(ISafeRunnable) line: 395
	BuildManager.basicBuild(IProject, int, MultiStatus, IProgressMonitor) 
line: 126
	BuildManager.build(int, IProgressMonitor) line: 188
	Workspace.build(int, IProgressMonitor) line: 122
	GlobalBuildAction.build(IProgressMonitor) line: 59
	GlobalBuildAction$1.run(IProgressMonitor) line: 143
	ModalContext$ModalContextThread.run() line: 98

Moving PR to JDTCore
Comment 2 Philipe Mulet CLA 2001-10-23 05:20:47 EDT
Will need to check that the new builder handles this scenario more gracefully
Comment 3 DJ Houghton CLA 2001-10-24 06:41:52 EDT
PRODUCT VERSION:

114
Linux Red Hat 6.2

Comment 4 Kent Johnson CLA 2001-12-11 11:38:57 EST

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