[jboss-jira] [JBoss JIRA] Updated: (GPD-128) ClassCastException in XmlAdapterFactory.getConfigurationElementByXmlElementName(String)

John Ruud (JIRA) jira-events at lists.jboss.org
Sun Aug 5 17:53:02 EDT 2007


     [ http://jira.jboss.com/jira/browse/GPD-128?page=all ]

John Ruud updated GPD-128:
--------------------------


Koen,

My stack trace is included (below). While my own classes are involved in this case, it may hopfully be clear by looking at line 43 of XmlAdapterRegistry why the exception occurs (a TreeSet is added to xmlElementMap, but in line 52 this Set is then attempted casted to an IConfigurationElement)

John

!ENTRY org.eclipse.ui 4 4 2007-08-05 14:16:41.843
!MESSAGE Unhandled event loop exception

!ENTRY org.eclipse.ui 4 0 2007-08-05 14:16:41.890
!MESSAGE java.util.TreeSet cannot be cast to org.eclipse.core.runtime.IConfigurationElement
!STACK 0
java.lang.ClassCastException: java.util.TreeSet cannot be cast to org.eclipse.core.runtime.IConfigurationElement
	at org.jbpm.gd.common.registry.XmlAdapterRegistry.getConfigurationElementByXmlElementName(XmlAdapterRegistry.java:52)
	at com.thrasys.gd.xpdl.model.ModelFactory.getSemanticElementId(ModelFactory.java:53)
	at com.thrasys.gd.xpdl.model.ModelFactory.createByElementId(ModelFactory.java:60)
	at com.thrasys.gd.xpdl.model.ModelFactory.addXNetXml(ModelFactory.java:92)
	at com.thrasys.gd.xpdl.model.Node.initializeNew(Node.java:9)
	at org.jbpm.gd.common.editor.CreationFactory.getNewObject(CreationFactory.java:35)
	at org.eclipse.gef.requests.CreateRequest.getNewObject(CreateRequest.java:73)
	at org.jbpm.gd.common.policy.XYLayoutEditPolicy.initCreateCommand(XYLayoutEditPolicy.java:58)
	at org.jbpm.gd.common.policy.XYLayoutEditPolicy.getCreateCommand(XYLayoutEditPolicy.java:42)
	at org.eclipse.gef.editpolicies.LayoutEditPolicy.getCommand(LayoutEditPolicy.java:199)
	at org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy.getCommand(ConstrainedLayoutEditPolicy.java:154)
	at org.eclipse.gef.editparts.AbstractEditPart.getCommand(AbstractEditPart.java:473)
	at org.eclipse.gef.tools.TargetingTool.getCommand(TargetingTool.java:122)
	at org.eclipse.gef.tools.CreationTool.handleMove(CreationTool.java:239)
	at org.eclipse.gef.tools.AbstractTool.mouseMove(AbstractTool.java:1038)
	at org.eclipse.gef.EditDomain.mouseMove(EditDomain.java:248)
	at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseMoved(DomainEventDispatcher.java:359)
	at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseMove(LightweightSystem.java:533)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:145)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1930)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:422)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
	at org.eclipse.core.launcher.Main.run(Main.java:977)
	at org.eclipse.core.launcher.Main.main(Main.java:952)

> ClassCastException in XmlAdapterFactory.getConfigurationElementByXmlElementName(String)
> ---------------------------------------------------------------------------------------
>
>                 Key: GPD-128
>                 URL: http://jira.jboss.com/jira/browse/GPD-128
>             Project: JBoss jBPM GPD
>          Issue Type: Bug
>    Affects Versions: jBPM JPDL Designer 3.1.0.CR
>            Reporter: John Ruud
>         Assigned To: Koen Aers
>
> I just noticed this problem in the current HEAD (so not in the official 3.1.0.CR release, I think). In XmlAdapterFactory (1.2), a TreeSet (as opposed to a IConfigurationElement) is now returned under certain conditions, and this causes a ClassCastException to be thrown (and this is breaking some of my exsiting code)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list