User 2082812c83
12-01-2007 18:15:27
Hi,
I have taken a swing application that was previously using JChem 3.1.1 and upgraded it to use 3.2.2. Now when I double click on a molecule rendered in a cell of a JTable I get the exception shown below (which I did not get when using the prior version of JChem). The table has registered a TableCellEditor which is a subclass of DefaultCellEditor but which returns an instance of MViewPane when getTableCellEditorComponent is called by Swing. Any ideas what is causing this exception?:
java.lang.RuntimeException: MObjectProp cannot be exported
at chemaxon.struc.prop.MObjectProp.convertToString(MObjectProp.java:44)
at chemaxon.struc.MPropertyContainer.getString(MPropertyContainer.java:116)
at chemaxon.struc.Molecule.getProperty(Molecule.java:298)
at chemaxon.marvin.view.swing.modules.MViewFrame$FieldView.<init>(MViewFrame.java:83)
at chemaxon.marvin.view.swing.modules.MViewFrame.makeLayout(MViewFrame.java:576)
at chemaxon.marvin.view.swing.modules.MViewFrame.callback(MViewFrame.java:163)
at chemaxon.marvin.view.swing.modules.GridBagView.setWinmode(GridBagView.java:865)
at chemaxon.marvin.view.swing.ViewPanel.setWinmode(ViewPanel.java:412)
at chemaxon.marvin.view.swing.ViewPanel.openViewer(ViewPanel.java:2759)
at chemaxon.marvin.view.swing.ViewPanel.doubleClick(ViewPanel.java:2713)
at chemaxon.marvin.view.swing.ViewCanvas.mouseClicked(ViewCanvas.java:389)
at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Pretty much everything else I am doing with regards to Molecule objects seems to work OK although I did have to change a few places where I was calling getProperty on a molecule to getPropertyObject otherwise I got pretty much the same exception ("MObjectProp cannot be exported") just caused from a different point in the code.
I have currently only taken the jchem.jar from the lib directory of JChem version 3.2.2 and used that in my application. In general do I need to include the other jar files into my application for rendering, loading compounds into structure tables and subsructure searching to work or is jchem.jar all that is needed?
If other jars are needed which ones?
Thanks,
James
Thanks,
James
I have taken a swing application that was previously using JChem 3.1.1 and upgraded it to use 3.2.2. Now when I double click on a molecule rendered in a cell of a JTable I get the exception shown below (which I did not get when using the prior version of JChem). The table has registered a TableCellEditor which is a subclass of DefaultCellEditor but which returns an instance of MViewPane when getTableCellEditorComponent is called by Swing. Any ideas what is causing this exception?:
java.lang.RuntimeException: MObjectProp cannot be exported
at chemaxon.struc.prop.MObjectProp.convertToString(MObjectProp.java:44)
at chemaxon.struc.MPropertyContainer.getString(MPropertyContainer.java:116)
at chemaxon.struc.Molecule.getProperty(Molecule.java:298)
at chemaxon.marvin.view.swing.modules.MViewFrame$FieldView.<init>(MViewFrame.java:83)
at chemaxon.marvin.view.swing.modules.MViewFrame.makeLayout(MViewFrame.java:576)
at chemaxon.marvin.view.swing.modules.MViewFrame.callback(MViewFrame.java:163)
at chemaxon.marvin.view.swing.modules.GridBagView.setWinmode(GridBagView.java:865)
at chemaxon.marvin.view.swing.ViewPanel.setWinmode(ViewPanel.java:412)
at chemaxon.marvin.view.swing.ViewPanel.openViewer(ViewPanel.java:2759)
at chemaxon.marvin.view.swing.ViewPanel.doubleClick(ViewPanel.java:2713)
at chemaxon.marvin.view.swing.ViewCanvas.mouseClicked(ViewCanvas.java:389)
at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Pretty much everything else I am doing with regards to Molecule objects seems to work OK although I did have to change a few places where I was calling getProperty on a molecule to getPropertyObject otherwise I got pretty much the same exception ("MObjectProp cannot be exported") just caused from a different point in the code.
I have currently only taken the jchem.jar from the lib directory of JChem version 3.2.2 and used that in my application. In general do I need to include the other jar files into my application for rendering, loading compounds into structure tables and subsructure searching to work or is jchem.jar all that is needed?
If other jars are needed which ones?
Thanks,
James
Thanks,
James