PM86989: Opening a JavaScript file results is ClassCastException

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Abstract:
    Attempts to open a JavaScript file result in error:
    java.lang.ClassCastException:
    org.eclipse.wst.jsdt.internal.compiler.lookup.BaseTypeBinding
    incompatible with
    org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding
    
    Error description:
     1. Create a new Web Project with JavaScript support
    2. Add a new javaScript file with text like the following
    3. Close the file
    
    A.B.X = A.extend(A.B.C,
    {
    
    
    
        createMethod : function(c, m){
    
            var f;
    
            if(!m.f1){
                f = function(){
    
                    this.doCall(c, m,
    Array.prototype.slice.call(arguments,
    0));
    
                }.createDelegate(this);
    
            }
            f.p = {
                    action: c,
                    method: m
                };
            return f;
    
        }
    
    });
    
    4. open the file. The Err log view will show errors like:
    
    
    1. Create a new Web Project with JavaScript support
    2. Add a new javaScript file with text like the following
    3. Close the file
    
    A.B.X = A.extend(A.B.C,
    {
    
    
    
        createMethod : function(c, m){
    
            var f;
    
            if(!m.f1){
                f = function(){
    
                    this.doCall(c, m,
    Array.prototype.slice.call(arguments,
    0));
    
                }.createDelegate(this);
    
            }
            f.p = {
                    action: c,
                    method: m
                };
            return f;
    
        }
    
    });
    
    4. Open the file.
    5. The Error log View will show errors like:
    
    JavaScript Model Exception: java.lang.ClassCastException:
    org.eclipse.wst.jsdt.internal.compiler.lookup.BaseTypeBinding
    incompatible with
    org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding
     at
    org.eclipse.wst.jsdt.internal.core.CompilationUnitProblemFinder.
    process(Unknown
    Source)
     at
    org.eclipse.wst.jsdt.internal.core.CompilationUnitProblemFinder.
    process(Unknown
    Source)
     at
    org.eclipse.wst.jsdt.internal.core.ReconcileWorkingCopyOperation
    .makeConsistent(Unknown
    Source)
     at
    org.eclipse.wst.jsdt.internal.core.ReconcileWorkingCopyOperation
    .executeOperation(Unknown
    Source)
     at
    org.eclipse.wst.jsdt.internal.core.JavaModelOperation.run(Unknow
    n
    Source)
     at
    org.eclipse.wst.jsdt.internal.core.JavaModelOperation.runOperati
    on(Unknown
    Source)
     at
    org.eclipse.wst.jsdt.internal.core.CompilationUnit.reconcile(Unk
    nown
    Source)
     at
    org.eclipse.wst.jsdt.internal.ui.text.java.JavaReconcilingStrate
    gy$1.run(Unknown
    Source)
     at org.eclipse.core.runtime.SafeRunner.run(Unknown Source)
     at
    org.eclipse.wst.jsdt.internal.ui.text.java.JavaReconcilingStrate
    gy.reconcile(Unknown
    Source)
     at
    org.eclipse.wst.jsdt.internal.ui.text.java.JavaReconcilingStrate
    gy.initialReconcile(Unknown
    Source)
     at
    org.eclipse.wst.jsdt.internal.ui.text.CompositeReconcilingStrate
    gy.initialReconcile(Unknown
    Source)
     at
    org.eclipse.wst.jsdt.internal.ui.text.JavaCompositeReconcilingSt
    rategy.initialReconcile(Unknown
    Source)
     at
    org.eclipse.jface.text.reconciler.MonoReconciler.initialProcess(
    Unknown
    Source)
     at
    org.eclipse.wst.jsdt.internal.ui.text.JavaReconciler.initialProc
    ess(Unknown
    Source)
     at
    org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundT
    hread.run(Unknown
    Source)
    Caused by: java.lang.ClassCastException:
    org.eclipse.wst.jsdt.internal.compiler.lookup.BaseTypeBinding
    incompatible with
    org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding
     at
    org.eclipse.wst.jsdt.core.infer.InferredType.resolveSuperType(Un
    known
    Source)
     at
    org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope.findInf
    erredSupertype(Unknown
    Source)
     at
    org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope.connect
    Superclass(Unknown
    Source)
     at
    org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope.connect
    TypeHierarchy(Unknown
    Source)
     at
    org.eclipse.wst.jsdt.internal.compiler.lookup.CompilationUnitSco
    pe.connectTypeHierarchy(Unknown
    Source)
     at
    org.eclipse.wst.jsdt.internal.compiler.lookup.LookupEnvironment.
    completeTypeBindings(Unknown
    Source)
     at
    org.eclipse.wst.jsdt.internal.compiler.Compiler.internalBeginToC
    ompile(Unknown
    Source)
     at
    org.eclipse.wst.jsdt.internal.compiler.Compiler.beginToCompile(U
    nknown
    Source)
     at
    org.eclipse.wst.jsdt.internal.compiler.Compiler.resolve(Unknown
    Source)
     at
    org.eclipse.wst.jsdt.internal.compiler.Compiler.resolve(Unknown
    Source)
     ... 16 more
    

Local fix

Problem summary

  • When opening a certain JavaScript file a ClassCastException
    might be written in the workspace log.
    

Problem conclusion

  • A check was added to prevent the ClassCastException from being
    thrown.
    The fix for this APAR is included in Rational Application
    Developer v8.5.5.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM86989

  • Reported component name

    RATL APP DEV WI

  • Reported component ID

    5724J1901

  • Reported release

    851

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-04-15

  • Closed date

    2013-10-15

  • Last modified date

    2013-10-15

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Modules/Macros

  • None
    NONE
    

Fix information

  • Fixed component name

    RATL APP DEV WI

  • Fixed component ID

    5724J1901

Applicable component levels

  • R900 PSY

       UP



Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Rational Application Developer for WebSphere Software

Software version:

8.5.1

Reference #:

PM86989

Modified date:

2013-10-15

Translate my page

Machine Translation

Content navigation