Bug 7426 - ClassCastException during build
Summary: ClassCastException during build
Status: RESOLVED DUPLICATE of bug 16187
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 F3   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-10 08:37 EST by Kirill Frolov CLA
Modified: 2002-11-12 09:30 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 Kirill Frolov CLA 2002-01-10 08:37:09 EST
I have brought the copy of the workspace folder from home to work and then 
started Eclipse. Image of the workspace contained several projects some of them 
were closed. And when I opened the projects at work they stared to rebuild 
completely (WHY??? They were up to date.) And then I got internal error. The 
log is provided below.

Is there something machine dependant in the .metadata folder?

THe version of Eclipse I use on both machines is exactly the same namely 
20011219 (latest stable build available).

The rebuild of a project fixed the problem.

Log: Thu Jan 10 16:06:59 MSK 2002
1 org.eclipse.core.resources 4 Unable to find Action Set: 
nox.browser.actions.browser
Log: Thu Jan 10 16:07:00 MSK 2002
1 org.eclipse.core.resources 4 Unable to find Action Set: 
nox.browser.actions.browser
Log: Thu Jan 10 16:07:01 MSK 2002
1 org.eclipse.core.resources 4 Unable to find Action Set: 
nox.browser.actions.browser
Log: Thu Jan 10 16:14:55 MSK 2002
2 org.eclipse.core.resources 2 Problems occurred when invoking code from plug-
in: org.eclipse.core.resources.
java.lang.ClassCastException: 
org.eclipse.jdt.internal.compiler.lookup.MemberTypeBinding
	at 
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom
(LookupEnvironment.java:286)
	at 
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom
(LookupEnvironment.java:275)
	at org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:118)
	at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType
(LookupEnvironment.java:65)
	at 
org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve
(UnresolvedReferenceBinding.java:23)
	at 
org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType
(BinaryTypeBinding.java:332)
	at 
org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveTypesFor
(BinaryTypeBinding.java:351)
	at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.methods
(BinaryTypeBinding.java:326)
	at 
org.eclipse.jdt.internal.compiler.lookup.MethodVerifier.computeInheritedMethods
(MethodVerifier.java:415)
	at org.eclipse.jdt.internal.compiler.lookup.MethodVerifier.verify
(MethodVerifier.java:624)
	at 
org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.verifyMethods
(SourceTypeBinding.java:848)
	at 
org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.verifyMethods
(CompilationUnitScope.java:589)
	at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:450)
	at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:261)
	at org.eclipse.jdt.internal.core.newbuilder.AbstractImageBuilder.compile
(AbstractImageBuilder.java:211)
	at org.eclipse.jdt.internal.core.newbuilder.AbstractImageBuilder.compile
(AbstractImageBuilder.java:187)
	at 
org.eclipse.jdt.internal.core.newbuilder.IncrementalImageBuilder.build
(IncrementalImageBuilder.java:97)
	at org.eclipse.jdt.internal.core.newbuilder.JavaBuilder.buildDeltas
(JavaBuilder.java:123)
	at org.eclipse.jdt.internal.core.newbuilder.JavaBuilder.build
(JavaBuilder.java:74)
	at org.eclipse.core.internal.events.BuildManager$2.run
(BuildManager.java:356)
	at org.eclipse.core.internal.runtime.InternalPlatform.run
(InternalPlatform.java:821)
	at org.eclipse.core.runtime.Platform.run(Platform.java:395)
	at org.eclipse.core.internal.events.BuildManager.basicBuild
(BuildManager.java:114)
	at org.eclipse.core.internal.events.BuildManager.basicBuild
(BuildManager.java:179)
	at org.eclipse.core.internal.events.BuildManager.basicBuild
(BuildManager.java:189)
	at org.eclipse.core.internal.events.BuildManager$1.run
(BuildManager.java:138)
	at org.eclipse.core.internal.runtime.InternalPlatform.run
(InternalPlatform.java:821)
	at org.eclipse.core.runtime.Platform.run(Platform.java:395)
	at org.eclipse.core.internal.events.BuildManager.basicBuild
(BuildManager.java:152)
	at org.eclipse.core.internal.events.BuildManager.build
(BuildManager.java:214)
	at org.eclipse.core.internal.resources.Workspace.endOperation
(Workspace.java:701)
	at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1237)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run
(WorkspaceModifyOperation.java:78)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run
(ModalContext.java:98)
Log: Thu Jan 10 16:14:56 MSK 2002
1 org.eclipse.core.resources 4 Exception in 
org.eclipse.ui.actions.OpenResourceAction. run: 
org.eclipse.core.internal.resources.ResourceException: Errors during build.
Comment 1 Philipe Mulet CLA 2002-01-10 11:29:17 EST
Do you have libraries before sources on your classpath ?
Comment 2 Philipe Mulet CLA 2002-01-10 11:59:10 EST
We should add some protection in our code.
Comment 3 Kirill Frolov CLA 2002-01-11 02:59:59 EST
The .classpath is provided below. I hope it will answer your question.
Comment 4 Kirill Frolov CLA 2002-01-11 03:00:37 EST
Oops. Forgot to include it.

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" 
sourcepath="JRE_SRC"/>
    <classpathentry kind="lib" path="lib/js.jar"/>
    <classpathentry kind="lib" path="lib/junit.jar"/>
    <classpathentry kind="lib" path="lib/xerces.jar"/>
    <classpathentry kind="lib" path="lib/jdi.jar"/>
    <classpathentry kind="output" path="bin"/>
</classpath>
Comment 5 Kent Johnson CLA 2002-05-28 13:34:36 EDT

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