AW: Different session timeout for local and external users

2008-11-14 Thread Ehlers, Kolja
Thanks for the speedy answer to my question. Is this the only possibility?
Since the filter will be called for each request, maybe this will slow down
my web application

Thanks again

-Ursprüngliche Nachricht-
Von: Mikolaj Rydzewski [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 13. November 2008 15:29
An: Tomcat Users List
Betreff: Re: Different session timeout for local and external users


Ehlers, Kolja wrote:
 is it somehow possible to set a different session timeout for local
 192.168... users and others? I know I could have a rewrite rule and then
 forward all calls from local workstation to a different webapp folder but
I
 thought maybe there is a more easy way to do this.

Servlet filter that will make use of HttpSession#getLastAccessedTime()
and invalidate session for 'local' users.

--
Mikolaj Rydzewski [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Geschäftsführung: Dr. Michael Fischer, Reinhard Eisebitt
Amtsgericht Köln HRB 32356
Steuer-Nr.: 217/5717/0536
Ust.Id.-Nr.: DE 204051920
--
This email transmission and any documents, files or previous email
messages attached to it may contain information that is confidential or
legally privileged. If you are not the intended recipient or a person
responsible for delivering this transmission to the intended recipient,
you are hereby notified that any disclosure, copying, printing,
distribution or use of this transmission is strictly prohibited. If you
have received this transmission in error, please immediately notify the
sender by telephone or return email and delete the original transmission
and its attachments without reading or saving in any manner.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Different session timeout for local and external users

2008-11-14 Thread Ehlers, Kolja
I have looked at the session listeners but there I cannot access the users
remote adress

-Ursprüngliche Nachricht-
Von: Ehlers, Kolja [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 14. November 2008 09:38
An: Tomcat Users List
Betreff: AW: Different session timeout for local and external users


Thanks for the speedy answer to my question. Is this the only possibility?
Since the filter will be called for each request, maybe this will slow down
my web application

Thanks again

-Ursprüngliche Nachricht-
Von: Mikolaj Rydzewski [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 13. November 2008 15:29
An: Tomcat Users List
Betreff: Re: Different session timeout for local and external users


Ehlers, Kolja wrote:
 is it somehow possible to set a different session timeout for local
 192.168... users and others? I know I could have a rewrite rule and then
 forward all calls from local workstation to a different webapp folder but
I
 thought maybe there is a more easy way to do this.

Servlet filter that will make use of HttpSession#getLastAccessedTime()
and invalidate session for 'local' users.

--
Mikolaj Rydzewski [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Geschäftsführung: Dr. Michael Fischer, Reinhard Eisebitt
Amtsgericht Köln HRB 32356
Steuer-Nr.: 217/5717/0536
Ust.Id.-Nr.: DE 204051920
--
This email transmission and any documents, files or previous email
messages attached to it may contain information that is confidential or
legally privileged. If you are not the intended recipient or a person
responsible for delivering this transmission to the intended recipient,
you are hereby notified that any disclosure, copying, printing,
distribution or use of this transmission is strictly prohibited. If you
have received this transmission in error, please immediately notify the
sender by telephone or return email and delete the original transmission
and its attachments without reading or saving in any manner.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Deploying On Production Server

2008-11-14 Thread Zaki Akhmad
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

I am trying to deploying my application with tomcat on my production
server. How do I make people that accessing my web server, no longer
should enter the tomcat port number? Just http://ip-address not
http://ip-address:port-number

- --
Zaki Akhmad


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: http://getfiregpg.org

iEYEARECAAYFAkkdOR4ACgkQT4k8JfIMt5eoSgCaArJWQgPdM5/ab73uYwPZ2KBB
6LgAoJds/Q0ljihIt5Pu4YuH5h6LQh/G
=cjEX
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AW: Different session timeout for local and external users

2008-11-14 Thread Mikolaj Rydzewski

Ehlers, Kolja wrote:

Thanks for the speedy answer to my question. Is this the only possibility?
Since the filter will be called for each request, maybe this will slow down
my web application
  

Maybe. But not likely. Search the web for 'premature optimization' ;-)

--
Mikolaj Rydzewski [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Deploying On Production Server

2008-11-14 Thread Ehlers, Kolja
You will need to make use of the mod_jk (The Apache Tomcat Connector) at 
http://tomcat.apache.org/connectors-doc/

-Ursprüngliche Nachricht-
Von: Zaki Akhmad [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 14. November 2008 09:41
An: Tomcat Users List
Betreff: Deploying On Production Server


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

I am trying to deploying my application with tomcat on my production
server. How do I make people that accessing my web server, no longer
should enter the tomcat port number? Just http://ip-address not
http://ip-address:port-number

- --
Zaki Akhmad


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: http://getfiregpg.org

iEYEARECAAYFAkkdOR4ACgkQT4k8JfIMt5eoSgCaArJWQgPdM5/ab73uYwPZ2KBB
6LgAoJds/Q0ljihIt5Pu4YuH5h6LQh/G
=cjEX
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Gesch�ftsf�hrung: Dr. Michael Fischer, Reinhard Eisebitt
Amtsgericht K�ln HRB 32356
Steuer-Nr.: 217/5717/0536
Ust.Id.-Nr.: DE 204051920
--
This email transmission and any documents, files or previous email
messages attached to it may contain information that is confidential or
legally privileged. If you are not the intended recipient or a person
responsible for delivering this transmission to the intended recipient,
you are hereby notified that any disclosure, copying, printing,
distribution or use of this transmission is strictly prohibited. If you
have received this transmission in error, please immediately notify the
sender by telephone or return email and delete the original transmission
and its attachments without reading or saving in any manner.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Deploying On Production Server

2008-11-14 Thread Serge Fonville
Inside server.xml you can change the port number from (default) 8080
to 80Restart
the tomcat service and it is running on the default HTTP port

Regards,

Serge Fonville

On Fri, Nov 14, 2008 at 9:40 AM, Zaki Akhmad [EMAIL PROTECTED] wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi,

 I am trying to deploying my application with tomcat on my production
 server. How do I make people that accessing my web server, no longer
 should enter the tomcat port number? Just http://ip-address not
 http://ip-address:port-number

 - --
 Zaki Akhmad


 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (GNU/Linux)
 Comment: http://getfiregpg.org

 iEYEARECAAYFAkkdOR4ACgkQT4k8JfIMt5eoSgCaArJWQgPdM5/ab73uYwPZ2KBB
 6LgAoJds/Q0ljihIt5Pu4YuH5h6LQh/G
 =cjEX
 -END PGP SIGNATURE-

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Apache/mod_jk serves random files from tomcat

2008-11-14 Thread Jakob Ericsson
On Thu, Nov 13, 2008 at 8:17 PM, Rainer Jung [EMAIL PROTECTED] wrote:
 Jakob Ericsson schrieb:
 Upgrading to latest version of mod_jk solves the problem. As I said
 before, this on Windows 2003 Server running both httpd (2.0.59) and
 tomcat (6.0.13) on the same machine. We upgraded all production
 machines this morning.

 Problem is in mod_jk 1.2.22 and is at least and fixed in 1.2.27. We
 did not do any other fixes to the environment when upgrading mod_jk.

 Hopefully this will help other people experiencing the same problem.

 Thanks a lot for reporting back. Let us know, in case the problem shows
 up again (hopefully not).


We had a peak yesterday on our machines and no problems reported.
Looks very promising.
Do you know (out of curiosity) know which bug in mod_jk that probably
caused the problem?

 Regards,

 Rainer

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AW: Different session timeout for local and external users

2008-11-14 Thread André Warnier

Mikolaj Rydzewski wrote:

Ehlers, Kolja wrote:
Thanks for the speedy answer to my question. Is this the only 
possibility?
Since the filter will be called for each request, maybe this will slow 
down

my web application
  

Maybe. But not likely. Search the web for 'premature optimization' ;-)


Have a look here :
http://tuckey.org/urlrewrite/

This does not have much to do with your case, but somewhere in there is 
a measure of how much time this filter takes per request.  Since it is 
much more complex that what you plan to do, I din't think you should worry.


The UrlRewrite filter itself, on the other hand, is a very handy tool 
that may be useful to you one day.
Maybe in fact it can even do what you want, also.  It can certainly 
distinguish remote IP addresses.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: multiple Set-Cookie headers in initial http response

2008-11-14 Thread Markus Reis
 Or use the same trick
 
 new Throwable(Oups).printStackTrace();
 
 inside your listener to not just write out session creations and
 destroys, but the code stack at that moment. Above Wrapper is nicer,
 using the same trick in your existing listener is simpler and faster.

I did that and finally found the problematic code (of course in the web 
application - in doGet/doPost of NewSessionServlet - and not in Tomcat/JBoss):
[code]
   EnumerationString params = request.getParameterNames();
   DynamicDataTransferObject ddto = (DynamicDataTransferObject) 
request.getSession().getAttribute(NEW_SESSION_LAST_DTO);
   if (ddto == null)
  ddto = new DynamicDataTransferObject();
   while (params.hasMoreElements()) {
  String key = params.nextElement();
  if (!request.getParameter(key).equals(ddto.get(key))) 
 request.getSession().invalidate();
  ddto.set(key, request.getParameter(key));
   }
   request.getSession().setAttribute(NEW_SESSION_LAST_DTO, ddto);
[/code]

This code checks whether a complex object representing all input/request params 
has been resubmitted with exactly the same values and invalidated the session x 
times (where x is the number of different parameter values). This is also done 
when a completely new session exists (and the params are sent for the first 
time).  This is complete non-sense of course.

My only apology to you is that I have not written this code and that I did not 
know of it's existence :-). Still I'd like to say thank you for your great help 
and valuable comments.

I now changed the code to:
[code]
   EnumerationString params = request.getParameterNames();
   DynamicDataTransferObject ddto = (DynamicDataTransferObject) 
request.getSession().getAttribute(NEW_SESSION_LAST_DTO);
   if (ddto == null) 
  ddto = new DynamicDataTransferObject();
   else {
  boolean invalidateSession = false;
  while (params.hasMoreElements()) {
 String key = params.nextElement();
 if (!request.getParameter(key).equals(ddto.get(key))) 
invalidateSession = true;
 ddto.set(key, request.getParameter(key));
  }
  if (invalidateSession)
 request.getSession().invalidate();
   }
   request.getSession().setAttribute(NEW_SESSION_LAST_DTO, ddto);
[/code]

Now session.invalidate() is called only once and only in the case where the 
client already called NewSessionServlet before in the existing browser session 
with different request parameter values.

One last question: I'm not sure whether it is good to call session.invalidate() 
in a doPost/doGet method of a HttpServlet? Could this have negative/problematic 
side-effects or is this OK?


many thanks  kind regards,
Markus
-- 
Sensationsangebot nur bis 30.11: GMX FreeDSL - Telefonanschluss + DSL 
für nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Debian + Apache 2.2 + Tomcat 5.5

2008-11-14 Thread Alexander Diedler
Hello,
I have a problem to integrate my own Application into the Tomcat Server. The 
mod_jk works fine. If I open http://127.0.0.1 I see the Tomcat Start Page.
Where I have to place my webapp and where I have to change some files to make 
my Application available onto the server?
I have a Debian 4.05 with Apache 2.2.5 and Tomcat 5.5.20 from Debian .deb 
packages installed per default.


Greetings
Alexander Diedler



Debian + Apache 2.2 + Tomcat 5.5

2008-11-14 Thread Alexander Diedler
Hello,
I have a problem to integrate my own Application into the Tomcat Server. The 
mod_jk works fine. If I open http://127.0.0.1 I see the Tomcat Start Page.
Where I have to place my webapp and where I have to change some files to make 
my Application available onto the server?
I have a Debian 4.05 with Apache 2.2.5 and Tomcat 5.5.20 from Debian .deb 
packages installed per default.


Greetings
Alexander Diedler



Re: Debian + Apache 2.2 + Tomcat 5.5

2008-11-14 Thread Serge Fonville
When deploying an application you can either place a war in the webapps
directory, copy the files to a directory in the webapps directory of if you
are hosting a simple website use the ROOT directory in you webapps
directory.It is advisable to change the appBase attribute in the host
element inside your server.xml

Regards,

Serge Fonville

On Fri, Nov 14, 2008 at 11:14 AM, Alexander Diedler [EMAIL PROTECTED]wrote:

 Hello,
 I have a problem to integrate my own Application into the Tomcat Server.
 The mod_jk works fine. If I open http://127.0.0.1 I see the Tomcat Start
 Page.
 Where I have to place my webapp and where I have to change some files to
 make my Application available onto the server?
 I have a Debian 4.05 with Apache 2.2.5 and Tomcat 5.5.20 from Debian .deb
 packages installed per default.


 Greetings
 Alexander Diedler




catalina.log error

2008-11-14 Thread Querol Vidal, Neus
Hi,

I get an error from the Catalina.log with my server, while using another server 
the application works fine.

Any idea will be more than welcome.

Thanks a lot.

Neus

This is the Catalina.log ERROR:

13-nov-2008 17:20:02 org.apache.catalina.core.AprLifecycleListener init
INFO: The Apache Tomcat Native library which allows optimal performance in 
production environments was not found on the java.library.path: C:\Program 
Files\Apache Software Foundation\Tomcat 
6.0\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Program 
Files\Java\jre1.6.0_03\bin;E:\oracle\product\10.2.0\db_1\bin;E:\oracle\product\10.2.0\client_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
 Files\ATI Technologies\ATI Control Panel;C:\Program Files\ATI 
Technologies\Fire GL 3D Studio 
Max;C:\oracle\Oracle10g\instantclient_10_2_0_3;C:\arcgis\ArcSDE\ora10gexe\bin
13-nov-2008 17:20:02 org.apache.coyote.http11.Http11Protocol init
INFO: Inicializando Coyote HTTP/1.1 en puerto http-8080
13-nov-2008 17:20:03 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 701 ms
13-nov-2008 17:20:03 org.apache.tomcat.util.digester.Digester fatalError
GRAVE: Parse Fatal Error at line -1 column -1: Premature end of file.
org.xml.sax.SAXParseException: Premature end of file.
at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown
 Source)
at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
 Source)
at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown 
Source)
at 
org.apache.tomcat.util.digester.Digester.parse(Digester.java:1581)
at 
org.apache.catalina.users.MemoryUserDatabase.open(MemoryUserDatabase.java:402)
at 
org.apache.catalina.users.MemoryUserDatabaseFactory.getObjectInstance(MemoryUserDatabaseFactory.java:103)
at 
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:140)
at javax.naming.spi.NamingManager.getObjectInstance(Unknown 
Source)
at 
org.apache.naming.NamingContext.lookup(NamingContext.java:793)
at 
org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at 
org.apache.naming.NamingContextBindingsEnumeration.nextElementInternal(NamingContextBindingsEnumeration.java:113)
at 
org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:71)
at 
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:137)
at 
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:109)
at 
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:81)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:703)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown 
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at 
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at 
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
13-nov-2008 17:20:03 org.apache.naming.NamingContext lookup
ADVERTENCIA: Unexpected exception resolving reference
org.xml.sax.SAXParseException: Premature end of file.
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown 
Source)
at 
org.apache.tomcat.util.digester.Digester.parse(Digester.java:1581)
at 
org.apache.catalina.users.MemoryUserDatabase.open(MemoryUserDatabase.java:402)
at 
org.apache.catalina.users.MemoryUserDatabaseFactory.getObjectInstance(MemoryUserDatabaseFactory.java:103)
at 

RE: Debian + Apache 2.2 + Tomcat 5.5

2008-11-14 Thread Alexander Diedler
Hello,
Hmm..
In /usr/share/tomcat5.5-webapps/ I move the folder ROOT to ROOT_BACK and move 
my App folder shop_v1 to ROOT
After that and a restart of Tomcat... nothing will be browseable.. not 
index.jsp nor test.jsp within ROOT with simple hello...
The message HTTP 404
The requested resource (/) is not available.

Alex


-Original Message-
From: Serge Fonville [mailto:[EMAIL PROTECTED]
Sent: Friday, November 14, 2008 11:22 AM
To: Tomcat Users List
Subject: Re: Debian + Apache 2.2 + Tomcat 5.5

When deploying an application you can either place a war in the webapps
directory, copy the files to a directory in the webapps directory of if you
are hosting a simple website use the ROOT directory in you webapps
directory.It is advisable to change the appBase attribute in the host
element inside your server.xml

Regards,

Serge Fonville

On Fri, Nov 14, 2008 at 11:14 AM, Alexander Diedler [EMAIL PROTECTED]wrote:

 Hello,
 I have a problem to integrate my own Application into the Tomcat Server.
 The mod_jk works fine. If I open http://127.0.0.1 I see the Tomcat Start
 Page.
 Where I have to place my webapp and where I have to change some files to
 make my Application available onto the server?
 I have a Debian 4.05 with Apache 2.2.5 and Tomcat 5.5.20 from Debian .deb
 packages installed per default.


 Greetings
 Alexander Diedler



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Logging Tomcat errors

2008-11-14 Thread Peter Stavrinides
Hi all,

Can anyone point me in the right direction, I need to implement a logging and 
reporting mechanism for Tomcat (6.0.18 on Debian based Linux with JSVC).

I am thinking of using either Log4j or Juli logging for only severe errors. 
Ideal would be to send an alert when the server crashes (by logging to an email 
appender - I know log4j has this feature), other errors can go to a log file. 
Some documentation/advice would be a great help! 


cheers,
Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: AW: Different session timeout for local and external users

2008-11-14 Thread Ehlers, Kolja
is it not possible to define a global filter for all web applications? If I
add

  filter
filter-nameLogger/filter-name
filter-classfilters.LoggerFilter/filter-class
init-param
  param-namelocalTimeout/param-name
  param-value480/param-value
/init-param
  /filter
  filter-mapping
filter-nameLogger/filter-name
url-pattern/*/url-pattern
  /filter-mapping

to conf/web.xml Tomcat gives SERVERE warnings at startup

14.11.2008 12:34:57 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
14.11.2008 12:34:57 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 576 ms
14.11.2008 12:34:58 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
14.11.2008 12:34:58 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
14.11.2008 12:34:58 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
14.11.2008 12:34:58 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Error filterStart

while when using the WEB-INF/web.xml is starts just fine

Thanks again

-Ursprüngliche Nachricht-
Von: Mikolaj Rydzewski [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 14. November 2008 09:42
An: Tomcat Users List
Betreff: Re: AW: Different session timeout for local and external users


Ehlers, Kolja wrote:
 Thanks for the speedy answer to my question. Is this the only possibility?
 Since the filter will be called for each request, maybe this will slow
down
 my web application

Maybe. But not likely. Search the web for 'premature optimization' ;-)

--
Mikolaj Rydzewski [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Geschäftsführung: Dr. Michael Fischer, Reinhard Eisebitt
Amtsgericht Köln HRB 32356
Steuer-Nr.: 217/5717/0536
Ust.Id.-Nr.: DE 204051920
--
This email transmission and any documents, files or previous email
messages attached to it may contain information that is confidential or
legally privileged. If you are not the intended recipient or a person
responsible for delivering this transmission to the intended recipient,
you are hereby notified that any disclosure, copying, printing,
distribution or use of this transmission is strictly prohibited. If you
have received this transmission in error, please immediately notify the
sender by telephone or return email and delete the original transmission
and its attachments without reading or saving in any manner.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AW: AW: Different session timeout for local and external users

2008-11-14 Thread Mikolaj Rydzewski

Ehlers, Kolja wrote:

is it not possible to define a global filter for all web applications?

For Tomcat you can use Valves.

In fact, you should really ignore additional time that such simple 
filter will add to request processing time.


First: check if it really slows down your app. If it _really_ slows it 
down you can think about some improvements.


--
Mikolaj Rydzewski [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: AW: AW: Different session timeout for local and external users

2008-11-14 Thread Ehlers, Kolja
yes thanks I will do that. So I cannot just add the filter to the global
web.xml at conf/web.xml?

-Ursprüngliche Nachricht-
Von: Mikolaj Rydzewski [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 14. November 2008 12:53
An: Tomcat Users List
Betreff: Re: AW: AW: Different session timeout for local and external
users


Ehlers, Kolja wrote:
 is it not possible to define a global filter for all web applications?
For Tomcat you can use Valves.

In fact, you should really ignore additional time that such simple
filter will add to request processing time.

First: check if it really slows down your app. If it _really_ slows it
down you can think about some improvements.

--
Mikolaj Rydzewski [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Geschäftsführung: Dr. Michael Fischer, Reinhard Eisebitt
Amtsgericht Köln HRB 32356
Steuer-Nr.: 217/5717/0536
Ust.Id.-Nr.: DE 204051920
--
This email transmission and any documents, files or previous email
messages attached to it may contain information that is confidential or
legally privileged. If you are not the intended recipient or a person
responsible for delivering this transmission to the intended recipient,
you are hereby notified that any disclosure, copying, printing,
distribution or use of this transmission is strictly prohibited. If you
have received this transmission in error, please immediately notify the
sender by telephone or return email and delete the original transmission
and its attachments without reading or saving in any manner.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Debian + Apache 2.2 + Tomcat 5.5

2008-11-14 Thread Mark Thomas
Alexander Diedler wrote:
 Hello,
 Hmm..
 In /usr/share/tomcat5.5-webapps/ I move the folder ROOT to ROOT_BACK and move 
 my App folder shop_v1 to ROOT
 After that and a restart of Tomcat... nothing will be browseable.. not 
 index.jsp nor test.jsp within ROOT with simple hello...
 The message HTTP 404
 The requested resource (/) is not available.

That would be a question for the Debian packagers who have changed the
default Tomcat file structure. They should be able to tell you where to put
stuff so it works.

Mark



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat Hanging Intermittently

2008-11-14 Thread Gaurav Pruthi
Dear All,

I have tomcat server with apache (mod_jk) and mysql running on my box.
Initially there were no issues with the server. But from past one month, the
tomcat application hangs and websites also doesn't open. Though when i run
nmap localhost, it shows me 8080 and ajp13 services running.

I have notices that in last 1 month serveral websites have been hosted on
the box. Earlier around 6-10 websites were hosted but now it has increased
to 20. Is it putting load on the server.

I am facing another issue.
Most of the websites have .war files deployed, so whenever i restarts the
tomcat, it takes 90 seconds to start the tomcat. Time duration has also
incereased as the  no. websites have increased.

Kindly provide me some solution so that i don't have to face any downtime in
future.



Thanks,
Gaurav Pruthi


Re: catalina.log error

2008-11-14 Thread William82

Hi,

Have you tried disabling XML Schema Validation in server.xml?



Querol Vidal, Neus wrote:
 
 Hi,
 
 I get an error from the Catalina.log with my server, while using another
 server the application works fine.
 
 Any idea will be more than welcome.
 
 Thanks a lot.
 
 Neus
 
 This is the Catalina.log ERROR:
 
 13-nov-2008 17:20:02 org.apache.catalina.core.AprLifecycleListener init
 INFO: The Apache Tomcat Native library which allows optimal performance in
 production environments was not found on the java.library.path: C:\Program
 Files\Apache Software Foundation\Tomcat
 6.0\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Program
 Files\Java\jre1.6.0_03\bin;E:\oracle\product\10.2.0\db_1\bin;E:\oracle\product\10.2.0\client_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
 Files\ATI Technologies\ATI Control Panel;C:\Program Files\ATI
 Technologies\Fire GL 3D Studio
 Max;C:\oracle\Oracle10g\instantclient_10_2_0_3;C:\arcgis\ArcSDE\ora10gexe\bin
 13-nov-2008 17:20:02 org.apache.coyote.http11.Http11Protocol init
 INFO: Inicializando Coyote HTTP/1.1 en puerto http-8080
 13-nov-2008 17:20:03 org.apache.catalina.startup.Catalina load
 INFO: Initialization processed in 701 ms
 13-nov-2008 17:20:03 org.apache.tomcat.util.digester.Digester fatalError
 GRAVE: Parse Fatal Error at line -1 column -1: Premature end of file.
 org.xml.sax.SAXParseException: Premature end of file.
 at
 com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown
 Source)
 at
 com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown
 Source)
 at
 com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown
 Source)
 at
 com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown
 Source)
 at
 com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
 Source)
 at
 com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
 Source)
 at
 com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
 Source)
 at
 com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
 at
 com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
 Source)
 at
 org.apache.tomcat.util.digester.Digester.parse(Digester.java:1581)
 at
 org.apache.catalina.users.MemoryUserDatabase.open(MemoryUserDatabase.java:402)
 at
 org.apache.catalina.users.MemoryUserDatabaseFactory.getObjectInstance(MemoryUserDatabaseFactory.java:103)
 at
 org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:140)
 at
 javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
 at
 org.apache.naming.NamingContext.lookup(NamingContext.java:793)
 at
 org.apache.naming.NamingContext.lookup(NamingContext.java:140)
 at
 org.apache.naming.NamingContextBindingsEnumeration.nextElementInternal(NamingContextBindingsEnumeration.java:113)
 at
 org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:71)
 at
 org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:137)
 at
 org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:109)
 at
 org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:81)
 at
 org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
 at
 org.apache.catalina.core.StandardServer.start(StandardServer.java:703)
 at
 org.apache.catalina.startup.Catalina.start(Catalina.java:566)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
 Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
 Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
 Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at
 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
 at
 org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
 13-nov-2008 17:20:03 org.apache.naming.NamingContext lookup
 ADVERTENCIA: Unexpected exception resolving reference
 org.xml.sax.SAXParseException: Premature end of file.
 at
 com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
 Source)
 at
 org.apache.tomcat.util.digester.Digester.parse(Digester.java:1581)
 at
 org.apache.catalina.users.MemoryUserDatabase.open(MemoryUserDatabase.java:402)
 at
 

Problem with Beta candidate for Tomcat connection pool

2008-11-14 Thread Mark Shifman
I installed the new Tomcat connection pool and it worked ok yesterday. First 
thing this morning it
threw this exception below. (I snipped out a bunch of stuff but can send the 
whole thing if it would
help)
My resource definition from context.xml is

Resource name=jdbc/prot auth=Container
type=javax.sql.DataSource 
driverClassName=oracle.jdbc.OracleDriver
factory=org.apache.tomcat.jdbc.pool.DataSourceFactory
url=jdbc:oracle:thin:@xxx.xxx.med.yale.edu:1521:xxx
username=xxx
password=xxx
initialSize=3
maxActive=10
maxIdle=10
maxWait=1
removeAbandoned=false
removeAbandonedTimeout=180
logAbandoned=false
timeBetweenEvictionRunsMillis=1
validationQuery=SELECT 1 from dual
testOnBorrow=true/

Have I done something stupid that lets stale connections hang around? I old 
dbcp pool worked fine.

Thanks in advance.
Mark Shifman

java.lang.reflect.UndeclaredThrowableException
at $Proxy0.getConnection(Unknown Source)
at 
org.apache.commons.dbutils.QueryRunner.prepareConnection(QueryRunner.java:189)
...
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor206.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
...
Caused by: java.sql.SQLException: java.lang.NegativeArraySizeException
at oracle.net.ano.CryptoDataPacket.decryptAndChecksum(CryptoDataPacket)
at oracle.net.ano.CryptoDataPacket.receive(CryptoDataPacket)
at oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:931)
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:893)
at oracle.jdbc.ttc7.Oclose.receive(Oclose.java:101)
at oracle.jdbc.ttc7.TTC7Protocol.close(TTC7Protocol.java:684)
at oracle.jdbc.driver.OracleStatement.close(OracleStatement.java:700)
at 
oracle.jdbc.driver.OraclePreparedStatement.privateClose(OraclePreparedStatement.java:489)
at 
oracle.jdbc.driver.OraclePreparedStatement.close(OraclePreparedStatement.java:396)
at 
oracle.jdbc.driver.OracleCallableStatement.close(OracleCallableStatement.java:982)
at 
oracle.jdbc.driver.OracleConnection.close_statements(OracleConnection.java:2369)
at oracle.jdbc.driver.OracleConnection.close(OracleConnection.java:1448)
at 
org.apache.tomcat.jdbc.pool.PooledConnection.disconnect(PooledConnection.java:103)
at 
org.apache.tomcat.jdbc.pool.PooledConnection.reconnect(PooledConnection.java:93)
at 
org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:473)
at 
org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:380)


-- 
 Mark Shifman MD. Ph.D.
 Yale Center for Medical Informatics
 Phone (203)737-5219
 [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: catalina.log error

2008-11-14 Thread William82


A better solution is to copy a recent version of xerces.jar inside
/common/endorsed folder.



Querol Vidal, Neus wrote:
 
 Hi,
 
 I get an error from the Catalina.log with my server, while using another
 server the application works fine.
 
 Any idea will be more than welcome.
 
 Thanks a lot.
 
 Neus
 
 This is the Catalina.log ERROR:
 
 13-nov-2008 17:20:02 org.apache.catalina.core.AprLifecycleListener init
 INFO: The Apache Tomcat Native library which allows optimal performance in
 production environments was not found on the java.library.path: C:\Program
 Files\Apache Software Foundation\Tomcat
 6.0\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Program
 Files\Java\jre1.6.0_03\bin;E:\oracle\product\10.2.0\db_1\bin;E:\oracle\product\10.2.0\client_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
 Files\ATI Technologies\ATI Control Panel;C:\Program Files\ATI
 Technologies\Fire GL 3D Studio
 Max;C:\oracle\Oracle10g\instantclient_10_2_0_3;C:\arcgis\ArcSDE\ora10gexe\bin
 13-nov-2008 17:20:02 org.apache.coyote.http11.Http11Protocol init
 INFO: Inicializando Coyote HTTP/1.1 en puerto http-8080
 13-nov-2008 17:20:03 org.apache.catalina.startup.Catalina load
 INFO: Initialization processed in 701 ms
 13-nov-2008 17:20:03 org.apache.tomcat.util.digester.Digester fatalError
 GRAVE: Parse Fatal Error at line -1 column -1: Premature end of file.
 org.xml.sax.SAXParseException: Premature end of file.
 at
 com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown
 Source)
 at
 com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown
 Source)
 at
 com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown
 Source)
 at
 com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown
 Source)
 at
 com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
 Source)
 at
 com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
 Source)
 at
 com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
 Source)
 at
 com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
 at
 com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
 Source)
 at
 org.apache.tomcat.util.digester.Digester.parse(Digester.java:1581)
 at
 org.apache.catalina.users.MemoryUserDatabase.open(MemoryUserDatabase.java:402)
 at
 org.apache.catalina.users.MemoryUserDatabaseFactory.getObjectInstance(MemoryUserDatabaseFactory.java:103)
 at
 org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:140)
 at
 javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
 at
 org.apache.naming.NamingContext.lookup(NamingContext.java:793)
 at
 org.apache.naming.NamingContext.lookup(NamingContext.java:140)
 at
 org.apache.naming.NamingContextBindingsEnumeration.nextElementInternal(NamingContextBindingsEnumeration.java:113)
 at
 org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:71)
 at
 org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:137)
 at
 org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:109)
 at
 org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:81)
 at
 org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
 at
 org.apache.catalina.core.StandardServer.start(StandardServer.java:703)
 at
 org.apache.catalina.startup.Catalina.start(Catalina.java:566)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
 Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
 Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
 Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at
 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
 at
 org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
 13-nov-2008 17:20:03 org.apache.naming.NamingContext lookup
 ADVERTENCIA: Unexpected exception resolving reference
 org.xml.sax.SAXParseException: Premature end of file.
 at
 com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
 Source)
 at
 org.apache.tomcat.util.digester.Digester.parse(Digester.java:1581)
 at
 org.apache.catalina.users.MemoryUserDatabase.open(MemoryUserDatabase.java:402)
 

Re: Problem with Beta candidate for Tomcat connection pool

2008-11-14 Thread Filip Hanik - Dev Lists

Thanks Mark for the report, no not at all. I will push out a fix today.

Filip

Mark Shifman wrote:

I installed the new Tomcat connection pool and it worked ok yesterday. First 
thing this morning it
threw this exception below. (I snipped out a bunch of stuff but can send the 
whole thing if it would
help)
My resource definition from context.xml is

Resource name=jdbc/prot auth=Container
type=javax.sql.DataSource 
driverClassName=oracle.jdbc.OracleDriver
factory=org.apache.tomcat.jdbc.pool.DataSourceFactory
url=jdbc:oracle:thin:@xxx.xxx.med.yale.edu:1521:xxx
username=xxx
password=xxx
initialSize=3
maxActive=10
maxIdle=10
maxWait=1
removeAbandoned=false
removeAbandonedTimeout=180
logAbandoned=false
timeBetweenEvictionRunsMillis=1
validationQuery=SELECT 1 from dual
testOnBorrow=true/

Have I done something stupid that lets stale connections hang around? I old 
dbcp pool worked fine.

Thanks in advance.
Mark Shifman

java.lang.reflect.UndeclaredThrowableException
at $Proxy0.getConnection(Unknown Source)
at 
org.apache.commons.dbutils.QueryRunner.prepareConnection(QueryRunner.java:189)
...
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor206.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
...
Caused by: java.sql.SQLException: java.lang.NegativeArraySizeException
at oracle.net.ano.CryptoDataPacket.decryptAndChecksum(CryptoDataPacket)
at oracle.net.ano.CryptoDataPacket.receive(CryptoDataPacket)
at oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:931)
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:893)
at oracle.jdbc.ttc7.Oclose.receive(Oclose.java:101)
at oracle.jdbc.ttc7.TTC7Protocol.close(TTC7Protocol.java:684)
at oracle.jdbc.driver.OracleStatement.close(OracleStatement.java:700)
at 
oracle.jdbc.driver.OraclePreparedStatement.privateClose(OraclePreparedStatement.java:489)
at 
oracle.jdbc.driver.OraclePreparedStatement.close(OraclePreparedStatement.java:396)
at 
oracle.jdbc.driver.OracleCallableStatement.close(OracleCallableStatement.java:982)
at 
oracle.jdbc.driver.OracleConnection.close_statements(OracleConnection.java:2369)
at oracle.jdbc.driver.OracleConnection.close(OracleConnection.java:1448)
at 
org.apache.tomcat.jdbc.pool.PooledConnection.disconnect(PooledConnection.java:103)
at 
org.apache.tomcat.jdbc.pool.PooledConnection.reconnect(PooledConnection.java:93)
at 
org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:473)
at 
org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:380)


  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: AW: Different session timeout for local and external users

2008-11-14 Thread Caldarale, Charles R
 From: Ehlers, Kolja [mailto:[EMAIL PROTECTED]
 Subject: AW: AW: Different session timeout for local and
 external users

 is it not possible to define a global filter for all web
 applications?

It should be, but it will apply to all webapps, including the ones packaged 
with Tomcat.

 filter-classfilters.LoggerFilter/filter-class

Where is filters/LoggerFilter.class located?  It must be accessible to *every* 
webapp if you put the declaration in conf/web.xml.

 14.11.2008 12:34:58 org.apache.catalina.core.StandardContext start
 SCHWERWIEGEND: Error filterStart

There may be another log entry showing the reason for the filterStart failure, 
such as class not found.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat webapp stopped working, please help

2008-11-14 Thread djbowen1


 I am running tomcat server on Redhat linux. Tomcat server 5. 
 
 2 weeks ago a webapp i have running on port 8010 just stopped working. I am 
 not a tomcat expert by any means and dont know much about it other than 
 trying to help out. 
 
 The only thing i see that has changed on the server is that up2date ran 
 october 29th and updated a bunch of stuff. 

-- 
View this message in context: 
http://www.nabble.com/Tomcat-webapp-stopped-working%2C-please-help-tp20502550p20502550.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



tomcat 5.5 clustering with JAAS

2008-11-14 Thread lmk

Hello,

I use tomcat clustering with session replication, and JAAS module
authentication;

when tomcat instance loose session, the other  cannot authenticate the user.

how I keep the user authenticated on all the tomcat instance?

thanks!


-- 
View this message in context: 
http://www.nabble.com/tomcat-5.5-clustering-with-JAAS-tp20502551p20502551.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Logging Tomcat errors

2008-11-14 Thread Caldarale, Charles R
 From: Peter Stavrinides [mailto:[EMAIL PROTECTED]
 Subject: Logging Tomcat errors

 Can anyone point me in the right direction, I need to
 implement a logging and reporting mechanism for Tomcat
 (6.0.18 on Debian based Linux with JSVC).

What specifically do you need to know beyond what's in the doc?
http://tomcat.apache.org/tomcat-6.0-doc/logging.html
http://wiki.apache.org/tomcat/FAQ/Logging
http://wiki.apache.org/tomcat/HowTo#head-af688216137bbf0542fa3f599cd4c41dcba68056
http://wiki.apache.org/tomcat/HowTo#head-6e03ddcd16fff5f1900e5332f311ed7faa228119

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: AW: Different session timeout for local and external users

2008-11-14 Thread Ehlers, Kolja
its located at shared/lib

14.11.2008 16:33:43 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
14.11.2008 16:33:43 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 593 ms
14.11.2008 16:33:43 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
14.11.2008 16:33:43 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
14.11.2008 16:33:43 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
14.11.2008 16:33:43 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Error filterStart
14.11.2008 16:33:43 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Context [/host-manager] startup failed due to previous errors
14.11.2008 16:33:43 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Error filterStart
14.11.2008 16:33:43 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Context [/manager] startup failed due to previous errors
14.11.2008 16:33:47 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
14.11.2008 16:33:47 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
14.11.2008 16:33:47 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31  config=null
14.11.2008 16:33:47 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
14.11.2008 16:33:47 org.apache.catalina.startup.Catalina start
INFO: Server startup in 4344 ms

This is all output I get. Maybe this is not working:

url-pattern/*/url-pattern

Thanks

-Ursprungliche Nachricht-
Von: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 14. November 2008 16:27
An: Tomcat Users List
Betreff: RE: AW: Different session timeout for local and external users


 From: Ehlers, Kolja [mailto:[EMAIL PROTECTED]
 Subject: AW: AW: Different session timeout for local and
 external users

 is it not possible to define a global filter for all web
 applications?

It should be, but it will apply to all webapps, including the ones packaged
with Tomcat.

 filter-classfilters.LoggerFilter/filter-class

Where is filters/LoggerFilter.class located?  It must be accessible to
*every* webapp if you put the declaration in conf/web.xml.

 14.11.2008 12:34:58 org.apache.catalina.core.StandardContext start
 SCHWERWIEGEND: Error filterStart

There may be another log entry showing the reason for the filterStart
failure, such as class not found.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Geschäftsführung: Dr. Michael Fischer, Reinhard Eisebitt
Amtsgericht Köln HRB 32356
Steuer-Nr.: 217/5717/0536
Ust.Id.-Nr.: DE 204051920
--
This email transmission and any documents, files or previous email
messages attached to it may contain information that is confidential or
legally privileged. If you are not the intended recipient or a person
responsible for delivering this transmission to the intended recipient,
you are hereby notified that any disclosure, copying, printing,
distribution or use of this transmission is strictly prohibited. If you
have received this transmission in error, please immediately notify the
sender by telephone or return email and delete the original transmission
and its attachments without reading or saving in any manner.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: catalina.log error

2008-11-14 Thread Caldarale, Charles R
 From: William82 [mailto:[EMAIL PROTECTED]
 Subject: Re: catalina.log error

 A better solution is to copy a recent version of xerces.jar inside
 /common/endorsed folder.

Please don't do that - it will simply confuse the issue.  The OP is running on 
a 1.6 JRE, which has more that adequate XML processing capability.

 org.apache.catalina.users.MemoryUserDatabase.open(MemoryUserDatabase.java:402)

Looks like the conf/tomcat-users.xml file is badly formatted.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AW: AW: Different session timeout for local and external users

2008-11-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Kolja,

Ehlers, Kolja wrote:
 is it not possible to define a global filter for all web applications?

Yes, but I'm not sure why you'd want to do that. If each application
needs it, just enable it in all applications.

 If I add
 
   filter
 filter-nameLogger/filter-name
 filter-classfilters.LoggerFilter/filter-class
 init-param
   param-namelocalTimeout/param-name
   param-value480/param-value
 /init-param
   /filter
   filter-mapping
 filter-nameLogger/filter-name
 url-pattern/*/url-pattern
   /filter-mapping
 
 to conf/web.xml Tomcat gives SERVERE warnings at startup
 
 14.11.2008 12:34:57 org.apache.coyote.http11.Http11Protocol init
 INFO: Initializing Coyote HTTP/1.1 on http-8080
 14.11.2008 12:34:57 org.apache.catalina.startup.Catalina load
 INFO: Initialization processed in 576 ms
 14.11.2008 12:34:58 org.apache.catalina.core.StandardService start
 INFO: Starting service Catalina
 14.11.2008 12:34:58 org.apache.catalina.core.StandardEngine start
 INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
 14.11.2008 12:34:58 org.apache.catalina.core.StandardHost start
 INFO: XML validation disabled
 14.11.2008 12:34:58 org.apache.catalina.core.StandardContext start
 SCHWERWIEGEND: Error filterStart

Is that all you get? I would have expected a ClassNotFoundException or
something. Your problem is likely that you have your
filters.LoggerFilter class in one of your webapps' lib directories.
Instead, you have to put it into Tomcat's lib directory (for TC 6) or
Tomcat's common/lib directory (for TC 5).

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkdm+QACgkQ9CaO5/Lv0PCLCwCgli8CLDzQ0XTFWizs0H7JNbLY
qagAoJFFTM+lVnwr7RvPh3GWMrSM2n/P
=0zEw
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Regarding Error 404-please help!

2008-11-14 Thread Quim Nuss

Hi tomcat Wisemen,

I'm trying to deploy a servlet on my fresh installated tomcat. I believe
I've succeded on installation as I can see the main page and run its
servlets on http://eawars.sytes.net:8180/, which is the domain and port of
my remote tomcat. (I run tomcat on a server on my LAN, but I've opened ports
for you on router to check it and because we're deploying a java application
as soon as I get it to work.

Actually, it USED to work three days ago, then, I don't know why, the basic
servlets I tried for testing stopped working, although the main page and
servlets keep working.

Anyway, I just tried a basic HelloWorld servlet. I assume the compilation
was good and the .class file is correct, as it was before. I deploy the
servlet structure into the webapps folder. However I get the resource not
available error.

Here's my web.xml:
?xml version=1.0 encoding=ISO-8859-15?
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
2.2//EN
http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;

web-app
servlet
servlet-nameHello/servlet-name
servlet-classHolaMundo/servlet-class
/servlet
servlet-mapping
servlet-nameHello/servlet-name
url-patterneawars/url-pattern
/servlet-mapping
/web-app

I run tomcat on an ubuntu server with shorewall (it has the port open). I'm
putting the servlets not on the ROOT/webapps but on the
/usr/share/tomcat5.5/webapps/
the .class name is HolaMundo.class

At first, I had the invoker mapping commented on /conf/web.xml, as suggested
(though unrecommended) on many pages, I tried uncommenting it, and
restarting, with no result. Same thing with 

servlet
servlet-nameinvoker/servlet-name
servlet-class
  org.apache.catalina.servlets.InvokerServlet
/servlet-class
init-param
param-namedebug/param-name
param-value0/param-value
/init-param
load-on-startup2/load-on-startup
/servlet

Which is not what they point out to be uncommented.

I didn't do a backup of the conf web.xml file, I'm afraid I may have screwed
it up...

I also tried deploying some *.war (one you provide and another one). Same
result.

I feel totally lost, I may re-install tomcat but I feel like it can be
solved easily... I'm stuck.
It's my first contact with servlets, I'll be reading the servlet basics, but
I'm not sure it helps...

Thank you for your attention, if you'd need any extra information, I'll
gladly provide it.

See ya!

Quim

-- 
View this message in context: 
http://www.nabble.com/Regarding-Error-404-please-help%21-tp19404129p20502836.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat webapp stopped working, please help

2008-11-14 Thread Peter Crowther
 From: djbowen1 [mailto:[EMAIL PROTECTED]
 I am running tomcat server on Redhat linux. Tomcat server 5.

There' a 5.0 stream (no longer maintained) and a 5.5 stream (maintained).  The 
third version number then becomes significant.  Could you give us any more of 
the version numbers, such as 5.0.26?

[...]
 The only thing i see that has changed on the server is that
 up2date ran october 29th and updated a bunch of stuff.

Ah.  The machine doesn't have a standard Tomcat install on it, I think.  I 
suspect you'll have more initial luck posting on a RedHat list.  They 
distribute a re-packaged version of Tomcat that puts a lot of things in very 
odd places compared to the default installation, and few people here are 
familiar with it.

That said, if you can find out where the Tomcat server's log files have been 
put, I'd strongly suggest looking in there for errors.  If you can then post 
the errors here, we might be able to help.  I'd love to suggest possible file 
names, but the repackagers may have changed those as well.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ReplicatedContext and web-inf/lib

2008-11-14 Thread Kenneth.S.Brooks
When bringing an application up in a clustered environment everything is 
working great, including session replication.
What we really need is a replicated applicationcontext.
We then enabled the ReplicatedContext as the className attribute of Context.

As soon as we do that the application doesn't start.
Debugging shows that the classloader is not loading any of the libraries in the 
web-inf/lib.
They are all available just fine when using the StandardContext (not specifying 
a className attribute in the context).

Is this some expected behavior?

Is there any special configurations necessary for running in ReplicatedContext?

Thanks,
Ken


-
This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law.  If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED.  Although this transmission and
any attachments are believed to be free of any virus or other
defect that might affect any computer system into which it is
received and opened, it is the responsibility of the recipient to
ensure that it is virus free and no responsibility is accepted by
JPMorgan Chase  Co., its subsidiaries and affiliates, as
applicable, for any loss or damage arising in any way from its use.
 If you received this transmission in error, please immediately
contact the sender and destroy the material in its entirety,
whether in electronic or hard copy format. Thank you.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: multiple Set-Cookie headers in initial http response

2008-11-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Markus,

Markus Reis wrote:
 I [set up a filter that emits stack traces] and finally found the
 problematic code (of course in the web application - in doGet/doPost
 of NewSessionServlet - and not in Tomcat/JBoss):

 [snip]

while (params.hasMoreElements()) {
   String key = params.nextElement();
   if (!request.getParameter(key).equals(ddto.get(key))) 
  request.getSession().invalidate();
   ddto.set(key, request.getParameter(key));
}
request.getSession().setAttribute(NEW_SESSION_LAST_DTO, ddto);

 [snip]

 This is complete non-sense of course.

:)

 My only apology to you is that I have not written this code and that
 I did not know of it's existence :-). Still I'd like to say thank you for
 your great help and valuable comments.

No problem. Just make sure you remember how you tracked-down this
problem so you can add this technique to your mental toolbox.

 One last question: I'm not sure whether it is good to call
 session.invalidate() in a doPost/doGet method of a HttpServlet? Could
 this have negative/problematic side-effects or is this OK?

I'm not sure where else you would call session.invalidate(). Sure, you
could put it into a separate method, but your servlet pretty much always
has to have doPost or doGet called by the container. There's no reason
to fear invalidating a session.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkdnPgACgkQ9CaO5/Lv0PB5FACfYbHM0ntpTOR2tmZpMxhUaOq2
Va4AoKg5iecm8u6Ll1b3XduUZ6StKqpT
=cJfW
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: AW: Different session timeout for local and external users

2008-11-14 Thread Caldarale, Charles R
 From: Ehlers, Kolja [mailto:[EMAIL PROTECTED]
 Subject: AW: AW: Different session timeout for local and
 external users

 its located at shared/lib

If it's a standalone class, it should be in shared/classes, not shared/lib.  
Also, make sure the class does not exist in any of the individual webapps.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat webapp stopped working, please help

2008-11-14 Thread djbowen1



Peter Crowther wrote:
 
 From: djbowen1 [mailto:[EMAIL PROTECTED]
 I am running tomcat server on Redhat linux. Tomcat server 5.
 
 There' a 5.0 stream (no longer maintained) and a 5.5 stream (maintained). 
 The third version number then becomes significant.  Could you give us any
 more of the version numbers, such as 5.0.26?
 
 [...]
 The only thing i see that has changed on the server is that
 up2date ran october 29th and updated a bunch of stuff.
 
 Ah.  The machine doesn't have a standard Tomcat install on it, I think.  I
 suspect you'll have more initial luck posting on a RedHat list.  They
 distribute a re-packaged version of Tomcat that puts a lot of things in
 very odd places compared to the default installation, and few people here
 are familiar with it.
 
 That said, if you can find out where the Tomcat server's log files have
 been put, I'd strongly suggest looking in there for errors.  If you can
 then post the errors here, we might be able to help.  I'd love to suggest
 possible file names, but the repackagers may have changed those as well.
 
 - Peter
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

I have the catalina.out and the catalina.date logs.which one is more
usefull?

-- 
View this message in context: 
http://www.nabble.com/Tomcat-webapp-stopped-working%2C-please-help-tp20502550p20502951.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: log POST data

2008-11-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

André,

André Warnier wrote:
 Christopher Schultz wrote:

 The only legal ways I know of are to call getReader and getInputStream.
 Those are easily handled as I've laid out in previous posts.
 Can you point me to one of these posts ?
 Because at the moment, I don't see this so easily.

Really? I'm talking about this thread you're reading /right now/. I laid
out how to use a unified buffer to handle both request.getReader and
request.getInputStream.

 I assume we can be talking about a POST submitted as
 multi-part/form-data.

Actually, it doesn't matter. It could be PUT as well, or any HTTP method
that allows a request body (or doesn't... I suppose you can read a
request body from any HTTP request, whether it makes sense or not).

 So the body may be large, and it can be read only
 once. You'd need to read it all (binary) and log it while saving it
 somewhere on disk.

You could keep it in memory, too. Presumably such a filter is only
really useful for debugging, so using memory to store the request
doesn't sound too bad to me.

 Then when the getReader or getInputStream call comes, open that saved
 file instead of the original request body.

Well, if getReader is called multiple times, it needs to return the same
reader, in the same place. So you have to keep track of the state of the
reader, etc. It's actually easier than it sounds.

 Considering the possible volume, not something you would really want to
 send to the usual logging mechanism.

Yes, but see my comment on debugging above.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkdnesACgkQ9CaO5/Lv0PBK4gCeN1S+O3PdTmtXgEtudsry3mz2
IzUAn3YkX7HtR4phQj1yZ9/v8z5UpCSg
=QviS
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Deploying On Production Server

2008-11-14 Thread Caldarale, Charles R
 From: Ehlers, Kolja [mailto:[EMAIL PROTECTED]
 Subject: AW: Deploying On Production Server

 You will need to make use of the mod_jk (The Apache Tomcat
 Connector) at http://tomcat.apache.org/connectors-doc/

Don't be silly - adding another major component just to run on port 80 is 
massive overkill.

As Serge F noted, change the port for the HTTP Connector in conf/server.xml 
from 8080 to 80.  If running on a Linux box, you'll need to start Tomcat using 
jsvc to avoid having to run as root.  Alternatively, you can use iptables to 
reroute port 80 to 8080, and not change Tomcat's config.  If running on 
Windows, there are no restrictions on port use.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat webapp stopped working, please help

2008-11-14 Thread Peter Crowther
 From: djbowen1 [mailto:[EMAIL PROTECTED]
 I have the catalina.out and the catalina.date logs.which one is more
 usefull?

The .out file typically has any errors in it.  The logging format is similar to 
many other applications.  I'd suggest looking through that for error messages - 
a swift hunt for xception in your text editor of choice is often remarkably 
informative!

To find the most recent set of exceptions, go to the end of the file and search 
backwards for startup.  YOu should find a startup complete line.  Anything 
more recent than that is after the webapp started, but I suspect you'll find 
problems before that - look backwards in the file for things that look 
problematic.

If you're new to Java and Tomcat, one piece of advice: post *full* stack traces 
of any exceptions you need more information about.  The headline exception 
often has nested exceptions inside it, and it's often the innermost one (and 
hence the bottom one on the stack trace) that's the most infomative one.  Along 
the lines of:

FubarException: Couldn't start application
[... trace...]
-- nested exception --
SqlException: Couldn't connect
[... trace...]
-- nested exception --
SocketException: Connection refused
[... trace...]

As you can imagine, it's a lot easier to diagnose the problem with all of that 
than if we just see the FubarException!

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat webapp stopped working, please help

2008-11-14 Thread djbowen1

Nov 14, 2008 10:51:39 AM org.apache.catalina.startup.Catalina start

SEVERE: Catalina.start: 

LifecycleException:  service.getName(): Catalina;  Protocol handler start
failed: java.net.BindException: Address already in use:8010

  at org.apache.catalina.connector.Connector.start(Connector.java:1139)

  at
org.apache.catalina.core.StandardService.start(StandardService.java:457)

  at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

  at org.apache.catalina.startup.Catalina.start(Catalina.java:552)

  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:597)

  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)

  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

Nov 14, 2008 10:51:39 AM org.apache.catalina.startup.Catalina start

INFO: Server startup in 7268 ms

Nov 14, 2008 10:54:37 AM org.apache.catalina.connector.Connector pause

SEVERE: Protocol handler pause failed

java.net.ConnectException: Connection timed out

  at java.net.PlainSocketImpl.socketConnect(Native Method)

  at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)

  at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)

  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)

  at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)

  at java.net.Socket.connect(Socket.java:519)

  at java.net.Socket.connect(Socket.java:469)

  at java.net.Socket.init(Socket.java:366)

  at java.net.Socket.init(Socket.java:208)

  at
org.apache.jk.common.ChannelSocket.unLockSocket(ChannelSocket.java:486)

  at org.apache.jk.common.ChannelSocket.pause(ChannelSocket.java:283)

  at org.apache.jk.server.JkMain.pause(JkMain.java:681)

  at
org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:153)

  at org.apache.catalina.connector.Connector.pause(Connector.java:1074)

  at
org.apache.catalina.core.StandardService.stop(StandardService.java:489)

  at
org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)

  at org.apache.catalina.startup.Catalina.stop(Catalina.java:602)

  at org.apache.catalina.startup.Catalina.start(Catalina.java:577)

  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:597)

  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)

  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

Nov 14, 2008 10:54:38 AM org.apache.catalina.core.StandardService stop

INFO: Stopping service Catalina

Nov 14, 2008 10:54:38 AM org.apache.catalina.core.ApplicationContext log

INFO: SessionListener: contextDestroyed()

Nov 14, 2008 10:54:38 AM org.apache.catalina.core.ApplicationContext log

INFO: ContextListener: contextDestroyed()

Nov 14, 2008 10:54:39 AM org.apache.coyote.http11.Http11Protocol destroy

INFO: Stopping Coyote HTTP/1.1 on http-8010


Peter Crowther wrote:
 
 From: djbowen1 [mailto:[EMAIL PROTECTED]
 I have the catalina.out and the catalina.date logs.which one is more
 usefull?
 
 The .out file typically has any errors in it.  The logging format is
 similar to many other applications.  I'd suggest looking through that for
 error messages - a swift hunt for xception in your text editor of choice
 is often remarkably informative!
 
 To find the most recent set of exceptions, go to the end of the file and
 search backwards for startup.  YOu should find a startup complete
 line.  Anything more recent than that is after the webapp started, but I
 suspect you'll find problems before that - look backwards in the file for
 things that look problematic.
 
 If you're new to Java and Tomcat, one piece of advice: post *full* stack
 traces of any exceptions you need more information about.  The headline
 exception often has nested exceptions inside it, and it's often the
 innermost one (and hence the bottom one on the stack trace) that's the
 most infomative one.  Along the lines of:
 
 FubarException: Couldn't start application
 [... trace...]
 -- nested exception --
 SqlException: Couldn't connect
 [... trace...]
 -- nested exception --
 SocketException: Connection refused
 [... trace...]
 
 As you can imagine, it's a lot easier to diagnose the problem with all of
 that than if we just see the FubarException!
 
 - Peter
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL 

RE: Tomcat webapp stopped working, please help

2008-11-14 Thread djbowen1

here is a current log with the port in use fixed

Nov 14, 2008 11:01:35 AM org.apache.coyote.http11.Http11Protocol pause

INFO: Pausing Coyote HTTP/1.1 on http-8010

Nov 14, 2008 11:01:35 AM org.apache.catalina.connector.Connector pause

SEVERE: Protocol handler pause failed

java.lang.NullPointerException

at org.apache.jk.server.JkMain.pause(JkMain.java:679)

at
org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:153)

at
org.apache.catalina.connector.Connector.pause(Connector.java:1074)

at
org.apache.catalina.core.StandardService.stop(StandardService.java:489)

at
org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)

at org.apache.catalina.startup.Catalina.stop(Catalina.java:602)

at
org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:645)

Nov 14, 2008 11:01:36 AM org.apache.catalina.core.StandardService stop

INFO: Stopping service Catalina

Nov 14, 2008 11:01:36 AM org.apache.catalina.core.ApplicationContext log

INFO: SessionListener: contextDestroyed()

Nov 14, 2008 11:01:36 AM org.apache.catalina.core.ApplicationContext log

INFO: ContextListener: contextDestroyed()

Nov 14, 2008 11:01:36 AM org.apache.catalina.connector.MapperListener
destroy

WARNING: Error unregistering MBeanServerDelegate

java.lang.NullPointerException

at
org.apache.catalina.connector.MapperListener.destroy(MapperListener.java:162)

at org.apache.catalina.connector.Connector.stop(Connector.java:1180)

at
org.apache.catalina.core.StandardService.stop(StandardService.java:51 9)

at
org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)

at org.apache.catalina.startup.Catalina.stop(Catalina.java:602)

at
org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:645)

Nov 14, 2008 11:01:36 AM org.apache.coyote.http11.Http11Protocol destroy

INFO: Stopping Coyote HTTP/1.1 on http-8010

Nov 14, 2008 11:01:36 AM org.apache.catalina.connector.Connector stop

SEVERE: Coyote connector has not been started

Nov 14, 2008 11:02:58 AM org.apache.catalina.core.AprLifecycleListener init

INFO: The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path:
/usr/java/jdk1.6.0_01   
 
/jre/lib/i386/client:/usr/java/jdk1.6.0_01/jre/lib/i386:/usr/java/jdk1.6.0_01/jr


e/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib

Nov 14, 2008 11:02:58 AM org.apache.coyote.http11.Http11Protocol init

INFO: Initializing Coyote HTTP/1.1 on http-8010

Nov 14, 2008 11:02:58 AM org.apache.catalina.startup.Catalina load

INFO: Initialization processed in 1366 ms

Nov 14, 2008 11:02:58 AM org.apache.catalina.core.StandardService start

INFO: Starting service Catalina

Nov 14, 2008 11:02:58 AM org.apache.catalina.core.StandardEngine start

INFO: Starting Servlet Engine: Apache Tomcat/6.0.10

log4j:WARN No such property [maxFileSize] in
org.apache.log4j.ConsoleAppender.

log4j:WARN No such property [maxBackupIndex] in
org.apache.log4j.ConsoleAppender

.

log4j:WARN No such property [file] in org.apache.log4j.ConsoleAppender.

Nov 14, 2008 11:03:01 AM org.apache.catalina.core.ApplicationContext log

INFO: ContextListener: contextInitialized()

Nov 14, 2008 11:03:01 AM org.apache.catalina.core.ApplicationContext log

INFO: SessionListener: contextInitialized()

log4j:WARN No such property [maxFileSize] in
org.apache.log4j.ConsoleAppender.

log4j:WARN No such property [maxBackupIndex] in
org.apache.log4j.ConsoleAppender

.

log4j:WARN No such property [file] in org.apache.log4j.ConsoleAppender.

log4j:WARN No such property [maxFileSize] in
org.apache.log4j.ConsoleAppender.

log4j:WARN No such property [maxBackupIndex] in
org.apache.log4j.ConsoleAppender

.

log4j:WARN No such property [file] in org.apache.log4j.ConsoleAppender.

log4j:WARN No such property [maxFileSize] in
org.apache.log4j.ConsoleAppender.

log4j:WARN No such property [maxBackupIndex] in
org.apache.log4j.ConsoleAppender

.

log4j:WARN No such property [file] in org.apache.log4j.ConsoleAppender.

log4j:WARN No such property [maxFileSize] in
org.apache.log4j.ConsoleAppender.

log4j:WARN No such property [maxBackupIndex] in
org.apache.log4j.ConsoleAppender

.

log4j:WARN No such property 

Re: Tomcat Hanging Intermittently

2008-11-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Gaurav,

Gaurav Pruthi wrote:
 I have tomcat server with apache (mod_jk) and mysql running on my box.
 Initially there were no issues with the server. But from past one month, the
 tomcat application hangs and websites also doesn't open. Though when i run
 nmap localhost, it shows me 8080 and ajp13 services running.
 
 I have notices that in last 1 month serveral websites have been hosted on
 the box. Earlier around 6-10 websites were hosted but now it has increased
 to 20. Is it putting load on the server.

Then Tomcat freezes like this, does it ever recover? How long does that
take? You should take a thread dump during the freeze to find out what
the threads are doing.

 I am facing another issue.

You should start another thread on the mailing list if you have a
separate question.

 Most of the websites have .war files deployed, so whenever i restarts the
 tomcat, it takes 90 seconds to start the tomcat. Time duration has also
 incereased as the  no. websites have increased.

So... deploying an increasing number of web applications increases
startup time? What did you expect?

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkdouUACgkQ9CaO5/Lv0PDPGACfWR7LKZ+TxCoG8OOQSNbb86Kp
oYcAoKELbgkjx/Kwm2Pqgzw6b4bJ/pYR
=lTVp
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: failure notice

2008-11-14 Thread aelgamal ,
Dears,



. A Servlet deployed on tomcat 5

. The Servlet connects to a database (Oracle 10 g) to perform a DML 
statement

. A lookup to a Data source was performed once

. I used the data source to open a connection to the database for each 
new request and close the connection by the end of the request.

The above scenario resulted in very poor scalability during the stress
testing. When the average response time for 1 thread was x msec, the average
response time for 2 threads was 2x and 3 threads was 3x and so on.



When I created a pool of connections (15 connections) in the Servlet and
kept the connections of this pool alive the scalability improved. The
average response time for a 150 concurrent threads was slightly higher than
the average response time for 1 thread.



Please advice why the poor performance when I used tomcat data source.



Best regards



Re: Problem with Beta candidate for Tomcat connection pool

2008-11-14 Thread Filip Hanik - Dev Lists

Mark, this was fixed in 1.0.3-beta, thanks for helping us out!

http://tomcat.apache.org/dev/dist/jdbc-pool/1.0-beta/

Filip


Mark Shifman wrote:

I installed the new Tomcat connection pool and it worked ok yesterday. First 
thing this morning it
threw this exception below. (I snipped out a bunch of stuff but can send the 
whole thing if it would
help)
My resource definition from context.xml is

Resource name=jdbc/prot auth=Container
type=javax.sql.DataSource 
driverClassName=oracle.jdbc.OracleDriver
factory=org.apache.tomcat.jdbc.pool.DataSourceFactory
url=jdbc:oracle:thin:@xxx.xxx.med.yale.edu:1521:xxx
username=xxx
password=xxx
initialSize=3
maxActive=10
maxIdle=10
maxWait=1
removeAbandoned=false
removeAbandonedTimeout=180
logAbandoned=false
timeBetweenEvictionRunsMillis=1
validationQuery=SELECT 1 from dual
testOnBorrow=true/

Have I done something stupid that lets stale connections hang around? I old 
dbcp pool worked fine.

Thanks in advance.
Mark Shifman

java.lang.reflect.UndeclaredThrowableException
at $Proxy0.getConnection(Unknown Source)
at 
org.apache.commons.dbutils.QueryRunner.prepareConnection(QueryRunner.java:189)
...
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor206.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
...
Caused by: java.sql.SQLException: java.lang.NegativeArraySizeException
at oracle.net.ano.CryptoDataPacket.decryptAndChecksum(CryptoDataPacket)
at oracle.net.ano.CryptoDataPacket.receive(CryptoDataPacket)
at oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:931)
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:893)
at oracle.jdbc.ttc7.Oclose.receive(Oclose.java:101)
at oracle.jdbc.ttc7.TTC7Protocol.close(TTC7Protocol.java:684)
at oracle.jdbc.driver.OracleStatement.close(OracleStatement.java:700)
at 
oracle.jdbc.driver.OraclePreparedStatement.privateClose(OraclePreparedStatement.java:489)
at 
oracle.jdbc.driver.OraclePreparedStatement.close(OraclePreparedStatement.java:396)
at 
oracle.jdbc.driver.OracleCallableStatement.close(OracleCallableStatement.java:982)
at 
oracle.jdbc.driver.OracleConnection.close_statements(OracleConnection.java:2369)
at oracle.jdbc.driver.OracleConnection.close(OracleConnection.java:1448)
at 
org.apache.tomcat.jdbc.pool.PooledConnection.disconnect(PooledConnection.java:103)
at 
org.apache.tomcat.jdbc.pool.PooledConnection.reconnect(PooledConnection.java:93)
at 
org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:473)
at 
org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:380)


  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Scalability

2008-11-14 Thread aelgamal ,
Dears,



. A Servlet deployed on tomcat 5

. The Servlet connects to a database (Oracle 10 g) to perform a DML 
statement

. A lookup to a Data source was performed once

. I used the data source to open a connection to the database for each 
new request and close the connection by the end of the request.

The above scenario resulted in very poor scalability during the stress
testing. When the average response time for 1 thread was x msec, the average
response time for 2 threads was 2x and 3 threads was 3x and so on.



When I created a pool of connections (15 connections) in the Servlet and
kept the connections of this pool alive the scalability improved. The
average response time for a 150 concurrent threads was slightly higher than
the average response time for 1 thread.



Please advice why the poor performance when I used tomcat data source.



Best regards



RE: Tomcat webapp stopped working, please help

2008-11-14 Thread Peter Crowther
 From: djbowen1 [mailto:[EMAIL PROTECTED]
[...]
 INFO: The Apache Tomcat Native library which allows optimal
 performance in production environments was not found

Not a problem.

 /usr/java/jdk1.6.0_01/jre/lib/i386/client

That's quite an old 1.6.  If the app was working before, and this isn't a 
recent update from RedHat, keep it - but I'd update to a more recent stable 
version where possible.  There have been some comments on this list that the 
latest (_10) isn't that stable, but don't take it as gospel!

 INFO: Starting Servlet Engine: Apache Tomcat/6.0.10

That's not a Tomcat 5.0.  Were you expecting it to be?

5.x and 6.0 are *very* different - if RedHat has pulled a 5.x out from under 
your webapp and put a 6.0 in, I would expect your app to fail.  It's a little 
like pulling out Apache httpd 1.x and putting 2.0 in, and expecting everything 
to work... ain't going to happen!

[...]
 INFO: JK: ajp13 listening on /0.0.0.0:8009

Are you connecting to Tomcat via Apache httpd?  I assume not, as you're talking 
about port 8010.  If not, once all this is fixed, you might want to edit your 
conf/server.xml file (wherever RedHat have put it!) and comment out the 
Connector that's on port 8009.  Don't do it now, on the principle of changing 
one thing at once!

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat webapp stopped working, please help

2008-11-14 Thread djbowen1

Yeah sorry it must be 6. i have no backround in this at all so i know very
little, it was just dumped on me.

The apache httpd.conf file has a virtual host set to redirect email.host.com
to email.host.com:8010. 



Peter Crowther wrote:
 
 From: djbowen1 [mailto:[EMAIL PROTECTED]
 [...]
 INFO: The Apache Tomcat Native library which allows optimal
 performance in production environments was not found
 
 Not a problem.
 
 /usr/java/jdk1.6.0_01/jre/lib/i386/client
 
 That's quite an old 1.6.  If the app was working before, and this isn't a
 recent update from RedHat, keep it - but I'd update to a more recent
 stable version where possible.  There have been some comments on this list
 that the latest (_10) isn't that stable, but don't take it as gospel!
 
 INFO: Starting Servlet Engine: Apache Tomcat/6.0.10
 
 That's not a Tomcat 5.0.  Were you expecting it to be?
 
 5.x and 6.0 are *very* different - if RedHat has pulled a 5.x out from
 under your webapp and put a 6.0 in, I would expect your app to fail.  It's
 a little like pulling out Apache httpd 1.x and putting 2.0 in, and
 expecting everything to work... ain't going to happen!
 
 [...]
 INFO: JK: ajp13 listening on /0.0.0.0:8009
 
 Are you connecting to Tomcat via Apache httpd?  I assume not, as you're
 talking about port 8010.  If not, once all this is fixed, you might want
 to edit your conf/server.xml file (wherever RedHat have put it!) and
 comment out the Connector that's on port 8009.  Don't do it now, on the
 principle of changing one thing at once!
 
 - Peter
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Tomcat-webapp-stopped-working%2C-please-help-tp20502550p20503725.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Apache/mod_jk serves random files from tomcat

2008-11-14 Thread Rainer Jung
Jakob Ericsson schrieb:
 On Thu, Nov 13, 2008 at 8:17 PM, Rainer Jung [EMAIL PROTECTED] wrote:
 Jakob Ericsson schrieb:
 Upgrading to latest version of mod_jk solves the problem. As I said
 before, this on Windows 2003 Server running both httpd (2.0.59) and
 tomcat (6.0.13) on the same machine. We upgraded all production
 machines this morning.

 Problem is in mod_jk 1.2.22 and is at least and fixed in 1.2.27. We
 did not do any other fixes to the environment when upgrading mod_jk.

 Hopefully this will help other people experiencing the same problem.
 Thanks a lot for reporting back. Let us know, in case the problem shows
 up again (hopefully not).

 
 We had a peak yesterday on our machines and no problems reported.
 Looks very promising.
 Do you know (out of curiosity) know which bug in mod_jk that probably
 caused the problem?

Unfortunately I have no idea. As already indicated, there wasn't any
change I'm aware of, which should have fixed such a problem on Windows.

Regards,

Rainer

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Close an HttpServletRequest without consuming the whole HTTP client stream [Tomcat 6.0.18]

2008-11-14 Thread Maurizio Melato

Hello!
  is there a way to dispose an HttpServletRequest closing the 
underlying inputstream without consuming the entire HTTP client stream?


Before answering request.getInputStream().close() let me explain the 
scenario ;)


The scenario involves a client application executing a potentially big 
HTTP chunked POST (100mb or even gb) and the server, for some reason,

may want to close the connection after a while.

The Server code closing the request is:
--

try {
   request.getInputStream().close();
}catch(IOException ignore) {}
}

try {
   response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, 
Error);

   response.flushBuffer();
}catch(IOException ignore) {}

try {
   response.getOutputStream().close();
} catch (IOException e) {}
--

I logged each step and I know for sure these operations are actually 
executed.


After the Server performs the operations above I would expect the client 
to get an IOException while still writing the request body stream but 
this does not happen!


The client posts all the request stream (consuming resources on the 
client machine, etc, etc..) till the end while Tomcat seems to simply 
discard those data without closing the underlying connection.


Do you know if this behaviour is supposed to be correct?
Any workaround to force a different one?


Thanks in advance for your availability!
Best regards,
Maurizio



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: failure notice

2008-11-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

To whom it may concern,

aelgamal , wrote:
 The above scenario resulted in very poor scalability during the stress
 testing. When the average response time for 1 thread was x msec, the average
 response time for 2 threads was 2x and 3 threads was 3x and so on.

How did you configure your data source?

 When I created a pool of connections (15 connections) in the Servlet and
 kept the connections of this pool alive the scalability improved. The
 average response time for a 150 concurrent threads was slightly higher than
 the average response time for 1 thread.

How did you configure your data source, here?

 Please advice why the poor performance when I used tomcat data source.

Tomcat can be configured to use a data source with a connection pool
size of 1. It's silly, but possible. If this is what you did, then you
simply weren't pooling connections and you should expect that pooling
would certainly improve performance.

If you're interested in playing with connection pools, help out Filip by
using his new Tomcat connection pool he's testing. I'm sure he'd love
the feedback.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkdqfwACgkQ9CaO5/Lv0PBXdACgjq/4JJZKJ+DgNn64szioNSZl
mvgAoMN8Qb9oPjizMzzeXyGJQn6IPQmO
=7ATP
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [ANNOUNCE] Beta candidate for Tomcat connection pool

2008-11-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Filip,

Filip Hanik - Dev Lists wrote:
 The Apache Tomcat team announces the immediate availability of
 Apache Tomcat JDBC  Connection Pool

The download page for this component says Tomcat 6. Is this component
compatible with Tomcat 5.5 as well? If so, I'd be happy to help test it
on my dev boxes.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkdqmYACgkQ9CaO5/Lv0PAGhQCeOP7bi++6f/oTwribzm1TqcMX
T3kAniDy/EhTIiC/qOevXg1VOovCtTEh
=6xjQ
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Logging Tomcat errors

2008-11-14 Thread Peter Stavrinides
I guess it should be easy enough to distinguish between severe errors and 
ordinary errors, but how do you distinguish between 500 errors application 
runtime errors? I specifically want to report errors that occur at the 
container level and not at the application level... I hope this makes sense.

Thanks
Peter 


- Original Message -
From: Charles R Caldarale [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Friday, 14 November, 2008 5:32:17 PM GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: RE: Logging Tomcat errors

 From: Peter Stavrinides [mailto:[EMAIL PROTECTED]
 Subject: Logging Tomcat errors

 Can anyone point me in the right direction, I need to
 implement a logging and reporting mechanism for Tomcat
 (6.0.18 on Debian based Linux with JSVC).

What specifically do you need to know beyond what's in the doc?
http://tomcat.apache.org/tomcat-6.0-doc/logging.html
http://wiki.apache.org/tomcat/FAQ/Logging
http://wiki.apache.org/tomcat/HowTo#head-af688216137bbf0542fa3f599cd4c41dcba68056
http://wiki.apache.org/tomcat/HowTo#head-6e03ddcd16fff5f1900e5332f311ed7faa228119

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [ANNOUNCE] Beta candidate for Tomcat connection pool

2008-11-14 Thread Filip Hanik - Dev Lists

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Filip,

Filip Hanik - Dev Lists wrote:
  

The Apache Tomcat team announces the immediate availability of
Apache Tomcat JDBC  Connection Pool



The download page for this component says Tomcat 6. Is this component
compatible with Tomcat 5.5 as well? If so, I'd be happy to help test it
on my dev boxes.
  


yes, should be compatible, compiled with JDK 1.5

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkdqmYACgkQ9CaO5/Lv0PAGhQCeOP7bi++6f/oTwribzm1TqcMX
T3kAniDy/EhTIiC/qOevXg1VOovCtTEh
=6xjQ
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat user sessions

2008-11-14 Thread Reis, Tom
Is there a way to view all the sessions in Tomcat and remove or stop
one? Thanks.


about tomcat-users.xml

2008-11-14 Thread nocturna_gr

Hi,
i am not sure i have understood right about the tomcat-users.xml file...
Where are the basic roles defined? 
I had some problems getting the admin and manager account working and
added a standard role, which however doesn't appear in the admin web
interface. Why is that?
What does the role1 do?

Thanks

-- 
View this message in context: 
http://www.nabble.com/about-tomcat-users.xml-tp20504868p20504868.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: ReplicatedContext and web-inf/lib

2008-11-14 Thread Kenneth.S.Brooks
A little more information.

When docBase is pointed at a war file and setting the unpackWAR=false it 
appears to at least load correctly. (We're still trying to validate that it is 
running correctly).

When docBase is pointed at a war file and unpackWAR=true then it does not 
load any of the libraries from WEB-INF/lib.

Thanks
-Ken

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, November 14, 2008 10:42 AM
To: users@tomcat.apache.org
Subject: ReplicatedContext and web-inf/lib


When bringing an application up in a clustered environment everything is 
working great, including session replication.
What we really need is a replicated applicationcontext.
We then enabled the ReplicatedContext as the className attribute of Context.

As soon as we do that the application doesn't start.
Debugging shows that the classloader is not loading any of the libraries in the 
web-inf/lib.
They are all available just fine when using the StandardContext (not specifying 
a className attribute in the context).

Is this some expected behavior?

Is there any special configurations necessary for running in ReplicatedContext?

Thanks,
Ken


-
This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law.  If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED.  Although this transmission and
any attachments are believed to be free of any virus or other
defect that might affect any computer system into which it is
received and opened, it is the responsibility of the recipient to
ensure that it is virus free and no responsibility is accepted by
JPMorgan Chase  Co., its subsidiaries and affiliates, as
applicable, for any loss or damage arising in any way from its use.
 If you received this transmission in error, please immediately
contact the sender and destroy the material in its entirety,
whether in electronic or hard copy format. Thank you.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law.  If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED.  Although this transmission and
any attachments are believed to be free of any virus or other
defect that might affect any computer system into which it is
received and opened, it is the responsibility of the recipient to
ensure that it is virus free and no responsibility is accepted by
JPMorgan Chase  Co., its subsidiaries and affiliates, as
applicable, for any loss or damage arising in any way from its use.
 If you received this transmission in error, please immediately
contact the sender and destroy the material in its entirety,
whether in electronic or hard copy format. Thank you.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Logging Tomcat errors

2008-11-14 Thread Kees Jan Koster

Dear Peter,

I guess it should be easy enough to distinguish between severe  
errors and ordinary errors, but how do you distinguish between 500  
errors application runtime errors? I specifically want to report  
errors that occur at the container level and not at the application  
level... I hope this makes sense.


Each logged line has an associated categry. You could configure your  
logging to only log the container level categories.


--
Kees Jan

http://java-monitor.com/forum/
[EMAIL PROTECTED]
06-51838192

Human beings make life so interesting. Do you know that in a universe  
so full of wonders,
they have managed to invent boredom. Quite astonishing... -- Terry  
Partchett



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Debian + Apache 2.2 + Tomcat 5.5

2008-11-14 Thread Kees Jan Koster

Dear Alex,

The debian Tomcat package is notoriously hard to use. In your shoes I  
would switch to a normal Tomcat server from apache.org.


In /usr/share/tomcat5.5-webapps/ I move the folder ROOT to ROOT_BACK  
and move my App folder shop_v1 to ROOT
After that and a restart of Tomcat... nothing will be browseable..  
not index.jsp nor test.jsp within ROOT with simple hello...

The message HTTP 404
The requested resource (/) is not available.


Try /index.jsp and see if that works. If it does, check the welcome  
file list in your web.xml.


--
Kees Jan

http://java-monitor.com/forum/
[EMAIL PROTECTED]
06-51838192

Human beings make life so interesting. Do you know that in a universe  
so full of wonders,
they have managed to invent boredom. Quite astonishing... -- Terry  
Partchett



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Question regarding Tomcat memory

2008-11-14 Thread Harish S Rathod
Hi,

To make our tomcat  heap size memory  to 8 GB we have set the below=20
settings echo $CATALINA_OPTS -Xms8192M -Xmx8192M -Xss1024K=20
-XX:PermSize=3D64m -XX:MaxPermSize=3D256m -Dfile.encoding=3DCp1252 Please=20
suggest is this ok ? as we are observing the maximum heap size memory for=20
tomcat gets a reduced bit to  around 7756736K and it keeps flucatating. Is=
=20
this the normal behaviour?.
The OS we are using is Linux 8.


Apache tomcat 6.0.14 installation on sun solaris 9 questions

2008-11-14 Thread Hardegree, Scott (IT)
Hello all,

 

I just got put into the fire without hardly any documentation.  I've got to
do a TOMCAT 6.0.14 (which is the enterprise standard) install on a sun
solaris 9 server that is running apache2.2.6 and I need to know what version
of the Java SDK to install and also what version of the JK_connector I need
to install as well.  (Did I mention that I'm a noob to the apache server
environment and the apache tomcat web server environment as well?)

 

Thanks for your help,

 

Scott Hardegree

ITS Web Services

Northrop Grumman IT

334-466-2318

 



smime.p7s
Description: S/MIME cryptographic signature


RE: Question regarding Tomcat memory

2008-11-14 Thread Caldarale, Charles R
 From: Harish S Rathod [mailto:[EMAIL PROTECTED]
 Subject: Question regarding Tomcat memory

First, use a different mailer or send only in plain text; whatever you're using 
is encoding even standard ASCII characters like =.

 To make our tomcat  heap size memory  to 8 GB we have set the below=20

How much RAM and swap space do you have on the system?  What JVM are you using? 
 To go over 1.8 GB you need a 64-bit JVM.

 $CATALINA_OPTS -Xms8192M -Xmx8192M -Xss1024K=20

Setting -Xss is usually not useful, unless your application is very, very 
strange.

 as we are observing the maximum heap size memory for
 tomcat gets a reduced bit to around 7756736K and it
 keeps flucatating.

What are you using to do the observing?  When I run JConsole targeting a JVM 
with the exact settings you specify, it says this about the heap:

Committed:  8,039,104 kbytes
  Max:  8,039,104 kbytes

This is on a SuSE 10 system, with JDK 1.6.0_07, in server mode.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat user sessions

2008-11-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tom,

Reis, Tom wrote:
 Is there a way to view all the sessions in Tomcat and remove or stop
 one? Thanks.

There is nothing built-into Tomcat to allow you to do this. Certain
add-ons and server managers can be used to do this, though. One such too
is LambdaProbe: http://lambdaprobe.org/

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkd2sYACgkQ9CaO5/Lv0PCDxQCgjscYQuykzWejk/mHBhihFR+1
p1sAniRcvgBSD24QbcdpOfGMrIwN0sfP
=E9Jn
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: about tomcat-users.xml

2008-11-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

To whom it may concern,

nocturna_gr wrote:
 i am not sure i have understood right about the tomcat-users.xml file...
 Where are the basic roles defined? 

There are no basic roles defined for Tomcat in general. The
tomcat-users.xml file allows you to define roles on the fly simply be
mentioning them as roles to be associated with each user.

In web.xml, you may explicitly define roles using the security-role
and role-name elements, but this is not required.

 I had some problems getting the admin and manager account working and
 added a standard role, which however doesn't appear in the admin web
 interface. Why is that?

standard probably has no meaning to the admin application, so it is
not displayed anywhere.

 What does the role1 do?

That's just an example role.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkd24EACgkQ9CaO5/Lv0PC1BwCeJP1WmBev4DiAOLOmTFfuU3sj
kCsAn10sB7urMr+VopUgg/XGqWD+vqiI
=AL63
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Apache tomcat 6.0.14 installation on sun solaris 9 questions

2008-11-14 Thread Steve Ochani
On 14 Nov 2008 at 13:30, Hardegree, Scott (IT) wrote:


 Hello all,

 I just got put into the fire without hardly any documentation.
 I´ve got to do a TOMCAT 6.0.14
 (which is the enterprise standard)


According to whom?



 install on a sun solaris 9 server
 that is running apache2.2.6 and
 I need to know what version of the Java SDK to install and also what

The latest.

 version of the JK_connector

The latest.

 I need to install as well. (Did I mention that I´m a noob to the
 apache server environment and the
 apache tomcat web server environment as well?)


Read the running.txt file included with the tomcat distro download to learn how 
to run/start
tomcat.

For mod_jk there is a quick start guide at:

http://tomcat.apache.org/connectors-doc/generic_howto/quick.html


The connector doc. main page is at:


http://tomcat.apache.org/connectors-doc/



-Steve O.





 Thanks for your help,

 Scott Hardegree
 ITS Web Services
 Northrop Grumman IT
 334-466-2318





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat user sessions

2008-11-14 Thread Martin Gainty

Tom-

did you get a chance to look at 
manager http://localhost:PORT/manager?
admin?

Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 




 Subject: Tomcat user sessions
 Date: Fri, 14 Nov 2008 11:11:13 -0600
 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 
 Is there a way to view all the sessions in Tomcat and remove or stop
 one? Thanks.

_
Stay up to date on your PC, the Web, and your mobile phone with Windows Live
http://clk.atdmt.com/MRT/go/119462413/direct/01/

tomcat-users.xml file becomes unusable

2008-11-14 Thread Joe Bolin
We are seeing a sporadic issue where the tomcat-users.xml file changes in
some way. The file command repots the type as 'data' rather than XML. The
byte size doesn't change. Once it changes, tomcat process still runs but is
inaccessible via web and no logging appears to be happening. This is on a
SLES(SUSE) 9 system.

Thanks,
Joe


RE: Apache tomcat 6.0.14 installation on sun solaris 9 questions

2008-11-14 Thread Steve Ochani
On 14 Nov 2008 at 15:10, Hardegree, Scott (IT) wrote:

Subject:RE: Apache tomcat 6.0.14 installation on sun solaris 9 
questions
Date sent:  Fri, 14 Nov 2008 15:10:58 -0600
From:   Hardegree, Scott (IT) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]

 It's our enterprise standard at the moment.  Cool, I'll run with
 those and check out the docs.  Thanks.  I appreciate the help.


You're welcome.


Please configure your mail client to obey the reply-to header and reply to the 
tomcat users list
so replies can be shared by all and archived for future searching.


-Steve O.




 Scott Hardegree
 ITS Web Services
 Northrop Grumman IT
 334-466-2318

 -Original Message-
 From: Steve Ochani [mailto:[EMAIL PROTECTED]
 Sent: Friday, November 14, 2008 2:20 PM
 To: Tomcat Users List
 Subject: Re: Apache tomcat 6.0.14 installation on sun solaris 9
 questions

 On 14 Nov 2008 at 13:30, Hardegree, Scott (IT) wrote:

 
  Hello all,
 
  I just got put into the fire without hardly any documentation.
  I´ve got to do a TOMCAT 6.0.14
  (which is the enterprise standard)


 According to whom?



  install on a sun solaris 9 server
  that is running apache2.2.6 and
  I need to know what version of the Java SDK to install and also
 what

 The latest.

  version of the JK_connector

 The latest.

  I need to install as well. (Did I mention that I´m a noob to the
  apache server environment and the
  apache tomcat web server environment as well?)
 

 Read the running.txt file included with the tomcat distro download
 to learn how to run/start
 tomcat.

 For mod_jk there is a quick start guide at:

 http://tomcat.apache.org/connectors-doc/generic_howto/quick.html


 The connector doc. main page is at:


 http://tomcat.apache.org/connectors-doc/



 -Steve O.





  Thanks for your help,
 
  Scott Hardegree
  ITS Web Services
  Northrop Grumman IT
  334-466-2318
 
 



 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat-users.xml file becomes unusable

2008-11-14 Thread Caldarale, Charles R
 From: Joe Bolin [mailto:[EMAIL PROTECTED]
 Subject: tomcat-users.xml file becomes unusable

 We are seeing a sporadic issue where the tomcat-users.xml
 file changes in some way. The file command repots the type
 as 'data' rather than XML.

What version of Tomcat are you using?

What are the contents of the changed file?  Can you post it here (obfuscate the 
passwords, of course)?

Tomcat does rewrite the tomcat-users.xml file during startup, unless you 
specify the readonly=true attribute for the UserDatabase Resource.  
However, I've never known it to rewrite it with anything but correct XML.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Custom Login Module

2008-11-14 Thread Rob Mercer
Hey all,

System: Tomcat 6.0.15, JDK 6.0, Windows Vista BE.

 

I've been tasked with creating a custom login module that will integrate
with our current system (which uses the ole request.getRemoteUser() call
some). I need to figure out what I'm not doing to integrate with the
Tomcat container:

 

My problem is that event though I have the right information in the
subject, the tomcat container does not recognize the user as logged in,
nor does request.getRemoteUser() change from being null.

 

Any ideas?

 

 

public class SomePage {

 

  public String login() {



HttpServletResponse response = FacesUtils.getResponse();

HttpServletRequest request = FacesUtils.getRequest();



HttpSession session = request.getSession(true);

 

Subject subject = (Subject) session

.getAttribute(javax.security.auth.subject);

 

if (subject == null) {

  subject = new Subject();

}

 

session.setAttribute(javax.security.auth.subject,
subject);

 

LoginContext lc = null;

try {

  lc = new LoginContext(Jaas, subject, new
HttpAuthCallbackHandler());

  System.out.println(established new logincontext);

} catch (LoginException le) {

  try {

le.printStackTrace();

 
response.sendError(HttpServletResponse.SC_FORBIDDEN, request

  .getRequestURI());

  } catch (IOException ioE){

ioE.printStackTrace();

  }

  return failure;

}

 

try {

  lc.login();

  // if we return with no exception, authentication
succeeded

} catch (Exception e) {

  try {

System.out.println(Login failed:  + e);

 
response.sendError(HttpServletResponse.SC_FORBIDDEN, request

.getRequestURI());

  } catch (IOException ioE){

ioE.printStackTrace();

  }

  return failure;

}

 

try {

  System.out.println(Subject is  + lc.getSubject());

  //chain.doFilter(request, response);

} catch (SecurityException se) {

  try {

 
response.sendError(HttpServletResponse.SC_FORBIDDEN, request

.getRequestURI());

  } catch (IOException ioE){

ioE.printStackTrace();

  }

}

 

return vhr;

  }

}

 

public class EmergencyLoginModule implements LoginModule{

 

public boolean commit() throws LoginException {

if (succeeded) {

  if (subject.isReadOnly()){

throw new LoginException(Subject is
readonly!);

  }

  // add a Principal (authenticated identity)

  // to the Subject

 

  // assume the user we authenticated is the
SamplePrincipal

  userPrincipal = new UserPrincipal(username);

  

  assignPrincipal(userPrincipal);

  assignPrincipal(new UserPrincipal(role));

  



  if (debug) {

System.out.println(\t\t[SampleLoginModule] 

+ added SamplePrincipal to
Subject);

  }

 

  // in any case, clean out state

  username = null;

  for (int i = 0; i  password.length; i++)

password[i] = ' ';

  password = null;

 

  commitSucceeded = true;

  

}

return true;

  }

}

 

Rob



Tomcat 6 clustering problem...rltd to context path

2008-11-14 Thread rohit aman
*I have two tomcats (tomcat 6)** setup on two separate machines. I have a
hardware load balancer with scheduling method configured to round robin.*
**
*each tomcat recognizes the other one by saying replication member added *
**
*I also made the examples web application (that comes with tomcat) a
cluster aware application. For this examples application, session
replication and everything works fine. This is how the log shows for this
application.*

2008-11-14 16:15:41.582 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Register manager /examples to
cluster element Engine with name Catalina
2008-11-14 16:15:41.582 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Register manager /examples to
cluster element Engine with name Catalina
2008-11-14 16:15:41.582 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Starting clustering manager at
/examples
2008-11-14 16:15:41.582 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Starting clustering manager at
/examples
2008-11-14 16:15:41.582 [main] [WARN]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/examples],
requesting session state from
org.apache.catalina.tribes.membership.MemberImpl[tcp://{-64, -88, -46,
11}:4000,{-64, -88, -46, 11},4000, alive=159203,id={-68 -112 77 -71 -86 -30
77 94 -65 -9 108 56 48 -127 -101 -125 }, payload={}, command={}, domain={},
]. This operation will timeout if no session state has been received within
60 seconds.
2008-11-14 16:15:41.582 [main] [WARN]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/examples],
requesting session state from
org.apache.catalina.tribes.membership.MemberImpl[tcp://{-64, -88, -46,
11}:4000,{-64, -88, -46, 11},4000, alive=159203,id={-68 -112 77 -71 -86 -30
77 94 -65 -9 108 56 48 -127 -101 -125 }, payload={}, command={}, domain={},
]. This operation will timeout if no session state has been received within
60 seconds.
2008-11-14 16:15:41.691 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/examples];
session state send at 11/14/08 4:15 PM received in 109 ms.
2008-11-14 16:15:41.691 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/examples];
session state send at 11/14/08 4:15 PM received in 109 ms.
2008-11-14 16:15:41.691 [main] [INFO]
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/examples] -
ContextListener: contextInitialized()
2008-11-14 16:15:41.691 [main] [INFO]
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/examples] -
SessionListener: contextInitialized()

*Now, I wanted to try my own application. For my own application... I want
it to be a default application for the server, so I put it in webappps/ea
directory and configured the context path as below in server.xml*

Context path=
   docBase=ea
   className=org.apache.catalina.core.StandardContext
cachingAllowed=true ...

*Session replication is not working for this application and the log says*

2008-11-14 16:15:43.581 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Register manager /ea to
cluster element Engine with name Catalina
2008-11-14 16:15:43.581 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Register manager /ea to
cluster element Engine with name Catalina
2008-11-14 16:15:43.581 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Starting clustering manager at
/ea
2008-11-14 16:15:43.581 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Starting clustering manager at
/ea
2008-11-14 16:15:43.581 [main] [WARN]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/wa],
requesting session state from
org.apache.catalina.tribes.membership.MemberImpl[tcp://{-64, -88, -46,
11}:4000,{-64, -88, -46, 11},4000, alive=161203,id={-68 -112 77 -71 -86 -30
77 94 -65 -9 108 56 48 -127 -101 -125 }, payload={}, command={}, domain={},
]. This operation will timeout if no session state has been received within
60 seconds.
2008-11-14 16:15:43.581 [main] [WARN]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/ea],
requesting session state from
org.apache.catalina.tribes.membership.MemberImpl[tcp://{-64, -88, -46,
11}:4000,{-64, -88, -46, 11},4000, alive=161203,id={-68 -112 77 -71 -86 -30
77 94 -65 -9 108 56 48 -127 -101 -125 }, payload={}, command={}, domain={},
]. This operation will timeout if no session state has been received within
60 seconds.
2008-11-14 16:16:43.622 [main] [ERROR]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/ea]: No
session state send at 11/14/08 4:15 PM received, timing out after 60,041 ms.
2008-11-14 16:16:43.622 [main] [ERROR]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/ea]: No
session state send at 11/14/08 4:15 PM received, timing out after 60,041 ms.
*in the other cluster member it says*

2008-11-14 16:15:44.218 [pool-2-thread-1] [WARN]
org.apache.catalina.ha.ClusterListener - Context manager doesn't

Default Virtual Host Tomcat 5.5

2008-11-14 Thread Ramamoorthy, Saku
 Hello,
 
  We recently upgraded our system from Tomcat 4_1_31 to Tomcat
 5_5_27. We use Crystal Interactive viewer for web reporting. Getting
 File Not Found errors on the crystal toolbar as if it does not
 recognize virtual host after upgrade. Our application is under
 /webapps/appFolder. But we want to define virtual host so that we can
 access the application as http://localhost/index.jsp as opposed to
 http://localhost/appFolder/index.jsp 
 
 Based on the context documentation
 http://tomcat.apache.org/tomcat-5.5-doc/config/context.html. I have
 defined the following in server.xml for defining virtual host. Is this
 proper way of setting virtual host? Do I need to set anything else? 
 
   Host name=localhost appBase=/webapps/appFolder
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
 
   Context path= docBase= debug=0 /

   /Host
 
 Thanks,
 Saku
 
This e-mail and any attachments may be confidential or legally privileged.  If 
you received this message in error or are not the intended recipient, you 
should destroy the e-mail message and any attachments or copies, and you are 
prohibited from retaining, distributing, disclosing or using any information 
contained herein.  Please inform us of the erroneous delivery by return e-mail. 

Thank you for your cooperation.
 



Re: Question regarding Tomcat memory

2008-11-14 Thread Harish S Rathod
Hi,
Sorry the content of the mail was bit messed up ,i have corrected the
settings wordings please read the below text

To make our tomcat  heap size memory  to 8 GB we have set the below
settings
-Xms8192M -Xmx8192M -Xss1024K -XX:PermSize=64m -XX:MaxPermSize=256m
-Dfile.encoding=Cp1252

Please suggest is this ok ? as we are observing the maximum heap size memory
for
tomcat gets a reduced bit to  around 7756736K and it keeps flucatating.Is
this normal behaviour
The OS we are using is Linux 8.
- Well we are using 64 bit JDK
- We are prinitng the heap mem using Log 4J utitiy in the apllication logs.





On Sat, Nov 15, 2008 at 4:01 AM, Caldarale, Charles R 
[EMAIL PROTECTED] wrote:

  From: Harish S Rathod [mailto:[EMAIL PROTECTED]
  Subject: Question regarding Tomcat memory

 First, use a different mailer or send only in plain text; whatever you're
 using is encoding even standard ASCII characters like =.

  To make our tomcat  heap size memory  to 8 GB we have set the below=20

 How much RAM and swap space do you have on the system?  What JVM are you
 using?  To go over 1.8 GB you need a 64-bit JVM.

  $CATALINA_OPTS -Xms8192M -Xmx8192M -Xss1024K=20

 Setting -Xss is usually not useful, unless your application is very, very
 strange.

  as we are observing the maximum heap size memory for
  tomcat gets a reduced bit to around 7756736K and it
  keeps flucatating.

 What are you using to do the observing?  When I run JConsole targeting a
 JVM with the exact settings you specify, it says this about the heap:

 Committed:  8,039,104 kbytes
  Max:  8,039,104 kbytes

 This is on a SuSE 10 system, with JDK 1.6.0_07, in server mode.

  - 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 start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Close an HttpServletRequest without consuming the whole HTTP client stream [Tomcat 6.0.18]

2008-11-14 Thread Bill Barker
There is currently no way to do this in Tomcat.  Tomcat will always drain 
the input stream, even in cases like this where it should know better.

Maurizio Melato [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Hello!
   is there a way to dispose an HttpServletRequest closing the underlying 
 inputstream without consuming the entire HTTP client stream?

 Before answering request.getInputStream().close() let me explain the 
 scenario ;)

 The scenario involves a client application executing a potentially big 
 HTTP chunked POST (100mb or even gb) and the server, for some reason,
 may want to close the connection after a while.

 The Server code closing the request is:
 --

 try {
request.getInputStream().close();
 }catch(IOException ignore) {}
 }

 try {
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, 
 Error);
response.flushBuffer();
 }catch(IOException ignore) {}

 try {
response.getOutputStream().close();
 } catch (IOException e) {}
 --

 I logged each step and I know for sure these operations are actually 
 executed.

 After the Server performs the operations above I would expect the client 
 to get an IOException while still writing the request body stream but this 
 does not happen!

 The client posts all the request stream (consuming resources on the client 
 machine, etc, etc..) till the end while Tomcat seems to simply discard 
 those data without closing the underlying connection.

 Do you know if this behaviour is supposed to be correct?
 Any workaround to force a different one?


 Thanks in advance for your availability!
 Best regards,
 Maurizio



 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6 clustering problem...rltd to context path

2008-11-14 Thread Filip Hanik - Dev Lists
you need to deploy the app on node 2 as well, it says the app is not 
installed there


Filip

rohit aman wrote:

*I have two tomcats (tomcat 6)** setup on two separate machines. I have a
hardware load balancer with scheduling method configured to round robin.*
**
*each tomcat recognizes the other one by saying replication member added *
**
*I also made the examples web application (that comes with tomcat) a
cluster aware application. For this examples application, session
replication and everything works fine. This is how the log shows for this
application.*

2008-11-14 16:15:41.582 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Register manager /examples to
cluster element Engine with name Catalina
2008-11-14 16:15:41.582 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Register manager /examples to
cluster element Engine with name Catalina
2008-11-14 16:15:41.582 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Starting clustering manager at
/examples
2008-11-14 16:15:41.582 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Starting clustering manager at
/examples
2008-11-14 16:15:41.582 [main] [WARN]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/examples],
requesting session state from
org.apache.catalina.tribes.membership.MemberImpl[tcp://{-64, -88, -46,
11}:4000,{-64, -88, -46, 11},4000, alive=159203,id={-68 -112 77 -71 -86 -30
77 94 -65 -9 108 56 48 -127 -101 -125 }, payload={}, command={}, domain={},
]. This operation will timeout if no session state has been received within
60 seconds.
2008-11-14 16:15:41.582 [main] [WARN]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/examples],
requesting session state from
org.apache.catalina.tribes.membership.MemberImpl[tcp://{-64, -88, -46,
11}:4000,{-64, -88, -46, 11},4000, alive=159203,id={-68 -112 77 -71 -86 -30
77 94 -65 -9 108 56 48 -127 -101 -125 }, payload={}, command={}, domain={},
]. This operation will timeout if no session state has been received within
60 seconds.
2008-11-14 16:15:41.691 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/examples];
session state send at 11/14/08 4:15 PM received in 109 ms.
2008-11-14 16:15:41.691 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/examples];
session state send at 11/14/08 4:15 PM received in 109 ms.
2008-11-14 16:15:41.691 [main] [INFO]
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/examples] -
ContextListener: contextInitialized()
2008-11-14 16:15:41.691 [main] [INFO]
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/examples] -
SessionListener: contextInitialized()

*Now, I wanted to try my own application. For my own application... I want
it to be a default application for the server, so I put it in webappps/ea
directory and configured the context path as below in server.xml*

Context path=
   docBase=ea
   className=org.apache.catalina.core.StandardContext
cachingAllowed=true ...

*Session replication is not working for this application and the log says*

2008-11-14 16:15:43.581 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Register manager /ea to
cluster element Engine with name Catalina
2008-11-14 16:15:43.581 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Register manager /ea to
cluster element Engine with name Catalina
2008-11-14 16:15:43.581 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Starting clustering manager at
/ea
2008-11-14 16:15:43.581 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Starting clustering manager at
/ea
2008-11-14 16:15:43.581 [main] [WARN]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/wa],
requesting session state from
org.apache.catalina.tribes.membership.MemberImpl[tcp://{-64, -88, -46,
11}:4000,{-64, -88, -46, 11},4000, alive=161203,id={-68 -112 77 -71 -86 -30
77 94 -65 -9 108 56 48 -127 -101 -125 }, payload={}, command={}, domain={},
]. This operation will timeout if no session state has been received within
60 seconds.
2008-11-14 16:15:43.581 [main] [WARN]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/ea],
requesting session state from
org.apache.catalina.tribes.membership.MemberImpl[tcp://{-64, -88, -46,
11}:4000,{-64, -88, -46, 11},4000, alive=161203,id={-68 -112 77 -71 -86 -30
77 94 -65 -9 108 56 48 -127 -101 -125 }, payload={}, command={}, domain={},
]. This operation will timeout if no session state has been received within
60 seconds.
2008-11-14 16:16:43.622 [main] [ERROR]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/ea]: No
session state send at 11/14/08 4:15 PM received, timing out after 60,041 ms.
2008-11-14 16:16:43.622 [main] [ERROR]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/ea]: No
session state send at 11/14/08 4:15 PM received, timing out after 60,041 ms.
*in the other cluster member it says*


RE: Default Virtual Host Tomcat 5.5

2008-11-14 Thread Caldarale, Charles R
 From: Ramamoorthy, Saku [mailto:[EMAIL PROTECTED]
 Subject: Default Virtual Host Tomcat 5.5

 Host name=localhost appBase=/webapps/appFolder
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false

The above is incorrect: appBase must point to the directory in which multiple 
webapps can be deployed, not the directory of any particular webapp.  Change it 
back to just webapps.

   Context path= docBase= debug=0 /

It is never correct to have docBase empty; in this case you want it set to 
appFolder.  However, Context elements should not be placed in server.xml, 
although that mechanism is still supported primarily for compatibility with 
older levels.

In your case, you should simply remove the Context element, and rename your 
appFolder to ROOT (case sensitive); that is the proper way of indicating 
the default webapp for the Host.  Doing it the way you are will likely get 
double deployment of the webapp, once as the default and again as /appFolder.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Question regarding Tomcat memory

2008-11-14 Thread Caldarale, Charles R
 From: Harish S Rathod [mailto:[EMAIL PROTECTED]
 Subject: Re: Question regarding Tomcat memory

 -Xms8192M -Xmx8192M -Xss1024K -XX:PermSize=64m -XX:MaxPermSize=256m
 -Dfile.encoding=Cp1252

That's what I surmised.

 Please suggest is this ok ?

As long as you have the RAM to hold that much heap (plus the other memory 
required by the process), it should be o.k.  If you don't have at least 9 GB of 
RAM, you're going to be paging like mad, which will absolutely kill performance.

Again, setting -Xss is usually pointless.  I would set PermSize to the same 
value as MaxPermSize, just to avoid unnecessary expansion and contraction of 
the PermGen.

 - Well we are using 64 bit JDK

Which one?

 - We are prinitng the heap mem using Log 4J utitiy in the
 apllication logs.

I don't know how log4j determines that value; what is shown by JConsole or 
LambdaProbe?  (The latter can be found at www.lambdaprobe.org.)

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]