AnsweredAssumed Answered

Running Alfresco SDK Samples Failure

Question asked by hyd198471 on Apr 15, 2012
Latest reply on Sep 10, 2014 by ranarakkoub
Hi
I am new to Alfresco SDK. I have download and install the Alfresco SDK 4.0d and Alfresco Community Edition and try to run the SDK example (FirstFoundationClient). The question is that I always failed to run and get the following errors:

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'encryptionKeysRegistry' defined in class path resource [alfresco/encryption-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(BeanDefinitionValueResolver.java:106)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
   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)
I have followed the tutorial of Alfresco SDK 4.0 and install external mysql database on the localhost. The following is my alfresco-global.properties:

#
# Sample custom content and index data location
#

dir.root=c:/alfresco/alf_data
dir.keystore = ${dir.root}/keystore
encryption.keystore.location=${dir.root}/keystore
encryption.keystore.keyMetaData.location=${dir.root}/keystore_password

db.username=root
db.password=admin
db.name = alfresco
#
# MySQL connection (This is default and requires mysql-connector-java-3.1.12-bin.jar, which ships with the Alfresco server)
#
db.driver=org.gjt.mm.mysql.Driver
db.url=jdbc:mysql://localhost/alfresco

#
# Oracle connection (requires ojdbc14_g.jar or equivalent jar in shared libraries location)
#
#db.driver=oracle.jdbc.OracleDriver
#db.url=jdbc:oracle:thin:@localhost:1521:alfresco

#
# Sybase connection (requires jconn2d.jar or equivalent jar in shared libraries location)
#
#db.driver=com.sybase.jdbc2.jdbc.SybDriver
#db.url=jdbc:sybase:Tds:localhost:2638/alfresco

#
# Properties shared between the Alfresco server
# and its remote clients (e.g.: the virtualization server).
#
# Ports used by Alfresco
#
# Note:  These ports are also used by the virtualization server
#        (hence, they're in a seperate file that can be copied easily).

# Remote RMI services
# alfresco.rmi.services.port=50500
# alfresco.rmi.services.host=localhost


However, the problem is still there. I am wondering what is the real problem there?
Can someone  help me with that ?

Outcomes