java error pointing to SQL Server

Sam 1,436 Reputation points
2024-06-27T11:32:38.65+00:00

Hi All,

Application team is getting below error and they wanted to check if there is an issue from the database end.

We didn't find anything from the database end. Nothing in the sql errorlogs nor we see any blocking.

Is it really a database error or generic error? did anyone come across this error? how to go about troubleshooting such issues to narrow down if it is SQL server issue or any app server issue?

<h1>500 - Internal Server Error</h1> org.activebpel.rt.bpel.AeBusinessProcessException   at org.activebpel.rt.bpel.server.engine.AePersistentProcessManager.createBusinessProcess(AePersistentProcessManager.java:280)   Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed.   at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:190)   at com.microsoft.sqlserver.jdbc.SQLServerConnection.checkClosed(SQLServerConnection.java:388)   at com.microsoft.sqlserver.jdbc.SQLServerConnection.setAutoCommit(SQLServerConnection.java:1883)   at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.checkTransaction(BaseWrapperManagedConnection.java:906)   at org.jboss.jca.adapters.jdbc.WrappedConnection.checkTransaction(WrappedConnection.java:1923)   at org.jboss.jca.adapters.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:452)   ... 32 more

Regards,

Sam

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

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 104.7K Reputation points MVP
    2024-06-27T22:10:47.0066667+00:00

    "The connection is closed". Could be because they are try to run a command on a closed connection. Which would be a programming error.

    Tell the app team to do their home work.

    0 comments No comments

  2. LucyChenMSFT-4874 2,820 Reputation points
    2024-06-28T01:45:30.59+00:00

    Hi @Sam,

    Thank you for reaching out and welcome to Microsoft Q&A.

    From the error messages you provided, I notice this:

    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed.

    In addition to Erland's answer, here’s a possible reason what I can see on this: When a connection in the database connection pool is created and not used for a long time, the connection is automatically recycled and invalidated, but the client does not know, and it is still using an invalid database connection when performing database operations.

    You can do the action like what Erland's suggestion: Tell the app team to do their homework. Also, you can try to add the script below after the configuration data source:

    <property name = "validationQuery" value = "select * from dual"/>
    

    It will first test the connection, and if it finds that the connection is invalid, it will re-obtain a valid database connection from the connection pool to use when the client uses an invalid connection.

    Here is a thread like yours, maybe you can check it out, hope it can bring you more ideas!

    Best regards,

    Lucy Chen


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    https://docs.microsoft.com/en-us/answers/support/email-notifications

    0 comments No comments