On 17/02/2018 00:08, Eric-R82 wrote:
I located an example webapp to test using a datasource.

I added the following to my Tomcat\conf\context.xml file

<Resource name=&quot;jdbc/TestDB&quot;
         auth=&quot;Container&quot;
         factory=&quot;org.apache.tomcat.jdbc.pool.DataSourceFactory&quot;
driverClassName=&quot;com.microsoft.sqlserver.jdbc.SQLServerDriver&quot;
         type=&quot;javax.sql.DataSource&quot;
         maxActive=&quot;50&quot;
         maxIdle=&quot;10&quot;
         maxWait=&quot;15000&quot;
         username=&quot;syncope&quot;
         password=&quot;&lt;password>"
         url="jdbc:sqlserver://localhost:1433;databaseName=TestDB;"
         removeAbandoned="true"
         removeAbandonedTimeout="30"
         logAbandoned="true" />/

The database TestDB has been created and populated. However I get the
following error:

/Unable to get connection, DataSource invalid: "java.sql.SQLException: No
suitable driver found for jdbc/TestDB"/

I need to research how to install the JDBC driver. I thought it was just as
simple as placing the .jar file that I downloaded from microsoft and placing
it in the Tomcat\lib folder.

Yes, it is as simple as that.

Please ensure that the "the .jar file downloaded from microsoft" effectively contains the class

com.microsoft.sqlserver.jdbc.SQLServerDriver

Regards.

--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/

Reply via email to