DBRE MSSQL JDBC driver not available for 'net.sourceforge.jtds.jdbc.Driver' Loop
I'm having trouble starting a simple project with the goal for seeing how DBRE would work with my database.
Expected Result: After setting up persistence to communicate with a MS SQL db, I should be able to run DBRE and connect to the database.
Actual Result: After setting up persistence to communicate with MS SQL db, roo continually tells me "JDBC driver not available for 'net.sourceforge.jtds.jdbc.Driver'"
Details:
Roo Versions: 1.1.5 and 1.2
What I've done so far:
1.) I got started by downloading the SpringSource Tool Suite Version 2.8.1.RELEASE. (Build Id: 201111221000)
2.) I created a new Spring Roo Project in the Tool Suite.
3.) I ran
Code:
roo>persistence setup --database MSSQL --provider HIBERNATE
Roo seemed to do its thing and setup my pom file
Code:
Created SRC_MAIN_RESOURCES\META-INF\spring\database.properties
Please update your database details in src/main/resources/META-INF/spring/database.properties.
Updated ROOT\pom.xml [added dependencies net.sourceforge.jtds:jtds:1.2.4, org.hibernate:hibernate-core:3.6.4.Final, org.hibernate:hibernate-entitymanager:3.6.4.Final, org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.0.Final, org.hibernate:hibernate-validator:4.1.0.Final, javax.validation:validation-api:1.0.0.GA, cglib:cglib-nodep:2.2, javax.transaction:jta:1.1, org.springframework:spring-jdbc:${spring.version}, org.springframework:spring-orm:${spring.version}, commons-pool:commons-pool:1.5.4, commons-dbcp:commons-dbcp:1.3; added repository https://repository.jboss.org/nexus/content/repositories/releases]
Updated SRC_MAIN_RESOURCES\META-INF\spring\applicationContext.xml
Created SRC_MAIN_RESOURCES\META-INF\persistence.xml
4.) I went to the indicated database.properties file and added/updated the properties for my database.
5.) I wanted to see if my settings and connection were good so I ran
Code:
roo> database introspect --schema dbo
As expected, per most of the help documentation, roo tells me I need to get the add-on:
Code:
Located add-on that may offer this JDBC driver
1 found, sorted by rank; T = trusted developer; R = Roo 1.1 compatible
ID T R DESCRIPTION -------------------------------------------------------------
01 Y Y 1.2.4.0010 #jdbcdriver driverclass:net.sourceforge.jtds.jdbc.Driver....
--------------------------------------------------------------------------------
[HINT] use 'addon info id --searchResultId ..' to see details about a search result
[HINT] use 'addon install id --searchResultId ..' to install a specific search result, or
[HINT] use 'addon install bundle --bundleSymbolicName TAB' to install a specific add-on version
JDBC driver not available for 'net.sourceforge.jtds.jdbc.Driver'
6.)So as per the documentation I run
Code:
roo> addon install id --searchResultId 01
I get this as a response:
Code:
roo> Target resource(s):
-------------------
Spring Roo - Wrapping - jtds (1.2.4.0010)
Deploying...done.
So I figured, now I'm ready to introspect my db and run the following again:
Code:
roo> database introspect --schema dbo
Roo tells me the following after I run that:
Code:
Located add-on that may offer this JDBC driver
1 found, sorted by rank; T = trusted developer; R = Roo 1.1 compatible
ID T R DESCRIPTION -------------------------------------------------------------
01 Y Y 1.2.4.0010 #jdbcdriver driverclass:net.sourceforge.jtds.jdbc.Driver....
--------------------------------------------------------------------------------
[HINT] use 'addon info id --searchResultId ..' to see details about a search result
[HINT] use 'addon install id --searchResultId ..' to install a specific search result, or
[HINT] use 'addon install bundle --bundleSymbolicName TAB' to install a specific add-on version
JDBC driver not available for 'net.sourceforge.jtds.jdbc.Driver'
7.) This looks familiar, better check the Googles and figure out what I'm doing wrong. I found several posts from 2010 that seemed to indicate there were some bugs with the wrong drivers being associated with MSSQL.
I found the following:
- http://forum.springsource.org/showth...-MSSQL-problem - this thread mentions running script install-jdbc-drivers.roo. I tried that and get file not found. After digging into that, it seems the use of that script was deprecated and removed.
- https://jira.springsource.org/browse/ROO-1354 - JIRA ticket related to the wrong driver being included and the resolution seems to indicate that 1.1.5 should contain the fix.
- http://forum.springsource.org/showth...ion-with-MSSQL -> A post on configuring the pom file and the properties file to use the MS JDBC driver instead of the JTDS driver. Andrew Swan indicates in this post that the JTDS driver provied by roo out of the box should just work and that install the MS JDBC driver should not be necessary. (I tried it for kicks, and roo complains that the driver isn't available either).
8.) Thinking maybe that bug linked above didn't actually make it into 1.1 release, I downloaded Roo 1.2 and created a new project just from the command line. After setting up persistence I get the following different result from roo
Code:
roo> database introspect --schema dbo
Unable to get connection from driver: I/O Error: SSO Failed: Native SSPI library
not loaded. Check the java.library.path system property.
So, what I am doing wrong? It seems other people have gotten roo to work with MSSQL. I'm not sure what I'm missing. Any help would be greatly appreciated.
Thanks in advance,
Ryan