Rollbase cannot find sql server driver on Apache Tomcat 7.

Posted by Rollbase User on 13-Jun-2013 09:00

We are running a Rollbase 4.05 Private Cloud Installation on a Ubuntu server and are trying to add a new sql server database for a customer. We have followed the instructions from Rollbase In Action and placed the sqljdbc.jar file in the tomcat/lib directory. We edited the catalina.sh file to add the full path to the sqljdbc.jar file to the classpath. Running the command "ps aux | grep tomcat7" shows the classpath variable with the correct path to the sqljdbc.jar file. Both tomcat7 and apache2 services were restarted. When adding a database to Rollbase, rollbase complains that the driver has not been installed Does anyone out there have any experience with SQL Server Databases on Rollbase Private Cloud linux server installations?

All Replies

Posted by Admin on 13-Jun-2013 14:42

Hi,



We have a Private Cloud instance running on SQL Server/Windows, and I can generate the same error message when trying to add a database. My guess is that class-name is hard-coded into the system since there's no way to configure the name of the library from the "Add Database" wizard.



If you are using the latest version of the Microsoft-provided JDBC driver like we are, I believe the correct namespace is "com.microsoft.sqlserver.jdbc.SQLServerDriver", where jdbc/sqlserver are switched around. So likely it will have to be addressed by RollBase.



For now, you'll likely to have to manually add the database to databases.xml configuration file and restart the server.



Hope this helps,

~ Kurt

Posted by Admin on 13-Jun-2013 14:51

Yes, it looks like it is hard-coded. If you open the following page in your RollBase installation:



/webapps/master/system/editDatabase.jsp



You'll notice on around line 144-148:







MySQL

Oracle

SQL Server



Change the last option to "com.microsoft.sqlserver.jdbc.SQLServerDriver" (or whatever the appropriate class name is for your particular driver)



You would also need to change the corresponding case statement on line 80-82:



case 'com.microsoft.jdbc.sqlserver.SQLServerDriver':

url.value='jdbc:sqlserver://[host]:1433;databaseName=[schema];integratedSecurity=true;';

break;



After rebooting the server, I confirmed in our system that we c

Posted by Admin on 13-Jun-2013 14:52

Thanks for the quick reply Kurt!



That was one of our first suspicions. We tried manually adding the database to the databases.xml file with both "com.microsoft.sqlserver.jdbc.SQLServerDriver" and "com.microsoft.jdbc.sqlserver.SQLServerDriver" as the namespace.



However, when we restart tomcat in both cases, we are unable to login and receive the vague error "Internal Error" and are prevented from logging in entirely. This sql server database we are trying to add is not the default database, but merely one database intended for one customer zone.

Posted by Admin on 13-Jun-2013 14:53

Thanks for the quick reply Kurt!



That was one of our first suspicions. We tried manually adding the database to the databases.xml file with both "com.microsoft.sqlserver.jdbc.SQLServerDriver" and "com.microsoft.jdbc.sqlserver.SQLServerDriver" as the namespace.



However, when we restart tomcat in both cases, we are unable to login and receive the vague error "Internal Error" and are prevented from logging in entirely. This sql server database we are trying to add is not the default database, but merely one database intended for one customer zone.

Posted by Admin on 13-Jun-2013 14:53

Posted by Admin on 13-Jun-2013 15:27

This did it!! Thank you so much for your help, Kurt. Even Pavel was stumped on this one!

This thread is closed