No suitable drivers found for jdbc: jtds: sqlserver

advertisements

I have explored similar questions, but none of them seem to be the same situation. I have a REST application deployed to the JBOSS 7.1.1 server. I am using JPA. Whenever I make a call in the EntityManager, I get the following error in the server:

15:16:39,024 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http--0.0.0.0-8080-1) No suitable driver found for jdbc:jtds:sqlserver://aicdevapp01:1433/MOD_Normal

Within the <datasources> tag in the configuration file of the standalone mode of the JBOSS server, I have the following lines of code:

<drivers>
    <driver name="mssql" module="net.sourceforge.jtds">
    <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>
    <xa-datasource-class>net.sourceforge.jtds.jdbcx.JtdsDataSource</xa-datasource-class>
     </driver>
 </drivers>

Any pointers on where I should be looking at to solve this problem? I can hit the database when I run maven tests, but whenever I deploy to the server I have that problem.


You have to download jtds.jar and add it to your classpath.