Skip to main content

Geronimo and Mysql Driver

I was trying to deploy Alfresco Content Management system into Geronimo. I downloaded the community war version and simply used the deploy script of Geronimo located in GERONIMO_HOME/bin/ to deploy the war file.

As soon As I started Alfresco through Geronimo console, I ran into problems with Alfresco not being able to load MySQL Driver. Needless to say, MySQL database was chosen for this deployment.

I ended up solving the problem by deploying MySQL driver into Geronimo. You can do this easily through the Geronimo console. On the left navigation of the console, there is a link called Common Libs below the Services folder. When you click on this, you will see an html form that lest you choose the jar file (in this case mysql-connector.jar). With in the form, you can give groupId, artificatId and version to the file. Once you submit the form, mysql connector will be deployed into Geronimo.

What you need to do next is to create a geronimo-web.xml file and place it under WEB-INF directory of alfresco.war. In this geronimo-web.xml you want to specify dependency to mysql-connector. The groupId and artifactId will come into play when you are defining the dependencies in your geronimo-web.xml file. Once I defined the dependency, and re-wared the alfresco.war file and re-deployed the new war file into Geronimo, I was able to successfully start Alfresco.

Here is how my geronimo-web.xml look like.

Comments