Tomcat apache fails to start on microsoft SQL server install

Posted by Rollbase User on 27-Mar-2012 06:10

I have followed the setup instructions and made adjustements to use SQL SERVER as the backend. My colleague has followed the video and had no trouble setting up MySQL installation. My knowledge of Apache and Java is very limited, I warn you. After installing the apps files, I go to tomcat\bin and type startup.bat at a command prompt. The server seems to try to start but the lock up. I have looked in the tomcat logs but they give no clue what is happening. I put the ms jdbc driver into the tomcat\bin folder. I have set the environment variables jre_home, rollbase_home and rollbase_root. The latter are both set to tomcat\rollbase, the former points to the jre6 folder. I am running windows 2008 R2 64 bit with SQL server 2008. JAVA SE 6U31, tomcat 6. Can anyone advise what to check next? See screen shot which shows status after running startup.bat. Thanks

All Replies

Posted by Admin on 27-Mar-2012 12:39

I have to admit that SQL Server installation is least tested case. I will do some testing and come back to you on this.

Posted by Admin on 27-Mar-2012 12:40

May be Martin knows more -I know his team runs Rollbase on SQL Server.

Posted by Admin on 27-Mar-2012 13:03

As Pavel mentioned, SQL Server is supported but is the least used and therefore least tested option since most of our customers run on MySQL or Oracle. However, this does not mean the problem necessarily lies with SQL Server.



From your screenshot it looks like Tomcat stops responding after the Master Server component is started. Perhaps this is due to a problem in configuration. After the Master component starts are you able to access the monitor page.



In your configuration it should be at the following URL for you:

http://localhost:8080/master/system/monitor.jsp



If you can access this can you post a screenshot of the result?



Also, can you look in your rollbase Files folder for the AllErrors.log file? This should be in the "Files" sub-directory called "1" or "2".

Posted by Admin on 27-Mar-2012 22:30

Please make sure you have sqljdbc.jar is placed in CATALINA_HOME/lib directory.

I'm almost sure that was the reason.



I also will check why the system did not display meaningful error message, as well as update documentation and emphasize that JDBC drivers are not part of Rollbase Private Cloud binaries.

Posted by Admin on 27-Mar-2012 22:56

Unfortunately, I wasn't there in person when we created one of our private instances running on MSSQL, i will contact our infrastructure team to clarify your concerns.



Piscoso, Martin

Rollbase PH

Posted by Admin on 28-Mar-2012 03:36

Thanks for the quick responses.

I have placed sqljdbc.jar in catalina_home and catalina_home/lib.

The monitor does not start up - page just sits trying to load but I get no response.

There is no files folder under rollbase.



The Ms article http://msdn.microsoft.com/en-us/library/ms378526.aspx mentions setting classpath but htis gets overridden when the startup.bat file is run and ends up as "Using CLASSPATH: c:\tomcat\bin\bootstrap.jar".



Posted by Admin on 28-Mar-2012 04:07

hi orbisrb,



- pls. rollback all the default config and try the inputs below. I already tested and it work in my private host.



Here's what we do in setting up MS-SQL connections.



- place the "sqljdbc4.jar" in \tomcat\lib not in ..\bin directory



In Database.xml under ../rollbase/config directory.. I used the following script to connect to MS-SQL Database Server.



NOTE: make sure that user account is properly setup in MS-SQL engine. I suggest to test first the DB user account in MS Management Studio.



hope this helps..

Posted by Admin on 28-Mar-2012 10:31

I'll do some more testing and update binaries tonight.

Posted by Admin on 29-Mar-2012 06:06

Hi and thanks for all your help.

I have put jdbc and jdbc4 .jar files into tomcat\lib and \bin folders.

I double checked the config files and did check that I could log in with the given credentials.



I noticed that when I run startup.bat the CLASSPATH is set to tomcat\bin\bootstrap.jar. Microsoft suggest that classpath should have the jdbc.jar on it. Am I correct in assuming that bootstrap.jar will also allow other classes to be loaded?



Once I have downloaded and re-installed the rollbase files I started tomcat and went to the login.jsp page. This loaded successfully but when I enter the username and password and hit enter it complains that it cannot load jdbc driver.



Here is a sample of the log file which is produced during startup: -



----------------------------------

29-Mar-2012 11:20:43 org.apache.catalina.core.StandardContext loadOnStartup

SEVERE: Servlet /master threw load() exception

com.rb.util.db.a404: Cannot load JDBC driver com.microsoft.jdbc.sqlserver.SQLServerDriver: com.microsof

Posted by Admin on 29-Mar-2012 11:32

That's what I suspected from the beginning: JDBC driver for SQL Server cannot be loaded.



Please try to copy sqljdbc.jar on Tomcat/lib directory (and remove sqljdbc4.jar).

Posted by Admin on 30-Mar-2012 03:47

I have already copied sqljdbc.jar to tomcat\lib. I have now tried removing the sqljdbc4.jar and this makes no difference.



I then tried moving jdbc.jar to tomcat\bin. Same result.



I really feel it is to do with classpath not being set as directed by Microsoft. Does bootstrap.jar load the jdbc drivers. It seems classpath is set to bootrap.jar only by some part of the process in startup.bat. I notice there is a setclasspath.jar but this does not actually mention the classpath.

Posted by Admin on 30-Mar-2012 06:08

Have you changed your databases.XML ? As mentioned by waltz

Posted by Admin on 30-Mar-2012 11:16

yes indeed. I follow all instructions.

Posted by Admin on 30-Mar-2012 22:07

Hi Nick,



Pavel has just left for Japan on holiday until April 17th so this is unfortunate timing in solving your issue. While I believe he had no issues setting this up on his side, he won't be available to answer your questions on this until later in April. I am hoping either one of our development partners can help you get past this issue in the forums, or I can identify the problem in my tests here [planning to set up a new test instance using SQL Server shortly]. I will let you know if I run into the same issue.



Meanwhile please let me know if you make any progress. I know that some folks at our Philippines partner run Rollbase Private Cloud on SQL Server and havn't run into this (that I know of) so perhaps they can jump in here or connect with you. We can find a way to reward them I'm sure :)



Regards,

Matt

Posted by Admin on 02-Apr-2012 03:08

ANy help will be appreciated. The setup is

Win2008 R2 64 Bit

SQL2008



java SE 6u31

Apache 6



Thanks.

Posted by Admin on 02-Apr-2012 17:14

Please make sure your jdbc driver is compatible with 64bit OS. You may also post question on SQL Server forum. This is clearly does not look like a problem with Rollbase software.

Posted by Admin on 02-Apr-2012 21:16

hi orbisrb,



Maybe this could help you...



- Since your using windows operating system, i would suggest to use windows service installer in your application.

- Let's clean first your environment..

- Delete or uninstall tomcat and its folders and sub-folders

- drop/delete your existing RB_DBO database in MS-SQL server

- download tomcat 32bit/64bit Windows Service Installer from tomcat website

- install tomcat6 using windows service installer.

- check if your tomcat is successfuly installed. type localhost:8080 to URL address field

- stop your tomcat services, try to use the stop/start button in the task bar. You may find it in the bottom right of your screen

- proceed to RB proper installation.

- unzip Rollbase.zip to /Tomcat directory

- unzip Webapps.zip to /Tomcat/webapps

- unzip lib.zip to /Tomcat/lib

- modify the shared.properties using your own preferred info

- modify your database.xml based on the script that i previously post

- copy sqljdbc4.jar to /tomcat/lib

- create RB_DBO database

Posted by Admin on 03-Apr-2012 00:31

I will modify Rollbase code to deliver more detailed error message. But that will not fix the issue with your installation. Call to Class.forName() fails and JDBC driver cannot be loaded in your environment.

Posted by Admin on 03-Apr-2012 12:00

Thanks Walter!

Posted by Admin on 05-Apr-2012 09:17

Thanks for all your help.

We have this working now.

The driver name in the databases.xml file which came with the install was "com.microsoft.jdbc.sqlserver.SQLServerDriver" instead of "com.microsoft.sqlserver.jdbc.SQLServerDriver"

Fixed the name and it's all working nicely.

Once again, thanks!

Posted by Admin on 05-Apr-2012 10:39

Great news! And thanks for the update. We'll check with Walt and others whether this change was necessary for them as well and if so, update the default value in databases.xml (if not we'll include a warning or note about this).



Valuable find.

Posted by Admin on 05-Apr-2012 10:58

Solved (by Orbis; thanks also to whaltz for stepping in) by changing driver name in the databases.xml file which comes with the install from "com.microsoft.jdbc.sqlserver.SQLServerDriver" to "com.microsoft.sqlserver.jdbc.SQLServerDriver"

This thread is closed