Difficulty deploying webservices

User fa1369adab

31-10-2014 14:30:08

I am trying to upgrade from marvin4JS6.3.0 to marvin4JS14.10.20.  When I upload the WAR file it fails to deploy.  I get the logged messages in the attached file.  I have no difficulty re-deploying marvin4J6.3.0. I'm not sure adding an attachment works, so here are the first few lines of the relevant log:


 


INFO: Deploying web application archive webservices.war
Oct 29, 2014 12:16:32 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Oct 29, 2014 12:17:13 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appDbBuilder' defined in class path resource [spring-appDb.xml]: Invocation of init method failed; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)

ChemAxon 7c2d26e5cf

31-10-2014 17:05:26

I have forwared your issue to the web service team.

ChemAxon 13811e1703

03-11-2014 12:54:26

Hi Refoyl,

I assume you have another instance of the JChem Web Services up and running on the same machine We are using a file based application database, which can be locked by one instance at a time. Please check it.

Regards,
Peter 

User fa1369adab

03-11-2014 14:17:00

Yes, we have two instances of Tomcat6 running, serving different ports.  The other one is running a previous version of webservices.  Is it not possible to configure Marvin4JS to have two instances running?  That configuration works, apparently, for version 6.3.0.

ChemAxon 13811e1703

03-11-2014 14:45:36

Right now there can be only one running instance. You can do upgrades by stopping an instance and deploying to another. 

User fa1369adab

03-11-2014 19:44:52

I undeployed the other copy.  When I try to deploy the new version, I get:


 



org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appDbBuilder' defined in class path resource [spring-appDb.xml]: Invocation of init method failed; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
...


at chemaxon.jchem.webservice2.configstore.SQLConfigStoreFactory.<init>(SQLConfigStoreFactory.java:87)


...


Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.


...


at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1422)


ChemAxon 13811e1703

04-11-2014 08:13:06

It's the same error, some other process is still locking the database. It is not enough to undeploy the application because of the behavior of Apache Derby, server must be stopped.

User fa1369adab

04-11-2014 14:48:49

I'm confused.  Are you suggesting that Tomcat6 must be stopped and restarted?  Or that Oracle must be stopped and restarted?  Or some other server?

ChemAxon 13811e1703

10-11-2014 09:58:16

Hi,

There should be only one instance of JChem Web Services deployed and running on the same machine.


It is using a file based database for storing application data, and that could be locked only by one instance. So when deploying a new version, yes, please restart Tomcat and make sure no other java process is running any instance of the application.

Regards,
Peter