MS SQL Connection Error while running war file from Jetty Server

Hi,

While i am running a war file from Jetty Server, below error i am facing. please suggest.

I am using MS-SQL 2005 Server for database.

INFO [populateTaskDashIssuesGrid has started] (JournalIssueAction.java:3637) - populateTaskDashIssuesGrid
 INFO [populateTaskDashIssuesGrid has started] (JournalIssueAction.java:3642) - user id for tasks : 4499
 INFO [populateTaskDashIssuesGrid has started] (JournalIssueAction.java:3654) - find : Find
 INFO [populateTaskDashIssuesGrid has started] (JournalIssueAction.java:3660) - retun size : 16
 INFO [returnIssueTaskHistoryAction has started] (JournalIssueAction.java:3124) - returnIssueTaskHistoryAction
 INFO [returnIssueTaskHistoryAction has started] (JournalIssueAction.java:3126) - history for issueId : 2101
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host  has failed. java.net.ConnectException: Connection timed out
        at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
        at com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnectionInternal(Unknown Source)
        at com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnection(Unknown Source)
        at main.java.com.pts.options.journal.daos.JournalIssueDaoImpl.fetchTasksHistory(JournalIssueDaoImpl.java:2433)
        at main.java.com.pts.options.journal.delegate.JournalIssueServiceImpl.fetchTasksHistory(JournalIssueServiceImpl.java:544)
        at main.java.com.pts.options.journals.struts2.actions.JournalIssueAction.returnIssueTaskHistoryAction(JournalIssueAction.java:3128)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

Appreciate any help to resolve this issue.
LVL 1
aloknet21Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gerwin Jansen, EE MVETopic Advisor Commented:
"com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host  has failed. java.net.ConnectException: Connection timed out"

Please verify your connection settings in the datasource for the application and check whether you can connect from your Jetty server to the database.
0
aloknet21Author Commented:
Please guide me the steps to check the connection from jetty server to database. also the steps to verify connection settings in the data source for the application.

thank you very much for your reply.
0
aloknet21Author Commented:
I have checked the connection settings from application now. it is as per below:

db.url=jdbc:sqlserver://10.31.1.33;DatabaseName=orktnu
db.user=mytest
db.password=qwer56t!
db.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver

Do i need to define Port 1433 here. please suggest.

Thanks!
0
Gerwin Jansen, EE MVETopic Advisor Commented:
Yes you need to define a port number as well, like "db.port=1433" but where are your settings from? They're not in XML format, where did you get them from?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.