Re: Tomcat 7 applet session problem

2011-07-07 Thread Michael Heinen
 It could be caused by the useHttpOnly attribute of the context to 
prevent cross-site scripting attacks.
HttpOnly cookies are not allowed to be passed to any client side script 
or Plug-in - such as a java applet.


see e.g. 
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Common_Attributes


So you have to
a) disable httpOnly cookies
b) pass a parameter into the applet with the sessionId and the applet 
has to use this sessionId in the requests.


Michael


Am 06.07.2011 23:18, schrieb Pid:

On 06/07/2011 21:54, S Arvind wrote:

Hi All,
  Web application presently running in the tomcat 6 which has applet
in it. In that applet we make a connection to server using URL class and get
some data from the server after it loads. In this process we got error after
updating to the tomcat 7. The problem is the session between the web
application and the applet varies which runs in the same browser tab. Dont
know why in tomcat 7 the applet request was considered as separate session
but instead in tomcat 6 bot are considered as same session request. Is there
any configuration changes for it?

Tomcat 7.0.x and later versions of 6.0.x change the session id after
authentication*.  You can't rely on the session id remaining the same,
the applet will need to check for session id changes in the cookie (or url).


p

* In order to prevent some session hijacking attacks





Re: mod_jk restarting during uploads of large files

2011-07-07 Thread martin
Yeh, I've worked out what was happening, seems that tomcat was being  
killed by the system running out of memory, which was happening  
without any log messages on the system at all, which was rather  
unhelpful and left me completely stumped for a while.  However adding  
extra swap space and memory seem to fix the problem.


Thanks anyway for the reply

Quoting Rainer Jung rainer.j...@kippdata.de:


It seems it is not a mod_jk problem. mod_jk never shuts down Tomcat, but
obviously your Tomcat shuts down during processing the request.

I would

- update Tomcat *and* the service wrapper (jdvc) to the most recent
patch update (e.g. Tomcat 5.5.33).

- run Tomcat once without the service wrapper to decide, whether the
problem comes from the wrapper or from Tomcat respectively your web
application.

Regards,

Rainer

On 04.07.2011 18:27, mar...@alt-v.co.uk wrote:

Hi
I have a problem when uploading files to tomcat through mod_jk.  When
uploading smaller files (100kb) everything seems to work fine, but when
uploading files of about 1.5Mb it seems as if the server is restarting
and causing a 503 error.  I've tried modifying timeouts in both apache
and tomcat, still i get this output on the catalina.err file: (sorry for
long log files)


04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:32 7210 jsvc.exec error: Service killed by signal 9
Jul 4, 2011 3:19:35 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
/usr/local/jdk/jre/lib/i386/client:/usr/local/jdk/jre/lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib

Jul 4, 2011 3:19:35 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jul 4, 2011 3:19:35 PM org.apache.catalina.startup.Catalina load

Re: Installing Tomcat as a Windows Service - JvmOptions semicolons

2011-07-07 Thread James Pretorius

Wrap the semicolon in single quotes 

Example below 

--JvmOptions=-Dcatalina.home=%CATALINA_HOME%;-Dcatalina.base=%CATALINA_BASE%;-Djava.library.path=C:\example\dir1';'C:\example\dir2


Peter Lombardo wrote:
 
 I'm having a bit of trouble configuring the jvm options as I'm
 installing Tomcat as a Windows Service.
 
 I need to set:
 java.library.path=C:\example\dir1;C:\example\dir2;C:\example\dir3
 
 I pass this to the update service command (below) but the JvmOptions
 command line option is parsing the semicolons as separated JVM
 options.
 
 %EXECUTABLE% //US//%SERVICE_NAME% ++JvmOptions
 -Djava.library.path=C:\example\dir1;C:\example\dir2;C:\example\dir3
 
 The instructions state:
 --JvmOptions   List of options in the form of -D or -X that
 will be passed to the JVM. The options are separated using either # or
 ; characters.
 
 If a JVM option has semicolons in it, how can I pass those as literals
 so that JvmOptions won't think it's a subsequent option?
 
 Thanks ahead of time for any help/input.
 
 
 -- 
 Peter Lombardo
 pglomba...@gmail.com
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Installing-Tomcat-as-a-Windows-Service---JvmOptions---semicolons-tp9504766p32012228.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: mod_jk restarting during uploads of large files

2011-07-07 Thread Pid
Linux OOM killer?

 http://lwn.net/Articles/317814/


p


On 07/07/2011 09:35, mar...@alt-v.co.uk wrote:
 Yeh, I've worked out what was happening, seems that tomcat was being
 killed by the system running out of memory, which was happening without
 any log messages on the system at all, which was rather unhelpful and
 left me completely stumped for a while.  However adding extra swap space
 and memory seem to fix the problem.
 
 Thanks anyway for the reply
 
 Quoting Rainer Jung rainer.j...@kippdata.de:
 
 It seems it is not a mod_jk problem. mod_jk never shuts down Tomcat, but
 obviously your Tomcat shuts down during processing the request.

 I would

 - update Tomcat *and* the service wrapper (jdvc) to the most recent
 patch update (e.g. Tomcat 5.5.33).

 - run Tomcat once without the service wrapper to decide, whether the
 problem comes from the wrapper or from Tomcat respectively your web
 application.

 Regards,

 Rainer

 On 04.07.2011 18:27, mar...@alt-v.co.uk wrote:
 Hi
 I have a problem when uploading files to tomcat through mod_jk.  When
 uploading smaller files (100kb) everything seems to work fine, but when
 uploading files of about 1.5Mb it seems as if the server is restarting
 and causing a 503 error.  I've tried modifying timeouts in both apache
 and tomcat, still i get this output on the catalina.err file: (sorry for
 long log files)


 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:32 7210 jsvc.exec error: Service killed by signal 9
 Jul 4, 2011 3:19:35 PM org.apache.catalina.core.AprLifecycleListener
 init
 INFO: The APR based Apache Tomcat Native library which allows optimal
 performance in production environments was not found on the
 java.library.path:
 

RE: [OT] webapps and TCP/UDP listening sockets

2011-07-07 Thread Jeffrey Janner
 From: Christopher Schultz 

 David,
 
 On 7/1/2011 11:03 AM, David kerber wrote:
  I don't know anything about x11, but if it's similar to Citrix or
  Microsoft RDP
 
 No, it's Citrix and RDP that are like X11 :)
 

That might be true for Citrix, but I know of no way to run 5 apps, each from a 
different server, on one client desktop using RDP.
__

Confidentiality Notice:  This Transmission (including any attachments) may 
contain information that is privileged, confidential, and exempt from 
disclosure under applicable law.  If the reader of this message is not the 
intended recipient you are hereby notified that any dissemination, 
distribution, or copying of this communication is strictly prohibited.  

If you have received this transmission in error, please immediately reply to 
the sender or telephone (512) 343-9100 and delete this transmission from your 
system.


TOMCAT 64bit 32BIT differences - URGENT

2011-07-07 Thread saj-khan

Hi All,

apologies if this question has been asked before.

I need to know the main differences between 64  32bit tomcat for windows.

Is the tomcat.exe and all associated files in the bin folder and lib folder
trully compiled 64bit
or is the installer solely 64bit for installing onto 64bit OS? and the
tomcat just uses which ever java you have installed to create its jvm?

i have been asked to change a set of servers from 32bit to 64bit for tomcat
and java
if it turns out that the java is the only thing i need ot change it will
save me tons of work
if the tomcat needs to be installed that nots a biggy as i can copy and
paste the tomcat folder into the place of the existing and put back the conf
and webapps folder so in theory this will allow me to work as if nothing
changed

you answers on the 32-64bit is greatly appreciated!!


Saj.
-- 
View this message in context: 
http://old.nabble.com/TOMCAT-64bit---32BIT-differences---URGENT-tp32013530p32013530.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



URI served from cache

2011-07-07 Thread Langer Arnaud
Hi there,

My question is simple : is it possible to disable the cache of Tomcat ?
I think I've browsed the entire web about that without finding my answer.
As I'm developping a website under Eclipse, I would like to see modifications 
as they are developped but here, when I change an image, for example, it's 
always given from the Tomcat's cache : I can see, in the Console of Tomcat, for 
each page I request, about 20 messages like this one :
{date and hour} DEBUG [http-8080-1] lutece.cache - URI served from cache : 
/PSP/images/logo.png

If I modifiy the logo.png, I can't see the new one in my browser, even if I 
stop and restart Tomcat, even if I disable my browser's cache...

I'm using Tomcat 6.0.26 on Windows XP SP3.

Thanks by advance for any way of answer.



Arnaud LANGER
Division Secteur Public

Sopra group.

Armor Plazza
5  7 Impasse Claude Nougaro CS 90314
44803 SAINT HERBLAIN CEDEX
Phone : +33 (0)2 40 38 94 27
alan...@sopragroup.commailto:alan...@sopragroup.com - 
www.sopragroup.comhttp://www.sopragroup.com


Ce message peut contenir des informations confidentielles dont la divulgation 
est à ce titre rigoureusement interdite en l'absence d'autorisation explicite 
de l'émetteur. Dans l'hypothèse où vous auriez reçu par erreur ce message, 
merci de le renvoyer à l'émetteur et de détruire toute copie.

P Pensez à l'environnement avant d'imprimer / Before printing, think about the 
environment.





Re: TOMCAT 64bit 32BIT differences - URGENT

2011-07-07 Thread Mikolaj Rydzewski

On Thu, 7 Jul 2011 06:52:30 -0700 (PDT), saj-khan wrote:

i have been asked to change a set of servers from 32bit to 64bit for 
tomcat

and java
if it turns out that the java is the only thing i need ot change it 
will

save me tons of work
if the tomcat needs to be installed that nots a biggy as i can copy 
and
paste the tomcat folder into the place of the existing and put back 
the conf
and webapps folder so in theory this will allow me to work as if 
nothing

changed


Java upgrade is mandatory.

You do not need to change Tomcats. It's Java, the only thing you need 
to change is JVM itself. As long as you use .bat files to start Tomcat 
you don't need to worry.


I'm not sure what about additional binaries (tomcat.exe, tomcatw.exe, 
etc), running tomcat as a system service.


--
Mikolaj Rydzewski m...@ceti.pl

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



RE: TOMCAT 64bit 32BIT differences - URGENT

2011-07-07 Thread Jeffrey Janner
Saj-khan:

You will need a 64-bit Java implementation, and the 64-bit version of the 
tomcat.exe wrapper program in the bin directory. Last I checked, the 
tomcatw.exe program is still 32-bit, as it only has to manipulate the registry.

If you are also using the APR protocol for your connectors, you will need the 
64-bit version of the native libraries.

The current tomcat installer will automatically install the correct bit-version 
of these components for the operating system you are running under. Please note 
that if you install tomcat onto a 64-bit OS, you must have a 64-bit version of 
Java.  It cannot run a 32-bit JVM.

Jeff

 -Original Message-
 From: saj-khan [mailto:saraj.k...@gmail.com]
 Sent: Thursday, July 07, 2011 8:53 AM
 To: users@tomcat.apache.org
 Subject: TOMCAT 64bit  32BIT differences - URGENT
 
 
 Hi All,
 
 apologies if this question has been asked before.
 
 I need to know the main differences between 64  32bit tomcat for
 windows.
 
 Is the tomcat.exe and all associated files in the bin folder and lib
 folder
 trully compiled 64bit
 or is the installer solely 64bit for installing onto 64bit OS? and the
 tomcat just uses which ever java you have installed to create its jvm?
 
 i have been asked to change a set of servers from 32bit to 64bit for
 tomcat
 and java
 if it turns out that the java is the only thing i need ot change it
 will
 save me tons of work
 if the tomcat needs to be installed that nots a biggy as i can copy and
 paste the tomcat folder into the place of the existing and put back the
 conf
 and webapps folder so in theory this will allow me to work as if
 nothing
 changed
 
 you answers on the 32-64bit is greatly appreciated!!
 
 
 Saj.
 --
 View this message in context: http://old.nabble.com/TOMCAT-64bit---
 32BIT-differences---URGENT-tp32013530p32013530.html
 Sent from the Tomcat - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 

__

Confidentiality Notice:  This Transmission (including any attachments) may 
contain information that is privileged, confidential, and exempt from 
disclosure under applicable law.  If the reader of this message is not the 
intended recipient you are hereby notified that any dissemination, 
distribution, or copying of this communication is strictly prohibited.  

If you have received this transmission in error, please immediately reply to 
the sender or telephone (512) 343-9100 and delete this transmission from your 
system.


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



Re: URI served from cache

2011-07-07 Thread Pid
On 07/07/2011 14:54, Langer Arnaud wrote:
 Hi there,
 
 My question is simple : is it possible to disable the cache of Tomcat ?
 I think I've browsed the entire web about that without finding my answer.
 As I'm developping a website under Eclipse, I would like to see modifications 
 as they are developped but here, when I change an image, for example, it's 
 always given from the Tomcat's cache : I can see, in the Console of Tomcat, 
 for each page I request, about 20 messages like this one :
 {date and hour} DEBUG [http-8080-1] lutece.cache - URI served from cache : 
 /PSP/images/logo.png

What is 'lutece.cache'?  That's not a log message Tomcat would output.

 If I modifiy the logo.png, I can't see the new one in my browser, even if I 
 stop and restart Tomcat, even if I disable my browser's cache...

Are you sure that the file is actually being updated?

If you're stopping and starting Tomcat then you are terminating the
cache (which is in-memory), so it will pick up the new version.

Assuming you're using Tomcat's cache and not a third party one.


p


 I'm using Tomcat 6.0.26 on Windows XP SP3.
 
 Thanks by advance for any way of answer.
 
 
 
 Arnaud LANGER
 Division Secteur Public
 
 Sopra group.
 
 Armor Plazza
 5  7 Impasse Claude Nougaro CS 90314
 44803 SAINT HERBLAIN CEDEX
 Phone : +33 (0)2 40 38 94 27
 alan...@sopragroup.commailto:alan...@sopragroup.com - 
 www.sopragroup.comhttp://www.sopragroup.com
 
 
 Ce message peut contenir des informations confidentielles dont la divulgation 
 est à ce titre rigoureusement interdite en l'absence d'autorisation explicite 
 de l'émetteur. Dans l'hypothèse où vous auriez reçu par erreur ce message, 
 merci de le renvoyer à l'émetteur et de détruire toute copie.
 
 P Pensez à l'environnement avant d'imprimer / Before printing, think about 
 the environment.
 
 
 
 




signature.asc
Description: OpenPGP digital signature


Re: TOMCAT 64bit 32BIT differences - URGENT

2011-07-07 Thread Mark Thomas
On 07/07/2011 15:07, Jeffrey Janner wrote:
 Saj-khan:
 
 You will need a 64-bit Java implementation, and the 64-bit version of the 
 tomcat.exe wrapper program in the bin directory. Last I checked, the 
 tomcatw.exe program is still 32-bit, as it only has to manipulate the 
 registry.
 
 If you are also using the APR protocol for your connectors, you will need the 
 64-bit version of the native libraries.
 
 The current tomcat installer will automatically install the correct 
 bit-version of these components for the operating system you are running 
 under. Please note that if you install tomcat onto a 64-bit OS, you must have 
 a 64-bit version of Java.  It cannot run a 32-bit JVM.

Wrong. You can quite happily run a 32-bit JVM on 64-bit Windows.

Mark



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



RE: SSL Certificate formats, requirements for import into existing keystore

2011-07-07 Thread Peterson, Tommy
Thanks, Felix.

Yesterday after the Holiday weekend we downloaded the certificates (which were 
pfx) and I used openssl to convert them and keytool to import them. All seems 
to work ok now.

-Original Message-
From: Felix Schumacher [mailto:felix.schumac...@internetallee.de]
Sent: Thursday, July 07, 2011 1:46 AM
To: Tomcat Users List; users@tomcat.apache.org
Subject: Re: SSL Certificate formats, requirements for import into existing 
keystore



Peterson, Tommy tommy.peter...@xpandcorp.com schrieb:

I have a keystore for an application that runs on Tomcat. People here 
introduced a load balancer (LB) into the mix for this same application and 
therefore I have to use keytool to import the LB's certificate into the 
existing keystore.

However, the key and the cert are in one file. According to the docs this is 
not an issue (you can even concatenate them the docs say). So I just ran the 
keytool command and I continually get an error message: keytool error: 
java.lang.Exception: Input not an X.509 certificate

The IT support folks said that this is the cert that was given to them by the 
hosting company and that it can be installed successfully on Apache.

There is some junk (bag attributes)n the file that I don't' understand. I 
am used to just seeing -BEGIN CERTIFICATE- END CERTIFICATE- 
 -BEGIN RSA PRIVATE KEY- -END RSA PRIVATE KEY- 

Any suggestions?

Thanks.


_

This message contains Devin Group confidential information and is intended only 
for the individual named. If you are not the named addressee you should not 
disseminate, distribute or copy this e-mail.
Please notify the sender immediately by e-mail if you have received this e-mail 
in error and delete this e-mail from your system. E-mail transmissions cannot 
be guaranteed secure, error-free and information could be intercepted, 
corrupted, lost, destroyed, arrive late, incomplete, or contain viruses. The 
sender therefore does not accept liability for errors or omissions in the 
contents of this message which may arise as result of transmission. If 
verification is required please request hard-copy version.


Hi Tommy,

Your file could be a pkcs12 file. Have you tried to use keytool 
-importkeystore ...?

Keytool -help should give you the needed parameters.

You need a recent java6 version for this to work.

Regards
Felix

This message contains Devin Group confidential information and is intended only 
for the individual named. If you are not the named addressee you should not 
disseminate, distribute or copy this e-mail.
 Please notify the sender immediately by e-mail if you have received this 
e-mail in error and delete this e-mail from your system. E-mail transmissions 
cannot be guaranteed secure, error-free and information could be intercepted, 
corrupted, lost, destroyed, arrive late, incomplete, or contain viruses. The 
sender therefore does not accept liability for errors or omissions in the 
contents of this message which may arise as result of transmission. If 
verification is required please request hard-copy version.


Re: TOMCAT 64bit 32BIT differences - URGENT

2011-07-07 Thread Konstantin Kolinko
2011/7/7 saj-khan saraj.k...@gmail.com:

 Hi All,

 apologies if this question has been asked before.

 I need to know the main differences between 64  32bit tomcat for windows.

 Is the tomcat.exe and all associated files in the bin folder and lib folder
 trully compiled 64bit

If you compare content of *-windows-arch.zip files, you should note
that only two files differ between each of them:
  tomcat7.exe  - service runner
  tcnative-1.dll - Tomcat-Native (optional component, can be deleted)

They are loaded in the same process as JVM and thus have to use the
same CPU architecture.

Service configuration application (tomcat7w.exe) is 32-bit.
The rest of code is neutral to CPU architecture.

 or is the installer solely 64bit for installing onto 64bit OS? and the
 tomcat just uses which ever java you have installed to create its jvm?

On a 64-bit system you can install either 32-bit version or 64-bit one
 --  use the same as the version of Java that you installed.

Recent versions of Tomcat (more recent that ~6 months ago -- see
change log for details! ) have all three versions of (tomcat7.exe
tcnative-1.dll) packed within installer and will autoselect the one
that matches the JRE. You select the JRE during installation.



 i have been asked to change a set of servers from 32bit to 64bit for tomcat
 and java
 if it turns out that the java is the only thing i need ot change it will
 save me tons of work
 if the tomcat needs to be installed that nots a biggy as i can copy and
 paste the tomcat folder into the place of the existing and put back the conf
 and webapps folder so in theory this will allow me to work as if nothing
 changed

 you answers on the 32-64bit is greatly appreciated!!


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



Re: mod_jk restarting during uploads of large files

2011-07-07 Thread André Warnier

Hi.

Since this concerns large files upload, I wonder if something along these lines 
is happening :

A file upload is a POST request, usually with an enctype=multipart/form-data format 
(similar to an email with attachments).
Furthermore, for sending this file, the browser is going to encode the file using Base64 
encoding, which increases the brutto size by at least 1/3.  So your 500 MB file becomes 
something like 700 MB in the POST.


Now let's imagine that by default Tomcat is buffering this in memory until it has read the 
whole POST and can start parsing it.  That could easily cause some memory issues.


I seem to remember that there existed a parameter somewhere telling Tomcat how much it 
should buffer in memory before it starts offloading that to disk, but I do not remember 
where.  Maybe it was in the former FileUpload project though..




mar...@alt-v.co.uk wrote:
Yeh, I've worked out what was happening, seems that tomcat was being 
killed by the system running out of memory, which was happening without 
any log messages on the system at all, which was rather unhelpful and 
left me completely stumped for a while.  However adding extra swap space 
and memory seem to fix the problem.


Thanks anyway for the reply

Quoting Rainer Jung rainer.j...@kippdata.de:


It seems it is not a mod_jk problem. mod_jk never shuts down Tomcat, but
obviously your Tomcat shuts down during processing the request.

I would

- update Tomcat *and* the service wrapper (jdvc) to the most recent
patch update (e.g. Tomcat 5.5.33).

- run Tomcat once without the service wrapper to decide, whether the
problem comes from the wrapper or from Tomcat respectively your web
application.

Regards,

Rainer

On 04.07.2011 18:27, mar...@alt-v.co.uk wrote:

Hi
I have a problem when uploading files to tomcat through mod_jk.  When
uploading smaller files (100kb) everything seems to work fine, but when
uploading files of about 1.5Mb it seems as if the server is restarting
and causing a 503 error.  I've tried modifying timeouts in both apache
and tomcat, still i get this output on the catalina.err file: (sorry for
long log files)


04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
scheduled
04/07/2011 

Re: mod_jk restarting during uploads of large files

2011-07-07 Thread Thad Humphries
André,

I believe the file upload you are talking about is the FileUpload project
from the Apache Commons: http://commons.apache.org/fileupload/

This does indeed have a disk-based implementation of an upload file. The
package is org.apache.commons.fileupload.disk and it implements the
project's org.apache.commons.fileupload.FileItem interface.

Y'all can check the JavaDoc for DiskFileItem and DiskFileItemFactory. There
are some good, out-of-the-box-ready examples, too. Suffice it to say that
DiskFileItemFactory.DEFAULT_SIZE_THRESHOLD--The default threshold above
which uploads will be stored on disk.--is 10K.

I'm using FileUpload v1.2.1 and it has worked flawlessly, both as is or with
a FileCleaningTracker from the Commons I/O project. We've tested it with
files a couple hundred bytes to over an MB, and it's worked fine on Linux,
Sun, MacOS, and Windows, with and without mod_jk, with and without SSL.

On Thu, Jul 7, 2011 at 10:27 AM, André Warnier a...@ice-sa.com wrote:

 Hi.

 Since this concerns large files upload, I wonder if something along these
 lines is happening :

 A file upload is a POST request, usually with an
 enctype=multipart/form-data format (similar to an email with attachments).
 Furthermore, for sending this file, the browser is going to encode the file
 using Base64 encoding, which increases the brutto size by at least 1/3.  So
 your 500 MB file becomes something like 700 MB in the POST.

 Now let's imagine that by default Tomcat is buffering this in memory until
 it has read the whole POST and can start parsing it.  That could easily
 cause some memory issues.

 I seem to remember that there existed a parameter somewhere telling Tomcat
 how much it should buffer in memory before it starts offloading that to
 disk, but I do not remember where.  Maybe it was in the former FileUpload
 project though..



 mar...@alt-v.co.uk wrote:

 Yeh, I've worked out what was happening, seems that tomcat was being
 killed by the system running out of memory, which was happening without any
 log messages on the system at all, which was rather unhelpful and left me
 completely stumped for a while.  However adding extra swap space and memory
 seem to fix the problem.

 Thanks anyway for the reply

 Quoting Rainer Jung rainer.j...@kippdata.de:

  It seems it is not a mod_jk problem. mod_jk never shuts down Tomcat, but
 obviously your Tomcat shuts down during processing the request.

 I would

 - update Tomcat *and* the service wrapper (jdvc) to the most recent
 patch update (e.g. Tomcat 5.5.33).

 - run Tomcat once without the service wrapper to decide, whether the
 problem comes from the wrapper or from Tomcat respectively your web
 application.

 Regards,

 Rainer

 On 04.07.2011 18:27, mar...@alt-v.co.uk wrote:

 Hi
 I have a problem when uploading files to tomcat through mod_jk.  When
 uploading smaller files (100kb) everything seems to work fine, but when
 uploading files of about 1.5Mb it seems as if the server is restarting
 and causing a 503 error.  I've tried modifying timeouts in both apache
 and tomcat, still i get this output on the catalina.err file: (sorry for
 long log files)


 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload already
 scheduled
 04/07/2011 15:19:31 7211 jsvc.exec error: Shutdown or reload 

Re: getAllClusterSessions gives OptionalDataException

2011-07-07 Thread Filip Hanik - Dev Lists

On 6/28/2011 2:31 AM, Konstantin Kolinko wrote:

2011/6/23 Ronald Klopronald-mailingl...@base.nl:

Hi,

I have an exception when one on my Tomcat nodes restarts. The session are
not synced and user complain about being logged out. I was running 6.0.32
and had the problem. Now I'm running a custom build of 6.0.33 from
yesterday. I added a little code which prints ' SEVERE: name=user'. The key
on which the sync fails while reading the value.

I looked into the java code in ObjectInputStream and it looks like some
inconsistency in the ObjectStream.

I have 4 nodes on Debian 5, sun-java6-jdk 6-22-0lenny1, seen the problem on
Tomcat 6.0.29, 6.0.32 and a custom build 6.0.33. I can't reproduce this
(yet) on my test environment, so debugging it is difficult without upset
customers.

Engine name=Catalina defaultHost=xxx.xxx.xxx
  Realm className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase /
Cluster
className=org.apache.catalina.ha.tcp.SimpleTcpCluster
Channel
className=org.apache.catalina.tribes.group.GroupChannel
Membership
className=org.apache.catalina.tribes.membership.McastService port=47727
/
/Channel
/Cluster
Host name=xxx.xxx.xxx
appBase=/data/webapps/crm-LIVE/deployed
unpackWARs=true autoDeploy=false
xmlValidation=false xmlNamespaceAware=true
/Host
/Engine

Can I provide more information? Where should I look.

NB: In some previous mails about another problem I thought that might be the
reason for my logout problem, that is why I tried 6.0.33-dev.

Ronald.

Jun 23, 2011 5:49:47 PM org.apache.catalina.ha.session.DeltaManager
getAllClusterSessions
WARNING: Manager [crm.realworks.nl#], requesting session state from
org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 10,
110}:4000,{10, 0, 10, 110},4000, alive=45370885,id={-34 112 102 -93 -87 -88
77 18 -113 -30 62 8 62 -65 -112 -13 }, payload={}, command={}, domain={}, ].
This operation will timeout if no session state has been received within 60
seconds.
Jun 23, 2011 5:49:47 PM org.apache.catalina.ha.session.DeltaManager
waitForSendAllSessions
INFO: Manager [crm.realworks.nl#]; session state send at 6/23/11 5:49 PM
received in 304 ms.
Jun 23, 2011 5:49:47 PM org.apache.catalina.ha.session.DeltaManager
getAllClusterSessions
WARNING: Manager [crm.realworks.nl#]: Drop message SESSION-ACCESSED inside
GET_ALL_SESSIONS sync phase start date 6/23/11 5:49 PM message date 6/23/11
5:49 PM
Jun 23, 2011 5:49:47 PM org.apache.catalina.ha.session.DeltaSession
readObject
SEVERE: name=user.
Jun 23, 2011 5:49:47 PM org.apache.catalina.ha.session.DeltaManager
deserializeSessions
SEVERE: IOException while loading persisted sessions:
java.io.OptionalDataException
java.io.OptionalDataException
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at java.util.HashMap.readObject(HashMap.java:1029)

(...)

Looking at ObjectInputStream sourced, the OptionalDataException is
thrown when the source stream is truncated.

It might be related to the following issue, fixed in Tomcat 7, but
never proposed for backport yet:
https://issues.apache.org/bugzilla/show_bug.cgi?id=50646
Tribes ByteMessage will get corrupted if message size exceeds the
underlying buffer size

that's what I thought, but the SessionMessage doesn't use ByteMessage


Best regards,
Konstantin Kolinko

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





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



Re: NPE at StandardWrapperValve.invoke() in Tomcat 7.0.16

2011-07-07 Thread Pid
On 07/07/2011 01:31, eurotrans-Verlag wrote:
 Hi all,
 
 I’m using Tomcat 7.0.16 on a system with Java 1.6.0_26 on Windows Serer 2008
 and wondered about a strange NPE I got shortly after deploying a webapp to
 Tomcat:

 SCHWERWIEGEND: An exception or error occurred in the container during the
 request processing
 java.lang.NullPointerException
   at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
 va:287)
   at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
 va:164)
   at
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
 .java:462)
   at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
 )
   at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100
 )
   at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
 :118)
   at
 org.apache.catalina.valves.CrawlerSessionManagerValve.invoke(CrawlerSessionM
 anagerValve.java:172)
   at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
   at
 org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:284)
   at
 org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProt
 ocol.java:146)
   at
 org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:
 1730)
   at
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.ja
 va:886)
   at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:9
 08)
   at java.lang.Thread.run(Thread.java:662)
 
 
 From looking at Tomcat 7.0.16's source, I can see that line 287 in
 StandardWrapperValve is inside a catch block:
 
 285   } catch (Throwable e) {
 286   ExceptionUtils.handleThrowable(e);
 287   container.getLogger().error(sm.getString(
 288   standardWrapper.serviceException, wrapper.getName(),
 289   context.getName()), e);
 290   throwable = e;
 291   exception(request, response, e);
 292   }
 
 So does that mean that another Exception/Error occurred, but was suppressed
 by that NPE and therefore couldn't be logged?

What is the request for and is the config of your Tomcat instance
modified from the original download - if so, what has changed (config etc)?


p




signature.asc
Description: OpenPGP digital signature


RE: NPE at StandardWrapperValve.invoke() in Tomcat 7.0.16

2011-07-07 Thread eurotrans-Verlag
Hi Pid,

 -Original Message-
 From: Pid [mailto:p...@pidster.com]
 Sent: Thursday, July 07, 2011 6:19 PM
 
 What is the request for and is the config of your Tomcat instance
 modified from the original download - if so, what has changed (config
 etc)?
 
 
 p
 

I don't know which request triggered that NPE. I guess it was on the first
request after deploying the webapp, all following requests worked fine. I
got that NPE 2 times, both times it appeared ca. 3 seconds after deploying
the webapp.
After I restarted Tomcat, the NPE didn't appear anymore.

My Tomcat config has the following changes compared to the original:
- Ports of the HTTP and AJP connector are changed
- I use the URIEncoding attribute on both the HTTP and AJP connector, like
this:
  Connector port=8019 protocol=AJP/1.3 redirectPort=8743
URIEncoding=UTF-8 /
- I declared the CrawlerSessionManagerValve at Engine level in server.xml:
  Valve className=org.apache.catalina.valves.CrawlerSessionManagerValve/
- I have several virual hosts declared in server.xml like this:
  Host name=the_name  appBase=some_directory unpackWARs=true
autoDeploy=true
Aliassome_alias/Alias
  /Host
  (the web application on which the error occurred was deployed to one of
the virtual hosts).
- I don't have any AccessLogValve declared.
- I disabled session persistence by adding Manager pathname= / in
context.xml.

I am using the ISAPI Redirector 1.2.32 with IIS 7.0 on Windows Server 2008
(32 bit), with Sun Java 1.6.0_26, and I'm using the Tomcat Native library
1.2.20. All requests to the webapps go through the ISAPI redirector.

It seems to me that originally another Exception occurred, but has been
suppressed by that NPE when Tomcat tried to log it.


Thanks for your answers.

Konstantin Preißer


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



Re: NPE at StandardWrapperValve.invoke() in Tomcat 7.0.16

2011-07-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Konstantin,

On 7/6/2011 8:31 PM, eurotrans-Verlag wrote:
 I’m using Tomcat 7.0.16 on a system with Java 1.6.0_26 on Windows
 Serer 2008 and wondered about a strange NPE I got shortly after
 deploying a webapp to Tomcat:
 
 SCHWERWIEGEND: An exception or error occurred in the container during
 the request processing java.lang.NullPointerException at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja

 
va:287)
 
 [...]
 
 From looking at Tomcat 7.0.16's source, I can see that line 287 in
 StandardWrapperValve is inside a catch block:
 
 285   } catch (Throwable e) { 286
 ExceptionUtils.handleThrowable(e); 287
 container.getLogger().error(sm.getString( 288
 standardWrapper.serviceException, wrapper.getName(), 289
 context.getName()), e); 290   throwable = e; 291
 exception(request, response, e); 292  }
 
 So does that mean that another Exception/Error occurred, but was
 suppressed by that NPE and therefore couldn't be logged?

Looks like it. I would be very interested to know which of those objects
is null: the container, the logger, the wrapper, or the context.

- -chris

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

iEYEARECAAYFAk4WBTwACgkQ9CaO5/Lv0PDjCQCghs2HebGAdzzsoeqT0dh+5I/E
PhgAn3SC4m1b8557I+YeS1r14IpcnrW1
=UIKh
-END PGP SIGNATURE-

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



Re: mod_jk restarting during uploads of large files

2011-07-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

André ,

On 7/7/2011 10:27 AM, André Warnier wrote:
 Since this concerns large files upload, I wonder if something along 
 these lines is happening :
 
 A file upload is a POST request, usually with an 
 enctype=multipart/form-data format (similar to an email with
 attachments). Furthermore, for sending this file, the browser is
 going to encode the file using Base64 encoding, which increases the
 brutto size by at least 1/3.  So your 500 MB file becomes something
 like 700 MB in the POST.

I don't think any browser does base64 encoding of files.

 Now let's imagine that by default Tomcat is buffering this in memory 
 until it has read the whole POST and can start parsing it.  That
 could easily cause some memory issues.

Tomcat itself (at least v5.5) does not handle file uploads itself. Most
people either roll their own (bad) or use commons-fileupload or
something similar.

Any buffering of any consequence will be done by a non-Tomcat component,
but could be easily configured to take up a lot of memory.

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

iEYEARECAAYFAk4WDVwACgkQ9CaO5/Lv0PDQQACfZ+LLUuDi6AvJAFW12Q8cMXgr
INwAniZcjDb1kvWdbf+taynqyl+A40nn
=0jra
-END PGP SIGNATURE-

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



RE: NPE at StandardWrapperValve.invoke() in Tomcat 7.0.16

2011-07-07 Thread eurotrans-Verlag
Hi Christopher,

 -Original Message-
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Sent: Thursday, July 07, 2011 9:13 PM
 
 Looks like it. I would be very interested to know which of those
 objects
 is null: the container, the logger, the wrapper, or the context.
 
 - -chris

I thought the same (I suppose only container or the logger can be null, 
according to the stacktrace, because if the wrapper or the context were null, 
it should have printed a different line number). Unfortunately, I don't see 
this NPE anymore so I can't use a modified Tomcat to debug it.


Regards,

Konstantin Preißer


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



Re: NPE at StandardWrapperValve.invoke() in Tomcat 7.0.16

2011-07-07 Thread Pid
On 07/07/2011 20:59, eurotrans-Verlag wrote:
 Hi Christopher,
 
 -Original Message-
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Sent: Thursday, July 07, 2011 9:13 PM

 Looks like it. I would be very interested to know which of those
 objects
 is null: the container, the logger, the wrapper, or the context.

 - -chris
 
 I thought the same (I suppose only container or the logger can be null, 
 according to the stacktrace, because if the wrapper or the context were null, 
 it should have printed a different line number). Unfortunately, I don't see 
 this NPE anymore so I can't use a modified Tomcat to debug it.

Are you using parallel deployment or are you replacing the existing
application when it's redeployed.

Maybe the old context is the one throwing the error.


p



signature.asc
Description: OpenPGP digital signature


Re: mod_jk restarting during uploads of large files

2011-07-07 Thread André Warnier

Christopher Schultz wrote:
...



I don't think any browser does base64 encoding of files.


Let's make a bet...

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



RE: NPE at StandardWrapperValve.invoke() in Tomcat 7.0.16

2011-07-07 Thread eurotrans-Verlag
Hi Pid,

 -Original Message-
 From: Pid [mailto:p...@pidster.com]
 Sent: Thursday, July 07, 2011 10:24 PM
 
 Are you using parallel deployment or are you replacing the existing
 application when it's redeployed.
 
 Maybe the old context is the one throwing the error.
 
 
 p

I don't use parallel deployment.
To redeploy a webapp, I just replace the old war file with a new one and wait 
for Tomcat to redeploy it.

The logs on redeploy were this:

07.07.2011 00:24:09 org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context []
07.07.2011 00:24:09 org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 1 instance(s) to be deallocated
07.07.2011 00:24:10 org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 1 instance(s) to be deallocated
07.07.2011 00:24:11 org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 1 instance(s) to be deallocated
07.07.2011 00:24:12 org.apache.catalina.loader.WebappClassLoader 
clearReferencesThreads
SCHWERWIEGEND: The web application [] is still processing a request that has 
yet to finish. This is very likely to create a memory leak. You can control the 
time allowed for requests to finish by using the unloadDelay attribute of the 
standard Context implementation.
07.07.2011 00:24:12 org.apache.catalina.startup.ExpandWar deleteDir
SCHWERWIEGEND: [D:\tomcat7\work\Catalina\bildergalerie.pleier-it.de\_] could 
not be completely deleted. The presence of the remaining files may cause 
problems
07.07.2011 00:24:12 org.apache.catalina.startup.ExpandWar delete
SCHWERWIEGEND: [D:\tomcat7\work\Catalina\bildergalerie.pleier-it.de\_] could 
not be completely deleted. The presence of the remaining files may cause 
problems
07.07.2011 00:24:12 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive ROOT.war
07.07.2011 00:24:17 org.apache.catalina.connector.CoyoteAdapter service
SCHWERWIEGEND: An exception or error occurred in the container during the 
request processing
java.lang.NullPointerException
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:287)
...

(SCHWERWIEGEND should read like SEVERE)

You're right, it could have something to do with the old context since it was 
still waiting for a request to finish. Maybe I can reproduce the NPE if I make 
a servlet that takes a long time to finish the request, to see what was the 
original exception that has been suppressed by the NPE.


Regards,

Konstantin Preißer


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



RE: NPE at StandardWrapperValve.invoke() in Tomcat 7.0.16

2011-07-07 Thread eurotrans-Verlag
 Maybe I can reproduce the
 NPE if I make a servlet that takes a long time to finish the request,
 to see what was the original exception that has been suppressed by the
 NPE.

OK, I was able to reproduce a NPE in TC 7.0.16 with a Servlet that calls 
Thread.sleep(2), then make a request to that servlet and immediately 
redeploy that webapp. However, this time the NPE was not in 
StandardWrapperValve.invoke(), but in StandardContextValve.invoke():

08.07.2011 00:26:40 org.apache.catalina.connector.CoyoteAdapter service
SCHWERWIEGEND: An exception or error occurred in the container during the 
request processing
java.lang.NullPointerException
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:301)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:162)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:140)
at 
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown 
Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

The lines around 172 in StandardContextValve are these:

166 // If the request was async at the start and an error occurred then
167 // the async error handling will kick-in and that will fire the
168 // request destroyed event *after* the error handling has taken
169 // place
170 if (!(request.isAsync() || (asyncAtStart  request.getAttribute(
171 RequestDispatcher.ERROR_EXCEPTION) != null))) {
172 context.fireRequestDestroyEvent(request);
173 }

The problem here is that context is null (I debugged TC in Eclipse). However, 
this time it seems that it is not another Exception that has been suppressed by 
a NPE.

I checked that the NPE in StandardContextValve.invoke() also occurs in Tomcat 
7.0.18.

Unfortunately, I was not able to reproduce the NPE in 
StandardWrapperValve.invoke().


Regards,

Konstantin Preißer


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



Re: mod_jk restarting during uploads of large files

2011-07-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

André,

On 7/7/2011 4:57 PM, André Warnier wrote:
 Christopher Schultz wrote: ...
 
 I don't think any browser does base64 encoding of files.
 
 Let's make a bet...

I'll buy you a nice American beer if I'm wrong and you come to ApacheCon
NA in Vancouver, BC.

Why would a web browser base64 encode a file before uploading it instead
of just using a binary stream? That's what application/octet-stream is
for. There's no need to do any kind of text-encoding to upload a file to
a compliant web server.

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

iEYEARECAAYFAk4WfloACgkQ9CaO5/Lv0PARcwCgwlueNXuZU1xClkT/E/FOkOjd
IpYAn1vmlRGrpLcy0LLsFzoXMI31Tme9
=6Ps3
-END PGP SIGNATURE-

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



Re: NPE at StandardWrapperValve.invoke() in Tomcat 7.0.16

2011-07-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Konstantin,

On 7/7/2011 3:59 PM, eurotrans-Verlag wrote:
 Hi Christopher,
 
 -Original Message- From: Christopher Schultz
 [mailto:ch...@christopherschultz.net] Sent: Thursday, July 07, 2011
 9:13 PM
 
 Looks like it. I would be very interested to know which of those 
 objects is null: the container, the logger, the wrapper, or the
 context.
 
 - -chris
 
 I thought the same (I suppose only container or the logger can be 
 null, according to the stacktrace, because if the wrapper or the
 context were null, it should have printed a different line number).

My experience with the Sun/Oracle compiler is that lines 288 and 289
will never be indicated in a stack trace: the line number of the start
of the statement is considered the line number for the entire statement.

 Unfortunately, I don't see this NPE anymore so I can't use a
 modified Tomcat to debug it.

Problem solved?

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

iEYEARECAAYFAk4WfskACgkQ9CaO5/Lv0PC/2ACgmb7DqC4NjPO4d+jfyXaC2NlT
qOYAnjtdGop5mScGfTN1cbDItRMjLmNF
=Pv/3
-END PGP SIGNATURE-

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



Re: NPE at StandardWrapperValve.invoke() in Tomcat 7.0.16

2011-07-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Konstantin,

On 7/7/2011 5:45 PM, eurotrans-Verlag wrote:
 The logs on redeploy were this:
 
 07.07.2011 00:24:09 org.apache.catalina.startup.HostConfig
 checkResources INFO: Undeploying context []

Uhh... that can't be good. Why does the context have no name?

 INFO: Deploying web application archive ROOT.war

Is [] the name Tomcat sometimes gives the root context? I've actually
never used a root context, so I don't know but I would have expected it
to call the context [/] instead of [].

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

iEYEARECAAYFAk4Wf2IACgkQ9CaO5/Lv0PBe8QCfepgWQyMhBvWEzZyt8pNrBkHq
k10An35gSSNjXMZub8HiX4dLAts2JWE5
=Y/q+
-END PGP SIGNATURE-

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



Re: NPE at StandardWrapperValve.invoke() in Tomcat 7.0.16

2011-07-07 Thread Konstantin Kolinko
2011/7/8 Christopher Schultz ch...@christopherschultz.net:
 On 7/7/2011 5:45 PM, eurotrans-Verlag wrote:
 The logs on redeploy were this:

 07.07.2011 00:24:09 org.apache.catalina.startup.HostConfig
 checkResources INFO: Undeploying context []

 Uhh... that can't be good. Why does the context have no name?


It is the ROOT context, as you noted.  Its contextPath is empty and
name just reflect that.

http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Naming

 INFO: Deploying web application archive ROOT.war

 Is [] the name Tomcat sometimes gives the root context? I've actually
 never used a root context, so I don't know but I would have expected it
 to call the context [/] instead of [].


Best regards,
Konstantin Kolinko

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