tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ULS Tech Support <tech_supp...@uls.com>
Subject Re: Hijacking
Date Tue, 20 Oct 2009 19:15:11 GMT
Sorry, i'll remember this not just for you, but for everyone to specifically 
use new for new threads.


--------------------------------------------------
From: "ULS Tech Support" <tech_support@uls.com>
Sent: Tuesday, October 20, 2009 1:13 PM
To: "Tomcat Users List" <users@tomcat.apache.org>; <pid@pidster.com>
Subject: Re: Hijacking

> Fair enough...  I didn't think it was a big deal to do that... clicking 
> new
> instead of reply... But really, i am still asking a valid question and
> require help...
>
> Didn't realize that this thread hijacking was going to cause someone to 
> tell
> me what i did wrong, when i still had a valid question.
>
> But i'll remember that next time for you...  Sound good?
>
>
>
> --------------------------------------------------
> From: "Pid" <pid@pidster.com>
> Sent: Tuesday, October 20, 2009 1:05 PM
> To: <users@tomcat.apache.org>
> Subject: Hijacking
>
>> On 20/10/2009 19:02, ULS Tech Support wrote:
>>> Tell me how i hijacked my own thread?
>>
>> As I described.  See?
>>
>>> This is my own thread.. and i actually modified the last one i sent out,
>>> cleared everything and typed out brand new.
>>
>> Umm, yes, that would be what we call hijacking.
>> You hijacked a thread, then did it again to 'your' new thread.
>>
>> Unless I'm much mistaken you responded to the inestimable Bill
>> Davidson's first "DBCP woes (running out of cursors)" email.
>>
>> Just because you changed the subject and/or body, doesn't mean you
>> started a new thread.  Look at the mail headers, or use a mail reader
>> that supports threaded views to see it.
>>
>> p
>>
>>
>>
>>> Thanks for the help.
>>>
>>>
>>>
>>> --------------------------------------------------
>>> From: "Pid" <pid@pidster.com>
>>> Sent: Tuesday, October 20, 2009 6:11 AM
>>> To: <users@tomcat.apache.org>
>>> Subject: Re: Another issue, jTDS with Tomcat 5.5.9
>>>
>>>> On 16/10/2009 22:04, ULS Tech Support wrote:
>>>>> Hi there,
>>>>
>>>> Please start a completely new email for each thread. Replacing the
>>>> subject line doesn't count, it's called thread hijacking.
>>>>
>>>> p
>>>>
>>>>
>>>>> Tomcat 5.5.9, using jTDS, with SQL Server 2005 i am getting this 
>>>>> issue.
>>>>>
>>>>> 2009/10/16 10:47:15 - sql exception:java.sql.SQLException: No current
>>>>> row in the ResultSet.
>>>>>
>>>>> This issue doesn't happen with TWFreeTDS (in fact, when i switch to
>>>>> twfreetds it works fine).. but from my research so far, i may have 
>>>>> been
>>>>> wrong in the way i implemented it.
>>>>>
>>>>> Here is the code.
>>>>>
>>>>> public Vector queryPaged4(String strTableExt) throws SQLException {
>>>>> dbRecords.removeAllElements();
>>>>> boolean rc = true;
>>>>>
>>>>> ResultSet rs_info = null;
>>>>> boolean bTest = false;
>>>>> DBItems temp = null;
>>>>>
>>>>> //New **********
>>>>> /* This will call a stored procedure, pass in the page # and
>>>>> number to display on each page and will return the results
>>>>> directly.
>>>>> */
>>>>>
>>>>> CallableStatement call = dbConn.prepareCall("{call sp_PagedItems4
>>>>> (?,?,?,?,?)}");
>>>>> call.setString(1, strTableExt);
>>>>> call.setString(2, filter);
>>>>> call.setString(3, order);
>>>>> call.setInt(4, pageNumber);
>>>>> call.setInt(5, recsPerPage);
>>>>>
>>>>> if (!call.execute())//Query
>>>>> {
>>>>> //No ResultSets Returned;
>>>>> } else {
>>>>>
>>>>> try {
>>>>> rs_info = call.getResultSet();
>>>>>
>>>>> //Save the total number of records (value) in queryPagedRecords
>>>>> queryPagedRecords = rs_info.getInt("TotalRec");
>>>>> queryPagedMore = rs_info.getInt("MoreRecords");
>>>>> nLowestID = rs_info.getInt("FirstRec");
>>>>> nHighestID = rs_info.getInt("LastRec");
>>>>>
>>>>> if (queryPagedRecords > 0) {
>>>>> //Test for another resultset.
>>>>> boolean bTest = false;
>>>>> bTest = call.getMoreResults();
>>>>> //Next resultset established, let's get the data!
>>>>> dbResultSet = call.getResultSet();
>>>>>
>>>>> while (dbResultSet.next()) {
>>>>> //System.out.println("2: " + dbResultSet.getInt("ID"));
>>>>> rc = true;
>>>>>
>>>>> //Set the items object based on the resultset.
>>>>> temp = this.setItemsObject(true, dbResultSet);
>>>>>
>>>>> dbRecords.addElement(temp);
>>>>> }
>>>>> }
>>>>> } catch (SQLException e) {
>>>>> System.out.println("SQLException: " + e);
>>>>> System.out.println("SQLException Message: " + e.getMessage());
>>>>> } finally {
>>>>> rs_info = null;
>>>>> temp = null;
>>>>> dbResultSet = null;
>>>>> }
>>>>> System.out.println("end");
>>>>> }
>>>>>
>>>>> return dbRecords;
>>>>> }
>>>>>
>>>>> Basically i'm getting the resultsets, but i'm not able to pull the 
>>>>> data
>>>>> from the resultsets as i get the error when i try and getInt.
>>>>>
>>>>> Does anyone have any clue on why this is happening, or how i can make
>>>>> this work?
>>>>>
>>>>> I did try and modify the code to the following to see if it helped, 
>>>>> but
>>>>> again, i'm still stumped on HOW to retrieve the data from the
>>>>> resultsets.
>>>>>
>>>>> try {
>>>>> System.out.println("start...");
>>>>> int updateCount = 0;
>>>>> updateCount = call.getUpdateCount();
>>>>> System.out.println("update count = " + updateCount);
>>>>> boolean moreResults = true;
>>>>> while (updateCount >= 0 || moreResults) {
>>>>> if (!moreResults) {
>>>>> // just eat it
>>>>> updateCount = call.getUpdateCount();
>>>>> System.out.println("\nupdateCount= " + updateCount);
>>>>> } else {
>>>>> // get the data
>>>>> if (rs_info == null) {
>>>>> rs_info = call.getResultSet();
>>>>> } else {
>>>>> dbResultSet = call.getResultSet();
>>>>> }
>>>>>
>>>>> //Save the total number of records (value) in queryPagedRecords
>>>>> System.out.println("Got Data, how to process??");
>>>>> } // if ! moreResults else
>>>>> moreResults = call.getMoreResults();
>>>>> System.out.println("More Results??");
>>>>> } // while
>>>>>
>>>>> //rs_info.setFetchSize();
>>>>> System.out.println("Lets get data from rs_info");
>>>>> queryPagedRecords = rs_info.getInt("TotalRec");
>>>>> queryPagedMore = rs_info.getInt("MoreRecords");
>>>>> nLowestID = rs_info.getInt("FirstRec");
>>>>> nHighestID = rs_info.getInt("LastRec");
>>>>>
>>>>> But it stops at the "queryPagedRecords = rs_info.getInt("TotalRec");"
>>>>>
>>>>> Thanks in advance to anyone who can help.
>>>>>
>>>>> ...Robin
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message