Solved

sql java errors

Posted on 2013-10-25
5
882 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

820 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