Hi, I want to run my applcation on net. hosting server is linux OS. all port and userid and password r correct. I downloaded the unix .tar file for SQL Server jdbc driver from microsft download site to my windows desktop. I then extracted the 3 mssql*.jar files and uploaded them to the linux in web-inf\lib as well as web-inf\classes.
When trying to connect to the database thru the application the connection manager is not able to connect to the database and get a connection. Throws up following error.
First when trying to get a connection Apr 7, 2004 3:37:14 AM com.ac.GEN.GEN.GEN_GEN_Error_Functions N_Log_Error SEVERE: (*Type = Exception*) User Id = 0 () Cause = java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket. Class = com.microsoft.jdbc.base.BaseExceptions 196: File = ConnectionPool.java (F_Get_New_Connection) 45: File = ConnectionPool.java (N_Initialize_Connection_Pool) 37: File = ConnectionPool.java (<init> 136: File = PoolManager.java (N_Create_Pools) 57: File = PoolManager.java (N_Initialize_Pool_Manager) 25: File = PoolManager.java (<init> 134: File = GEN_0005fGEN_0005fUser_0005fLogin$jsp.java
Second when trying to close a non-existing connection
Apr 7, 2004 3:37:14 AM com.ac.GEN.GEN.GEN_GEN_Error_Functions N_Log_Error SEVERE: (*Type = Exception*) User Id = 0 () Cause = java.lang.NullPointerException Class = com.ac.jdbc.ConnectionPool 261: File = ConnectionPool.java (F_Refresh_Connection) 174: File = ConnectionPool.java (F_Get_Pooled_Connection) 85: File = ConnectionPool.java (F_Get_Connection) 65: File = ConnectionPool.java (F_Get_Connection) 154: File = PoolManager.java (getConnection) 102: File = GEN_GEN_Database_Functions.java (F_Check_User_Login) 213: File = GEN_0005fGEN_0005fUser_0005fLogin$jsp.java The application runs fine in local environment with Tomcat 4.1.18. In local environment I have added these mssql*.jar files in <tomcat home>\common\lib folder.
The jsp and class file folders are same in both local and online environments.
What's going wrong? What is the solution for this? Is this a problem with Tomcat 4?
A couple of things are probably happening: 1. The server is not running (Hopefully it is!) 2. SQL Server does not have TCP/IP enabled - Check this in the network utility 3. Ping the IP address - Does it return? 4. The URL - IP address / Servername is incorrect. These would be a good place to start. It would not be a database, username, or password problem because you could not even connect to the server... It is not a driver problem because your driver is recognized. I would say that most likely, it is your URL or connection string... Could you post an example of the connection string you are using?
An egg is a chicken's house!
Joined: Apr 26, 2002
hi Jason, Thanks for your reply. My db.properties file is like this can u find some thing from this
drivers=com.microsoft.jdbc.sqlserver.SQLServerDriver ac.Database=SQL Server ac.Database_Connect_URL=jdbc:microsoft:sqlserver://*.*.*.*:1433;user=***;password=***;DatabaseName=*** ac.User_Name=*** ac.Password=*** ac.Initial_Connections=3 ac.Maximum_Connections=4