Re: Tomcat lost request parameters

2004-12-23 Thread Roberto Rios
Hi,

Thanks for replying. I was looking through the code trying to find
multi-threading problems (like Bob said).

So, I decided to post some code fragments in order to show to you how
stupid these errors are...



<%
  ticket.setAttribute("code", request.getParameter("ticketCode"));
  ticket.loadElement();
  ...
%>

The exception rises in the line "ticket.loadElement()". What we are
doing is a simple db select to retrieve some data, and then we are using
it in order to set the object fields.

The exception (a custom one) tells that the code has not been properly
setted, so the loadElement() method could not be executed...

It's insane, because as I shown, I'm setting it one line before (like
the problem that Frank had), and again, this code works well under light
pressure.

This is the reason that I told that tomcat was losing request
parameters.

By default, the jsp isThreadSafe="true". So I think that it could not be
changed by another request...   

Looking through the copiled jsp, I found that my bean becomes this:

com.mycompany.Ticket ticket = null;
synchronized (pageContext) {
  ticket = (com.mycompany.Ticket) pageContext.getAttribute("ticket",
PageContext.PAGE_SCOPE);
  if (ticket == null){
try {
  ticket = (com.mycompany.Ticket)
  java.beans.Beans.instantiate(this.getClass().getClassLoader(),
"com.mycompany.Ticket");
} catch (ClassNotFoundException exc) {
  throw new InstantiationException(exc.getMessage());
} catch (Exception exc) {
  throw new ServletException("Cannot create bean of class " +
"com.mycompany.Ticket", exc);
}
pageContext.setAttribute("ticket", ticket, PageContext.PAGE_SCOPE);
  }
}

I am trying to avoid changes, but I think that I will explicit call
isThreadSafe on the top of the page and also change the scope for
REQUEST_SCOPE...

Just to let you know...

TIA,

Bob


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat lost request parameters

2004-12-22 Thread Bob Feretich
I don't think that this will help much, but your problem seems like a 
multi-threading problem rather than a "lost request parameter" problem.

Have you tried inserting in some debug code to write request parameters 
to the log from the first servlet that receives them?

Regards,
Bob Feretich
Original message 
-
Subject: Tomcat lost request parameters
From: "Roberto Rios" <[EMAIL PROTECTED]>
Date: Wed, 22 Dec 2004 18:51:16 -0200
To: <[EMAIL PROTECTED]>

Hi,
I know that my subject sounds crazy, but I'm going nuts...
I have an application, 100% java (jsp 1.2 and servlet 2.3). This
application has more or less 1,5 years. So it is stable. I always used
tomcat as my web server (without apache because I don't have static html
to be served) with no problem.
We are using TC 4.1.31, with J2SDK1.4.2_03 on a W2K/SP4 box (Xeon 3.0Ghz
with 2GB mem).
At this time we had more or less 25 concurrent users. We were happy...
Recently, another department in company started to use the application.
So now we have more or less 100 concurrent users.
Since then the problems began raising. Most of then when we try to
insert/update data in database. Generally we receive errors telling that
we tried to insert null values into a not null field (BTW we are using
oracle 8.1.7 with JDBC - classes12.jar).
My point is that application was working. Nothing changed (except the
number of users). So, I'm sure that the fields are being properly
filled.
What I would like to ask you, is if someone has experienced this kind of
problem. I was wondering if tomcat could lost request parameters under
heavy traffic...
I don't have any prove that it actually lost something. As I said, I'm
just wondering. Maybe the JDBC...
Searching into the mailing list archive, I found a thread about
performance. I have changed the connector maxProcessors to 150 and also
add maxKeepAliveRequests="1" to it after reading it. Nothing change.
Does someone has some advice? I know that my posting is vague, but I
don't where to look anymore...
I was thinking about to do a tomcat upgrade (to 5.0.X).
TIA,
Bob

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat lost request parameters

2004-12-22 Thread fzlists
I don't think your going crazy, I have been seeing the same thing too... I have 
an app that has been in production for about a year.  Yes, there have been 
changes along the way, but it's been more or less rock-solid stable... except 
that the past few months I've seen occassional NPE's caused by incoming request 
parameters being null.

I have never been able to replicate this in test or development.  It's not 
frequent, maybe 5-10 times per 50,000 requests, which is 5-10 times too many, 
but not too bad (I haven't been yelled at, let's put it that way :) ).  But, 
it's been bugging me.  

I see it in similar places as you... Doing a database query, where the SQL is 
constructed based on incoming parameters, and they wind up being null, causing 
SQL exceptions.  Because of the way the front-end works, it should be entirely 
impossible for a user to ever not submit these requests (you'll have to trust 
me on this... if it's not impossible, they'd have to go out of their way and 
try to do this).

So, yes, I'm seeing the same thing.  Also, it's been a number of Tomcat 
versions now, all in the 5.0.x branch.  We're at 5.0.29 now.

I've also seen some bizarre exceptions caused by session problems... Trying to 
set an attribute and it's telling me the session is invalid 
(IllegalStateException), except that the line of code DIRECTLY BEFORE THAT ONE 
verified that the session is valid!

We are moving to WebSphere in the next few weeks, so I'll know pretty quickly 
if this is a Tomcat issue or not, but I strongly suspect it is (not meant as a 
knock, I absolutely adore Tomcat).

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Wed, December 22, 2004 3:51 pm, Roberto Rios said:
> Hi,
> 
> I know that my subject sounds crazy, but I'm going nuts...
> 
> I have an application, 100% java (jsp 1.2 and servlet 2.3). This
> application has more or less 1,5 years. So it is stable. I always used
> tomcat as my web server (without apache because I don't have static html
> to be served) with no problem.
> 
> We are using TC 4.1.31, with J2SDK1.4.2_03 on a W2K/SP4 box (Xeon 3.0Ghz
> with 2GB mem).
> 
> At this time we had more or less 25 concurrent users. We were happy...
> 
> Recently, another department in company started to use the application.
> So now we have more or less 100 concurrent users.
> 
> Since then the problems began raising. Most of then when we try to
> insert/update data in database. Generally we receive errors telling that
> we tried to insert null values into a not null field (BTW we are using
> oracle 8.1.7 with JDBC - classes12.jar).
> 
> My point is that application was working. Nothing changed (except the
> number of users). So, I'm sure that the fields are being properly
> filled.
> 
> What I would like to ask you, is if someone has experienced this kind of
> problem. I was wondering if tomcat could lost request parameters under
> heavy traffic...
> 
> I don't have any prove that it actually lost something. As I said, I'm
> just wondering. Maybe the JDBC...
> 
> Searching into the mailing list archive, I found a thread about
> performance. I have changed the connector maxProcessors to 150 and also
> add maxKeepAliveRequests="1" to it after reading it. Nothing change.
> 
> Does someone has some advice? I know that my posting is vague, but I
> don't where to look anymore...
> 
> I was thinking about to do a tomcat upgrade (to 5.0.X).
> 
> TIA,
> 
> Bob
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: Tomcat lost request parameters

2004-12-22 Thread Mike Curwen
I once worked on a portal site that experienced very odd behaviour under
load.  When in development, everyone got what they were expecting.  Under
load testing, pages where missing items, some items were duplicated, etc,
etc.

The problem was the usage of variables in a JSP page declared in:
<%!  %>
or the corresponding type of variable (instance variables) in servlets.

It doesn't show up under normal load, because individual users can get "in
and out" without anyone being the wiser.  Once the container starts getting
loaded though, you can have person A's request not being completed before
person B's request is begun processing.



Mike Curwen
Product Manager
Globally Boundless 
www.globallyboundless.com

204.885.7733 ext 227



> -Original Message-
> From: Roberto Rios [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, December 22, 2004 2:51 PM
> To: [EMAIL PROTECTED]
> Subject: Tomcat lost request parameters
> 
> 
> Hi,
> 
> I know that my subject sounds crazy, but I'm going nuts...
> 
> I have an application, 100% java (jsp 1.2 and servlet 2.3). 
> This application has more or less 1,5 years. So it is stable. 
> I always used tomcat as my web server (without apache because 
> I don't have static html to be served) with no problem.
> 
> We are using TC 4.1.31, with J2SDK1.4.2_03 on a W2K/SP4 box 
> (Xeon 3.0Ghz with 2GB mem).
> 
> At this time we had more or less 25 concurrent users. We were happy...
> 
> Recently, another department in company started to use the 
> application. So now we have more or less 100 concurrent users.
> 
> Since then the problems began raising. Most of then when we 
> try to insert/update data in database. Generally we receive 
> errors telling that we tried to insert null values into a not 
> null field (BTW we are using oracle 8.1.7 with JDBC - classes12.jar).
> 
> My point is that application was working. Nothing changed 
> (except the number of users). So, I'm sure that the fields 
> are being properly filled.
> 
> What I would like to ask you, is if someone has experienced 
> this kind of problem. I was wondering if tomcat could lost 
> request parameters under heavy traffic...
> 
> I don't have any prove that it actually lost something. As I 
> said, I'm just wondering. Maybe the JDBC...
> 
> Searching into the mailing list archive, I found a thread 
> about performance. I have changed the connector maxProcessors 
> to 150 and also add maxKeepAliveRequests="1" to it after 
> reading it. Nothing change.
> 
> Does someone has some advice? I know that my posting is 
> vague, but I don't where to look anymore...
> 
> I was thinking about to do a tomcat upgrade (to 5.0.X).
> 
> TIA,
> 
> Bob
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat lost request parameters

2004-12-22 Thread Roberto Rios
Hi,

I know that my subject sounds crazy, but I'm going nuts...

I have an application, 100% java (jsp 1.2 and servlet 2.3). This
application has more or less 1,5 years. So it is stable. I always used
tomcat as my web server (without apache because I don't have static html
to be served) with no problem.

We are using TC 4.1.31, with J2SDK1.4.2_03 on a W2K/SP4 box (Xeon 3.0Ghz
with 2GB mem).

At this time we had more or less 25 concurrent users. We were happy...

Recently, another department in company started to use the application.
So now we have more or less 100 concurrent users.

Since then the problems began raising. Most of then when we try to
insert/update data in database. Generally we receive errors telling that
we tried to insert null values into a not null field (BTW we are using
oracle 8.1.7 with JDBC - classes12.jar).

My point is that application was working. Nothing changed (except the
number of users). So, I'm sure that the fields are being properly
filled.

What I would like to ask you, is if someone has experienced this kind of
problem. I was wondering if tomcat could lost request parameters under
heavy traffic...

I don't have any prove that it actually lost something. As I said, I'm
just wondering. Maybe the JDBC...

Searching into the mailing list archive, I found a thread about
performance. I have changed the connector maxProcessors to 150 and also
add maxKeepAliveRequests="1" to it after reading it. Nothing change.

Does someone has some advice? I know that my posting is vague, but I
don't where to look anymore...

I was thinking about to do a tomcat upgrade (to 5.0.X).

TIA,

Bob


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



lost request

2002-12-17 Thread Deepa Raja
Hi,

I'm using apache(1.3.26)-tomcat(4.1.12) (warp connector) for my application.
When I test my application with IE everything works fine until I press the
browser back button. once I press the back button I loose my request and I
could not fetch any form elements in my destination jsp.


Did anyone have the same problem? Please help.

Thanks
Deepa






This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: