ChemDraw failing inside IJC

User c1ce6b3d19

10-08-2012 18:21:43

I’m trying to set the default editor to ChemDraw inside of
IJC.


Using the startup option -J-Dijc.molecule-editor=Chemdraw it doesn’t work, can you
help or explain what is going on? 


I am able to use other startup option correctly (e.g.
startup.window).


I am using a Win 7 64 bit machine with ChemBioDraw Ultra
12.0 and IJC 5.10.1. 


 



When I try to open a molecule
for editing, the following is output to the log.



 


INFO [com.im.ijc.sketchreg.chemdraw.bridge.ChemDrawBridge]:
Loading Chemdraw bri


dge library (cdbridge.dll)...


INFO [com.im.ijc.sketchreg.chemdraw.bridge.ChemDrawBridge]:
Cannot load ChemDraw


 intergation library


java.lang.UnsatisfiedLinkError: C:\Program
Files\ChemAxon\InstantJChem\instantjc


hem\modules\lib\cdbridge.dll: Can't find dependent libraries


        at java.lang.ClassLoader$NativeLibrary.load(Native
Method)


        at
java.lang.ClassLoader.loadLibrary0(Unknown Source)


        at
java.lang.ClassLoader.loadLibrary(Unknown Source)


        at
java.lang.Runtime.loadLibrary0(Unknown Source)


        at java.lang.System.loadLibrary(Unknown
Source)


[catch] at
com.im.ijc.sketchreg.chemdraw.bridge.ChemDrawBridge.<clinit>(ChemDraw


Bridge.java:31)


        at
com.im.ijc.sketchreg.chemdraw.ChemdrawFactory.isValid(ChemdrawFactory


.java:50)


        at
com.im.ijc.sketchreg.SketchRegistry.getFactoryFromFile(SketchRegistry


.java:165)





Perhaps this is due to the known issues in
5.5.0, May 2011,  a problem with ChemDraw. 



 



 


http://www.chemaxon.com/instantjchem/Release_Notes_Cumulative.html#5.5.0


Known issues



·        
ChemDraw support does
not currently work on 64 bit Windows



 


Thanks,


Jon

ChemAxon fa971619eb

10-08-2012 18:26:59

Hi Jon,


Yes, I think you have hit on the problem.


Cambridgesoft do not provide a 64 bit version of their DLL, and we currently can't find a work around to this.


Tim


 

User c1ce6b3d19

05-09-2012 18:33:23

Tim,


I followed a suggestion to try running a 32 bit version of IJC on my 64 bit windows machine and ChemDraw was working after some light testing.   So this is a possible work around.  


 


My concern was that a problem occurs in IJC that is very hard to recover from.  


To reproduce"



  1. Install both 64 bit and 32 bit IJC on my machine in different locations (Program Files and Program Files (x86), respectively)

  2. Run 32 bit IJC and select Chemdraw as the selected molecule editor.  Tools>>options>>Miscellaneous area>>Molecule view/edit tab>>Molecule Editor section.

  3. Close the 32 bit IJC and open 64 bit IJC.

  4. Open a grid view or form view of data tree that has a structure or open the Molecule view/edit tab in the options panel.  

  5. The following error occurs:



An error has occurred. However, the system should continue working.


Check Instant JChem log file located in your C:\Users\jonlee\AppData\Roaming\.instantjchem\ijc_5_10\var\log folder for more details.


 




java.lang.NullPointerException


at com.im.ijc.sketchreg.SketchRegistry.<init>(SketchRegistry.java:93)


at com.im.ijc.sketchreg.SketchRegistry.<clinit>(SketchRegistry.java:43)


Caused: java.lang.ExceptionInInitializerError


at com.im.ijc.widgets.table.editors.StructureTCEditor.<init>(StructureTCEditor.java:95)


at com.im.ijc.widgets.table.AbstractWBTable.createTableCellEditorForField(AbstractWBTable.java:104)


at com.im.ijc.widgets.table.WBTable.setEditorAndRendererForColumn(WBTable.java:582)


at com.im.ijc.widgets.table.WBTable.createDefaultColumnsFromModel(WBTable.java:624)


at javax.swing.JTable.tableChanged(Unknown Source)


at javax.swing.JTable.setModel(Unknown Source)


at javax.swing.JTable.<init>(Unknown Source)


at javax.swing.JTable.<init>(Unknown Source)


at com.im.ijc.widgets.common.table.ResizableTableImpl.<init>(ResizableTableImpl.java:31)


at com.im.ijc.widgets.table.AbstractWBTable.<init>(AbstractWBTable.java:143)


at com.im.ijc.widgets.table.WBTable.<init>(WBTable.java:158)


at com.im.ijc.widgets.table.WBTableWidget.setFields(WBTableWidget.java:237)


at com.im.ijc.widgets.table.AbstractTableWidget.bind(AbstractTableWidget.java:201)


at com.im.ijc.widgets.table.WBTableFactory.restoreWidget(WBTableFactory.java:59)


at com.im.ijc.widgets.common.GenericWidgetFactory.restoreWidget(GenericWidgetFactory.java:47)


at com.im.ijc.formview.xml.DesignerHandleWidgetPersister.readElement(DesignerHandleWidgetPersister.java:207)


at com.im.df.api.util.xml.BasicPersister.read(BasicPersister.java:1027)


at com.im.df.api.util.xml.BasicPersister.readObjectPolymorphic(BasicPersister.java:1157)


at com.im.ijc.gridview.io.GridViewConfigPersister.readElement(GridViewConfigPersister.java:56)


at com.im.df.api.util.xml.BasicPersister.read(BasicPersister.java:1027)


at com.im.df.api.util.xml.PersisterRegistry.load(PersisterRegistry.java:98)


at com.im.df.api.util.xml.PersisterRegistry.load(PersisterRegistry.java:81)


at com.im.df.api.util.xml.XMLUtils.loadBean(XMLUtils.java:117)


at com.im.ijc.gridview.GridViewTopComponent.loadTableState(GridViewTopComponent.java:242)


at com.im.ijc.gridview.GridViewTopComponent.createTableWidget(GridViewTopComponent.java:222)


at com.im.ijc.gridview.GridViewTopComponent$1.phase2InAWT(GridViewTopComponent.java:186)


at com.im.commons.progress.BackgroundRunner$3.run(BackgroundRunner.java:149)


at java.awt.event.InvocationEvent.dispatch(Unknown Source)


at java.awt.EventQueue.dispatchEventImpl(Unknown Source)


at java.awt.EventQueue.access$000(Unknown Source)


at java.awt.EventQueue$1.run(Unknown Source)


at java.awt.EventQueue$1.run(Unknown Source)


at java.security.AccessController.doPrivileged(Native Method)


at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)


at java.awt.EventQueue.dispatchEvent(Unknown Source)


at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:162)


at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)


at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)


at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)


at java.awt.EventDispatchThread.pumpEvents(Unknown Source)


at java.awt.EventDispatchThread.pumpEvents(Unknown Source)


[catch] at java.awt.EventDispatchThread.run(Unknown Source)



This would not be too bad if you can change the molecule editor in the options panel.  I had to reopen the 32 bit IJC and change it back to Marvin for the error to go away.  


Jon


 

ChemAxon e189db4705

07-09-2012 23:51:27

Hi Jon,


it looks this is a bug which is probably caused that these two installations (32-bits and 64-bits) are sharing the settings directory.  I will look at it soon and will improve the error handling for this special use case.


As workaround I think you can use own userdir for each installation (directory where options are stored). So options won't be shared between your two installations. You can start Instant JChem with userdir switch, e.g.:


c:\Program Files (x86)\ChemAxon\InstantJChem\bin>instantjchem.exe --userdir c:\ijc32

Petr