Project

General

Profile

bug #6082

Local managed server in Taxeditor fails during start

Added by Andreas Kohlbecker about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Highest
Category:
taxeditor
Target version:
Start date:
09/13/2016
Due date:
% Done:

100%

Severity:
critical
Found in Version:

Description

login : 
editor version : 4.3.0.201609131149
server :  / 
schema version : 
os : Linux 3.19.0-59-generic amd64
java : 1.8.0_60
java.lang.RuntimeException: Error during CDM server startup
    at eu.etaxonomy.taxeditor.webapp.CDMServer$1.run(CDMServer.java:193)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [eu/etaxonomy/cdm/persistence.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [eu/etaxonomy/cdm/security_base.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [eu/etaxonomy/cdm/remote/config/DataSourceConfigurer.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.RuntimeException: Unable to connect or to retrieve version info from data source com.mchange.v2.c3p0.ComboPooledDataSource[ identityToken -> z8kfsx9j9yqqq81mvaz0g|1fa429a4, dataSourceName -> z8kfsx9j9yqqq81mvaz0g|1fa429a4 ]
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1481)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1226)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:446)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:328)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
    at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:800)
    at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:444)
    at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:294)
    at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)
    at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    at org.eclipse.jetty.server.Server.start(Server.java:387)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
    at org.eclipse.jetty.server.Server.doStart(Server.java:354)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at eu.etaxonomy.taxeditor.webapp.CDMServer$1.run(CDMServer.java:184)
....

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:1469)
    at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:644)
    at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:554)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(C3P0PooledConnectionPool.java:758)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:685)
    ... 63 more
Caused by: java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getDriver(DriverManager.java:315)
    at com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:285)
    at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)
    at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
    at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
    at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
    at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
    at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
    at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)

The mysql driver seems to be missing!

Associated revisions

Revision 09ab8026 (diff)
Added by Andreas Kohlbecker about 3 years ago

fix #6082 fixing incomplete entries in the eu.etaxonomy.taxeditor.webapp/build.properties

Revision ccf3875f (diff)
Added by Andreas Müller about 3 years ago

ref #6082 try to fix dependency issues in managed TaxEditor

History

#1 Updated by Andreas Müller about 3 years ago

  • Subject changed from local managed server in Taxeditor fails during start to Local managed server in Taxeditor fails during start
  • Priority changed from New to Highest
  • Target version changed from Unassigned CDM tickets to Release 4.3

#2 Updated by Andreas Müller about 3 years ago

  • Assignee changed from Andreas Müller to Andreas Kohlbecker

#3 Updated by Andreas Kohlbecker about 3 years ago

This does not happen from within the IDE and the eu.etaxonomy.taxeditor.webapp_4.3.0.201609190837.jar of the lastets NIGHTLY build contains the mysql-connector-java-5.1.24.jar, so at first glance the setup looks ok.

Need to do more in depth investigation ....

#4 Updated by Andreas Kohlbecker about 3 years ago

this seems to be caused by incomplete entries in the eu.etaxonomy.taxeditor.webapp/build.properties

#5 Updated by Andreas Kohlbecker about 3 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50

Applied in changeset taxeditor:commit:taxeditor|09ab8026ce80a7f76ad3bc250f303aee986c3dab.

#6 Updated by Andreas Kohlbecker about 3 years ago

  • Status changed from Resolved to Feedback

The changes committed before did apparently not solve the problem.
The latest build made by jenkins still was having that bug.

I tried to build the editor drirctly from within eclipse but this attempt failed due to

  Cannot complete the install because one or more required items could not be found.
 Software being installed: EDIT Taxonomic Editor 4.3.0.201609191704 (eu.etaxonomy.taxeditor.product 4.3.0.201609191704)
 Missing requirement: CDM Library Dependencies Plugin 4.3.0.201609191704 (eu.etaxonomy.taxeditor.cdmlib 4.3.0.201609191704) requires 'bundle org.apache.commons.httpclient 3.1.0' but it could not be found
 Cannot satisfy dependency:

I a have not enough experience with eclipse rcp to quickly solve that.
Can someone take over?

#7 Updated by Andreas Müller about 3 years ago

  • Status changed from Feedback to Resolved

taxeditor|ccf3875f seems to fix the problem.

Please check.

#8 Updated by Andreas Kohlbecker about 3 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 50 to 100

Yes this change actually fixes the problem. Howver, it is strange that it is necessary to explicitly name all jars in the bin.includes. Specifying the lib folder as

bin.includes = META-INF/,\
               .,\
               lib/

should include all the jars that are contained in that folder. The UI Widget of the Build Configuration editor works this way and the RCP documentation also tells that a folder entry should be sufficient. It would be much more reliable if this would be working as expected, since version changes in the depencencies would not require to changes in the build.propertiesfile.

#9 Updated by Andreas Müller about 3 years ago

To be honest I am not sure which of the 3 changes was the crucial one and if they are all required.

I only remembered that I had a similar problem on my local installation and the changes finally helped. But maybe only the entries in ManifestMF and/or classpathentry did the job, as both definetely still had the wrong version number.

Maybe someone (Katja, Patrick?) can test this a bit further and try to clean the code as far as possible.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)