AnsweredAssumed Answered

alfresco nto starting

Question asked by ashwink on Oct 13, 2010
Hi,

my alfresoc is using mysql database. Alfresco and mysql are runnning in the same box and the ip of that box is 192.168.1.175 I recently chnaged mysql to listen on 192.168.1.175 instead of all 0.0.0.0. i changed the following in alfresco to reflect that change:
/opt/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/repository.properties
db.url=jdbc:mysql://192.168.1.175:3306/alfresco
from
db.url=jdbc:mysql:///${db.name}
the output of netstat -anp|grep 3306 shows the following:
tcp        0      0 192.168.1.175:3306          0.0.0.0:*                   LISTEN      10017/mysqld
But alfresco is not satrtign and throwing the following error in alfresco.log


18:34:36,245 WARN  [org.hibernate.cfg.SettingsFactory] Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

Last packet sent to the server was 0 ms ago.)
        at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
        at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
..
..
..

Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Last packet sent to the server was 0 ms ago.
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorI

..
..

18:34:36,271 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)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolv
….
….
Caused by: 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.be

Outcomes