Question

I've got a play! (1.x) app that works fine if I user 'play run', either in dev/test/prod mode. But when I try to run it on a Tomcat server, I got this exception :

10-Feb-2014 12:32:48.196 SEVERE [http-apr-8080-exec-20] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class play.server.ServletWrapper play.exceptions.DatabaseException: Cannot connected to the database, No suitable driver found for jdbc:sqlserver://127.0.0.1:1444;DatabaseName=Blabbla at play.db.DBPlugin.onApplicationStart(DBPlugin.java:161) at play.plugins.PluginCollection.onApplicationStart(PluginCollection.java:525) at play.Play.start(Play.java:533) at play.Play.init(Play.java:305) at play.server.ServletWrapper.contextInitialized(ServletWrapper.java:78) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4734) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

I'm using play 1.2.7, Tomcat 8.0.1 (same problem with v7) and here is my config file :

db.url=jdbc:sqlserver://127.0.0.1:1444;DatabaseName=Blabbla db.driver=net.sourceforge.jtds.jdbc.Driver
jpa.dialect=org.hibernate.dialect.SQLServerDialect

I already tried to put the driver into TOMCAT_DIR/lib but nothing changed

Any idea ?

Was it helpful?

Solution

Find a solution : use Microsoft driver for MsSQL instead of the JTDS one. JTDS works fine on standalone but not with Tomcat.

db.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top