out of memory error

2005-04-26 Thread Pedro Nevado
This one of the remedies proposed. There is also a bug reported, and a patch
for it. Finally you can try swallowOutput=false in your context.xml.
Pedro Nevado


De: sysdba [EMAIL PROTECTED]
Enviado: viernes, 15 de abril de 2005 15:49
Para: Tomcat Users List
Asunto: Memory Leak Solved

We have struggled with a memory leak in 5.0.28/5.0.30 for months. There have
been many complaints about the necessity to restart Tomcat every couple days
due to Out of Memory errors, but no solutions that cured it. Well, the
suggestion to put the single line:
 Introspector.flushCaches();
in the destroy method of a servlet in a redeployable app finally solves it.
Our
Tomcat web server has now run for seven days without an OOM error. The
amount
of time spent with the Optimizeit profiler trying to locate a nonexistent
memory leak in the application code cannot be overestimated. This discovery
should be bold red lettered in the docs.

Gary Harris



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



how to host website on Tomcat 5.5.9

2005-04-26 Thread Pedro Nevado
Instead of defining your context in server.xml, try to define it in a
document titled ROOT.xml. This document must be located in
conf/Catalina/www.anishanumandla.com/.
Also, I would change the appBase of your host to "/Program Files/Apache
Software Foundation/Tomcat 5.5/webapps".
I hope this helps.

Pedro Nevado

-Mensaje original-
De: Ashok Anumandla [mailto:[EMAIL PROTECTED]
Enviado el: martes, 26 de abril de 2005 5:02
Para: tomcat-user@jakarta.apache.org
Asunto: how to host website on Tomcat 5.5.9


Hi All,

I am trying to host my son website on Tomcat 5.5.9 in my home machine, i
did following steps ..

- installed the JRE,JAVA, and Tomcat 5.5.9
- installed ant
- when i run ant, it created anishanumandla under tomcat webapps.
- configured following in server.xml
 
 
   
- Configured web.xml for welcome file.
- Configured my linksys to fwd the any request from
www.anishanumandla.com to port number and 8080 port.

- Restarted the tomcat,

But unfortunately i am not able to make it working , when i try
http://localhost:8080/anishanumandla, it is working fine, but when i try
accessing www.anishanumandla.com it is not working, i am getting page
not found error, can somebody please tell me what i am doing wrong
here?? or if there is step by step document, can u please send me the
url,,,

the environmentment is Windows 2000...

Thanks in advance

Regards
Ashok



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



RE: Log4J in Tomcat 5.0...I don't believe the FAQ

2004-09-06 Thread Pedro Nevado
I use commons-logging api for two reasons (I am affraid that one of them
better than the other):
- because I reuse classes that use it.
- because the people from whom I learned to program Java2EE use it.
Thanks for the reference; it is really interesting.

-Mensaje original-
De: Jacob Kjome [mailto:[EMAIL PROTECTED]
Enviado el: domingo, 05 de septiembre de 2004 23:55
Para: Tomcat Users List
Asunto: RE: Log4J in Tomcat 5.0...I don't believe the FAQ


Why do you use commons-logging in your application classes?  I can see a
semi-legitimate argument for a framework doing this, so as to not force a
particular logging implementation on the user.   However, you are the
user.  You choose the logging implementation.  You have, obviously, chosen
Log4j as your implementation of choice.  Why not cut out the middle man
(commons-logging) and use Log4j?

You might be interested in this...
http://www.qos.ch/logging/thinkAgain.html

See links at the bottom of the page as well.

Jake


At 09:01 PM 9/5/2004 +0200, you wrote:
>In case it helps, this is what I do with Tomcat 5.0.28 (Win 2000 without
>installer, j2sdk1.4.2_04):
>- I do not put log4j.jar in commom/lib, but in the WEB-INF/lib of my web
>app.
>- I put log4j.xml (equivalent to log4j.properties) and
>commons-logging.properties in WEB-INF/classes of my app.
>The archive commons-logging.properties contains:
>
>org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
>
>I use the commons-logging api in my application classes.
>
>Regards.
>Pedro Nevado
>
>
>-Mensaje original-
>De: Patrick Burleson [mailto:[EMAIL PROTECTED]
>Enviado el: domingo, 05 de septiembre de 2004 17:05
>Para: [EMAIL PROTECTED]
>Asunto: Log4J in Tomcat 5.0...I don't believe the FAQ
>
>
>So I'm trying to get Tomcat 5.0 to use Log4J for its log output
>formatted to my liking. Started searching and found a link to this
>message in the Tomcat FAQ that says it has the solution.
>
>http://marc.theaimsgroup.com/?l=tomcat-user&m=108330970225012&w=2
>
>Well, after performing what seem like simple steps (probably the steps
>I would have done anyway), still no logging through Log4J.
>
>Did I miss some magically step number 4 or even step 0? I copied
>log4j-1.2.8.jar to /commons/lib and put the example
>log4j.properties in /commons/classes at DEBUG level and
>still only got the original format with only INFO level stuff printing
>out.
>
>I tried with the following versions of Tomcat on Windows XP with JDK
>1.4.2_05 and JDK 5.0-RC:
>
>5.0.27 Windows Installer
>5.0.27 Zip file
>5.0.19 Windows Installer
>5.0.19 Zip File
>
>I tried the last two since they were the version mention in the mail
>message. I tried the zips thinking maybe there was something
>"different" about the windows installers.
>
>Later in that thread it is mentioned by Jacob Kjome in message
>http://marc.theaimsgroup.com/?l=tomcat-user&m=108333554729166&w=2 :
>
>" I've pointed out almost these exact instructions many times before
>and people keep asking or say it doesn't work (it does)."
>
>I just don't believe it. There has to be something I missed...but
>that's hard to do when there's only 3 steps, one of them being
>"Download Log4J".
>
>Any ideas?
>
>Thanks,
>Patrick
>
>
>
>-
>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: Log4J in Tomcat 5.0...I don't believe the FAQ

2004-09-05 Thread Pedro Nevado
In case it helps, this is what I do with Tomcat 5.0.28 (Win 2000 without
installer, j2sdk1.4.2_04):
- I do not put log4j.jar in commom/lib, but in the WEB-INF/lib of my web
app.
- I put log4j.xml (equivalent to log4j.properties) and
commons-logging.properties in WEB-INF/classes of my app.
The archive commons-logging.properties contains:

org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger

I use the commons-logging api in my application classes.

Regards.
Pedro Nevado


-Mensaje original-
De: Patrick Burleson [mailto:[EMAIL PROTECTED]
Enviado el: domingo, 05 de septiembre de 2004 17:05
Para: [EMAIL PROTECTED]
Asunto: Log4J in Tomcat 5.0...I don't believe the FAQ


So I'm trying to get Tomcat 5.0 to use Log4J for its log output
formatted to my liking. Started searching and found a link to this
message in the Tomcat FAQ that says it has the solution.

http://marc.theaimsgroup.com/?l=tomcat-user&m=108330970225012&w=2

Well, after performing what seem like simple steps (probably the steps
I would have done anyway), still no logging through Log4J.

Did I miss some magically step number 4 or even step 0? I copied
log4j-1.2.8.jar to /commons/lib and put the example
log4j.properties in /commons/classes at DEBUG level and
still only got the original format with only INFO level stuff printing
out.

I tried with the following versions of Tomcat on Windows XP with JDK
1.4.2_05 and JDK 5.0-RC:

5.0.27 Windows Installer
5.0.27 Zip file
5.0.19 Windows Installer
5.0.19 Zip File

I tried the last two since they were the version mention in the mail
message. I tried the zips thinking maybe there was something
"different" about the windows installers.

Later in that thread it is mentioned by Jacob Kjome in message
http://marc.theaimsgroup.com/?l=tomcat-user&m=108333554729166&w=2 :

" I've pointed out almost these exact instructions many times before
and people keep asking or say it doesn't work (it does)."

I just don't believe it. There has to be something I missed...but
that's hard to do when there's only 3 steps, one of them being
"Download Log4J".

Any ideas?

Thanks,
Patrick



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



RE: Tomcat Datasource

2004-07-27 Thread Pedro Nevado
In case it helps, have a look a this parameter:



factory
org.apache.commons.dbcp.BasicDataSourceFactory

Pedro

-Mensaje original-
De: Bussie, Andre D [mailto:[EMAIL PROTECTED]
Enviado el: lunes, 26 de julio de 2004 20:57
Para: [EMAIL PROTECTED]
Asunto: Tomcat Datasource


I'm using Tomcat 5.0.19. I configured a datasource via the Tomcat Admin
tool to configure a datatsource listed below is the server.xml file
settings for the datasource









maxWait

5000





maxActive

4





password







url

jdbc:hsqldb.hsql://localhost





driverClassName

org.hsqldb.jdbcDriver





maxIdle

2





username

sa





  

 

However when I try to access the datasource from a jsp file I get the
following error

2004-07-26 10:42:19 StandardWrapperValve[jsp]: Servlet.service() for
servlet jsp threw exception

javax.naming.NameNotFoundException: Name jdbc/phone is not bound in this
Context

 

Code snippet listed below

<% InitialContext ctx = new InitialContext(); 

  DataSource ds =
(DataSource)ctx.lookup("java:comp/env/jdbc/phone");

  Connection conn = ds.getConnection();

  try{

 

Any suggestions on what can be causing this error. Why isn't in the
context and how do I bind it to the context?

 

 




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



RE: error when start tomcat if in the web.xml is the error-page directive

2002-12-13 Thread Pedro Nevado
Verify the order of your elements in the web.xml file.

-Mensaje original-
De: Dionisio Ruiz de Zarate [mailto:[EMAIL PROTECTED]]
Enviado el: viernes, 13 de diciembre de 2002 13:22
Para: [EMAIL PROTECTED]
Asunto: error when start tomcat if in the web.xml is the error-page
directive


if in my web.xml i have this:

404
/error.jsp


the tomcat starts well but appears the next error. Can you help me to resolv
it? thanks.

ERROR:
13-dic-2002 13:19:14 org.apache.commons.digester.Digester error
GRAVE: Parse Error at line 723 column 11: The content of element type
"web-app" must match
"(icon?,display-name?,description?,distributable?,context-param*,filter*,fil
ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mappin
g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,se
curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-loca
l-ref*)".
org.xml.sax.SAXParseException: The content of element type "web-app" must
match
"(icon?,display-name?,description?,distributable?,context-param*,filter*,fil
ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mappin
g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,se
curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-loca
l-ref*)".
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHand
lerWrapper.java:232)
at
org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:17
3)
at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:36
2)
at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:29
6)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.
java:1953)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:8
78)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(XMLDo
cumentFragmentScannerImpl.java:1144)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocu
mentFragmentScannerImpl.java:987)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(XMLDocumentFragmentScannerImpl.java:1445)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
ntFragmentScannerImpl.java:333)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:116
9)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at
org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.ja
va:282)
at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:639)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:
243)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:166)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3493)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at
org.apache.catalina.core.StandardService.start(StandardService.java:497)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
13-dic-2002 13:19:15 org.apache.jk.common.ChannelSocket init



--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




RE: error when start tomcat if in the web.xml is the error-page directive

2002-12-13 Thread Pedro Nevado
Dionisio,
I do not find anything wrong with that entry in your web.xml file. The error
is probably caused by another element.I have used error pages in my web-xml
files with the same entry as yours without problems.

Pedro

-Mensaje original-
De: Dionisio Ruiz de Zarate [mailto:[EMAIL PROTECTED]]
Enviado el: viernes, 13 de diciembre de 2002 13:22
Para: [EMAIL PROTECTED]
Asunto: error when start tomcat if in the web.xml is the error-page
directive


if in my web.xml i have this:

404
/error.jsp


the tomcat starts well but appears the next error. Can you help me to resolv
it? thanks.

ERROR:
13-dic-2002 13:19:14 org.apache.commons.digester.Digester error
GRAVE: Parse Error at line 723 column 11: The content of element type
"web-app" must match
"(icon?,display-name?,description?,distributable?,context-param*,filter*,fil
ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mappin
g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,se
curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-loca
l-ref*)".
org.xml.sax.SAXParseException: The content of element type "web-app" must
match
"(icon?,display-name?,description?,distributable?,context-param*,filter*,fil
ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mappin
g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,se
curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-loca
l-ref*)".
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHand
lerWrapper.java:232)
at
org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:17
3)
at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:36
2)
at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:29
6)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.
java:1953)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:8
78)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(XMLDo
cumentFragmentScannerImpl.java:1144)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocu
mentFragmentScannerImpl.java:987)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(XMLDocumentFragmentScannerImpl.java:1445)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
ntFragmentScannerImpl.java:333)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:116
9)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at
org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.ja
va:282)
at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:639)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:
243)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:166)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3493)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at
org.apache.catalina.core.StandardService.start(StandardService.java:497)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
13-dic-2002 13:19:15 org.apache.jk.common.ChannelSocket init



--
To unsubscribe, e-mail:

For additional commands, e-mail:



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