cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'

avtor
Champ in-the-making
Champ in-the-making
Alfresco 4.2 whith PostgreSQL database.
OS: Ubuntu 14.04 server.

When i try to invoke export/import tools, for example:

java -cp "/mnt/4TB/DST/alfresco/alfresco-4.2/tomcat/lib/servlet-api.jar:classes/alfresco/module:classes:lib/*" org.alfresco.tools.Import -user admin -pwd admin -store workspace://SpacesStore -path sys:system -verbose Zone.xml

i get following message: [alfresco.repo.admin] [main] Using database URL 'jdbc:mysql:///alfresco' with user 'alfresco'.
then: Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'

Alfresco-global.properties contain :
### database connection properties ###
db.driver=org.postgresql.Driver
db.username=alfresco
db.password=${password}
db.name=alfresco
db.url=jdbcSmiley Tongueostgresql://localhost:5432/${db.name}

Please, help me find out, how to correct invoke export/import tools.
10 REPLIES 10

jpotts
World-Class Innovator
World-Class Innovator
Alfresco is configured to use MySQL by default so if you've got it configured for PostgreSQL in your alfresco-global.properties file but the error message is complaining about MySQL it means your alfresco-global.properties file isn't being read.

Jeff

avtor
Champ in-the-making
Champ in-the-making
Thanks a lot. I've copied alfresco-global.properties to tomcat/webapps/alfresco/WEB-INF/classes and and have got connected sucessfully.

mrogers
Star Contributor
Star Contributor
That's the wrong place.   Should you redeploy for some reason your changes will get lost.

The correct place is tomcat/shared/classes

If you are using a version of tomcat that you have installed yourself then you also need to configure the shared.loader in catalina.properties.

avtor
Champ in-the-making
Champ in-the-making
When location is tomcat/shared/classes It get error I wrote above.

In catalina.properties :
shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar

mrogers
Star Contributor
Star Contributor
very strange.

avtor
Champ in-the-making
Champ in-the-making
If add to classpath tomcat/shared/classes it works fine. it's my mistake.

Nice to know you solved it. Alfresco's bundled Tomcat is configured to use 'shared/classes' as part of the ClassPath, but newer Tomcat versions doesn't have it.

tgebeyehu
Champ in-the-making
Champ in-the-making
i am using alfresco 5 and alfresco maven sdk 2.0. when i update to alfresco 5 and alfresco sdk to 2.0.0 i keep seeing this error as a newbie i got stacked on my project and couldn't figure out how to  solve it. any help.

Is this issue resolved?

I have also same issue.