Unable to access Shared Projects

User 8ad6931a80

22-05-2012 16:30:54

Hi.


Some users are getting the error below after upgrading IJC from 5.5.1 to 5.9.3 and cannot access any shared databases.


Please can you advise.


Regards,


Mike


 


java.lang.NoClassDefFoundError: com/im/commons/beans/BeanUtils


                at com.im.ijc.core.api.util.SchemaInitManager.findCustomizer(SchemaInitManager.java:385)


                at com.im.ijc.core.api.util.SchemaInitManager.startInit(SchemaInitManager.java:183)


                at com.im.ijc.core.api.util.SchemaInitManager.access$000(SchemaInitManager.java:54)


                at com.im.ijc.core.api.util.SchemaInitManager$1.run(SchemaInitManager.java:85)


                at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)


                at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)


Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to


                at org.openide.util.RequestProcessor.post(RequestProcessor.java:422)


                at com.im.ijc.core.api.util.SchemaInitManager.findSchema(SchemaInitManager.java:82)


                at com.im.ijc.core.ds.SchemaConnectionDataObject$SC.getSchemaProvider(SchemaConnectionDataObject.java:271)


                at com.im.ijc.core.api.actions.ConnectSchemaAction.performAction(ConnectSchemaAction.java:40)


                at org.openide.util.actions.NodeAction$DelegateAction$1.run(NodeAction.java:586)


                at org.openide.util.actions.ActionInvoker$1.run(ActionInvoker.java:95)


                at org.openide.util.actions.ActionInvoker.doPerformAction(ActionInvoker.java:116)


                at org.openide.util.actions.ActionInvoker.invokeAction(ActionInvoker.java:99)


                at org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeAction.java:583)


                at org.openide.explorer.view.TreeView$PopupSupport.mouseClicked(TreeView.java:1565)


                at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)


                at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)


                at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)


                at java.awt.AWTEventMulticaster.mouseClicked(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.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.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)


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


[catch] at java.awt.EventQueue$2.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:137)


                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)


 

User 8ad6931a80

23-05-2012 13:14:35

Hi.


This has become a serious problem now for a number of users who are unable to access their databases.  It appears to be profile related as I can access the databases as their user when I am logged onto their Windows 7 PC, but when our IT guys have recreated the users profile it has not fixed the problem.


Below is the error in more detail.  Please can you assist as a matter of urgency.


Regards,


Mike.


org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'initialDataSource' defined in URL [jar:file:/C:/Program%20Files%20(x86)/ChemAxon/InstantJChem/instantjchem/modules/com-im-df-server-local.jar!/META-INF/spring/applicationContext-shared-server-and-local-beans.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.im.commons.db.datasource.BaseDataSource com.im.commons.db.datasource.DifDataSourceFactory.createDataSource()] threw exception; nested exception is java.lang.RuntimeException: Cannot find DataSourceFactory


                at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581)


                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:983)


                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:879)


                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)


                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)


                at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)


                at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)


                at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)


                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)


                at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1079)


                at com.im.df.impl.db.sprovider.SproviderUtils.readApplicationContext(SproviderUtils.java:248)


                at com.im.df.impl.db.sprovider.PropsReadState.proceedToNextState(PropsReadState.java:136)


                at com.im.df.impl.db.sprovider.SchemaProviderImpl.proceedToNextState(SchemaProviderImpl.java:116)


                at com.im.ijc.core.api.util.SchemaInitManager.startInit(SchemaInitManager.java:237)


                at com.im.ijc.core.api.util.SchemaInitManager.access$000(SchemaInitManager.java:54)


                at com.im.ijc.core.api.util.SchemaInitManager$1.run(SchemaInitManager.java:85)


                at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)


                at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)


Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.im.commons.db.datasource.BaseDataSource com.im.commons.db.datasource.DifDataSourceFactory.createDataSource()] threw exception; nested exception is java.lang.RuntimeException: Cannot find DataSourceFactory


                at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:157)


                at org.springframework.beans.factory.support.ConstructorResolver$3.run(ConstructorResolver.java:564)


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


                at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:562)


                ... 17 more


Caused by: java.lang.RuntimeException: Cannot find DataSourceFactory


                at com.im.commons.db.datasource.DifDataSourceFactory.initDataSourceFactory(DifDataSourceFactory.java:58)


                at com.im.commons.db.datasource.DifDataSourceFactory.createDataSource(DifDataSourceFactory.java:45)


                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)


                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)


                at java.lang.reflect.Method.invoke(Unknown Source)


                at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:145)


                ... 20 more

ChemAxon fa971619eb

23-05-2012 13:42:30

Mike,


could you please send the contents of the Help -> Instant JChem dialog, and, if posible, the contents of the IJC log file. Send privately by email if you prefer.


Tim

ChemAxon 37bb34e128

24-05-2012 09:04:19

Hi Mike,


I'm looking at the exceptions and I think the first one you posted here is the real culprit. That is the NoClassDefFoundError: com/im/commons/beans/BeanUtils exception. It's a linkage error that can only happen on runtime when the actual class is not where it is expected to be. It usually means a corrupt installation.


In 5.9.x releases BeanUtils class was moved from it's former package com.im.commons.util to a new package com.im.commons.beans. You said that the error happens after upgrading IJC from 5.5.1 to 5.9.3. The only possible explanation is that the module with BeanUtils class was not upgraded.


Now, in order to analyse this further I would need to understand how exactly you (your users) upgrade IJC. Let me ask a few questions:


1. Do your users have a full write access to the IJC installation directory?


2. Do your users upgrade their IJC installation by downloading updates from within IJC (eg. via Plugin Manager) or by reinstalling IJC from the installer?


Here is a bit of a background on how IJC upgrade works in regards to the installation directory and so called 'userdir'.


IJC consists of modules. When you install IJC from the installer all its modules are copied to the installation directory. When you run IJC all user customizations are written to the 'userdir', which is a directory somewhere underneath a user's home directory (which is defined by OS). When a user tries upgrading IJC new versions of modules are downloaded. IJC tries to download them to the installation directory, if it's possible. That is if the current user has a full write access rights to that directory. If the user does not have write aceess to the installation directory the modules are downloaded to a userdir and in WinOS terms become part of this user's profile.


This could lead to a very messy situation if the same IJC installation is shared by admin and non-admin users (eg users who have write access to the installation dir and those who don't). Because the non-admin users may end up having old versions of modules in their userdir that override newer versions from the installation dir.


I'm not sure if this is exactly the problem that you are facing, but from what you've described it looks like it is. A simple remedy could be to just delete the userdir. Choose one user that has the problem, let him login and start IJC, ignore the errors and go to Help -> About, find what the userdir is for this user. Close IJC and delete the userdir. Start IJC again. If the theory is right IJC should start without the error.


Thanks and sorry for this lenghty post.


-vita


P.S.: Having the IJC log file as requested by Tim would be useful. You can send it either to Tim or to my private email vstejskal _at_ chemaxon.com.


 


com/im/commons/beans/BeanUtils

ChemAxon 37bb34e128

28-05-2012 12:21:09

Mike confimed in private email that deleting userdir solves the problem.


-vita