NullPointerException when calling setImplicitH on Windows

User 6fe22de057

25-09-2014 09:23:15

Hi,


We were calling setImplicitH on an MSketchPane with the value DispOptConsts.IMPLICITH_OFF_S.


Our code had been like this for a while, but after a recent upgrade of Marvin (6.2.0 2014-01-20) we noticed that it started causing a NullPointerException on Windows.


NullPointerException:NullPointerException
java.util.Hashtable.hash(Unknown Source)
java.util.Hashtable.get(Unknown Source)
java.util.Properties.getProperty(Unknown Source)
chemaxon.marvin.common.UserSettings.getProperty(UserSettings.java:505)
chemaxon.marvin.common.UserSettings.setProperty(UserSettings.java:541)
chemaxon.marvin.common.UserSettings.setProperty(UserSettings.java:522)
chemaxon.marvin.common.swing.MolPanel.changeUserDispoptsProperties(MolPanel.java:1912)
chemaxon.marvin.common.swing.MolPanel.setDispopts(MolPanel.java:1318)
chemaxon.marvin.common.swing.MolPanel.setImplicitH(MolPanel.java:2868)
chemaxon.marvin.beans.MarvinPane.setImplicitH(MarvinPane.java:891)


We've removed the call as we don't seem to need it anyway (perhaps it was an old workaround?), but here is a bug report for the files.


__Jason

ChemAxon 4fa3cf533c

29-09-2014 11:37:21

Dear Jason,


Could you please tell, how do you integrate the product, or what part do you use ? Preferably a code snippet would help.


Regards,


Tamas Fazekas-Vigh

User 6fe22de057

29-09-2014 11:54:18

...


UserSettings userSettings = new UserSettings();


userSettings.setProperty(SketchParameterConstants.MENU_CUSTOMIZATION_FILE, "...");


userSettings.setProperty(SketchParameterConstants.CUSTOMIZATION_ENABLED, "true");


sketchPane = new MSketchPane(userSettings);


sketchPane.setImplicitH(DispOptConsts.IMPLICITH_OFF_S); // NullPointerException on Windows


sketchPane.setPreferredSize(new Dimension(530, 520));


...

ChemAxon 4fa3cf533c

29-09-2014 12:37:13

It seems for me, that it is because the lack of license file. It is either missing or it is not located on the right place. 


Are you not experiencing any Licence Exception upon showing the component ?


Regards,


Tamas Fazekas-Vigh

User 6fe22de057

29-09-2014 13:13:17










tfazekas wrote:

It seems for me, that it is because the lack of license file. It is either missing or it is not located on the right place. 


Are you not experiencing any Licence Exception upon showing the component ?



Not that I can see. Seems to work if I remove the call. Our chemistry specialists don't think we want the call anyway so I wouldn't worry too much about it.


__Jason

ChemAxon 7936325a45

30-09-2014 08:57:43

Dear Jason,


Can you email me your menucustomization file, if it is possible?


Regards,
István 

User 6fe22de057

30-09-2014 09:02:50










istvanori wrote:

Dear Jason,


Can you email me your menucustomization file, if it is possible?


Regards,
István 



Sure.


__Jason

ChemAxon 7936325a45

30-09-2014 15:14:17

Dear Jason,


Sadly that did not help to reproduce the exception. Which version did you update your marvin to?


After updates, deleting the Java cache could help to solve irreproducable errors. You can find a description about that here: https://www.chemaxon.com/forum/ftopic556.html&sid=a890425016966d34e8a326c7cfa5f933


Regards,
István 

User 6fe22de057

30-09-2014 15:19:06










istvanori wrote:

Dear Jason,


Sadly that did not help to reproduce the exception. Which version did you update your marvin to?


After updates, deleting the Java cache could help to solve irreproducable errors. You can find a description about that here: https://www.chemaxon.com/forum/ftopic556.html&sid=a890425016966d34e8a326c7cfa5f933


Regards,
István 



Hi,


We upgraded to version "6.2.0 2014-01-20", as I said at the start.


__Jason



ChemAxon 7936325a45

30-09-2014 15:43:36

Dear Jason,

Sorry, I misunderstood. Which version did you upgrade from?


Thanks,
István 

User 6fe22de057

30-09-2014 15:49:55










istvanori wrote:

Dear Jason,

Sorry, I misunderstood. Which version did you upgrade from?


Thanks,
István 



Hi,


In order, the recent integrations have been the following (going backwards in time):


- 6.2.0


- 6.2.0_b778 (a beta? build)


- 6.0.3


- 5.12.2


- 5.12


HTH


__Jason

ChemAxon 7936325a45

01-10-2014 10:10:23












istvanori wrote:

After updates, deleting the Java cache could help to solve irreproducable errors. You can find a description about that here: https://www.chemaxon.com/forum/ftopic556.html&sid=a890425016966d34e8a326c7cfa5f933



Did the Java cache deletion help?


Regards,
István

User 6fe22de057

01-10-2014 12:20:05










istvanori wrote:












istvanori wrote:

After updates, deleting the Java cache could help to solve irreproducable errors. You can find a description about that here: https://www.chemaxon.com/forum/ftopic556.html&sid=a890425016966d34e8a326c7cfa5f933



Did the Java cache deletion help?


Regards,
István



I don't think the cache can be relevant since this was running under Eclipse as a normal application.


__Jason

ChemAxon 5433b8e56b

07-10-2014 16:44:14

Hi Jason,


the problem is the following:


we introduced a change in our licensing, and if you comment out all the code, that sets up the Sketcher, and leave only the MSketchPane instantiation, and place the instantiated pane into a frame, you would see a License notficitaion.


Currently you have to have a valid license file in order to embed the Marvin Beans components into an other application, and I am pretty sure this is the cause of the problem.


The exception is a bug by the way in our system so we need to fix it since it hides the license related notification also.


So if you do not have a license required to embed the newer versions of MarvinBeans, you should contact our sales team at sales _at_ chemaxon.com


If you have it, then you have to place the license.cxl file under the user home folder into the .chemaxon directory (~\.chemaxon), or start the standalone MarvinSketch application and use the License Manager that can be found in the Help menu to install the license.


Regards,
Istvan 

User 6fe22de057

08-10-2014 16:59:27










ifajth wrote:

Hi Jason,


the problem is the following:


we introduced a change in our licensing, and if you comment out all the code, that sets up the Sketcher, and leave only the MSketchPane instantiation, and place the instantiated pane into a frame, you would see a License notficitaion.


Currently you have to have a valid license file in order to embed the Marvin Beans components into an other application, and I am pretty sure this is the cause of the problem.


The exception is a bug by the way in our system so we need to fix it since it hides the license related notification also.


So if you do not have a license required to embed the newer versions of MarvinBeans, you should contact our sales team at sales _at_ chemaxon.com


If you have it, then you have to place the license.cxl file under the user home folder into the .chemaxon directory (~\.chemaxon), or start the standalone MarvinSketch application and use the License Manager that can be found in the Help menu to install the license.


Regards,
Istvan 



Our product is client-server. The Chemaxon licence file is kept on the server currently. We've found that the Marvin components that we need work adequately without registering this on the client-side. If we find we need to register a client-side licence (e.g. as your licensing changes), we would read it from our server and programmatically set it in the client. We would not install the fileon the client or have a separately client-side licence manager we could avoid it.


__Jason

User 6fe22de057

10-10-2014 10:05:49










jason.trenouth wrote:










 

Our product is client-server. The Chemaxon licence file is kept on the server currently. We've found that the Marvin components that we need work adequately without registering this on the client-side. If we find we need to register a client-side licence (e.g. as your licensing changes), we would read it from our server and programmatically set it in the client. We would not install the fileon the client or have a separately client-side licence manager we could avoid it.


__Jason



Correction. We already read the Chemaxon licence from our server and set it in the client if it is available, but we do also rely on Marvin working in a degenerate way if no licence is available on the server because there may be a Chemxon licence available on the more remote server where the query is ultimately being submitted (in our federated system). At the moment we haven't done the work to read the licence from the right federated server to enable/disable interactive client-side functionality. But that wasn't the scenario here. It was just plain client-server.


__Jason


 

ChemAxon 5433b8e56b

15-10-2014 11:44:34

Hi Jason,


first of all sorry for the late reply on this.


We have checked the license issued to you, and it seems you may have an issue with the settings regarding to the license path, or with the license, I suggest to skip to e-mail communication from now on on this topic.


Regards,
Istvan