cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot load JDBC driver

alfian_h
Champ in-the-making
Champ in-the-making

Hi,

I am new when using Alfresco, I already install Alfresco alfresco-content-services-community-distribution-6.0.7-ga.zip.

When I start my tomcat, I got error message that said

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customPropertyEditorRegistrar' defined in class path resource [alfresco/core-services-context.xml]: Cannot resolve reference to bean 'NamespaceService' while setting bean property 'namespaceService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryDAO' defined in class path resource [alfresco/core-services-context.xml]: Cannot resolve reference to bean 'tenantService' while setting bean property 'tenantService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantService' defined in URL [jar:file:/E:/java/Tomcat9.0/webapps/alfresco/WEB-INF/lib/alfresco-repository-6.55.jar!/alfresco/mt/mt-context.xml]: Cannot resolve reference to bean 'tenantAdminDAO' while setting bean property 'tenantAdminDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantAdminDAO' defined in class path resource [alfresco/dao/dao-context.xml]: Cannot resolve reference to bean 'repoSqlSessionTemplate' while setting bean property 'sqlSessionTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repoSqlSessionTemplate' defined in class path resource [alfresco/ibatis/ibatis-context.xml]: Cannot resolve reference to bean 'repoSqlSessionFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repoSqlSessionFactory' defined in class path resource [alfresco/ibatis/ibatis-context.xml]: Cannot resolve reference to bean 'dialectResourceLoader' while setting bean property 'resourceLoader'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectResourceLoader' defined in class path resource [alfresco/ibatis/ibatis-context.xml]: Cannot create inner bean 'org.springframework.beans.factory.config.PropertyPathFactoryBean#7a1ec4dd' of type [org.springframework.beans.factory.config.PropertyPathFactoryBean] while setting bean property 'dialectClass'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.beans.factory.config.PropertyPathFactoryBean#7a1ec4dd' defined in class path resource [alfresco/ibatis/ibatis-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialect': FactoryBean threw exception on object creation; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:378)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1613)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1357)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502)
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:367)
    ... 59 more

While, I am not use mysql as my database, this is my alfresco-global.properties configuration

dir.root=E:\alfresco\alf_data
dir.keystore=${dir.root}\keystore

db.username=alfresco
db.password=alfresco
db.pool.max=100

db.schema.update=true

db.driver=oracle.jdbc.driver.OracleDriver
db.url=jdbcSmiley Surprisedracle:thin:@128.21.30.20:1521:xxxdb

index.recovery.mode=AUTO

alfresco.context=alfresco
alfresco.host=128.21.34.14
alfresco.port=8080
alfresco.protocol=http
share.context=share
share.host=128.21.34.14
share.port=8080
share.protocol=http

imap.server.enabled=true
imap.server.port=143
imap.server.host=localhost

alfresco.rmi.services.host=0.0.0.0

monitor.rmi.service.port=50508

smart.folders.enabled=false

Thank you for your help.

Regards,

Alfian

1 ACCEPTED ANSWER

douglascrp
World-Class Innovator
World-Class Innovator

Oracle database is only supported for the Enterprise edition of Alfresco.

I see you are using the Community edition, and in this case you will have to choose between MySQL or PostgreSQL.

View answer in original post

4 REPLIES 4

douglascrp
World-Class Innovator
World-Class Innovator

Oracle database is only supported for the Enterprise edition of Alfresco.

I see you are using the Community edition, and in this case you will have to choose between MySQL or PostgreSQL.

Not applicable

I am using aldresco community version 6.2.0 EA. I have already configured PostgreSQL JDBC and settings in alfresco global properties but still having the same error. (catalina.log shown) 

Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'
	at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:81)
	at org.alfresco.repo.domain.dialect.DialectFactoryBean.getObject(DialectFactoryBean.java:59)
	at org.alfresco.repo.domain.dialect.DialectFactoryBean.getObject(DialectFactoryBean.java:1)
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:171)
	... 116 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'
	at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1429)
	at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
	at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)

samuelw
Confirmed Champ
Confirmed Champ

@Anonymous 

did you solve the issue?

I have the same problem (Debian 10/Tomcat 9).

EddieMay
World-Class Innovator
World-Class Innovator

Hi @samuelw,

As this post has been marked as solved, I'd recommend starting a new thread.

HTH, 

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!