Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337797

Summary: ClassCastException in CopyTypeCommand
Product: z_Archived Reporter: Stanislav Nichev <stanislav.nichev>
Component: WTP IncubatorAssignee: Dimitar Tenev <dimitar.tenev>
Status: CLOSED FIXED QA Contact: Dimitar Tenev <dimitar.tenev>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
patch fixing the way modelRoot is used
none
fixing schema resolve
none
fixing schema resolve none

Description Stanislav Nichev CLA 2011-02-22 04:15:34 EST
Build Identifier: 

Hi Colleagues,

In some cases, when executing the CopyTypeCommand, a ClassCaseException is thrown.
I'm listing a part of the stack trace:

Caused by: java.lang.ClassCastException: org.eclipse.wst.sse.sieditor.model.impl.WSDLModelRoot cannot be cast to org.eclipse.wst.sse.sieditor.model.api.IXSDModelRoot
at org.eclipse.wst.sse.sieditor.command.emf.xsd.CopyTypeCommand.ensureImport(CopyTypeCommand.java:814)
at org.eclipse.wst.sse.sieditor.command.emf.xsd.CopyTypeCommand.visitComplexTypeDefinition(CopyTypeCommand.java:600)
at org.eclipse.wst.sse.sieditor.command.emf.xsd.CopyTypeCommand.visitTypeDefinition(CopyTypeCommand.java:513)
at org.eclipse.wst.sse.sieditor.command.emf.xsd.CopyTypeCommand.visitElementDeclaration(CopyTypeCommand.java:429)
at org.eclipse.wst.sse.sieditor.command.emf.xsd.CopyTypeCommand.run(CopyTypeCommand.java:160)

There is an issue with the way the modelRoot is being used.

Regards,
Stanislav

Reproducible: Sometimes
Comment 1 Stanislav Nichev CLA 2011-02-22 04:19:46 EST
Created attachment 189463 [details]
patch fixing the way modelRoot is used
Comment 2 Stanislav Nichev CLA 2011-02-24 07:29:59 EST
Created attachment 189690 [details]
fixing schema resolve
Comment 3 Stanislav Nichev CLA 2011-02-24 07:34:34 EST
Created attachment 189691 [details]
fixing schema resolve
Comment 4 Stanislav Nichev CLA 2011-06-05 14:57:30 EDT
Hi Colleagues,

Could you please confirm if this issue is fixed and close the bugzilla? It looks as though the patches are applied.

Regards,
Stanislav
Comment 5 Dimitar Tenev CLA 2011-06-17 06:34:58 EDT
Hi Stanislav,

Thank you for the paches.
I have found that they are already applied, so I am closing this bugzzila.

Best regards,
Dimitar
Comment 6 Dimitar Tenev CLA 2011-06-17 07:09:45 EDT
Changing status to CLOSED.