we have a bit of a problem here. We are working on GWT (Google Web Toolkit), with a login page managed by Spring Security and a simple MySQL db for user management. we encountered a strange behaviour. When we run the code in development mode from our IDE (Eclipse), the virtualized jetty runs everything great, but, when we try to build the application in a WAR file, and then deploy it under a Tomcat 7, we have the following error:
Could not get the JDBC connection ... No suitable driver found for jdbc:mysql://localhost:3306/myschema
We already know there are only 2 causes for this exception, and are:
- Failed to load the JDBC driver
- Wrong parsing of URL connection string
We are pretty sure the URL is correct, as it states here:
<beans:bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<beans:property name="driverClassName" value="com.mysql.jdbc.Driver" />
<beans:property name="url" value="jdbc:mysql://localhost:3306/myschema" />
<beans:property name="username" value="root" />
<beans:property name="password" value="root" />
</beans:bean>
so probably the cause here is Tomcat, or Spring Security that messes around with the library. One last thing, we imported correctly all jar files, from JDBC, to SpringFramework and GWT.
If you need some more info, just ask! Thanks..