Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] ClassCastException in Workbench in M8

I'm just posting this in case anyone runs into the same issue.

I updated to EclipseLink M8 today and found that I could not access my
class's mappings in the Workbench anymore.  Clicking on any class gave me a
ClassCastException for MWNullTransactionalPolicy.  

After some experimenting, I found that the error goes away if I add this
snippet after the "class-handle" element.  The "descriptor-alias" needs to
match the class name.

   <transactional-policy type="ox">
      <descriptor-alias>Address</descriptor-alias>
      <refresh-cache-policy/>
      <caching-policy/>
      <query-manager type="ox"/>
      <locking-policy type="ox"/>
      <primary-key-policy/>
   </transactional-policy>

--Polly

Here was the exception:

java.lang.ClassCastException:
org.eclipse.persistence.tools.workbench.mappingsmodel.descriptor.MWNullTransactionalPolicy
	at
org.eclipse.persistence.tools.workbench.mappingsmodel.descriptor.xml.MWOXDescriptor.primaryKeyPolicy(MWOXDescriptor.java:407)
	at
org.eclipse.persistence.tools.workbench.mappingsplugin.ui.descriptor.xml.EisPrimaryKeysPanel$3.getValueFromSubject(EisPrimaryKeysPanel.java:134)
	at
org.eclipse.persistence.tools.workbench.uitools.app.PropertyAspectAdapter.buildValue(PropertyAspectAdapter.java:273)
	at
org.eclipse.persistence.tools.workbench.uitools.app.PropertyAspectAdapter.engageSubject(PropertyAspectAdapter.java:217)
	at
org.eclipse.persistence.tools.workbench.uitools.app.AspectAdapter.subjectChanged(AspectAdapter.java:130)
	at
org.eclipse.persistence.tools.workbench.uitools.app.AspectAdapter$1.propertyChange(AspectAdapter.java:108)
	at
org.eclipse.persistence.tools.workbench.utility.events.DefaultChangeNotifier.propertyChange(DefaultChangeNotifier.java:60)
	at
org.eclipse.persistence.tools.workbench.utility.events.ChangeSupport.firePropertyChangedInternal(ChangeSupport.java:478)
	at
org.eclipse.persistence.tools.workbench.utility.events.ChangeSupport.firePropertyChanged(ChangeSupport.java:439)
	at
org.eclipse.persistence.tools.workbench.uitools.app.ValueModelChangeSupport.firePropertyChanged(ValueModelChangeSupport.java:122)
	at
org.eclipse.persistence.tools.workbench.utility.AbstractModel.firePropertyChanged(AbstractModel.java:131)
	at
org.eclipse.persistence.tools.workbench.uitools.app.TransformationPropertyValueModel.valueChanged(TransformationPropertyValueModel.java:92)
	at
org.eclipse.persistence.tools.workbench.uitools.app.PropertyValueModelWrapper$1.propertyChange(PropertyValueModelWrapper.java:71)
	at
org.eclipse.persistence.tools.workbench.utility.events.DefaultChangeNotifier.propertyChange(DefaultChangeNotifier.java:60)
	at
org.eclipse.persistence.tools.workbench.utility.events.ChangeSupport.firePropertyChangedInternal(ChangeSupport.java:478)
	at
org.eclipse.persistence.tools.workbench.utility.events.ChangeSupport.firePropertyChanged(ChangeSupport.java:439)
	at
org.eclipse.persistence.tools.workbench.uitools.app.ValueModelChangeSupport.firePropertyChanged(ValueModelChangeSupport.java:122)
	at
org.eclipse.persistence.tools.workbench.utility.AbstractModel.firePropertyChanged(AbstractModel.java:131)
	at
org.eclipse.persistence.tools.workbench.uitools.app.SimplePropertyValueModel.setValue(SimplePropertyValueModel.java:67)
	at
org.eclipse.persistence.tools.workbench.framework.ui.view.AbstractPropertiesPage.setNode(AbstractPropertiesPage.java:157)
	at
org.eclipse.persistence.tools.workbench.framework.ui.view.TabbedPropertiesPage.setNode(TabbedPropertiesPage.java:226)
	at
org.eclipse.persistence.tools.workbench.mappingsplugin.ui.common.MappingsApplicationNode.propertiesPage(MappingsApplicationNode.java:52)
	at
org.eclipse.persistence.tools.workbench.framework.internal.AbstractEditorView.nodeChanged(AbstractEditorView.java:150)
	at
org.eclipse.persistence.tools.workbench.framework.internal.AbstractEditorView$1.propertyChange(AbstractEditorView.java:84)
	at
org.eclipse.persistence.tools.workbench.utility.events.DefaultChangeNotifier.propertyChange(DefaultChangeNotifier.java:60)
	at
org.eclipse.persistence.tools.workbench.utility.events.ChangeSupport.firePropertyChangedInternal(ChangeSupport.java:478)
	at
org.eclipse.persistence.tools.workbench.utility.events.ChangeSupport.firePropertyChanged(ChangeSupport.java:439)
	at
org.eclipse.persistence.tools.workbench.uitools.app.ValueModelChangeSupport.firePropertyChanged(ValueModelChangeSupport.java:122)
	at
org.eclipse.persistence.tools.workbench.utility.AbstractModel.firePropertyChanged(AbstractModel.java:131)
	at
org.eclipse.persistence.tools.workbench.uitools.app.SimplePropertyValueModel.setValue(SimplePropertyValueModel.java:67)
	at
org.eclipse.persistence.tools.workbench.framework.internal.WorkspaceView.selectedNodesChanged(WorkspaceView.java:195)
	at
org.eclipse.persistence.tools.workbench.framework.internal.WorkspaceView$1.valueChanged(WorkspaceView.java:107)
	at
javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(DefaultTreeSelectionModel.java:629)
	at
javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(DefaultTreeSelectionModel.java:1078)
	at
javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(DefaultTreeSelectionModel.java:287)
	at
org.eclipse.persistence.tools.workbench.framework.internal.NavigatorView$SelectionModel.setSelectionPaths(NavigatorView.java:514)
	at
javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(DefaultTreeSelectionModel.java:170)
	at javax.swing.JTree.setSelectionPath(JTree.java:1174)
	at
javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(BasicTreeUI.java:2296)
	at
javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelectionImpl(BasicTreeUI.java:3509)
	at
javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(BasicTreeUI.java:3484)
	at
javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(BasicTreeUI.java:3465)
	at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:222)
	at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
	at java.awt.Component.processMouseEvent(Component.java:5514)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
	at java.awt.Component.processEvent(Component.java:5282)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3984)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3889)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1791)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

-- 
View this message in context: http://www.nabble.com/ClassCastException-in-Workbench-in-M8-tp17678737p17678737.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top