Re: Wierd problem with Tomcat 5.59 running on Windows Server 2003

2010-03-15 Thread ULS Tech Support

That was one of the first things i did...

The thing was, it wasn't a jsp file that was old, it was a class file...

Very WEIRD :)

Guess i'm used to the i before e except after c rule, and didn't think of it 
on the few exceptions.   Including weird.



--
From: Oto Bossert o.boss...@gmail.com
Sent: Monday, March 15, 2010 2:13 AM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: Wierd problem with Tomcat 5.59 running on Windows Server 2003


Did you clear your work directory? Check it for old versions

On 3/15/10, ULS Tech Support tech_supp...@uls.com wrote:
Perhaps there's something i'm overlooking, but i've decided to re-copy 
the
entire folder over and now it seems like it wants to work (although it 
could

be a config change, i'm not sure).

So there is a resolution for now.



--
From: ULS Tech Support tech_supp...@uls.com
Sent: Sunday, March 14, 2010 8:31 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: Wierd problem with Tomcat 5.59 running on Windows Server 
2003



I'm aware that I'm running a five year old version of tomcat.I tried
to
upgrade to the latest 5.5 and 6.0 version, and trying to get my
application
to work on it didn't go so well..
I chose to abandon it for now due to time constraints.

Ok, so what do you mean by I'm not running the Tomcat config that i
thought
i was?

The application files are identical between the dev and the live server.
In
fact, i run the application fine on the dev computer, yet i try and run 
it

(after copying all the files over) on the live server, and i still get
this
issue.

There are other beans that this issue is happening on...

Interestingly, i renamed the webapp application folder (to webapp2) and
the
issue happened there as well.

I would appreciate some help, or perhaps i am not understanding 
something

before it was copied over to this server and may need to just understand
it
more.

Thanks.


--
From: Caldarale, Charles R chuck.caldar...@unisys.com
Sent: Sunday, March 14, 2010 8:03 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: RE: Wierd problem with Tomcat 5.59 running on Windows Server 
2003



From: ULS Tech Support [mailto:tech_supp...@uls.com]
Subject: Wierd problem with Tomcat 5.59 running on Windows Server 2003

Also, is there a place that tomcat will cache its servlets?


No.  You are most likely just not running the Tomcat configuration you
think you are.

(You're also running a five year old version of Tomcat, which is a bit
silly, considering all the security, performance, and other fixes that
have gone in since then.)

- Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE 
PROPRIETARY

MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.


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



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




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




--
Sent from my mobile device

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




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



Wierd problem with Tomcat 5.59 running on Windows Server 2003

2010-03-14 Thread ULS Tech Support
Hello.

I'm sure this is a Tomcat issue...  But let me give this background.

I've recently upgraded the server that the website used to run on (used to run 
on Windows Server 2000, upgraded to Windows Server 2003).

I was able to transfer everything over to the new server.. The speed and 
updates are great... 

But, for some reason, some servlets are running an old version of itself.

For example,
All images used to be hosted at webapp/images (as an example).
But i have moved them out of the webapp, and into its own (thus, /images).  

I made this change a few months ago before i moved the application to the new 
server... Haven't ran or used this old location in ages.  

Recently i made a change to this bean (HeaderBean) that would do other stuff... 
For some reason though, this Bean is suddenly using an old version of itself 
(where the bean would get the image from its old location (webapp/images).  

This happened to me originally when testing the new server, but all i had to do 
was do a restart of the server (restarting tomcat didn't help), and it would 
use the new one ok.

But i'm still having the issue where restarting the server doesn't help.  
Tomcat is still using the OLD bean from a few months ago.  
Just to make sure, the jsp page that calls this bean is correct.  It is the 
Bean/class that is having this issue.
The image for example is NOT showing up... i look at the source code and it 
shows the old location (which doesn't exist).

Other than the original testing, this has never happened previously... 

I am using netbeans 6.7.1 for development (windows 7 ultimate), and after 
compilation, i copy it over to the server (WEB) and deploy it in the 
appropriate folder.
I have updated the context, reloadable=true, just to make sure.  
This is not an internet explorer/firefox issue.  I've tried this on 3 different 
computers and setups... i still get the OLD bean.

I don't know why this is happening and wondering if anyone here has seen this 
issue, or may know why its happening and what i need to do to fix it.

Also, is there a place that tomcat will cache its servlets?

Thank you to anyone who is able to help.

...Robin

Re: Wierd problem with Tomcat 5.59 running on Windows Server 2003

2010-03-14 Thread ULS Tech Support
I'm aware that I'm running a five year old version of tomcat.I tried to 
upgrade to the latest 5.5 and 6.0 version, and trying to get my application 
to work on it didn't go so well..

I chose to abandon it for now due to time constraints.

Ok, so what do you mean by I'm not running the Tomcat config that i thought 
i was?


The application files are identical between the dev and the live server.  In 
fact, i run the application fine on the dev computer, yet i try and run it 
(after copying all the files over) on the live server, and i still get this 
issue.


There are other beans that this issue is happening on...

Interestingly, i renamed the webapp application folder (to webapp2) and the 
issue happened there as well.


I would appreciate some help, or perhaps i am not understanding something 
before it was copied over to this server and may need to just understand it 
more.


Thanks.


--
From: Caldarale, Charles R chuck.caldar...@unisys.com
Sent: Sunday, March 14, 2010 8:03 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: RE: Wierd problem with Tomcat 5.59 running on Windows Server 2003


From: ULS Tech Support [mailto:tech_supp...@uls.com]
Subject: Wierd problem with Tomcat 5.59 running on Windows Server 2003

Also, is there a place that tomcat will cache its servlets?


No.  You are most likely just not running the Tomcat configuration you 
think you are.


(You're also running a five year old version of Tomcat, which is a bit 
silly, considering all the security, performance, and other fixes that 
have gone in since then.)


- Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you 
received this in error, please contact the sender and delete the e-mail 
and its attachments from all computers.



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



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



Re: Another issue, jTDS with Tomcat 5.5.9

2009-10-20 Thread ULS Tech Support

Tell me how i hijacked my own thread?

This is my own thread.. and i actually modified the last one i sent out, 
cleared everything and typed out brand new.


Thanks for the help.



--
From: Pid p...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




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




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



Tomcat 5.59 with jTDS, and SQL Server 2005

2009-10-20 Thread ULS Tech Support
Hi there,

Let's try this again...

I am using 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

 


Re: Tomcat 5.59 with jTDS, and SQL Server 2005

2009-10-20 Thread ULS Tech Support

Hi David,



--
From: David kerber dcker...@verizon.net
Sent: Tuesday, October 20, 2009 12:34 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: Tomcat 5.59 with jTDS, and SQL Server 2005


ULS Tech Support wrote:

Hi there,

Let's try this again...

I am using 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.



...


while (dbResultSet.next()) {


Have you verified that you're getting here?  The .next() should
essentially guarantee that you are on a valid row.


I'm not actually getting to this point... it stops back when i try and get 
the data from the first resultset.


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);

It stops at the first line, queryPagedRecords = rs_info.getInt(TotalRec);



//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.


The first thing I'd suggest would be to eliminate the handling of
multiple resultsets until you can verify that you can read a single one.
 Your code above is pretty much what I do, but I don't use SQL SErver.


The majority of the other webpages are set up as a single resultset, which 
do work :)  It is only when i have multiple results sets.


Thanks for answering, i appreciate this.





D


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




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



Re: Tomcat 5.59 with jTDS, and SQL Server 2005

2009-10-20 Thread ULS Tech Support

No problem, thanks again David..

...Robin

--
From: David kerber dcker...@verizon.net
Sent: Tuesday, October 20, 2009 12:54 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: Tomcat 5.59 with jTDS, and SQL Server 2005


ULS Tech Support wrote:

Hi David,



--
From: David kerber dcker...@verizon.net
Sent: Tuesday, October 20, 2009 12:34 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: Tomcat 5.59 with jTDS, and SQL Server 2005


...


The majority of the other webpages are set up as a single resultset, 
which do work :)  It is only when i have multiple results sets.


Thanks for answering, i appreciate this.


Sorry I couldn't help more; I've never used multiple resultsets, so I'm 
tapped out as far as helping you goes.


D


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




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



Re: Hijacking

2009-10-20 Thread ULS Tech Support
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 p...@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 p...@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

Re: Hijacking

2009-10-20 Thread ULS Tech Support
Sorry, i'll remember this not just for you, but for everyone to specifically 
use new for new threads.



--
From: ULS Tech Support tech_supp...@uls.com
Sent: Tuesday, October 20, 2009 1:13 PM
To: Tomcat Users List users@tomcat.apache.org; p...@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 p...@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 p...@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

Re: Tomcat 5.59 with jTDS, and SQL Server 2005

2009-10-20 Thread ULS Tech Support



--
From: Pid p...@pidster.com
Sent: Tuesday, October 20, 2009 1:19 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: Tomcat 5.59 with jTDS, and SQL Server 2005





1. Is there a particular barrier to using the official MS driver?  (I am
wincing as I ask).

http://jtds.sourceforge.net/index.html
As quoted:

Why use jTDS?

jTDS is free software. jTDS is released under the terms of the GNU LGPL, 
giving you not only the posibility to debug and tweak it to your own liking 
but also to use it in and distribute it with your free or commercial 
applications.


The other free choices, the JDBC-ODBC bridge and Microsoft's own JDBC 
driver are not actually free. If you encounter an issue with any of them you 
won't be able to fix it yourself and response times from both Microsoft and 
Sun are anything but short. Also, both of them lack functionality (the 
Microsoft driver implements JDBC 2.0, while the bridge is just a JDBC 1.0 
implementation) and have serious stability problems: the bridge crashes the 
JVM if the ODBC driver has any problem and Microsoft just has no intention 
of really supporting Java/JDBC.





2. What is the full stack trace you referred to earlier, does it have a
separate root cause?
There was a stack trace, but that was because i hadn't captured the error 
correctly.

This is all i get now..

SQLException: java.sql.SQLException: No current row in the ResultSet.
SQLException Message: No current row in the ResultSet.



3. Is TWFreeTDS a drop-in replacement?

I`ve been using TWFreeTDS because it did support the multiple resultsets.


4. Are there any known bugs in jTDS for the combination of circumstances
you're testing against?

None that i`m aware of.


5. Does the procedure definitely return data in each of the result sets?
When i used the twfreetds... and yes it does return data.. i re-ran the sql 
procedure to make sure...
I used twfreetds originally instead of jtds, the entire thing worked fine... 
But i wanted to implement the pooling with jtds (and probably can with 
twfreetds, but wanted an alternative).



p




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



Re: Tomcat 5.59 with jTDS, and SQL Server 2005

2009-10-20 Thread ULS Tech Support

Found the thread from Mark... thank you for pointing me in that direction...

--
From: Pid p...@pidster.com
Sent: Tuesday, October 20, 2009 1:19 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: Tomcat 5.59 with jTDS, and SQL Server 2005


On 20/10/2009 19:59, ULS Tech Support wrote:

No problem, thanks again David..

...Robin

--
From: David kerber dcker...@verizon.net
Sent: Tuesday, October 20, 2009 12:54 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: Tomcat 5.59 with jTDS, and SQL Server 2005


ULS Tech Support wrote:

Hi David,



--
From: David kerber dcker...@verizon.net
Sent: Tuesday, October 20, 2009 12:34 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: Tomcat 5.59 with jTDS, and SQL Server 2005


...



The majority of the other webpages are set up as a single resultset,
which do work :) It is only when i have multiple results sets.

Thanks for answering, i appreciate this.


Sorry I couldn't help more; I've never used multiple resultsets, so
I'm tapped out as far as helping you goes.


I have exactly zero experience with SQL Server  Tomcat, but...

1. Is there a particular barrier to using the official MS driver?  (I am 
wincing as I ask).


2. What is the full stack trace you referred to earlier, does it have a 
separate root cause?


3. Is TWFreeTDS a drop-in replacement?

4. Are there any known bugs in jTDS for the combination of circumstances 
you're testing against?


5. Does the procedure definitely return data in each of the result sets?


p



D


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




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




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




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



Another issue, jTDS with Tomcat 5.5.9

2009-10-16 Thread ULS Tech Support

Hi there,

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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org