Getting different SQL exceptions in SQL server Vs Java client application.

Jeevan Choudhary 0 Reputation points
2025-02-01T05:22:17.71+00:00

Hello Team,

I am getting the following error in my client application and it is failing to connect to the database -

On the 2019 SQL server-

"The login packet used to open the connection is structurally invalid; the connection has been closed. Please contact the vendor of the client library. Error: 17832, Severity: 20, State: 10."

On the Java client application side (using sqljdbc 12.8.1 driver) we get the error- "SQL State: null ; Error Code: 0; Error message : Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is broken and recovery is not possible. The connection is marked by the client driver as unrecoverable. No attempt was made to restore the connection."

What could be the cause?

Thanks.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,435 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ZoeHui-MSFT 40,356 Reputation points
    2025-02-03T03:02:02.49+00:00

    Hi Jeevan Choudhary

    For more details, you need check errorlog. By default, the error log is located at Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\LOG\ERRORLOG and ERRORLOG.n files.

    In additon, you can check the system logs for any additional error messages or warnings that may provide further insight into the cause of the issue.

    Finally, verify that there is no network connectivity issues between the client machine and the SQL Server instance. This can include checking for firewalls, routers, or other network devices that may be blocking traffic.

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.