NULL POINTER when opening some MarvinsKetch features

User a6873c7b2c

03-12-2009 16:53:36

Hi,


I am integrating marvinsketch (Jchem 5.2.6) in a GUI by using the following component : chemaxon.marvin.beans.MViewPane


JPanel viewPanel = new JPanel(new BorderLayout());

MViewPane view = new MViewPane();

viewPanel.add(view);


when using some features of the MViewPane such as the button to display "The periodiс table of the chemical elements" or by cliking on Menu->Help->"About marvinsKetch", I got some NullPointerException (see the stacktrace below):


However, most of the others features work fine!


The only archive I am using is jchem.jar. Am I missing something here ?


Thanks for your support.


Stephane


 


 


periodic element button:


Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at chemaxon.marvin.sketch.swing.SketchPanel.setMoreVisible0(SketchPanel.java:2620)
    at chemaxon.marvin.sketch.swing.SketchPanel.setMoreVisible(SketchPanel.java:2593)
    at chemaxon.marvin.sketch.swing.actions.ShowPeriodicSystemAction.actionPerformed(ShowPeriodicSystemAction.java:43)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.JToggleButton$ToggleButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.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.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)
    at java.awt.EventDispatchThread.run(Unknown Source)



About MarvinsKetch:


Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at chemaxon.marvin.common.swing.MolPanel.doHelp(MolPanel.java:2369)
    at chemaxon.marvin.sketch.swing.actions.AboutAction.actionPerformed(AboutAction.java:32)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.AbstractButton.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.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.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)
    at java.awt.EventDispatchThread.run(Unknown Source)

ChemAxon 7c2d26e5cf

04-12-2009 19:57:40

I have created a small example. Hopefully, it is similar to your application. I have tested 5.2.6 with this example. It works fine for me.


$ javac -classpath ".;lib/jchem.jar" Test.java
$ java -classpath ".;lib/jchem.jar" Test

Are you sure that all jars are preserved in jchem/lib directory (beside jchem.jar)?


Do you use the proper Java version?


http://www.chemaxon.com/forum/ftopic5279.html

User a6873c7b2c

07-12-2009 10:26:20

Hi Tamas,


thanks for your answer.


forms-1.1.0.jar was missing in my path. The strange thing is I would have expect a "ClassNotFoundException" instead of a NullPointerException with this missing jar.


Anyway, problem is resolved.


Thanks again.

ChemAxon 7c2d26e5cf

07-12-2009 17:04:35

I am glad that the problem has been solved. Thanks for the feedback.