Re: SQL Server 2000: JDBC

2005-10-06 Thread Roberto Rios

Hi,

Generally this error occurs when the connection between tomcat and the 
database is down, or the connection object is using a connection that is 
poor.


For instance, if your tomcat is running, and for some reason, the 
database goes down and then restart, you will receive this error.


So, before sending a sql command, you should test if the connection is 
good. If it isn't, kill it and start another one. I'm not sure, but if 
you use dbcp it will do it for you.


Bob

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



Problems serving files to download

2005-06-28 Thread Roberto Rios
Hi,
 
I have a tomcat 4.1.31 (j2sdk1.4.2_08) running in a linux rh9 box. It's
a fresh install.
 
I'm from Brazil, so I've configured my linux to use pt_BR.ISO-8859-1. If
I type locale, everything is ok.
 
My CATALINA_OPTS has the -Dfile.encoding=ISO-8859-1
 
I have no problems with my applications. Everithing works fine. All my
pages are compiled fine, my servlets work fine, etc...
 
But, if I try to serve files to download, and this files had special
characters like çãíetc, when I click the file name (that is
displayed right), I receive the 404 HTTP error.
 
For instance: using vi, I created a file named acentuação.txt inside
the tomcat-docs directory. When I try to access this file, it's name is
encoded to acentua%C3%A7%C3%A3o.txt (the address shows
http://localhost/tomcat-docs/acentua%C3%A7%C3%A3o.txt
http://localhost/tomcat-docs/acentua%C3%A7%C3%A3o.txt), and after that I
can't access it. I tryed to use Firefox (1.0.4) and IE 6, but I got the
same problem
 
How do I manage this? Who encoded the name?
 
TIA,
 
Bob


RES: Problems serving files to download

2005-06-28 Thread Roberto Rios
Hi,

Thanks for replying. No, I'm not using servlets to read the files.

The files are being served directly by tomcat. I have configured tomcat
to allow directory linstings, so I can see the files in the directory
and click on it directly.

By the way, the same problem occurs with files that have spaces in their
names. If I try to download a file named this is an example.txt the
same error occurs. The file name is encoded to
this%20is%20an%20example.txt and after that I'm not able to download
it.

Using your sugestion, I created a small jsp with the following code:

%
String s = java.net.URLDecoder.decode(
http://localhost/tomcat-docs/acentua%C3%A7%C3%A3o.txt;, UTF-8 );
Reponse.sendRedirect(s);
%

It works fine. I was able to download the file. The problem is that as I
said, the files are being served directly, and I am trying to understand
why tomcat isn't able to decode the url properly... Well, I'm not sure
if this is or not a tomcat misconfiguration problem...

Thanks again,

Bob

-Mensagem original-
De: Robert Harper [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 28 de junho de 2005 11:12
Para: 'Tomcat Users List'; [EMAIL PROTECTED]
Assunto: RE: Problems serving files to download


Try the following if you are trying to read the following in a servlet:

String s = java.net.URLDecoder.decode(
http://localhost/tomcat-docs/acentua%C3%A7%C3%A3o.txt;, UTF-8 );

You can read the file and write it out to the response stream. Since
this is a text file it will be displayed in the browser window. The user
may then save the file from the browser. 

Robert S. Harper
Information Access Technology, Inc.

-Original Message-
From: Roberto Rios [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 28, 2005 7:49 AM
To: 'Tomcat Users List'
Subject: Problems serving files to download

Hi,
 
I have a tomcat 4.1.31 (j2sdk1.4.2_08) running in a linux rh9 box. It's
a fresh install.
 
I'm from Brazil, so I've configured my linux to use pt_BR.ISO-8859-1. If
I type locale, everything is ok.
 
My CATALINA_OPTS has the -Dfile.encoding=ISO-8859-1
 
I have no problems with my applications. Everithing works fine. All my
pages are compiled fine, my servlets work fine, etc...
 
But, if I try to serve files to download, and this files had special
characters like çãíetc, when I click the file name (that is
displayed right), I receive the 404 HTTP error.
 
For instance: using vi, I created a file named acentuação.txt inside
the tomcat-docs directory. When I try to access this file, it's name is
encoded to acentua%C3%A7%C3%A3o.txt (the address shows
http://localhost/tomcat-docs/acentua%C3%A7%C3%A3o.txt
http://localhost/tomcat-docs/acentua%C3%A7%C3%A3o.txt), and after that I
can't access it. I tryed to use Firefox (1.0.4) and IE 6, but I got the
same problem
 
How do I manage this? Who encoded the name?
 
TIA,
 
Bob



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



Tomcat service terminated unexpectedly

2005-05-09 Thread Roberto Rios
Hi,

We have a tomcat running in a W2K Box (tomcat 4.1.30, java 1.4.1_01, W2K
SP4, Pentium Xeon 2,8Ghz, 2,5Gb ram).

Tomcat is running as a service (default installation) and time to time
(random) it crashes with the following message:

The Apache Tomcat 4.1 service terminated unexpectedly. It has done this
1 time(s). The following corrective action will be taken in 6
milliseconds: Restart the service.

The source of this message is Service Control Manager and the event id
is 7031.

After the restart, I receive more or less 120 warning messages telling
me that:

The compressed file C:\winnt\temp\jar_cacheX.tmp contains files
number that is larger than 100. The file was skipped by Real-Time scan.

Does someone experienced something like this? Any suggestion? Is there
any know issue with tomcat service?

Maybe doing an upgrade on java/tomcat?

TIA,

Bob


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



RES: Tomcat service terminated unexpectedly

2005-05-09 Thread Roberto Rios
Hi,

Thanks, and yes, we have an antivirus installed, but it's not Norton.
It's Trend's SProtect.

Bob

-Mensagem original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Enviada em: segunda-feira, 9 de maio de 2005 09:59
Para: Tomcat Users List; [EMAIL PROTECTED]
Assunto: RE: Tomcat service terminated unexpectedly

Do you perchance have the Norton virus known as anti?

-Original Message-
From: Roberto Rios [mailto:[EMAIL PROTECTED]
Sent: Monday, May 09, 2005 7:43 AM
To: 'Tomcat Users List'
Subject: Tomcat service terminated unexpectedly
Importance: High


Hi,

We have a tomcat running in a W2K Box (tomcat 4.1.30, java 1.4.1_01, W2K
SP4, Pentium Xeon 2,8Ghz, 2,5Gb ram).

Tomcat is running as a service (default installation) and time to time
(random) it crashes with the following message:

The Apache Tomcat 4.1 service terminated unexpectedly. It has done this
1 time(s). The following corrective action will be taken in 6
milliseconds: Restart the service.

The source of this message is Service Control Manager and the event id
is 7031.

After the restart, I receive more or less 120 warning messages telling
me that:

The compressed file C:\winnt\temp\jar_cacheX.tmp contains files
number that is larger than 100. The file was skipped by Real-Time scan.

Does someone experienced something like this? Any suggestion? Is there
any know issue with tomcat service?

Maybe doing an upgrade on java/tomcat?

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]



How to search tomcat user list

2005-04-30 Thread Roberto Rios
Hi,

I think that this post is a little bit off-topic, but I couldn't found
it elsewhere...

How do I search something in the tomcat user list?

I used to do it through mail-archives.apache.org, but they changed it
and now it's not possible to search it, only browse it.

I looking for information about the CoyoteConnector (connectionLinger,
connectionTimeout, buffer, etc)? I want more specific information
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/coyote.html is
too much generic).

For instance, If I increase buffer size, what kind of impact I will
have?

TIA,

Bob


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



RES: How to search tomcat user list

2005-04-30 Thread Roberto Rios
I found it:

http://www.mail-archive.com

Bob
-Mensagem original-
De: Roberto Rios [mailto:[EMAIL PROTECTED] 
Enviada em: sábado, 30 de abril de 2005 12:18
Para: 'Tomcat Users List'
Assunto: How to search tomcat user list
Prioridade: Alta

Hi,

I think that this post is a little bit off-topic, but I couldn't found
it elsewhere...

How do I search something in the tomcat user list?

I used to do it through mail-archives.apache.org, but they changed it
and now it's not possible to search it, only browse it.

I looking for information about the CoyoteConnector (connectionLinger,
connectionTimeout, buffer, etc)? I want more specific information
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/coyote.html is
too much generic).

For instance, If I increase buffer size, what kind of impact I will
have?

TIA,

Bob


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



RES: Tomcat5 java.lang.OutOfMemoryError

2005-01-10 Thread Roberto Rios
Hi Claudia,

It's NOT necessary to reinstall tomcat in order to change it's values.

Take a look at:
http://forum.java.sun.com/thread.jspa?threadID=559924tstart=360

Bob


-Mensagem original-
De: SARMIENTO Claudia COGA [mailto:[EMAIL PROTECTED] 
Enviada em: segunda-feira, 10 de janeiro de 2005 16:49
Para: 'Tomcat Users List'
Assunto: Tomcat5 java.lang.OutOfMemoryError

Hello all:
I have problems with memory in Tomcat, this happen when the servlet try
to
forward the result jsp only if the result is too big (a set of rows in a
period date)
Th bean doesn't have problems, but the servlet yes, so i think i need to
change my configuration to set more memory at startup. (Actually is the
default)

I work in Tomcat 5.0.25 under W2000 with tomcat as a service, i read
that i
have to re-install tomcat
(http://marc.theaimsgroup.com/?l=tomcat-userm=104331482014538w=2) the
notes is for tomcat 4, is the same for tomcat 5.0?

Thanks!
Claudia

PD:

This is the exactly error:

2005-01-10 11:26:42 StandardWrapperValve[invoker]: Servlet.service()
para
servlet invoker lanzó excepción
java.lang.OutOfMemoryError



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



RE: jndi error configuring data source

2005-01-06 Thread Roberto Rios
Hi,

Put the JDBC jar in [TOMCAT]/common/lib

Do not place it inside your own application lib folder

Bob

-Mensagem original-
De: Scott Purcell [mailto:[EMAIL PROTECTED] 
Enviada em: quarta-feira, 5 de janeiro de 2005 20:02
Para: tomcat-user@jakarta.apache.org
Assunto: jndi error configuring data source

 
I am trying to configure database pooling in Tomcat 4.1.31. I found some
excellent documentation here
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples
-howto.html
 
I followed this exactly for mysql (top article).
 
I created the DBTest web-app precisely, and all folders exist and
web.xml file is good.
My webapp is under root/DBTest/WEB-INF/classes
 
/lib/mm.mysql-bin.jar
  web.xml
 
The server starts properly, so I know my configuration is good. The
problem is I get an error stating that it cannot find the jar file for
the mysql driver when I hit the test page. (ERROR_BELOW)
Anyway, I followed the article precisely, and noticed that they hit
localhost:8080. My tomcat is running on 80 and at my IP address as you
can see below. 
Would this be why it cannot find the jar file? I am looking at the ajp13
listening on /0.0.0.0:8009 and wondering if there is something else that
needs configuring?
 
Would like to get this running if possible.
 
Thank you 
Scott
 
 
 
 

INFO: Starting Coyote HTTP/1.1 on http-192.168.66.90-80
Jan 5, 2005 3:52:27 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Jan 5, 2005 3:52:27 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=15/532
config=C:\jakarta-tomcat-4.1.31\conf\jk2.prop
erties
org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver
class 'org.g
jt.mm.mysql.Driver', cause:
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClas
sLoader.java:945)
at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClas
sLoader.java:810)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:140)
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
rce.java:730)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
.java:518)
at foo.DBTest.init(DBTest.java:23)
at org.apache.jsp.test_jsp._jspService(test_jsp.java:49)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:162)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
40)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:200)


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



RES: I need to configure logs on my virtual hosting

2004-12-30 Thread Roberto Rios
Hi,

Yes, you can.

Take a look at the admin context provided with tomcat (as an example):

Context path=/admin docBase=${catalina.home}/server/webapps/admin
debug=0 privileged=true

  Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_admin_log. suffix=.txt
  timestamp=true/

/Context

Bob

-Mensagem original-
De: Amit Gupta [mailto:[EMAIL PROTECTED] 
Enviada em: quinta-feira, 30 de dezembro de 2004 02:33
Para: Tomcat Users List; [EMAIL PROTECTED]
Assunto: RE: I need to configure logs on my virtual hosting

Hi Bob,

I am using tomcat 5.0. I found that logger is used below tomcat 5.5.0.
Can I use logger in context.xml in mywebapp/META-INF/context.xml?


Amit Gupta
Mobile: 91-9818052171
Yahoo IM: amitguptainn
MSN IM : amitguptainn

-Original Message-
From: Roberto Rios [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 28, 2004 8:30 PM
To: tomcat-user@jakarta.apache.org
Subject: RE: I need to configure logs on my virtual hosting

Hi,

Which tomcat version?

For tomcat 4.X put a LOGGER component inside the context and specify the
directory that you want. Take a look at
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/logger.html)

This procedure works with TC 5.0.X, but it's deprecated.

For TC 5.5, look at
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html.

Bob
-Mensagem original-
De: Amit Gupta [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 28 de dezembro de 2004 04:27
Para: Tomcat Users List
Assunto: I need to configure logs on my virtual hosting

Hi,

 

I need to configure logs on my virtual hosting. How can I do it? Till
now logs are created at global logs directory to which I don't have
access. I need logs in my webapps directory.

 



-
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]



RES: I need to configure logs on my virtual hosting

2004-12-30 Thread Roberto Rios
Hi,

Can you provide more details? Are you getting errors or the log files
aren't being created?

I always used logger inside my contexts and I never had problem.

I never used TC5.0.19. I did an upgrade from TC4.1.30 to 5.0.28 and
everything works well.

Bob

-Mensagem original-
De: Goel, Manish Kumar [mailto:[EMAIL PROTECTED] 
Enviada em: quinta-feira, 30 de dezembro de 2004 08:39
Para: Tomcat Users List; [EMAIL PROTECTED]
Assunto: RE: I need to configure logs on my virtual hosting

Hi,
 can any body help me this same thing not working on tomcat 5.0.19
version.

Manish


-Original Message-
From: Roberto Rios [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 30, 2004 4:03 PM
To: 'Amit Gupta'; 'Tomcat Users List'
Subject: RES: I need to configure logs on my virtual hosting


Hi,

Yes, you can.

Take a look at the admin context provided with tomcat (as an example):

Context path=/admin docBase=${catalina.home}/server/webapps/admin
debug=0 privileged=true

  Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_admin_log. suffix=.txt
  timestamp=true/

/Context

Bob

-Mensagem original-
De: Amit Gupta [mailto:[EMAIL PROTECTED] 
Enviada em: quinta-feira, 30 de dezembro de 2004 02:33
Para: Tomcat Users List; [EMAIL PROTECTED]
Assunto: RE: I need to configure logs on my virtual hosting

Hi Bob,

I am using tomcat 5.0. I found that logger is used below tomcat 5.5.0.
Can I use logger in context.xml in mywebapp/META-INF/context.xml?


Amit Gupta
Mobile: 91-9818052171
Yahoo IM: amitguptainn
MSN IM : amitguptainn

-Original Message-
From: Roberto Rios [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 28, 2004 8:30 PM
To: tomcat-user@jakarta.apache.org
Subject: RE: I need to configure logs on my virtual hosting

Hi,

Which tomcat version?

For tomcat 4.X put a LOGGER component inside the context and specify the
directory that you want. Take a look at
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/logger.html)

This procedure works with TC 5.0.X, but it's deprecated.

For TC 5.5, look at
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html.

Bob
-Mensagem original-
De: Amit Gupta [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 28 de dezembro de 2004 04:27
Para: Tomcat Users List
Assunto: I need to configure logs on my virtual hosting

Hi,

 

I need to configure logs on my virtual hosting. How can I do it? Till
now logs are created at global logs directory to which I don't have
access. I need logs in my webapps directory.

 



-
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]



***
Information contained in this email message is intended only for use of
the
individual or entity named above. If the reader of this message is not
the
intended recipient, or the employee or agent responsible to deliver it
to
the intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If
you
have received this communication in error, please immediately notify the
[EMAIL PROTECTED] and destroy the original message.

**


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



RE: I need to configure logs on my virtual hosting

2004-12-28 Thread Roberto Rios
Hi,

Which tomcat version?

For tomcat 4.X put a LOGGER component inside the context and specify the
directory that you want. Take a look at
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/logger.html)

This procedure works with TC 5.0.X, but it's deprecated.

For TC 5.5, look at
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html.

Bob
-Mensagem original-
De: Amit Gupta [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 28 de dezembro de 2004 04:27
Para: Tomcat Users List
Assunto: I need to configure logs on my virtual hosting

Hi,

 

I need to configure logs on my virtual hosting. How can I do it? Till
now logs are created at global logs directory to which I don't have
access. I need logs in my webapps directory.

 



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



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

jsp:useBean id = ticket class = com.mycompany.Ticket/

%
  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]



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]



Strage Behaviour - Tomcat Memory Leak

2004-08-05 Thread Roberto Rios
Hi,

I was doing an evaluation of JProfiler in order see the improvements did
since the last time I used it. I has a feature (like other profilers) that
shows the heap usage in real time.

As I always do, I have installed a new copy of tomcat, with NO changes. I
have just unziped it into a directory (by the way, I am using winXP,
J2SDK1.4.2_05, JProfiler 3.1 and tomcat 4.1.30/5.0.25).

So I started JProfiler, that automatically starts tomcat (I have tested it
against 4.1.30 and 5.0.25 - same behaviour), and I also started the heap
monitor (that JProfiler calls VM Telemetry).

What I saw, IMHO, is very strange: time to times (around every 30 minutes)
the heap is totally filled, and the garbage collector runs. So the graph
looks like a saw:

  /|  /|  /|  /
 / | / | / | /
/  |/  |/  |/

What is strange, is that I does't touch tomcat. I just start it. Nothing is
running under it (except the default applications: manager, examples,
etc Anyway, I have cleaned the server.xml and webapps, removing the
manager, admin and examples app. Same bahaviour again).

IMHO, the heap usage should be a flat line if nothing is running under
tomcat. Something like (the initial increase is due to tomcat startup) this:

  /--
 /
/

My conclusion, is that OR tomcat has a huge memory leak, OR JProfiler isn't
reliable.

Does anyone has an explanation about this behaviour? Is it know? Maybe a
listener, logger, etc?

TIA,

Bob


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



RE: Strage Behaviour - Tomcat Memory Leak

2004-08-05 Thread Roberto Rios
Everybody is right. The saw teeth is around 3mb. The heap is around 9mb. So
after the GC runs, the available heap falls to 6mb.

As Yoah said this isn't a memory leak, since all the objects that area
created are garbage collected. I called it as a memory leak because even
with nothing running under tomcat, object were created.

I did an experience (following what Allistair wrote), removing loggers and
setting autodeploy to false. The saw pattern still occuring, but the cycle
is a little bit longer.

And, now that the problem is solved, I think that JProfiler is quite good.
It has some nice features. Since the last time that I have tested it, they
have improved a lot.

Thanks,

Bob

-Mensagem original-
De: Roberto Rios [mailto:[EMAIL PROTECTED]
Enviada em: quinta-feira, 5 de agosto de 2004 13:40
Para: [EMAIL PROTECTED]
Assunto: Strage Behaviour - Tomcat Memory Leak


Hi,

I was doing an evaluation of JProfiler in order see the improvements did
since the last time I used it. I has a feature (like other profilers) that
shows the heap usage in real time.

As I always do, I have installed a new copy of tomcat, with NO changes. I
have just unziped it into a directory (by the way, I am using winXP,
J2SDK1.4.2_05, JProfiler 3.1 and tomcat 4.1.30/5.0.25).

So I started JProfiler, that automatically starts tomcat (I have tested it
against 4.1.30 and 5.0.25 - same behaviour), and I also started the heap
monitor (that JProfiler calls VM Telemetry).

What I saw, IMHO, is very strange: time to times (around every 30 minutes)
the heap is totally filled, and the garbage collector runs. So the graph
looks like a saw:

  /|  /|  /|  /
 / | / | / | /
/  |/  |/  |/

What is strange, is that I does't touch tomcat. I just start it. Nothing is
running under it (except the default applications: manager, examples,
etc Anyway, I have cleaned the server.xml and webapps, removing the
manager, admin and examples app. Same bahaviour again).

IMHO, the heap usage should be a flat line if nothing is running under
tomcat. Something like (the initial increase is due to tomcat startup) this:

  /--
 /
/

My conclusion, is that OR tomcat has a huge memory leak, OR JProfiler isn't
reliable.

Does anyone has an explanation about this behaviour? Is it know? Maybe a
listener, logger, etc?

TIA,

Bob


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



Admin Webapp Error

2003-02-12 Thread Roberto Rios
Hi all,

I am trying to use the admin module that comes with tomcat 4.1.18, and I
receive the following error message:

javax.servlet.ServletException: Cannot find message resources under key
org.apache.struts.action.MESSAGE at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
tImpl.java:530)
at org.apache.jsp.login_jsp._jspService(login_jsp.java:188)
...

I did some research, and I was not able to found I solution. I never
found a direct solution, so I decided to do some tests.

First of all, the problems seems to be related with struts.

1) I have replaced xmlParserAPIs.jar and xercesImpl.jar because
someone wrote that the struts that comes with tomcat 4.1.18 has some
bugs, and do not work with earlier versions of it. So, I have downloaded
the version 2.1.0 os xerces, but it doesn't work too.

2) After that, I did some research at STRUTS mailing list, and I found
that the problem could be related with Action servlet, and some guys
recommended to put a load-on-startup/ into web.xml. It doesn't
worked too.

Of course I tried to do both of them, but no success again.

I have tried to use both tomcat 4.1.18 FULL and 4.1.18 LE. I am using
j2sdk 1.4.1_01-b01, with w2k pro. I always use a fresh installation with
no modifications. I just ungzip/untar the binary distribution, then I
set the CATALINA_HOME, change the tomcat-users.xml (adding the admin and
manager roles as well an admin user).

Tomcat always works well. My applications run fine. Manager webapp works
fine too, but the admin module...

Please, some one have a solution to this problem?

Thanks in advance,

Roberto Rios


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




RES: Admin Webapp Error - SOLVED

2003-02-12 Thread Roberto Rios
Hi all,

Thanks for the tips.

The one that worked come from Eric Roberts.

But I did the opposite: I have downloaded it as a tar.gz file, extracted
it in a Linux box, then I moved the
jakarta-tomcat-4.1.18-LE-jdk14 diretory to my W2K box.

And it worked. Now I am able to use the admin webapp.

Problably Eric was right: during the download and/or extraction
something went wrong, and it maybe changed something...

I was looking the logs (thanks Bert) and I noticed some class not
found errors. So I have examined the classes and they were aparently
ok, so I decided to do the Eric solution...

Thanks again,

Roberto


-Mensagem original-
De: Roberto Rios [mailto:[EMAIL PROTECTED]] 
Enviada em: quarta-feira, 12 de fevereiro de 2003 11:34
Para: [EMAIL PROTECTED]
Assunto: Admin Webapp Error
Prioridade: Alta


Hi all,

I am trying to use the admin module that comes with tomcat 4.1.18, and I
receive the following error message:

javax.servlet.ServletException: Cannot find message resources under key
org.apache.struts.action.MESSAGE at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
tImpl.java:530)
at org.apache.jsp.login_jsp._jspService(login_jsp.java:188)
...

I did some research, and I was not able to found I solution. I never
found a direct solution, so I decided to do some tests.

First of all, the problems seems to be related with struts.

1) I have replaced xmlParserAPIs.jar and xercesImpl.jar because
someone wrote that the struts that comes with tomcat 4.1.18 has some
bugs, and do not work with earlier versions of it. So, I have downloaded
the version 2.1.0 os xerces, but it doesn't work too.

2) After that, I did some research at STRUTS mailing list, and I found
that the problem could be related with Action servlet, and some guys
recommended to put a load-on-startup/ into web.xml. It doesn't
worked too.

Of course I tried to do both of them, but no success again.

I have tried to use both tomcat 4.1.18 FULL and 4.1.18 LE. I am using
j2sdk 1.4.1_01-b01, with w2k pro. I always use a fresh installation with
no modifications. I just ungzip/untar the binary distribution, then I
set the CATALINA_HOME, change the tomcat-users.xml (adding the admin and
manager roles as well an admin user).

Tomcat always works well. My applications run fine. Manager webapp works
fine too, but the admin module...

Please, some one have a solution to this problem?

Thanks in advance,

Roberto Rios


-
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]