With the following configuration, an empty result set prints the SQL query string: JSP server = JRun 3.1; Database = Access 2000; OS = XP Home. However, with the following configuration, an empty result set (the same query) does not print the SQL query string: JSP server = Tomcat; Database = SQL Server 7.0; OS = NT 4.0. Can you tell me which is causing the problem?
I have narrowed the problem to being the JRun server. I will try to get an answer from them but in the meantime, can anybody help???
This is probably some bug in the Taglib lifecycle for that version of JRun. Can someone who runs JRun debug this?
I have the same problem with tomcat 4.1.10, Win 2000 and MySQL 2.23.49. It happens only if there is another query (not empty) on the jsp page. It doesn't happen if I set loop at false in the resulset tag. Any help ?? Thanks
I have the same problem with Tomcat 4.1.12, solaris 2.8, Java 1.3.1_05 and Sybase Server 11.9.2. Any help? Thanks
I have the same problem with Tomcat 4.1.12, solaris 2.8, Java 1.3.1-b24 and Sybase Server 12.
Hi I had the same problems as the others. Now, after changing a single line in the ResultSetTag-Class it works just fine for me. What I changed: the doEndTag()-Method contains the following if-statement (line 231): if (getBodyContent() != null && getPreviousOut() != null) { getPreviousOut().write(getBodyContent().getString()); } I just added another condition: _rowCount != 0 Now it looks like this: if (getBodyContent() != null && getPreviousOut() != null && _rowCount != 0) { getPreviousOut().write(getBodyContent().getString()); } With this condition-check the query-string doesn't appear anymore when a result- set is empty. I hope, this does not affect other necessary behaviours of taglibs. Furthermore I suggest to change the EVAL_BODY_TAG return-statements in all the dbtags-classes to either EVAL_BODY_BUFFERED or EVAL_BODY_AGAIN as EVAL_BODY_TAG is deprecated. Greetings from Switzerland Matthias Rambold (mrambold@hsr.ch)
Hi! We have resolved this problem following Matthias Rambold's advices, but changing something... In the ResultSetTag class we have changed from: if (getBodyContent() != null && getPreviousOut() != null) { getPreviousOut().write(getBodyContent().getString()); } to: if (_rowCount != 0) { getPreviousOut().write(getBodyContent().getString()); } And changed in the following classes: - ConnectionTag - PreparedStatementImplTag - ResultSetTag - StatementImplTag the attribute EVAL_BODY_TAG to EVAL_BODY_BUFFERED because the first is deprecated. Everything in our application (HelpDesk On-Line) is going well !!! Bye and best regards.
i tried all of the solutions proposed above and none worked for me. all of them cause trouble if one sets the loop attribute to "false". i figured out that a missing super.release(); statement at the beginning of the release() method in ResultSetTag.java is the root of this bug.
Mirko (and other), This bug seems to the same problem fixed on bug 26863. I committed the changes earlier today - could you test it tomorrow, with the next nightly build? Felipe
*** This bug has been marked as a duplicate of 26863 ***
I just ran a test using jakarta-taglibs-dbtags-20040301.zip and everything worked fine.