AnsweredAssumed Answered

PROBLEM: Could not obtain connection metadata

Question asked by hr61369256 on Mar 17, 2012
Latest reply on Sep 19, 2012 by darkmstr
Hi ,
I'm working with alfresco since 2006 and solved a lot of problems on my own … but now I tried all (what I knew as possible causes) … I have no more idea.

I installed release 3.4e with MySQL under Ubuntu 10.10 (with tomcat). I double checked the database connection, the database rights for user alfresco for database alfresco34e … seems all OK. I'm using "mysql-connector-java-5.1.18-bin" … I've made the corresponding settings in alfresco-global.properties:

——————————————————————
dir.root=/opt/Alfresco/alfresco34e/alf_data

web.application.context.url=http://127.0.0.1:8080/alfresco

### database connection properties ###
db.name=alfresco34e
db.username=alfresco
db.password=<password>
db.host=127.0.0.1
db.port=3306
db.driver=org.gjt.mm.mysql.Driver
db.url=jdbc:mysql://127.0.0.1:3306/alfresco34e?useUnicode=yes&characterEncoding=UTF-8
——————————————————————

In alfresco.log I received a Warning and a Error, which I posted as followed in short form:

——————————————————————
23:13:41,498 WARN  [org.hibernate.cfg.SettingsFactory] Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)
   at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
   at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
   at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81)

——————————————————————

——————————————————————
23:13:41,537 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'RepoServerMgmt' defined in class path resource [alfresco/core-services-context.xml]: Cannot resolve reference to bean 'transactionService' while setting bean property 'transactionService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionService' defined in class path resource [alfresco/core-services-context.xml]: Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [alfresco/hibernate-context.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 [alfresco/hibernate-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)

——————————————————————

Any ideas? Thank you.

Outcomes