Solved

sql java errors

Posted on 2013-10-25
5
888 Views
Last Modified: 2013-11-06
when error log says both sql and java in the same line, how can we troubleshoot where the problem is.. this happens once in a few days...
0
Comment
Question by:25112
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 5

Author Comment

by:25112
ID: 39601109
here is an example:
com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset by peer: socket write error
               at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1368)
               at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1355)
               at com.microsoft.sqlserver.jdbc.TDSChannel.write(IOBuffer.java:1548)
               at com.microsoft.sqlserver.jdbc.TDSWriter.flush(IOBuffer.java:2368)
               at com.microsoft.sqlserver.jdbc.TDSWriter.writePacket(IOBuffer.java:2270)
               at com.microsoft.sqlserver.jdbc.TDSWriter.endMessage(IOBuffer.java:1877)
               at com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(IOBuffer.java:4403)
               at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:386)
               at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:338)
               at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)
               at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416)
               at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:185)
               at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:160)
               at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:281)
               at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
               at java.lang.Thread.run(Thread.java:662)
0
 
LVL 21

Assisted Solution

by:Amitkumar Panchal
Amitkumar Panchal earned 167 total points
ID: 39604058
This seems to be a network issue at first look. This occurs even network is down for a second.

However, there are many reasons... like..
1. network issue
2. connection timeout
3. application lost a connection
....
so on.
0
 
LVL 28

Assisted Solution

by:Naveen Kumar
Naveen Kumar earned 166 total points
ID: 39607622
May be you can get to the bottom of the problem by running your app/code in the debugging/log mode to let you know at what point it throws the below error and then go from there to see what can be done to fix it.

Thanks,
0
 
LVL 35

Accepted Solution

by:
mccarl earned 167 total points
ID: 39607659
Can you show how you are configuring your DataSource? From the error I gather you are using c3p0 for pooling data sources. The error that you are getting is probably from SQL Server closing connections after a certain period of idle time. You should be able to configure c3p0 to test connections periodically so that the server doesn't time them out, or other similar configurations to overcome this type of problem.

Post your config and we should be able to assist.
0
 
LVL 5

Author Comment

by:25112
ID: 39627649
your clues have helped me. thanks.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Format Date fields 11 56
junit initializtion error 2 17
Set a variable value in SQL Procedure 3 23
t-sql left join 2 25
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
The viewer will learn how to implement Singleton Design Pattern in Java.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question