Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352106 - Getting BuildException with a ClassCastException with Library & Records
Summary: Getting BuildException with a ClassCastException with Library & Records
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-14 10:59 EDT by Kathy Carroll CLA
Modified: 2017-02-23 14:14 EST (History)
2 users (show)

See Also:


Attachments
TestResultLib source file (2.02 KB, application/octet-stream)
2011-07-14 11:00 EDT, Kathy Carroll CLA
no flags Details
dataDef source file (1.02 KB, application/octet-stream)
2011-07-14 11:01 EDT, Kathy Carroll CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kathy Carroll CLA 2011-07-14 10:59:13 EDT
Build Identifier: 0.7.0

My EGL project has preferences to only generate JAVA.  I create a package called runtime. When I add my two files to the package and clean the project, I get this build exception:

org.eclipse.edt.compiler.internal.core.builder.BuildException: java.lang.ClassCastException: org.eclipse.edt.compiler.binding.PrimitiveTypeBindingImpl cannot be cast to org.eclipse.edt.compiler.binding.IFunctionBinding
	at org.eclipse.edt.compiler.internal.core.builder.AbstractProcessingQueue.process(AbstractProcessingQueue.java:187)
	at org.eclipse.edt.compiler.internal.core.builder.AbstractProcessingQueue.process(AbstractProcessingQueue.java:152)
	at org.eclipse.edt.ide.core.internal.builder.AbstractBuilder.processParts(AbstractBuilder.java:99)
	at org.eclipse.edt.ide.core.internal.builder.AbstractBuilder.build(AbstractBuilder.java:136)
	at org.eclipse.edt.ide.core.internal.builder.Builder.cleanBuild(Builder.java:167)
	at org.eclipse.edt.ide.core.internal.builder.Builder.build(Builder.java:94)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:311)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:343)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:242)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.ClassCastException: org.eclipse.edt.compiler.binding.PrimitiveTypeBindingImpl cannot be cast to org.eclipse.edt.compiler.binding.IFunctionBinding
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofExpression.visit(Egl2MofExpression.java:322)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2Mof.visit(Egl2Mof.java:1)
	at org.eclipse.edt.compiler.core.ast.FunctionInvocation.accept(FunctionInvocation.java:45)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofExpression.visit(Egl2MofExpression.java:411)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2Mof.visit(Egl2Mof.java:1)
	at org.eclipse.edt.compiler.core.ast.FunctionInvocation.accept(FunctionInvocation.java:45)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofExpression.visit(Egl2MofExpression.java:204)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2Mof.visit(Egl2Mof.java:1)
	at org.eclipse.edt.compiler.core.ast.Assignment.accept(Assignment.java:111)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofStatement.visit(Egl2MofStatement.java:105)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2Mof.visit(Egl2Mof.java:1)
	at org.eclipse.edt.compiler.core.ast.AssignmentStatement.accept(AssignmentStatement.java:36)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofPart.handleEndVisitPart(Egl2MofPart.java:422)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofPart.defaultHandleVisitPart(Egl2MofPart.java:347)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofPart.visit(Egl2MofPart.java:183)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2Mof.visit(Egl2Mof.java:1)
	at org.eclipse.edt.compiler.core.ast.Library.accept(Library.java:49)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2Mof.convert(Egl2Mof.java:160)
	at org.eclipse.edt.ide.core.internal.builder.AbstractProcessingQueue.createIRFromBoundAST(AbstractProcessingQueue.java:250)
	at org.eclipse.edt.ide.core.internal.builder.AbstractProcessingQueue.processCompiledPart(AbstractProcessingQueue.java:226)
	at org.eclipse.edt.ide.core.internal.builder.AbstractProcessingQueue.level03Compile(AbstractProcessingQueue.java:165)
	at org.eclipse.edt.compiler.internal.core.builder.AbstractProcessingQueue.process(AbstractProcessingQueue.java:169)
	... 17 more


Reproducible: Always

Steps to Reproduce:
1.  Create an EGL project and added org.eclipse.edt.runtime.java to java path
2.  Create a packaged named runtime
3.  Drop the two attached files into it
4.  Clean the project
Comment 1 Kathy Carroll CLA 2011-07-14 11:00:48 EDT
Created attachment 199671 [details]
TestResultLib source file
Comment 2 Kathy Carroll CLA 2011-07-14 11:01:24 EDT
Created attachment 199672 [details]
dataDef source file
Comment 3 Matt Heitz CLA 2011-07-14 11:08:05 EDT
FYI Kathy, EDTBuilds is for problems that happen when EDT's code is compiled.  It's not for the EDT builder.  Sorry about the confusing names.
Comment 4 Kathy Carroll CLA 2011-07-14 11:18:24 EDT

I isoloted the offending EGL function.  This function has incorrect EGL syntax.
 Once corrected, EGL build problem is resolved.

    private function getTimeStamp() returns (String)
        // KLC removed data time stuff
        currentTime = "20110714_888888"
        writeStdOut( function stubbed getTimeStamp() returns (String)"");
        return (currentTime);
    end
Comment 5 Paul Harmon CLA 2011-07-14 15:51:23 EDT
I have added some additional error checking in EGL2MofExpression to handle this
Comment 6 Kathy Carroll CLA 2011-07-15 10:00:48 EDT
Changes work as expected.  Added bonus I get the syntax errors now.
Comment 7 Lisa Lasher CLA 2011-10-11 16:18:48 EDT
Closing this defect.