添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

There is a strut application which throws -519 error sometimes. I would have to restart tomcat whenever this error occures.

You can find te detail of -519 here

It rarely happens. But I am not able to understand the actual cause and its solution.

Please make sure that your code always fetches all results from the ResultSet and make sure ResultSet and PreparedStatement get also always close()d. If you do not ensure these things it is possible that a cursor will not be automatically closed in DB2.

In your case a database connection gets returned back to the connection pool but not all resources have been freed properly. When the eactly same SQL statement is prepared again using the same connection you get the error in question.

If this is custom code of yours I would recommend using PMD and FindBugs extensively while developing because they warn eagerly about not closing all resources.

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question . Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers .