RE: JSESSIONID doesn't contain the port

2008-06-20 Thread Zsolt Koppany
Thank you everybody making comments to my original post.

Our customer has two tomcats because one instance is the production version
of our application and the second one is a test instance of the new version
of the same application. Because of that the context-pathes are the same.

I understand, that context-path can be changed but means more hacking for
the customer. The other problem is that the customer stored in our wiki
pages URL-s with context path (but without port). It could be discussed
whether or not this is lucky but this is the case.

Zsolt 

 -Original Message-
 From: Christopher Schultz [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 19, 2008 10:08 PM
 To: Tomcat Users List
 Subject: Re: JSESSIONID doesn't contain the port
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Zsolt,
 
 Zsolt Koppany wrote:
 | How can we make tomcat-5.5.25 to store also port into JSESSIONID?
 
 You can't really do that, unless you want to hack-up TC's source.
 
 What you could do is deploy your applications under different context
 names, instead of deploying them both as ROOT. In that case, the
 JSESSIONID cookie will have a unique path associated with it, and they
 won't clobber each other.
 
 Another option would be to turn off cookies on the server, and use only
 URL-encoded session ids.
 
 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
 iEYEARECAAYFAkhavLsACgkQ9CaO5/Lv0PBvBgCcDpc3S6mQSZUlH39692/cRM5C
 yXkAoKlTmd0vkg1kRpMF0ivzEvE8KzR7
 =Ymjf
 -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]



Problem Running mod_jk with apache2

2008-06-20 Thread Junaid Arshad

Hi All,

I've been trying to setup mod_jk1.2.15 with Apache2.0.63 and tomcat 
5.5.23. After some hassle I was able to build mod_jk.so and did modify 
the httpd.conf to say the location of the .so and worksers.properties 
but when I tried to start apache it failed with the following error:


eipvm03:/usr/local/apache2/bin# ./apachectl 
restart Syntax error on line 1081 of 
/usr/local/apache2/conf/httpd.conf:
API module structure 'jk_module' in file 
/usr/lib/apache2/modules/mod_jk.so is garbled - expected signature 
41503230 but saw 41503232 - perhaps this is not an Apache module DSO, or 
was compiled for a different Apache version?


Any help will be much appreciated

Many Thanks!

Junaid


-
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 hanging locked thread

2008-06-20 Thread Olivier Fourel
Hello,

I have a tomcat 5.5 server hanging in production mode.
It seems we have threads that are never released and stay locked as shown in
the extract below.

I'm looking for help about tools or methods to identify what locks our
threads.


Our application log is ok, we tried to set it in trace mode but it doesn't
show more clue.


Olivier



Thread dump extract :

http-8180-Processor300 daemon prio=10 tid=0x2aaaf4eb4400 nid=0x1574 in
Object.wait() [0x5d7fe000..0x5d7fedc0]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on 0x2aaabbd271c0 (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Object.wait(Object.java:485)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
- locked 0x2aaabbd271c0 (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Thread.run(Thread.java:619)

http-8180-Processor299 daemon prio=10 tid=0x2aaaf4eb3000 nid=0x1573 in
Object.wait() [0x5d6fd000..0x5d6fdd40]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on 0x2aaabbd60838 (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Object.wait(Object.java:485)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
- locked 0x2aaabbd60838 (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Thread.run(Thread.java:619)

http-8180-Processor298 daemon prio=10 tid=0x2aaaf4eb1800 nid=0x1572 in
Object.wait() [0x5d5fc000..0x5d5fccc0]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on 0x2aaabbd60c50 (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Object.wait(Object.java:485)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
- locked 0x2aaabbd60c50 (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Thread.run(Thread.java:619)

http-8180-Processor297 daemon prio=10 tid=0x2aaaf4eb0400 nid=0x1571
runnable [0x5d4fb000..0x5d4fbc40]
   java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at
org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:737)
at
org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:398)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:827)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:619)

http-8180-Processor296 daemon prio=10 tid=0x2aaaf4eaf000 nid=0x1570 in
Object.wait() [0x5d3fa000..0x5d3fabc0]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on 0x2aaabbd61480 (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Object.wait(Object.java:485)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
- locked 0x2aaabbd61480 (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Thread.run(Thread.java:619)


Re: JSESSIONID doesn't contain the port

2008-06-20 Thread Leon Rosenberg
ok, it that case all you need are just two virtual hosts.

Leon

On Fri, Jun 20, 2008 at 8:56 AM, Zsolt Koppany [EMAIL PROTECTED] wrote:
 Thank you everybody making comments to my original post.

 Our customer has two tomcats because one instance is the production version
 of our application and the second one is a test instance of the new version
 of the same application. Because of that the context-pathes are the same.

 I understand, that context-path can be changed but means more hacking for
 the customer. The other problem is that the customer stored in our wiki
 pages URL-s with context path (but without port). It could be discussed
 whether or not this is lucky but this is the case.

 Zsolt

 -Original Message-
 From: Christopher Schultz [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 19, 2008 10:08 PM
 To: Tomcat Users List
 Subject: Re: JSESSIONID doesn't contain the port

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Zsolt,

 Zsolt Koppany wrote:
 | How can we make tomcat-5.5.25 to store also port into JSESSIONID?

 You can't really do that, unless you want to hack-up TC's source.

 What you could do is deploy your applications under different context
 names, instead of deploying them both as ROOT. In that case, the
 JSESSIONID cookie will have a unique path associated with it, and they
 won't clobber each other.

 Another option would be to turn off cookies on the server, and use only
 URL-encoded session ids.

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

 iEYEARECAAYFAkhavLsACgkQ9CaO5/Lv0PBvBgCcDpc3S6mQSZUlH39692/cRM5C
 yXkAoKlTmd0vkg1kRpMF0ivzEvE8KzR7
 =Ymjf
 -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]



-
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: Problem Running mod_jk with apache2

2008-06-20 Thread Rainer Jung

Hi Junaid,

Junaid Arshad wrote:

Hi All,

I've been trying to setup mod_jk1.2.15 with Apache2.0.63 and tomcat 
5.5.23. After some hassle I was able to build mod_jk.so and did modify 
the httpd.conf to say the location of the .so and worksers.properties 
but when I tried to start apache it failed with the following error:


eipvm03:/usr/local/apache2/bin# ./apachectl 
restart Syntax error on line 1081 of 
/usr/local/apache2/conf/httpd.conf:
API module structure 'jk_module' in file 
/usr/lib/apache2/modules/mod_jk.so is garbled - expected signature 
41503230 but saw 41503232 - perhaps this is not an Apache module DSO, or 
was compiled for a different Apache version?


Any help will be much appreciated


Which steps did you go to produce the mod_jk.so?

Some hints:

- don't use 1.2.15. We are at 1.2.26. That won't solve your problem, but 
if you start fresh, don't start with such an old version.


- configure needs --with-apxs. On some systems, there is an apxs file 
for use with httpd 1.3, and a file apxs2 for use with httpd 2.0. You 
need to ask your supplier of httpd, where the correct apxs for the 
version of httpd you want to use sits. In a default installation layout 
of httpd, it is in the bin directory of the httpd installation 
directory. Most Linuxes though scatter all the httpd parts around in the 
system. You can use rpm -q --filesbypkg to find out, where rpm 
contents have been installed to.



Many Thanks!

Junaid


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]



Re: JSESSIONID doesn't contain the port

2008-06-20 Thread Pid

Caldarale, Charles R wrote:

From: Pid [mailto:[EMAIL PROTECTED]
Subject: Re: JSESSIONID doesn't contain the port

The problem is that the TC1 sets a value of JSESSIONID that does not
exist in TC2.


Go back and reread the original post.  There's only one instance of Tomcat, but there 
are two Connector elements, each with a unique port.  The OP has not said why 
he thinks it's necessary to have two ports, but it really doesn't matter, since it's 
irrelevant as far as cookies are concerned.


I have now. Doh.

p



 - 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: Problem Running mod_jk with apache2

2008-06-20 Thread Junaid Arshad


Rainer Jung wrote:

Hi Junaid,

Junaid Arshad wrote:

Hi All,

I've been trying to setup mod_jk1.2.15 with Apache2.0.63 and tomcat 
5.5.23. After some hassle I was able to build mod_jk.so and did 
modify the httpd.conf to say the location of the .so and 
worksers.properties but when I tried to start apache it failed with 
the following error:


eipvm03:/usr/local/apache2/bin# ./apachectl 
restart Syntax error on line 1081 of 
/usr/local/apache2/conf/httpd.conf:
API module structure 'jk_module' in file 
/usr/lib/apache2/modules/mod_jk.so is garbled - expected signature 
41503230 but saw 41503232 - perhaps this is not an Apache module DSO, 
or was compiled for a different Apache version?


Any help will be much appreciated


Which steps did you go to produce the mod_jk.so?


I followed steps at http://www.debianhelp.co.uk/apachetomcat.htm


Some hints:

- don't use 1.2.15. We are at 1.2.26. That won't solve your problem, 
but if you start fresh, don't start with such an old version.


- configure needs --with-apxs. On some systems, there is an apxs file 
for use with httpd 1.3, and a file apxs2 for use with httpd 2.0. You 
need to ask your supplier of httpd, where the correct apxs for the 
version of httpd you want to use sits. In a default installation 
layout of httpd, it is in the bin directory of the httpd installation 
directory. Most Linuxes though scatter all the httpd parts around in 
the system. You can use rpm -q --filesbypkg to find out, where rpm 
contents have been installed to.


I did start fresh with 1.2.26 but didn't work again. I've got apxs2 
which I got by apt-get install and I guess it would be ok. But, 
nothing seems to be working :-(


Cheers

Junaid


Many Thanks!

Junaid


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: Problem Running mod_jk with apache2

2008-06-20 Thread Rainer Jung

Junaid Arshad wrote:

Rainer Jung wrote:

Junaid Arshad wrote:

Hi All,

I've been trying to setup mod_jk1.2.15 with Apache2.0.63 and tomcat 
5.5.23. After some hassle I was able to build mod_jk.so and did 
modify the httpd.conf to say the location of the .so and 
worksers.properties but when I tried to start apache it failed with 
the following error:


eipvm03:/usr/local/apache2/bin# ./apachectl 
restart Syntax error on line 1081 of 
/usr/local/apache2/conf/httpd.conf:
API module structure 'jk_module' in file 
/usr/lib/apache2/modules/mod_jk.so is garbled - expected signature 
41503230 but saw 41503232 - perhaps this is not an Apache module DSO, 
or was compiled for a different Apache version?


I checked the MODULE_MAGIC_COOKIE values for httpd. 41503230 is for 
httpd 2.0 and 41503232 is for httpd 2.2. Modules are not binary 
compatible between those. So it looks you are building for httpd 2.2 and 
using in 2.0. I still expect your apxs2 to be wrong.



Any help will be much appreciated


Which steps did you go to produce the mod_jk.so?


I followed steps at http://www.debianhelp.co.uk/apachetomcat.htm


Some hints:

- don't use 1.2.15. We are at 1.2.26. That won't solve your problem, 
but if you start fresh, don't start with such an old version.


- configure needs --with-apxs. On some systems, there is an apxs file 
for use with httpd 1.3, and a file apxs2 for use with httpd 2.0. You 
need to ask your supplier of httpd, where the correct apxs for the 
version of httpd you want to use sits. In a default installation 
layout of httpd, it is in the bin directory of the httpd installation 
directory. Most Linuxes though scatter all the httpd parts around in 
the system. You can use rpm -q --filesbypkg to find out, where rpm 
contents have been installed to.


I did start fresh with 1.2.26 but didn't work again. I've got apxs2 
which I got by apt-get install and I guess it would be ok. But, 
nothing seems to be working :-(


So are you sure, this apxs2 belongs to your version of httpd?

Are you sure, that the file you try to load is the file you built? Have 
a look ate the LoadModule directive for mod_jk and try to figure out, to 
which path for the *.so file it points to. Is the file there actually 
the one you built? The file resulting from the build should be either in 
the apache-2.0 sub directory of the mod_jk source, or in the .libs 
subdirectory underneath.


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]



libs oracle and tomcat 5.5

2008-06-20 Thread reno . rkcrew
hello everyone,

is anybody know why the oracle lib should be placed into the 'common/endorsed'
folder to be seen by BIRT ?
i put them into 'common/lib' and i had an sql error ...

thanks

fred

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



Spring or Tomcat forgets the classpath?

2008-06-20 Thread DCVer

Hi all,

I have strange problem. I am building standard web application (with Maven).
The structure of the output WAR is as follows:

WAR
 | - - META-INF
 | | - - ...
 |
 | - - WEB-INF
   | - - classes
   | | - - compiled_classes
   | | - - all_necessary_files (e.g. common.xml)
   |
   | - - lib
   | | - - all_necessary_jars
   |
   | - - beans.xml
   | - - web.xml

In web.xml I need to load few configuration files (for Spring - in this
example it is common.xml file):

web-app
[...]
context-param
param-namecontextConfigLocation/param-name
param-valuecommon.xml/param-value
/context-param
[...]
/web-app

While deploying the application in Tomcat I receive errors (from Spring I
guess), because Spring or Tomcat doesn't see the common.xml file (which is
located in WEB-INF/classes). Aren't files in WEB-INF/classes added to
classpath? If i specify WEB-INF/classes/common.xml path, the file is seen by
Spring, but I use also other Spring configuration files (can't be modified),
which need to refer to these files without WEB-INF/classes path (param-value
= common.xml).
What is more we have some WAR files with the configuration shown above (like
param-valuecommon.xml/param-value) and everything works fine. So why I
receive the error?

Hope that is not as hard to solve as it seems to me!
-- 
View this message in context: 
http://www.nabble.com/Spring-or-Tomcat-forgets-the-classpath--tp18026497p18026497.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: Problem Running mod_jk with apache2

2008-06-20 Thread Junaid Arshad


Thanks!

I got this working. I guess the apxs2 that I installed using apt-get was 
for apache2.2. This solved the problem but I am getting errors as:


/Invalid command 'logsJkLogFile', perhaps mis-spelled or defined by a 
module not included in the server configuration/


I guess there is a problem in loading mod_jk. I've pasted mod_jk 
settings part of my httpd.conf  as under...


Any hints as to what might correct this.

Cheers

Junaid

LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
# Where to find workers.properties
JkWorkersFile /usr/local/apache2/workers.properties
# Where to put jk
logsJkLogFile /var/log/apache2/mod_jk.log
# Set the jk log level
[debug/error/info]JkLogLevel info
# Select the log format
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat %w %V %T
# Send servlet for context / jsp-examples to worker named worker1
JkMount /jsp-examples worker1
# Send JSPs for context /jsp-examples/* to worker named worker1
JkMount /jsp-examples/* worker1


Rainer Jung wrote:

Junaid Arshad wrote:

Rainer Jung wrote:

Junaid Arshad wrote:

Hi All,

I've been trying to setup mod_jk1.2.15 with Apache2.0.63 and tomcat 
5.5.23. After some hassle I was able to build mod_jk.so and did 
modify the httpd.conf to say the location of the .so and 
worksers.properties but when I tried to start apache it failed with 
the following error:


eipvm03:/usr/local/apache2/bin# ./apachectl 
restart Syntax error on line 1081 of 
/usr/local/apache2/conf/httpd.conf:
API module structure 'jk_module' in file 
/usr/lib/apache2/modules/mod_jk.so is garbled - expected signature 
41503230 but saw 41503232 - perhaps this is not an Apache module 
DSO, or was compiled for a different Apache version?


I checked the MODULE_MAGIC_COOKIE values for httpd. 41503230 is for 
httpd 2.0 and 41503232 is for httpd 2.2. Modules are not binary 
compatible between those. So it looks you are building for httpd 2.2 
and using in 2.0. I still expect your apxs2 to be wrong.



Any help will be much appreciated


Which steps did you go to produce the mod_jk.so?


I followed steps at http://www.debianhelp.co.uk/apachetomcat.htm


Some hints:

- don't use 1.2.15. We are at 1.2.26. That won't solve your problem, 
but if you start fresh, don't start with such an old version.


- configure needs --with-apxs. On some systems, there is an apxs 
file for use with httpd 1.3, and a file apxs2 for use with httpd 
2.0. You need to ask your supplier of httpd, where the correct apxs 
for the version of httpd you want to use sits. In a default 
installation layout of httpd, it is in the bin directory of the 
httpd installation directory. Most Linuxes though scatter all the 
httpd parts around in the system. You can use rpm -q --filesbypkg 
to find out, where rpm contents have been installed to.


I did start fresh with 1.2.26 but didn't work again. I've got apxs2 
which I got by apt-get install and I guess it would be ok. But, 
nothing seems to be working :-(


So are you sure, this apxs2 belongs to your version of httpd?

Are you sure, that the file you try to load is the file you built? 
Have a look ate the LoadModule directive for mod_jk and try to figure 
out, to which path for the *.so file it points to. Is the file there 
actually the one you built? The file resulting from the build should 
be either in the apache-2.0 sub directory of the mod_jk source, or in 
the .libs subdirectory underneath.


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: Spring or Tomcat forgets the classpath?

2008-06-20 Thread Youssef Mohammed
you have to add this instead
 /WEB-INF/classes/common.xml



On Fri, Jun 20, 2008 at 1:38 PM, DCVer [EMAIL PROTECTED] wrote:


 Hi all,

 I have strange problem. I am building standard web application (with
 Maven).
 The structure of the output WAR is as follows:

 WAR
  | - - META-INF
  | | - - ...
  |
  | - - WEB-INF
   | - - classes
   | | - - compiled_classes
   | | - - all_necessary_files (e.g. common.xml)
   |
   | - - lib
   | | - - all_necessary_jars
   |
   | - - beans.xml
   | - - web.xml

 In web.xml I need to load few configuration files (for Spring - in this
 example it is common.xml file):

 web-app
[...]
context-param
param-namecontextConfigLocation/param-name
param-valuecommon.xml/param-value
/context-param
[...]
 /web-app

 While deploying the application in Tomcat I receive errors (from Spring I
 guess), because Spring or Tomcat doesn't see the common.xml file (which is
 located in WEB-INF/classes). Aren't files in WEB-INF/classes added to
 classpath? If i specify WEB-INF/classes/common.xml path, the file is seen
 by
 Spring, but I use also other Spring configuration files (can't be
 modified),
 which need to refer to these files without WEB-INF/classes path
 (param-value
 = common.xml).
 What is more we have some WAR files with the configuration shown above
 (like
 param-valuecommon.xml/param-value) and everything works fine. So why I
 receive the error?

 Hope that is not as hard to solve as it seems to me!
 --
 View this message in context:
 http://www.nabble.com/Spring-or-Tomcat-forgets-the-classpath--tp18026497p18026497.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]




-- 
Regards, Youssef


Re: Spring or Tomcat forgets the classpath?

2008-06-20 Thread Youssef Mohammed
and in your common.xml file you can import as many config files are you
want. and here you can specify a class path resources

eg.

import resource=classpath:spring/repos.xml /
import resource=classpath:spring/dbDatasource.xml /
import resource=classpath:spring/jaxwsspring.xml /
import resource=context-beans.${TARGET_ENV}.xml /
import resource=classpath:spring/mail.xml /
import resource=classpath:spring/services.xml /
import resource=classpath:spring/paypal.xml /
import resource=classpath:spring/trackTableEditor.xml /


On Fri, Jun 20, 2008 at 2:24 PM, Youssef Mohammed 
[EMAIL PROTECTED] wrote:

 you have to add this instead
  /WEB-INF/classes/common.xml




 On Fri, Jun 20, 2008 at 1:38 PM, DCVer [EMAIL PROTECTED] wrote:


 Hi all,

 I have strange problem. I am building standard web application (with
 Maven).
 The structure of the output WAR is as follows:

 WAR
  | - - META-INF
  | | - - ...
  |
  | - - WEB-INF
   | - - classes
   | | - - compiled_classes
   | | - - all_necessary_files (e.g. common.xml)
   |
   | - - lib
   | | - - all_necessary_jars
   |
   | - - beans.xml
   | - - web.xml

 In web.xml I need to load few configuration files (for Spring - in this
 example it is common.xml file):

 web-app
[...]
context-param
param-namecontextConfigLocation/param-name
param-valuecommon.xml/param-value
/context-param
[...]
 /web-app

 While deploying the application in Tomcat I receive errors (from Spring I
 guess), because Spring or Tomcat doesn't see the common.xml file (which is
 located in WEB-INF/classes). Aren't files in WEB-INF/classes added to
 classpath? If i specify WEB-INF/classes/common.xml path, the file is seen
 by
 Spring, but I use also other Spring configuration files (can't be
 modified),
 which need to refer to these files without WEB-INF/classes path
 (param-value
 = common.xml).
 What is more we have some WAR files with the configuration shown above
 (like
 param-valuecommon.xml/param-value) and everything works fine. So why I
 receive the error?

 Hope that is not as hard to solve as it seems to me!
 --
 View this message in context:
 http://www.nabble.com/Spring-or-Tomcat-forgets-the-classpath--tp18026497p18026497.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]




 --
 Regards, Youssef




-- 
Regards, Youssef


Re: Problem Running mod_jk with apache2

2008-06-20 Thread Rainer Jung

Junaid Arshad wrote:

This solved the problem but I am getting errors as:

/Invalid command 'logsJkLogFile', perhaps mis-spelled or defined by a 
module not included in the server configuration/


See

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

for the list of known configuration directives. 'logsJkLogFile' doesn't 
exist.


I guess there is a problem in loading mod_jk. I've pasted mod_jk 
settings part of my httpd.conf  as under...


No, the above error only indicates, that you are using a configuration 
directive which doesn't exist. And that's true ;)



Any hints as to what might correct this.

Cheers

Junaid

LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
# Where to find workers.properties
JkWorkersFile /usr/local/apache2/workers.properties
# Where to put jk
logsJkLogFile /var/log/apache2/mod_jk.log


Wrong, see docs page.


# Set the jk log level
[debug/error/info]JkLogLevel info


Wrong, see docs page.


# Select the log format
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 


I would leave the default.


# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories


Throw out +ForwardUriCompat, and if you know no good reason for the 
other two, drop the whole line.



# JkRequestLogFormat set the request format
JkRequestLogFormat %w %V %T


I wouldn't use a jk request log. Instead use a custom LogFormat to add 
interesting info to your standard access log. See mod_log_config in 
the above docs page.



# Send servlet for context / jsp-examples to worker named worker1
JkMount /jsp-examples worker1
# Send JSPs for context /jsp-examples/* to worker named worker1
JkMount /jsp-examples/* worker1


Could be, that that makes sense. This will depend on your 
workers.properties.


Rainer


Rainer Jung wrote:

Junaid Arshad wrote:

Rainer Jung wrote:

Junaid Arshad wrote:

Hi All,

I've been trying to setup mod_jk1.2.15 with Apache2.0.63 and tomcat 
5.5.23. After some hassle I was able to build mod_jk.so and did 
modify the httpd.conf to say the location of the .so and 
worksers.properties but when I tried to start apache it failed with 
the following error:


eipvm03:/usr/local/apache2/bin# ./apachectl 
restart Syntax error on line 1081 of 
/usr/local/apache2/conf/httpd.conf:
API module structure 'jk_module' in file 
/usr/lib/apache2/modules/mod_jk.so is garbled - expected signature 
41503230 but saw 41503232 - perhaps this is not an Apache module 
DSO, or was compiled for a different Apache version?


I checked the MODULE_MAGIC_COOKIE values for httpd. 41503230 is for 
httpd 2.0 and 41503232 is for httpd 2.2. Modules are not binary 
compatible between those. So it looks you are building for httpd 2.2 
and using in 2.0. I still expect your apxs2 to be wrong.



Any help will be much appreciated


Which steps did you go to produce the mod_jk.so?


I followed steps at http://www.debianhelp.co.uk/apachetomcat.htm


Some hints:

- don't use 1.2.15. We are at 1.2.26. That won't solve your problem, 
but if you start fresh, don't start with such an old version.


- configure needs --with-apxs. On some systems, there is an apxs 
file for use with httpd 1.3, and a file apxs2 for use with httpd 
2.0. You need to ask your supplier of httpd, where the correct apxs 
for the version of httpd you want to use sits. In a default 
installation layout of httpd, it is in the bin directory of the 
httpd installation directory. Most Linuxes though scatter all the 
httpd parts around in the system. You can use rpm -q --filesbypkg 
to find out, where rpm contents have been installed to.


I did start fresh with 1.2.26 but didn't work again. I've got apxs2 
which I got by apt-get install and I guess it would be ok. But, 
nothing seems to be working :-(


So are you sure, this apxs2 belongs to your version of httpd?

Are you sure, that the file you try to load is the file you built? 
Have a look ate the LoadModule directive for mod_jk and try to figure 
out, to which path for the *.so file it points to. Is the file there 
actually the one you built? The file resulting from the build should 
be either in the apache-2.0 sub directory of the mod_jk source, or in 
the .libs subdirectory underneath.


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]



Re: Problem Running mod_jk with apache2

2008-06-20 Thread Junaid Arshad


Yes, that was true...:-) and I did corect it to make the two (apache and 
tomcat) run but when I tried to access the location specfied by 
JkMount i.e. a webpage etc. it was a 503 error: Service Temporarily 
Unavailable


I checked both tomcat and apache WS, and, they were running good...

do you have any clue about this error...

Cheers

Junaid


Rainer Jung wrote:

Junaid Arshad wrote:

This solved the problem but I am getting errors as:

/Invalid command 'logsJkLogFile', perhaps mis-spelled or defined by a 
module not included in the server configuration/


See

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

for the list of known configuration directives. 'logsJkLogFile' 
doesn't exist.


I guess there is a problem in loading mod_jk. I've pasted mod_jk 
settings part of my httpd.conf  as under...


No, the above error only indicates, that you are using a configuration 
directive which doesn't exist. And that's true ;)



Any hints as to what might correct this.

Cheers

Junaid

LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
# Where to find workers.properties
JkWorkersFile /usr/local/apache2/workers.properties
# Where to put jk
logsJkLogFile /var/log/apache2/mod_jk.log


Wrong, see docs page.


# Set the jk log level
[debug/error/info]JkLogLevel info


Wrong, see docs page.


# Select the log format
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 


I would leave the default.


# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories


Throw out +ForwardUriCompat, and if you know no good reason for the 
other two, drop the whole line.



# JkRequestLogFormat set the request format
JkRequestLogFormat %w %V %T


I wouldn't use a jk request log. Instead use a custom LogFormat to add 
interesting info to your standard access log. See mod_log_config in 
the above docs page.



# Send servlet for context / jsp-examples to worker named worker1
JkMount /jsp-examples worker1
# Send JSPs for context /jsp-examples/* to worker named worker1
JkMount /jsp-examples/* worker1


Could be, that that makes sense. This will depend on your 
workers.properties.


Rainer


Rainer Jung wrote:

Junaid Arshad wrote:

Rainer Jung wrote:

Junaid Arshad wrote:

Hi All,

I've been trying to setup mod_jk1.2.15 with Apache2.0.63 and 
tomcat 5.5.23. After some hassle I was able to build mod_jk.so 
and did modify the httpd.conf to say the location of the .so 
and worksers.properties but when I tried to start apache it 
failed with the following error:


eipvm03:/usr/local/apache2/bin# ./apachectl 
restart Syntax error on line 1081 of 
/usr/local/apache2/conf/httpd.conf:
API module structure 'jk_module' in file 
/usr/lib/apache2/modules/mod_jk.so is garbled - expected 
signature 41503230 but saw 41503232 - perhaps this is not an 
Apache module DSO, or was compiled for a different Apache version?


I checked the MODULE_MAGIC_COOKIE values for httpd. 41503230 is for 
httpd 2.0 and 41503232 is for httpd 2.2. Modules are not binary 
compatible between those. So it looks you are building for httpd 2.2 
and using in 2.0. I still expect your apxs2 to be wrong.



Any help will be much appreciated


Which steps did you go to produce the mod_jk.so?


I followed steps at http://www.debianhelp.co.uk/apachetomcat.htm


Some hints:

- don't use 1.2.15. We are at 1.2.26. That won't solve your 
problem, but if you start fresh, don't start with such an old 
version.


- configure needs --with-apxs. On some systems, there is an apxs 
file for use with httpd 1.3, and a file apxs2 for use with httpd 
2.0. You need to ask your supplier of httpd, where the correct 
apxs for the version of httpd you want to use sits. In a default 
installation layout of httpd, it is in the bin directory of the 
httpd installation directory. Most Linuxes though scatter all the 
httpd parts around in the system. You can use rpm -q 
--filesbypkg to find out, where rpm contents have been installed to.


I did start fresh with 1.2.26 but didn't work again. I've got apxs2 
which I got by apt-get install and I guess it would be ok. But, 
nothing seems to be working :-(


So are you sure, this apxs2 belongs to your version of httpd?

Are you sure, that the file you try to load is the file you built? 
Have a look ate the LoadModule directive for mod_jk and try to 
figure out, to which path for the *.so file it points to. Is the 
file there actually the one you built? The file resulting from the 
build should be either in the apache-2.0 sub directory of the mod_jk 
source, or in the .libs subdirectory underneath.


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, 

Re: Problem Running mod_jk with apache2

2008-06-20 Thread Rainer Jung

Junaid Arshad wrote:


Yes, that was true...:-) and I did corect it to make the two (apache and 
tomcat) run but when I tried to access the location specfied by 
JkMount i.e. a webpage etc. it was a 503 error: Service Temporarily 
Unavailable


I checked both tomcat and apache WS, and, they were running good...

do you have any clue about this error...


Yes:


# Send servlet for context / jsp-examples to worker named worker1
JkMount /jsp-examples worker1
# Send JSPs for context /jsp-examples/* to worker named worker1
JkMount /jsp-examples/* worker1


Could be, that that makes sense. This will depend on your 
workers.properties.


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]



Keep getting this error

2008-06-20 Thread Mathias P.W Nilsson

Don't know how to get rid of this


:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
7)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.SocketException: Connection reset by peer: socket write
erro
r
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
com.sun.net.ssl.internal.ssl.OutputRecord.writeBuffer(OutputRecord.ja
va:295)
at
com.sun.net.ssl.internal.ssl.OutputRecord.write(OutputRecord.java:284
)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecordInternal(SSLSoc
ketImpl.java:734)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.
java:722)
at
com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.ja
va:59)
at
org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(Internal
OutputBuffer.java:737)
at
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349)
at
org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffe
r.doWrite(InternalOutputBuffer.java:761)
at
org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(Identit
yOutputFilter.java:118)
at
org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputB
uffer.java:570)
at org.apache.coyote.Response.doWrite(Response.java:560)
at
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffe
r.java:353)
... 28 more
ClientAbortException:  java.net.SocketException: Connection reset by peer:
socke
t write error
at
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffe
r.java:358)
at
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349)
at
org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.ja
va:381)
at
org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:37
0)
at
org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputSt
ream.java:89)
at
se.edgesoft.hairless.web.resource.FileResourceServlet.doGet(FileResou
rceServlet.java:74)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.ja
va:234)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at
org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doF
ilterInternal(OpenEntityManagerInViewFilter.java:111)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:75)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:175)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:525)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
7)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.SocketException: Connection reset by peer: socket write
erro
r
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
com.sun.net.ssl.internal.ssl.OutputRecord.writeBuffer(OutputRecord.ja
va:295)
   

very large catalina logfile...

2008-06-20 Thread Zaher Srour
Hi all,
Am new to Tomcat, have the following problem:
The size of the *catalina.-mm-dd.log* file became so large that the
server free space (23 GB) was filled with it
As you can see, a file of this size can't be opened to check the logged
info.
I couldn't find information about limiting catalina-logfiles to prevent it
to happen again.
Conf. info: version  5.5.17

Can anyone help me with this...

-- 
Zaher Srour
GIS Consultant

Realworld OO Systems
Venusstraat 17
4105 JH  Culemborg
The Netherlands


RE: Tomcat 5.5 hanging locked thread

2008-06-20 Thread Caldarale, Charles R
 From: Olivier Fourel [mailto:[EMAIL PROTECTED]
 Subject: Tomcat 5.5 hanging  locked thread

 I have a tomcat 5.5 server hanging in production mode.
 It seems we have threads that are never released and stay
 locked as shown in the extract below.

The threads you extracted look perfectly normal - they're in the thread pool, 
waiting for requests to show up.  You need to be looking at the other threads 
that may be stuck or looping somewhere else.  If you have database connections, 
make sure those are functional and not all consumed by threads failing to close 
them.

 - 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: mapping tomcat to ip address behind router

2008-06-20 Thread Eric Gichuhi

Hi, 

Try using a subdomain DNS eg myservice.mydomain.com that will resolve
internally to http://192.168.0.54 (behind router) and externally to
http://99.153.32.456(direct internet connection). The DNS Server should do
the rest - basically forward all requests from behind the router to the
given subdomain.

Cheers!

Rgds,
Eric 


-Original Message-
From: Johnny Kewl [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Date: Fri, 13 Jun 2008 06:07:42 +0200
Subject: Re: mapping tomcat to ip address behind router

 
 - Original Message - 
 From: illusion [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Sent: Thursday, June 12, 2008 11:14 PM
 Subject: mapping tomcat to ip address behind router
 
 
 
  Hey,
 
  I want to set-up tomcat to serve http requests from behind a router. 
 When
  there is a direct internet connection and no router, and the address
  property is added and port number is changed in server.xml as below
 in
  example 1, tomcat serves requests fine for http://99.153.32.456.
 
  When I set it up to run behind a router as show in example 2, with
 the
  router forwarding requests to 192.168.0.54 which is the computer
 behind 
  the
  router with tomcat, it does not work for the url
 http://99.153.32.456. 
  What
  is the correct way to set it tomcat behind a router?
 
  thanks in advance for your assistance
 
  Example 1 - no router - works
 
  Connector port=80 protocol=HTTP/1.1
connectionTimeout=2
address=99.153.32.456
redirectPort=8443 /
 !-- A Connector using the shared thread pool--
 !--
 Connector executor=tomcatThreadPool
port=80 protocol=HTTP/1.1
address=99.153.32.456
connectionTimeout=2
redirectPort=8443 /
 --
 
  Example 2 - behind router - does not work
 
  Connector port=80 protocol=HTTP/1.1
connectionTimeout=2
address=192.168.0.54
redirectPort=8443 /
 !-- A Connector using the shared thread pool--
 !--
 Connector executor=tomcatThreadPool
port=80 protocol=HTTP/1.1
address=192.168.0.54
connectionTimeout=2
redirectPort=8443 /
 --
 
 illusion, you have now probably screwed up the TC config...
 Reload the the standard TC config, and just change the 8080, to 80,
 dont 
 touch other stuff for now.
 
 Then google, I think you have one of those ADSL Nat Router things
 Heres an article with someone else struggling along
 http://sanzon.wordpress.com/2008/04/04/setting-up-web-server-behind-rou
 ter-wrt54g2/
 
 Whats probably screwing you up is even though you have it forwarding,
 the 
 IP's internally are being dynamicly assigned, you have to give the
 server a 
 fixed IP, typically this is not the ISP IP, its the machine IP, and
 then you 
 need to check the machine and make sure its using your router as the 
 gateway.
 
 Its not really a TC thing, best thing is to look at the router name and
 google for it and web server.
 These little box's now a days have some amazing functionality, so you
 need 
 to find the manual for the thing.
 
 You need to check the Dynamip DNS is not on, DHCP is not assinged to
 the 
 server, the DNS discovery is set or on auto, the network masks are
 right 
 etc.
 If your SP supplied the router, they should know how to set the thing
 up, 
 dont mention tomcat, its got nothing to do with it, just tell em its a
 web 
 server on a machine if that works, TC will work.
 
 And then learn to do things like ping a machine etc.
 
 Have fun
 
 
 ---
 
 HARBOR : http://www.kewlstuff.co.za/index.htm
 The most powerful application server on earth.
 The only real POJO Application Server.
 See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
 ---
   
 
 
 -
 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: Keep getting this error

2008-06-20 Thread Youssef Mohammed
org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:111)

It is in a spring classes filter , make sure your web app is configured
correctly to use spring/jsf/jpa.

you can also just comment that filter out from your web.xml. but you will no
longer have the OpenEntityManagerInViewFilter .




On Fri, Jun 20, 2008 at 3:38 PM, Mathias P.W Nilsson [EMAIL PROTECTED]
wrote:


 Don't know how to get rid of this


 :844)
at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
 ss(Http11Protocol.java:583)
at
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
 7)
at java.lang.Thread.run(Thread.java:619)
 Caused by: java.net.SocketException: Connection reset by peer: socket write
 erro
 r
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
 java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
 com.sun.net.ssl.internal.ssl.OutputRecord.writeBuffer(OutputRecord.ja
 va:295)
at
 com.sun.net.ssl.internal.ssl.OutputRecord.write(OutputRecord.java:284
 )
at
 com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecordInternal(SSLSoc
 ketImpl.java:734)
at
 com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.
 java:722)
at
 com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.ja
 va:59)
at
 org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(Internal
 OutputBuffer.java:737)
at
 org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349)
at
 org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffe
 r.doWrite(InternalOutputBuffer.java:761)
at
 org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(Identit
 yOutputFilter.java:118)
at
 org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputB
 uffer.java:570)
at org.apache.coyote.Response.doWrite(Response.java:560)
at
 org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffe
 r.java:353)
... 28 more
 ClientAbortException:  java.net.SocketException: Connection reset by peer:
 socke
 t write error
at
 org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffe
 r.java:358)
at
 org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349)
at
 org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.ja
 va:381)
at
 org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:37
 0)
at
 org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputSt
 ream.java:89)
at
 se.edgesoft.hairless.web.resource.FileResourceServlet.doGet(FileResou
 rceServlet.java:74)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
 icationFilterChain.java:290)
at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
 ilterChain.java:206)
at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.ja
 va:234)
at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
 icationFilterChain.java:235)
at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
 ilterChain.java:206)
at
 org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doF
 ilterInternal(OpenEntityManagerInViewFilter.java:111)
at
 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
 equestFilter.java:75)
at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
 icationFilterChain.java:235)
at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
 ilterChain.java:206)
at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
 alve.java:233)
at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
 alve.java:175)
at
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
 torBase.java:525)
at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
 ava:128)
at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
 ava:102)
at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
 ve.java:109)
at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
 a:286)
at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
 :844)
at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
 ss(Http11Protocol.java:583)
at
 

Re: very large catalina logfile...

2008-06-20 Thread Youssef Mohammed
Zaher pasha ..
try this http://www.unicon.net/node/604


On Fri, Jun 20, 2008 at 3:48 PM, Zaher Srour 
[EMAIL PROTECTED] wrote:

 Hi all,
 Am new to Tomcat, have the following problem:
 The size of the *catalina.-mm-dd.log* file became so large that the
 server free space (23 GB) was filled with it
 As you can see, a file of this size can't be opened to check the logged
 info.
 I couldn't find information about limiting catalina-logfiles to prevent it
 to happen again.
 Conf. info: version  5.5.17

 Can anyone help me with this...

 --
 Zaher Srour
 GIS Consultant

 Realworld OO Systems
 Venusstraat 17
 4105 JH  Culemborg
 The Netherlands




-- 
Regards, Youssef


Re: Problem Running mod_jk with apache2

2008-06-20 Thread André Warnier



Junaid Arshad wrote:


Thanks!

I got this working. I guess the apxs2 that I installed using apt-get was 
for apache2.2. This solved the problem but I am getting errors as:


/Invalid command 'logsJkLogFile', perhaps mis-spelled or defined by a 
module not included in the server configuration/



The directive is really JkLogFile.

See http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html

André

-
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: very large catalina logfile...

2008-06-20 Thread Caldarale, Charles R
 From: Youssef Mohammed [mailto:[EMAIL PROTECTED]
 Subject: Re: very large catalina logfile...

 Zaher pasha ..
 try this http://www.unicon.net/node/604

The OP stated he was using 5.5.17, so providing configuration for the defunct 
5.0 Logger element isn't going to help.

OP: what platform are you running on?  There are some editors that won't 
attempt to load the whole file into memory, just the portion being looked at; 
you should be able to extract some of it for analysis, even if you have to use 
a hex editor to do it.

 - 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: AJP encryption

2008-06-20 Thread Rossen Raykov
Bill,

The VPN and the ssh tunnels encrypt the traffic between the servers but anybody 
with enough access can listen on the interface and intercept the traffic. For 
example ngrep -d tun0 would revile all the communications over Open VPN.
The encryption of the direct communications between the web and the app server 
would not allow that and as a result brings extra protection.

Having said that I can work on the Java side of the connectors to add optional 
encryption, but my C is a little bit rusty and it'll be nice if somebody else 
would be able to help it...
Before to jump on it, are you aware of anything already planned or the stuff 
you mentioned was just proposed? Is there any type of initial documentation 
on what to and how to?

Rossen

- Original Message -
From: Bill Barker [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Thursday, June 19, 2008 11:45:08 PM GMT -05:00 US/Canada Eastern
Subject: Re: AJP encryption


Rossen Raykov [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Hi All,

 Is there anybody interested in encrypting the AJP communication channel?
 Is anything like that planned for the next release?


It's on the wishlist for AJP/1.4 (as well as compression).  However there 
hasn't been much developer traction on AJP/1.4 for years.  The general 
consence on [EMAIL PROTECTED] has been to not add it to an AJP/1.3 release, so 
the 
answer to your second question is likely:  no.  The answer to your first 
question (based on this list) is likely:  yes.

AJP is designed to work over high-speed, secure, internal networks.  In this 
type of environment, if a black-hat can manage to sniff AJP traffic, you 
have much bigger problems on your hands ;).  However, if you want to submit 
patches to add encryption, I'm sure that you will find tomcat developers 
that are interested in reviewing them.

As Markus said, there are plenty of ways to encrypt AJP traffic today.  Just 
judging from this list, SSH tunnelling is popular, as well as Markus' 
suggestion of OpenVPN.

 Rossen

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


-
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: very large catalina logfile...

2008-06-20 Thread Zaher Srour
Am running a Java (5.0 update 6) web application on a MS server 2003 SE SP2.
Thanks for you both for the quick reply.

Zaher

On Fri, Jun 20, 2008 at 3:03 PM, Youssef Mohammed 
[EMAIL PROTECTED] wrote:

 Zaher pasha ..
 try this http://www.unicon.net/node/604


 On Fri, Jun 20, 2008 at 3:48 PM, Zaher Srour 
 [EMAIL PROTECTED] wrote:

  Hi all,
  Am new to Tomcat, have the following problem:
  The size of the *catalina.-mm-dd.log* file became so large that the
  server free space (23 GB) was filled with it
  As you can see, a file of this size can't be opened to check the logged
  info.
  I couldn't find information about limiting catalina-logfiles to prevent
 it
  to happen again.
  Conf. info: version  5.5.17
 
  Can anyone help me with this...
 
  --
  Zaher Srour
  GIS Consultant
 
  Realworld OO Systems
  Venusstraat 17
  4105 JH  Culemborg
  The Netherlands
 



 --
 Regards, Youssef




-- 
Zaher Srour
GIS Consultant

Realworld OO Systems
Venusstraat 17
4105 JH  Culemborg
The Netherlands


Re: very large catalina logfile...

2008-06-20 Thread Zaher Srour
Hi, Now I read the whole message :)

I tried to open the file with UltraEdit32 and Notepad++ 4.8.5 ..
The first gives am error, the other crashed.

Zaher
On Fri, Jun 20, 2008 at 3:33 PM, Zaher Srour 
[EMAIL PROTECTED] wrote:

 Am running a Java (5.0 update 6) web application on a MS server 2003 SE
 SP2.
 Thanks for you both for the quick reply.

 Zaher


 On Fri, Jun 20, 2008 at 3:03 PM, Youssef Mohammed 
 [EMAIL PROTECTED] wrote:

 Zaher pasha ..
 try this http://www.unicon.net/node/604


 On Fri, Jun 20, 2008 at 3:48 PM, Zaher Srour 
 [EMAIL PROTECTED] wrote:

  Hi all,
  Am new to Tomcat, have the following problem:
  The size of the *catalina.-mm-dd.log* file became so large that the
  server free space (23 GB) was filled with it
  As you can see, a file of this size can't be opened to check the logged
  info.
  I couldn't find information about limiting catalina-logfiles to prevent
 it
  to happen again.
  Conf. info: version  5.5.17
 
  Can anyone help me with this...
 
  --
  Zaher Srour
  GIS Consultant
 
  Realworld OO Systems
  Venusstraat 17
  4105 JH  Culemborg
  The Netherlands
 



 --
 Regards, Youssef




 --
 Zaher Srour
 GIS Consultant

 Realworld OO Systems
 Venusstraat 17
 4105 JH  Culemborg
 The Netherlands




-- 
Zaher Srour
GIS Consultant

Realworld OO Systems
Venusstraat 17
4105 JH  Culemborg
The Netherlands


RE: very large catalina logfile...

2008-06-20 Thread Caldarale, Charles R
 From: Zaher Srour [mailto:[EMAIL PROTECTED]
 Subject: Re: very large catalina logfile...

 Am running a Java (5.0 update 6) web application on a MS
 server 2003 SE SP2.

Try this:
http://www.hhdsoftware.com/Products/home/hex-editor-free.html

I haven't tried it with anything as big as 23 GB, but I have successfully used 
it with files somewhat larger than process virtual space.

(Neither I nor Unisys have any affiliation with the above company.)

I don't think there's any straightforward means of configuring JULI to create 
rolling log files, but you could switch to log4j and do that in the future.

 - 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: Changing roles on the fly

2008-06-20 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Lyallex,

Lyallex wrote:
| The problem comes when a superuser wants to remove a role from a user
| and that user may be logged in.
| What I need to be able to do is to view all the currently active
| sessions and log the relevant user out (by invalidating the session
| for example) so that when they next try to access a protected resource
| they have to log in again ... I can't give any more details I'm
| afraid.

The only ways to do something to all sessions (like searching them and
perhaps killing one or more of them) is to either write a
HttpSessionListener and register all new sessions in your own registry
(which will work across all containers), or use whatever LambdaProbe
does to find all application sessions (probably JMX) and risk tying your
code to a particular container.

| I think I may be able to do this by allowing a superuser account to
| access this information using JMX (mbeans) and do appropriate stuff.
| This is a sanity check with the experts on this list as I have never
| used JMX before and I would like to know if I am pointing in the right
| direction.

If I were doing this, I would probably go the HttpSessionListener route,
but that's just biased based on my own experience with listeners and
lack of experience with JMX -- JMX actually sounds like a better deal
since I'm guessing this will be an rarely-used feature, and adding the
overhead of managing all the sessions yourself seems like it might not
be worth it.

| I do not want to expose the tomcat management console to superusers as
| they will be (business) domain experts, not Tomcat users or
| developers/sysadmins

This is a good idea. Whatever you do should be fool-proof ;)

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

iEYEARECAAYFAkhbugQACgkQ9CaO5/Lv0PBfaQCcClWiumQjpf9fGMQAH+lyaWvO
FeIAn1R7dXJmUuVr52KRHYCBo0hGfb4v
=HS4n
-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: JSESSIONID doesn't contain the port

2008-06-20 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Zsolt,

Zsolt Koppany wrote:
| Our customer has two tomcats because one instance is the production
version
| of our application and the second one is a test instance of the new
version
| of the same application. Because of that the context-pathes are the same.

How do you know where the first request (say, to http://host/theApp)
should go -- production or test? This seems like a weird configuration.
Can you explain it a little more?

| I understand, that context-path can be changed but means more hacking for
| the customer. The other problem is that the customer stored in our wiki
| pages URL-s with context path (but without port). It could be discussed
| whether or not this is lucky but this is the case.

If you were to use something like Apache httpd out front, you might be
able to use a cookie or URL parameter to track which version of the
application the user is using (prod vs. test) and then use mod_rewrite
or a similar module to modify the port connecting to Tomcat.

Just a thought.

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

iEYEARECAAYFAkhbu9UACgkQ9CaO5/Lv0PC/0wCfSQKU2x3F0iMSU3w1n9P8ye3U
d2UAnA03vZ9W7SGU6BNKj92yhN05R3nH
=Z75a
-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: JNDI realm strange problem(Tomcat 6.0.16)

2008-06-20 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Kuman,

Kumar Gaurav Srivastava wrote:
| i have my realm configuration in server.xml, every thing is fine i can
| login. but when i try to login the next morning it gives error
|
| SEVERE: Exception performing authentication
| javax.naming.NoInitialContextException: Need to specify class name in
| environment or system property, or as an applet parameter, or in an
| application resource file: java.naming.factory.initial at
| javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)

Hmm... are you sure your server is staying up all night, or does it get
restarted or anything like that? NoInitialContextException is very strange.

If you restart Tomcat, does it start working again?

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

iEYEARECAAYFAkhbvLQACgkQ9CaO5/Lv0PCAtQCgmlDIAYefCW33BAi1Y2lEzWKM
WacAnirMgdFZVpfg2aOJM4Y+va4+fDMZ
=D+S0
-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 contexts with multiple / in path attribute

2008-06-20 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jonathan,

I know you've posted before, but could you remind us of your TC version?

Jonathan Mast wrote:
| Context path=/foo/bar 
|
| Specifically, how do I reference this webapp in the logging.properties
| file?  For contexts with just a single slash in their path:
|
| Context path=/blah ...

[snip]

|
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/blah].handlers
| = 6blah.org.apache.juli.FileHandler
|
| And it has worked fine.
|
| But how should i reference the Context whose path is /foo/bar ?

I would imagine that

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo/bar].handlers
= 7foobar.org.apache.juli.FileHandler

would work (including the configuration for the 7foobar... handler.

If you are getting these messages already in a log file, they should be
including the name of the logger already (which includes the magic
incantation you'll need to use for the part before .handlers in your
logging.properties configuration.

Does this really capture use of System.out and System.err? Cool! I
didn't know that!

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

iEYEARECAAYFAkhbvboACgkQ9CaO5/Lv0PDOqQCfbvKJQ1G8Nvbj8hxS2bgRHmLP
mC4AniV0lMb1aj+5JMhejzILwlkgKAi2
=/9nZ
-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: JSESSIONID doesn't contain the port

2008-06-20 Thread Leon Rosenberg
On Fri, Jun 20, 2008 at 4:16 PM, Christopher Schultz
[EMAIL PROTECTED] wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Zsolt,

 Zsolt Koppany wrote:
 | Our customer has two tomcats because one instance is the production
 version
 | of our application and the second one is a test instance of the new
 version
 | of the same application. Because of that the context-pathes are the same.

 How do you know where the first request (say, to http://host/theApp)
 should go -- production or test? This seems like a weird configuration.
 Can you explain it a little more?


http://host:8000/theApp vs http://host:8080/theApp or whatever ports
he uses? :-)
Leon

-
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 contexts with multiple / in path attribute

2008-06-20 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:[EMAIL PROTECTED]
 Subject: Re: Logging contexts with multiple / in path attribute

 Does this really capture use of System.out and System.err? Cool! I
 didn't know that!

Isn't that just a result of setting swallowOutput to true for the Context?

 - 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: very large catalina logfile...

2008-06-20 Thread Bruno Vilardo
If it was Linux or Unix, or could use the command split to split the file in
small pieces so that you can read.

Not so sure on windows env.

Just my 2 cents...




On Fri, Jun 20, 2008 at 10:55 AM, Caldarale, Charles R 
[EMAIL PROTECTED] wrote:

  From: Zaher Srour [mailto:[EMAIL PROTECTED]
  Subject: Re: very large catalina logfile...
 
  Am running a Java (5.0 update 6) web application on a MS
  server 2003 SE SP2.

 Try this:
 http://www.hhdsoftware.com/Products/home/hex-editor-free.html

 I haven't tried it with anything as big as 23 GB, but I have successfully
 used it with files somewhat larger than process virtual space.

 (Neither I nor Unisys have any affiliation with the above company.)

 I don't think there's any straightforward means of configuring JULI to
 create rolling log files, but you could switch to log4j and do that in the
 future.

  - 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: Validation

2008-06-20 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Emerson,

emerson cargnin wrote:
| I saw that in the server.xml web.xml validation is disabled. And with
| the comment:
|
| Note: XML Schema validation will not work with Xerces 2.2
|
| The thing is, I can't see any xerces library inside tomcat. I have
| xerces 2.4 on my app, but I believe it doesn't matter my webapp lib.

Xerces might be bundled with your JRE. I have Sun 1.5.0_13-b05 on
GNU/Linux, and I can see that:

SAXParser is implemented by class
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl
DocumentBuilder is implemented by class
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl

This looks like a re-packaged version of Xerces. I couldn't poke at the
org.apache.xerces.impl.Version (or even
com.sun.org.apache.xerces.impl.Version) to gee what version is being
used. This page
(http://java.sun.com/j2se/1.5.0/docs/guide/xml/jaxp/JAXP-Compatibility_150.html)
suggests that the 1.5 implementation includes a JAXP implementation
based on Apache Xerces, but doesn't mention which version or what
changes they made :(

| Even in examples webapp it fails
|
| 13-Jun-2008 14:06:05 org.apache.catalina.core.StandardContext start
| SEVERE: Context [/examples] startup failed due to previous errors
| java.lang.NullPointerException
| at
org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl.getBuiltInDV(Unknown
| Source)

This fails when you enable validation in the Host that contains the
exmaples webapp? Hmm... you may be running into the will not work with
Xerces 2.2 problem.

If you're concerned about your webapp matching the schema, then you
could always run your web.xml file through another tool that will
validate it separately from the deployment. It's non-ideal, but at least
it should work.

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

iEYEARECAAYFAkhbxVoACgkQ9CaO5/Lv0PAbZwCgi8LD0vXJhot60ALPFDwh55Ln
LMoAoJG6XL5di3YDLNv66/H7DYy7JNLm
=Hwvh
-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: JSESSIONID doesn't contain the port

2008-06-20 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Leon,

Leon Rosenberg wrote:
| http://host:8000/theApp vs http://host:8080/theApp or whatever ports
| he uses? :-)

Oh, right. Duh!

Yeah... I think he's kinda screwed.

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

iEYEARECAAYFAkhbxa4ACgkQ9CaO5/Lv0PCSDACfWIDaM7zj2z9co0ZBCz8ml7FC
jwEAnRP0/CNIIBPbPJ/qGoF7ridudsuj
=tskU
-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: very large catalina logfile...

2008-06-20 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Bruno,

Bruno Vilardo wrote:
| If it was Linux or Unix, or could use the command split to split the
file in
| small pieces so that you can read.

'split' is a GNU utility (part of coreutils) which is not specific to
GNU/Linux. There are windows versions of them as well:

http://gnuwin32.sourceforge.net/packages.html
or
http://unxutils.sourceforge.net/

That last one seems defunct, which is a shame since I've used those
utilities myself many times. :(

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

iEYEARECAAYFAkhbxxIACgkQ9CaO5/Lv0PDf6gCgvuv8q17S8AYvIwD6E+fM5p13
OnIAnR3JV2LpID6lbuvsnhHPgIeQ8k7G
=v1QE
-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: very large catalina logfile...

2008-06-20 Thread Bruno Vilardo
Cris,

Thanks a lot for the information. I will download the softwares and play
around.

Great tips are always welcome as well as great explanation..

Thanks a lot,
Best Regards,

Bruno

On Fri, Jun 20, 2008 at 12:04 PM, Christopher Schultz 
[EMAIL PROTECTED] wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Bruno,

 Bruno Vilardo wrote:
 | If it was Linux or Unix, or could use the command split to split the
 file in
 | small pieces so that you can read.

 'split' is a GNU utility (part of coreutils) which is not specific to
 GNU/Linux. There are windows versions of them as well:

 http://gnuwin32.sourceforge.net/packages.html
 or
 http://unxutils.sourceforge.net/

 That last one seems defunct, which is a shame since I've used those
 utilities myself many times. :(

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

 iEYEARECAAYFAkhbxxIACgkQ9CaO5/Lv0PDf6gCgvuv8q17S8AYvIwD6E+fM5p13
 OnIAnR3JV2LpID6lbuvsnhHPgIeQ8k7G
 =v1QE
 -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: Tomcat 5.5 hanging locked thread

2008-06-20 Thread Olivier Fourel


 The threads you extracted look perfectly normal - they're in the thread
 pool, waiting for requests to show up.  You need to be looking at the other
 threads that may be stuck or looping somewhere else.  If you have database
 connections, make sure those are functional and not all consumed by threads
 failing to close them.

  - Chuck


Thank you for your answer, i thought the locked keyword was indicating a
lockedk thread as in tle lines below


at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
- locked 0x2aaabbd271c0 (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)


I have no other lock description in my thread dump.


RE: Tomcat 5.5 hanging locked thread

2008-06-20 Thread Peter Crowther
 From: Olivier Fourel [mailto:[EMAIL PROTECTED]
 I have no other lock description in my thread dump.

But you may still have stuck threads, for example waiting on database 
connections.  Not all sources of waiting threads require a lock.

- 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 5.5 hanging locked thread

2008-06-20 Thread Caldarale, Charles R
 From: Olivier Fourel [mailto:[EMAIL PROTECTED]
 Subject: Re: Tomcat 5.5 hanging  locked thread

 i thought the locked keyword was indicating a
 lockedk thread as in tle lines below

In order to do an Object.wait() call, the thread must first synchronize on 
(lock) the object of interest, so what you're seeing is perfectly normal for an 
idle thread from the pool.

 I have no other lock description in my thread dump.

As Peter asked, what else do you have in the thread dump?

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



Mapping a file to a URL pattern on Tomcat?

2008-06-20 Thread Vinay Chilakamarri
Hi,

 I want to send a response(which is basically a file on the disk) to a
 specific URL pattern. While I know that we could do this using directives in
 Apache HTTPD, I am not sure how to do this on Tomcat. I could see that we
 can map Servlets to a URL pattern. Is there a way that we can map a file
 directly like this, without having to write a servlet as such?

 Thanks.



How to turn off Etag headers?

2008-06-20 Thread Dave Girardin
Group,

I'm a Unix admin working on a Solaris 8 server running Tomcat 6.0.16. No
other apps run on the server, for example, there is no Apache httpd running.
I have been tasked with turning off Etag headers. Our security folks have
supposedly identified this security vulnerability, note that is says Apache
but it's really Tomcat:

Vulnerability Identified: Apache ETag Header Information Disclosure Weakness

Severity: Low

Description: A cache management feature is available for Apache that makes
use of an entity tag (ETag) header. When this option is enabled and a
request is made for a document relating to a file, for caching purposes, an
ETag response header is returned containing various file attributes. A
weakness has been found in the generation of ETag headers under certain
configurations implementing the FileETag directive.

Impact: Among the file attributes included in the header is the file inode
number that is returned to a client. This poses a security risk, as this
information may aid in launching attacks against other network-based
services. For instance, NFS uses inode numbers to generate file handles.

Recommendation: Disable ETag headers. Apache 1.3.22 and earlier are not
configurable to disable the use of inodes in ETag headers. Default behavior
in later versions will still release this sensitive information. OpenBSD has
released a patch that addresses this issue. Inode numbers returned from the
server are now encoded using a private hash to avoid the release of
sensitive information

Can anyone tell me how to disable the ETag headers? I have searched the
documentation and sorry if it's there I missed it.

Thanks!!

David


Re: Logging for Dummies in Tomcat 5.5/6.0

2008-06-20 Thread Mark Thomas

André Warnier wrote:
To attempt a summary of the discussions so far, it sems that there are 
two distinct groups : Tomcat developers, and Tomcat users,


There might be two lists but I don't think it is quite that simple. The
standard ASF definitions can be found here
http://www.apache.org/foundation/how-it-works.html#roles

The developers seem to be happy with the logging and its documentation 
as it is, and consider it clear, or at least accessible.  The users, as 
far as I can tell from the correspondence I receive, generally have a 
different opinion.


This is less a user/developer(actually committer in ASF terms) issue and
more one how complex your environment is. For the simple environments, the
Tomcat 4 appeared to be fine although often there were some nasty memory
leaks hiding in the background. For the complex ones there was a world of
pain trying to get logging configured. There were often instances of the
logs for webapp A being logged to webapp B. The root causes of this were
many. Take a look at the dev archive and/or Bugzilla if you want more info.

I believe that the difference of opinions rests basically on the 
following : at some point in time, the developers of Tomcat - who it 
should be remembered do this for free - decided that maintaining 
Tomcat's own logging mechanism wasn't really worth their time and 
efforts, considering that there existed already a couple of external 
libraries (packages?) which did the job better anyway.


This is not correct. I encourage you to read the code, or at least the
build.properties.default file, before making such assertions. TC4 to TC6 
all use commons logging.


They thus split 
that part off, allowing them to concentrate on more interesting and 
rewarding parts of the code.


Also not true. The TC4 logging simply wasn't up to the job. See above.

And they have no intention of moving back. 


Absolutely. You are not goign to find any committer prepared to replace a 
working logging system with a broken one.


Them being the developers of a product offered free of charge, nobody 
can or should discuss their decision or blame them for it.


Anyone is free to join the developers list and discuss ways of improving
the code. It helps a lot if you are prepared to roll up your sleeves and
contribution bug reports, test cases or patches (to code or documentation).

What I personally believe they forgot at that point, is that there are 
many users of Tomcat who are not pure Java or Tomcat developers; that 
these users, having acquired over time a reasonable understanding of how 
to use Tomcat - if not necessarily how it works inside - now suddenly 
are faced with the need to get acquainted with a whole bunch of things 
of which they do not have a clue (commons-logging, juli, log4j), which 
per se do not really interest them (because they are not mainly Java 
developers) and which by themselves require quite an investment in time 
in order to start understanding how they work.


In this case bits needed to be replaced so it actually worked. Along the 
way the configuration process was changed. Given the choice between the old 
and the new, I'd take the implementation that actually works every time.


snip/

I don't think I need to continue.  Mere Tomcat users will understand 
what I mean, and Tomcat developers can imagine what the average bloke 
using Tomcat occasionally, thinks when he stumbles upon this.
(And yes, it is from a particular packaging of Tomcat, but that's not 
the point here; the official one is not simpler).


Different people will have different views on the simplicity of the 
logging. If all you want to do is make a small change I don't think there 
is much difference. If you want to understand it, TC4 looks simpler but the

class-loading complexities which are not at all obvious at first glance (or
after several hours pouring over the code) will come back to bite you when 
you think you understand what is going on.


Now above I am playing somewhat dumb, because since this thread started, 
I have already started to understand some aspects of the above.
But even with this increased understanding, my basic feeling about it 
remains that it looks like a gigantic overkill and waste of time 
compared to the needs - and time available for this - of most Tomcat users.
To look at it another way, by making this change, and for most simple 
cases, one has replaced 3 lines inserted in server.xml or context.xml, 
by hundreds of lines all over the place (I am counting the docs, 
because they are needed now, and they were not before).
I can imagine on the other hand that for developers this might be an 
immense improvement, but again that's not the point here.


You need to get it out of your head the this was done for the benefit of
anyone but the users. The changes were made for the benefit of users so
that we had a logging system that worked.

I will continue to study it of course, because I have no choice if I 
want to twiddle ever so slightly 

RE: How to turn off Etag headers?

2008-06-20 Thread Caldarale, Charles R
 From: Dave Girardin [mailto:[EMAIL PROTECTED]
 Subject: How to turn off Etag headers?

 Impact: Among the file attributes included in the header
 is the file inode number that is returned to a client.

Although paranoia is often helpful when analyzing security risks, I think your 
assessment team may have gone overboard on this one.  Looking at the source 
code for DefaultServlet and ResourceAttributes, only a weak ETag is normally 
sent out, consisting of nothing but the file size and last modified time - 
unlike httpd, it does not include the inode number.  There is provision for a 
more detailed ETag (a strong ETag), but as far as I can tell, no use is made of 
it.

There are three spots is in DefaultServlet that set the ETag header, and none 
of them appear to be configurable; if your security team insists on disabling 
ETags, it would be simple to just comment out those three lines.

There's a related article here:
http://blog.bcarlso.net/articles/2007/10/19/tomcat-weak-etags-and-javascript-css-caching
but the examples given contain several errors, so take it with a grain of salt.

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



Getting Tomcat 6 to compile JSP with Java 1.6

2008-06-20 Thread Johannes Schmidt
Hello,

I have just spent 4+ hours trying to get Tomcat 6(.0.14) to compile my
JSPs with Java 1.6.  I have googled, found some things and tried, but
have had no luck getting it to work.

I found a page with instructions on getting Tomcat 5.5 running with
Java 1.5 (a page linked to from several posts in the archives of this
list): 
http://blog.taragana.com/index.php/archive/how-to-run-javac-15-or-beyond-compiler-for-jsp-compilation-in-tomcat-55-with-generics-enabled-and-other-15-only-features/

I adapted the instructions for Tomcat 6.  Here's what I did:
* Copy tools.java from $JAVA_HOME/lib to $CATALINA_HOME/lib
* Renamed jasper-compiler-jdt.jar to jasper-compiler-jdt.jar.old
* Installed the latest binary version of ANT
* Copied ant.jar from the Ant distribution to $CATALINA_HOME/lib
* Edited $CATALINA_HOME/conf/web.xml, so that the JSP servlet has the
compilerSourceVM and compilerTargetVM init parameters set:

   servlet
servlet-namejsp/servlet-name
servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
init-param
param-namefork/param-name
param-valuefalse/param-value
/init-param
init-param
param-namecompilerSourceVM/param-name
param-value1.5/param-value
/init-param
init-param
param-namecompilerTargetVM/param-name
param-value1.5/param-value
/init-param
init-param
param-namexpoweredBy/param-name
param-valuefalse/param-value
/init-param
load-on-startup3/load-on-startup
/servlet


Furthermore, the Tomcat 6 Jasper How-To at
http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html , in the
last paragraph of the Configuration section states that to use Ant
instead of the standard Eclipse JDT compiler, I need use the javac
argument to catalina.sh.

I have done this.  However, whenever I try to get tomcat to compile a
JSP, I get errors -- it actually alternates (irregularly) between two
errors.

The relevant parts of the error messages (I'm including the full
errors at the bottom of this message, but for readability abbreviating
them here):

Error 1:

root cause

java.lang.NullPointerException

org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:167)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
au.com.netek.clubs.servlet.Servlet.displayJSPDirect(Servlet.java:118)


Error 2:

root cause

org.apache.jasper.JasperException: Unable to load class for JSP

org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:600)

org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:144)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
au.com.netek.clubs.servlet.Servlet.displayJSPDirect(Servlet.java:118)



In case it makes a big difference, I'm running:

* CentOS 4 (RHEL equivalent;  64-bit x86)
* jdk 1.6.0_02
* Tomcat 6.0.14 (as previously mentioned)

I doubt that it makes a difference, but I'm running Tomcat as a
service.  The following environment variables are set before Tomcat is
started:
export JAVA_HOME=/usr/java/jdk1.6/
export CATALINA_HOME=/usr/local/tomcat
export CATALINA_OPTS=-javac
export JRE_HOME=/usr/java/jdk1.6/
export ANT_HOME=/usr/local/ant
export PATH=${ANT_HOME}/bin:${PATH}:


As far as I can tell, I have followed all of the instructions correctly.

Can anybody suggest anything that
- I've done wrong, based on these instructions;
- is wrong with these instructions; and/or
- has nothing to do with these instructions, but might give me what I want?


In terms of Java 1.5 vs 1.6, I don't care which I get.  I just want to
be able to use generics in my JSPs, since I'm using them in my
servlets, and want the JSPs to be able to handle them neatly.

Thanks very much if you bothered to read this far, and thanks in
advance for any help!

Hopefully someone will know what I need to do :-)

Cheers,
Johannes.






**
Full Error 1:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that 

Re: Logging contexts with multiple / in path attribute

2008-06-20 Thread Jonathan Mast
Turns out the multiple / in the context path wasn't a problem.  However, its
not capturing the System.out and System.err associated with the webapps.
An empty file is created, but the System. stuff keeps going to
Catalina.out.  And i've set the swallowOutput attribute to true, so that
functionality isn't working either.

And it's not a issue with the multiple / , I have a single / context path
which I know for certain is throwing errors.  I changed it to also log
individually but it too just generates a an empty file.

I'm using Tomcat 5.5.17 on Linux.

I've added AccessLogValves to several of my webapps and they work great, too
bad no one has developed a SystemErrorLogValve.

The java.util.logging section of
http://tomcat.apache.org/tomcat-5.5-doc/logging.html seems to indicate that
it is possible to capture the System.out stuff to separate files, but
apparently this isn't working.

The log4j section of the same page seems rather daunting, and I don't know
if that will work either.


On Fri, Jun 20, 2008 at 10:39 AM, Caldarale, Charles R 
[EMAIL PROTECTED] wrote:

  From: Christopher Schultz [mailto:[EMAIL PROTECTED]
  Subject: Re: Logging contexts with multiple / in path attribute
 
  Does this really capture use of System.out and System.err? Cool! I
  didn't know that!

 Isn't that just a result of setting swallowOutput to true for the
 Context?

  - 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: Getting Tomcat 6 to compile JSP with Java 1.6

2008-06-20 Thread Caldarale, Charles R
 From: Johannes Schmidt [mailto:[EMAIL PROTECTED]
 Subject: Getting Tomcat 6 to compile JSP with Java 1.6

 I have just spent 4+ hours trying to get Tomcat 6(.0.14) to compile my
 JSPs with Java 1.6.  I have googled, found some things and tried, but
 have had no luck getting it to work.

I think you're trying too hard.  Tomcat 6 compiles JSPs using 1.5 syntax right 
out of the box, with no changes.  You don't need to rename anything, configure 
anything, or toss the magic crystals anywhere.  I'd suggest starting over with 
a clean Tomcat installation and see if it works before you start changing 
things.

 http://blog.taragana.com/index.php/archive/how-to-run-javac-15-or-beyond-compiler-for-jsp-compilation-in-tomcat-55-with-generics-enabled-and-other-15-only-features/

Note the date on that blog entry: it's over three years old, and pretty much 
completely irrelevant now.  It did have meaning with the early releases of 5.5, 
but reality bypassed it long ago.

 - 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: Getting Tomcat 6 to compile JSP with Java 1.6

2008-06-20 Thread Johannes Schmidt
2008/6/21 Caldarale, Charles R [EMAIL PROTECTED]:
 From: Johannes Schmidt [mailto:[EMAIL PROTECTED]
 Subject: Getting Tomcat 6 to compile JSP with Java 1.6

 I have just spent 4+ hours trying to get Tomcat 6(.0.14) to compile my
 JSPs with Java 1.6.  I have googled, found some things and tried, but
 have had no luck getting it to work.

 I think you're trying too hard.  Tomcat 6 compiles JSPs using 1.5 syntax 
 right out of the box, with no changes.  You don't need to rename anything, 
 configure anything, or toss the magic crystals anywhere.  I'd suggest 
 starting over with a clean Tomcat installation and see if it works before you 
 start changing things.



Well, aren't I quite the idiot?  Sorry for wasting your time, but
thanks very much for responding!  Goes to show I shouldn't do these
things when I'm exhausted.

I've reverted to the standard configuration.

I've also just realised that the original error that sparked my
ill-founded investigation had nothing to do with generics, except
insofar as I removed a bunch of casts when I updated some HashMaps to
use generics, and  in the process accidentally removed a cast from a
request.getAttribute() call.

Again, apologies for the time wasting (believe me, I really am sorry
that I wasted so much time -- I've been up all night -- it's almost 6
am here now).

Next time I'll sleep first, and ask questions the next day, if I still
can't solve them.

Cheers,
Johannes.

-
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: Getting Tomcat 6 to compile JSP with Java 1.6

2008-06-20 Thread Caldarale, Charles R
 From: Johannes Schmidt [mailto:[EMAIL PROTECTED]
 Subject: Re: Getting Tomcat 6 to compile JSP with Java 1.6

 Again, apologies for the time wasting (believe me, I really am sorry
 that I wasted so much time -- I've been up all night -- it's almost 6
 am here now).

No apologies necessary.  I think we've all been in that place...

 - 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: Mapping a file to a URL pattern on Tomcat?

2008-06-20 Thread Youssef Mohammed
any static file in your WAR can be accessed thru a URL

eg.   the file.png in the root directory in you site.war can be accessed
thru http://localhost:8080/site/file.png





On Fri, Jun 20, 2008 at 7:49 PM, Vinay Chilakamarri 
[EMAIL PROTECTED] wrote:

 Hi,
 
  I want to send a response(which is basically a file on the disk) to a
  specific URL pattern. While I know that we could do this using directives
 in
  Apache HTTPD, I am not sure how to do this on Tomcat. I could see that we
  can map Servlets to a URL pattern. Is there a way that we can map a file
  directly like this, without having to write a servlet as such?
 
  Thanks.
 




-- 
Regards, Youssef


Re: How to turn off Etag headers?

2008-06-20 Thread Youssef Mohammed
if you are running behind apache .. you can turn that off using the
mod_headers ... you can unset any headers then.

On Fri, Jun 20, 2008 at 8:37 PM, Dave Girardin [EMAIL PROTECTED] wrote:

 Group,

 I'm a Unix admin working on a Solaris 8 server running Tomcat 6.0.16. No
 other apps run on the server, for example, there is no Apache httpd
 running.
 I have been tasked with turning off Etag headers. Our security folks have
 supposedly identified this security vulnerability, note that is says Apache
 but it's really Tomcat:

 Vulnerability Identified: Apache ETag Header Information Disclosure
 Weakness

 Severity: Low

 Description: A cache management feature is available for Apache that makes
 use of an entity tag (ETag) header. When this option is enabled and a
 request is made for a document relating to a file, for caching purposes, an
 ETag response header is returned containing various file attributes. A
 weakness has been found in the generation of ETag headers under certain
 configurations implementing the FileETag directive.

 Impact: Among the file attributes included in the header is the file inode
 number that is returned to a client. This poses a security risk, as this
 information may aid in launching attacks against other network-based
 services. For instance, NFS uses inode numbers to generate file handles.

 Recommendation: Disable ETag headers. Apache 1.3.22 and earlier are not
 configurable to disable the use of inodes in ETag headers. Default behavior
 in later versions will still release this sensitive information. OpenBSD
 has
 released a patch that addresses this issue. Inode numbers returned from the
 server are now encoded using a private hash to avoid the release of
 sensitive information

 Can anyone tell me how to disable the ETag headers? I have searched the
 documentation and sorry if it's there I missed it.

 Thanks!!

 David




-- 
Regards, Youssef


RE: How to turn off Etag headers?

2008-06-20 Thread Caldarale, Charles R
 From: Youssef Mohammed [mailto:[EMAIL PROTECTED]
 Subject: Re: How to turn off Etag headers?

 if you are running behind apache ..

Did you read the original message?

  No other apps run on the server, for example, there
  is no Apache httpd running.

 - 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: How to turn off Etag headers?

2008-06-20 Thread Youssef Mohammed
On Sat, Jun 21, 2008 at 1:12 AM, Caldarale, Charles R 
[EMAIL PROTECTED] wrote:

  From: Youssef Mohammed [mailto:[EMAIL PROTECTED]
  Subject: Re: How to turn off Etag headers?
 
  if you are running behind apache ..

 Did you read the original message?


Sorry I missed that. So doing that thought a filter would be the way to go.
Although I don't really see a point on not having apache in a real
deployment.



   No other apps run on the server, for example, there
   is no Apache httpd running.

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




-- 
Regards, Youssef


RE: How to turn off Etag headers?

2008-06-20 Thread Caldarale, Charles R
 From: Youssef Mohammed [mailto:[EMAIL PROTECTED]
 Subject: Re: How to turn off Etag headers?

 Although I don't really see a point on not having apache in a real
 deployment.

Because adding httpd makes things slower.  Read the recent threads about 
performance comparisons.

 - 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: How to turn off Etag headers?

2008-06-20 Thread Youssef Mohammed
On Sat, Jun 21, 2008 at 1:29 AM, Caldarale, Charles R 
[EMAIL PROTECTED] wrote:

  From: Youssef Mohammed [mailto:[EMAIL PROTECTED]
  Subject: Re: How to turn off Etag headers?
 
  Although I don't really see a point on not having apache in a real
  deployment.

 Because adding httpd makes things slower.  Read the recent threads about
 performance comparisons.


no way !  well at least in your apps a major bank in the region. we have
done extensive tests and we got 10% - 20% performance gain.
from IT prespecitve , it is much better to have httpd as proxy for all your
web apps inside your enterprise.



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




-- 
Regards, Youssef


Re: How to turn off Etag headers?

2008-06-20 Thread Youssef Mohammed
corrected

On Sat, Jun 21, 2008 at 1:44 AM, Youssef Mohammed 
[EMAIL PROTECTED] wrote:

 On Sat, Jun 21, 2008 at 1:29 AM, Caldarale, Charles R 
 [EMAIL PROTECTED] wrote:

  From: Youssef Mohammed [mailto:[EMAIL PROTECTED]
  Subject: Re: How to turn off Etag headers?
 
  Although I don't really see a point on not having apache in a real
  deployment.

 Because adding httpd makes things slower.  Read the recent threads about
 performance comparisons.


 no way !  well at least in our apps a major bank in the region. we have
 done extensive tests and we got 10% - 20% performance gain.
 from IT prespecitve , it is much better to have httpd as proxy for all your
 web apps inside your enterprise.



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




 --
 Regards, Youssef




-- 
Regards, Youssef


RE: How to turn off Etag headers?

2008-06-20 Thread Caldarale, Charles R
 From: Youssef Mohammed [mailto:[EMAIL PROTECTED]
 Subject: Re: How to turn off Etag headers?

 no way !  well at least in our apps a major bank in the
 region. we have done extensive tests and we got 10% - 20%
 performance gain.

Since you're dealing with banking information, I suspect much of your traffic 
is via SSL.  Turn on the APR connector in Tomcat with OpenSSL and try the 
measurements again.  The pure Java connector is definitely slower than the 
httpd/APR one for doing encryption.

 - 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: How to turn off Etag headers?

2008-06-20 Thread Youssef Mohammed
  no way !  well at least in our apps a major bank in the
  region. we have done extensive tests and we got 10% - 20%
  performance gain.

 Since you're dealing with banking information, I suspect much of your
 traffic is via SSL.  Turn on the APR connector in Tomcat with OpenSSL and
 try the measurements again.  The pure Java connector is definitely slower
 than the httpd/APR one for doing encryption.


we are using seperate hardware to do SSL (SSL offloaders) , we are moving
the static content on any web app into apache so it won't need to go to
tomcat to fitch that and here we get the gain.

look Charles , I am really open to get rid of httpd (it is not my cousin
anyway!) but i need to be convinced.

Note also that commertial application servers (namely WSAD and Oracle ) do
come with httpd  infront of thier app server.


Re: How to turn off Etag headers?

2008-06-20 Thread Youssef Mohammed
correction gain ! WAS not WSAD.


On Sat, Jun 21, 2008 at 1:58 AM, Youssef Mohammed 
[EMAIL PROTECTED] wrote:


  no way !  well at least in our apps a major bank in the
  region. we have done extensive tests and we got 10% - 20%
  performance gain.

 Since you're dealing with banking information, I suspect much of your
 traffic is via SSL.  Turn on the APR connector in Tomcat with OpenSSL and
 try the measurements again.  The pure Java connector is definitely slower
 than the httpd/APR one for doing encryption.


 we are using seperate hardware to do SSL (SSL offloaders) , we are moving
 the static content on any web app into apache so it won't need to go to
 tomcat to fitch that and here we get the gain.

 look Charles , I am really open to get rid of httpd (it is not my cousin
 anyway!) but i need to be convinced.

 Note also that commertial application servers (namely WSAD and Oracle ) do
 come with httpd  infront of thier app server.






-- 
Regards, Youssef


Re: Keep getting this error

2008-06-20 Thread Bill Barker

Mathias P.W Nilsson [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]

 Don't know how to get rid of this


Don't take so long to generate the page that your users get bored and move 
on to utube ;)?

Seriously, the error is that the user has moved on to a different page (e.g. 
clicking on a different link) before the page is fully loaded.  The browser 
no longer wants the original page, so closes the Socket, and you get this 
exception.  Tomcat throws it's own special ClientAbortException so that it 
knows not to log the exception, but that doesn't prevent your Servlets 
and/or Filters logging it.  I'm guessing that Youssef is right, and that it 
is Spring that is logging the exception.  But it isn't clear from the log 
extract who is logging it.


 :844)
at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
 ss(Http11Protocol.java:583)
at
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
 7)
at java.lang.Thread.run(Thread.java:619)
 Caused by: java.net.SocketException: Connection reset by peer: socket 
 write
 erro
 r
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
 java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
 com.sun.net.ssl.internal.ssl.OutputRecord.writeBuffer(OutputRecord.ja
 va:295)
at
 com.sun.net.ssl.internal.ssl.OutputRecord.write(OutputRecord.java:284
 )
at
 com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecordInternal(SSLSoc
 ketImpl.java:734)
at
 com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.
 java:722)
at
 com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.ja
 va:59)
at
 org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(Internal
 OutputBuffer.java:737)
at
 org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349)
at
 org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffe
 r.doWrite(InternalOutputBuffer.java:761)
at
 org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(Identit
 yOutputFilter.java:118)
at
 org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputB
 uffer.java:570)
at org.apache.coyote.Response.doWrite(Response.java:560)
at
 org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffe
 r.java:353)
... 28 more
 ClientAbortException:  java.net.SocketException: Connection reset by peer:
 socke
 t write error
at
 org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffe
 r.java:358)
at
 org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349)
at
 org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.ja
 va:381)
at
 org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:37
 0)
at
 org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputSt
 ream.java:89)
at
 se.edgesoft.hairless.web.resource.FileResourceServlet.doGet(FileResou
 rceServlet.java:74)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
 icationFilterChain.java:290)
at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
 ilterChain.java:206)
at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.ja
 va:234)
at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
 icationFilterChain.java:235)
at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
 ilterChain.java:206)
at
 org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doF
 ilterInternal(OpenEntityManagerInViewFilter.java:111)
at
 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
 equestFilter.java:75)
at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
 icationFilterChain.java:235)
at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
 ilterChain.java:206)
at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
 alve.java:233)
at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
 alve.java:175)
at
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
 torBase.java:525)
at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
 ava:128)
at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
 ava:102)
at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
 ve.java:109)
   

Tomcat Connection Pooling - wait_timeout

2008-06-20 Thread Thomas Haines

Hello

I am experiencing a reproducible problem with connection pooling in  
Tomcat, although I suspect it is not a Tomcat issue per se.


I am running:
mysql server 5.0.58
tomcat 6.0.16
mysql connector 5.1.6
java version 1.5.0_13
all on CentOS 5

The following error occurs when there has been no activity between the  
DB and Tomcat for some period of time:


ERROR (21-06-08 07:59) [servlets.ViewEmail]
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last  
packet successfully received from the server was 46859 seconds ago.The  
last packet sent successfully to the server was 46859 seconds ago,  
which  is longer than the server configured value of 'wait_timeout'.  
You should consider either expiring and/or testing connection validity  
before use in your application, increasing the server configured  
values for client timeouts, or using the Connector/J connection  
property 'autoReconnect=true' to avoid this problem.
	at sun.reflect.GeneratedConstructorAccessor17.newInstance(Unknown  
Source)
	at  
sun 
.reflect 
.DelegatingConstructorAccessorImpl 
.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
	at  
com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java: 
1074)

at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3246)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1917)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
	at  
com 
.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java: 
1734)
	at  
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java: 
1885)
	at  
org 
.apache 
.tomcat 
.dbcp 
.dbcp 
.DelegatingPreparedStatement 
.executeQuery(DelegatingPreparedStatement.java:93)
	at com.ghf.util.MailoutUtils.getRecipientbyChecksum(MailoutUtils.java: 
123)
INFO  (21-06-08 08:01) [servlets.ViewEmail] :  View email request  
successfully processed
INFO  (21-06-08 08:02) [servlets.ViewEmail] :  View email request  
successfully processed



At this juncture, I am unsure how to remedy this.  My only two  
thoughts are to either:


a) downgrade to MySQL Connector/J 5.0.8 and see if this fixes it;
b) add a while (!verified  attempts2) type loop in getConnection()  
method to query the DB using a minimal query and then catch the first  
dead connection.


I'm not overly keen on introducing the additional overhead of querying  
the DB just to check if it is valid every time a request is made for a  
connection.  Does anyone have any thoughts on how I might debug/solve  
this issue?  I've searched widely on Google to no avail.   
Interestingly, there is another instance of tomcat communicating with  
MySQL on the machine, exactly the same configuration, that doesn't  
suffer these woes.  Any help would be appreciated!


Tom

Other relevant snippets:
META-INF/context.xml:
?xml version=1.0 encoding=UTF-8?
Context path=/dyn
Resource name=jdbc/ghip auth=Container
type=javax.sql.DataSource
maxActive=50
maxIdle=5
maxWait=1
username=**
password=**
driverClassName=com.mysql.jdbc.Driver
removeAbandoned=true
removeAbandonedTimeout=180
url=jdbc:mysql://localhost:3306/ghip?autoReconnect=true
/
/Context


DBPool.java exert:
/**
 * Method getConnection.
 * @return Connection New connection from the pool
 */
public static Connection getConnection() {

Connection conn = null;

try {
Context ctx = (Context) new 
InitialContext().lookup(java:comp/env);
conn = ((DataSource) ctx.lookup(jdbc/ghip)).getConnection();
}
catch (Exception e) {
e.printStackTrace(System.err);
}

return conn;
}


-
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 Connection Pooling - wait_timeout

2008-06-20 Thread Youssef Mohammed
people were suffering from this exception in hibernate forums, it was
suggested to switch from DBCP to c3po.
Note also that the config you provided is not using any pooling at all.
Datasources are not pooled by default.


On Sat, Jun 21, 2008 at 8:18 AM, Thomas Haines 
[EMAIL PROTECTED] wrote:

 Hello

 I am experiencing a reproducible problem with connection pooling in Tomcat,
 although I suspect it is not a Tomcat issue per se.

 I am running:
 mysql server 5.0.58
 tomcat 6.0.16
 mysql connector 5.1.6
 java version 1.5.0_13
 all on CentOS 5

 The following error occurs when there has been no activity between the DB
 and Tomcat for some period of time:

 ERROR (21-06-08 07:59) [servlets.ViewEmail]
 com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet
 successfully received from the server was 46859 seconds ago.The last packet
 sent successfully to the server was 46859 seconds ago, which  is longer than
 the server configured value of 'wait_timeout'. You should consider either
 expiring and/or testing connection validity before use in your application,
 increasing the server configured values for client timeouts, or using the
 Connector/J connection property 'autoReconnect=true' to avoid this problem.
at sun.reflect.GeneratedConstructorAccessor17.newInstance(Unknown
 Source)
at
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at
 com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3246)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1917)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
at
 com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
at
 com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1885)
at
 org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
at
 com.ghf.util.MailoutUtils.getRecipientbyChecksum(MailoutUtils.java:123)
 INFO  (21-06-08 08:01) [servlets.ViewEmail] :  View email request
 successfully processed
 INFO  (21-06-08 08:02) [servlets.ViewEmail] :  View email request
 successfully processed


 At this juncture, I am unsure how to remedy this.  My only two thoughts are
 to either:

 a) downgrade to MySQL Connector/J 5.0.8 and see if this fixes it;
 b) add a while (!verified  attempts2) type loop in getConnection()
 method to query the DB using a minimal query and then catch the first dead
 connection.

 I'm not overly keen on introducing the additional overhead of querying the
 DB just to check if it is valid every time a request is made for a
 connection.  Does anyone have any thoughts on how I might debug/solve this
 issue?  I've searched widely on Google to no avail.  Interestingly, there is
 another instance of tomcat communicating with MySQL on the machine, exactly
 the same configuration, that doesn't suffer these woes.  Any help would be
 appreciated!

 Tom

 Other relevant snippets:
 META-INF/context.xml:
 ?xml version=1.0 encoding=UTF-8?
 Context path=/dyn
Resource name=jdbc/ghip auth=Container
type=javax.sql.DataSource
maxActive=50
maxIdle=5
maxWait=1
username=**
password=**
driverClassName=com.mysql.jdbc.Driver
removeAbandoned=true
removeAbandonedTimeout=180
url=jdbc:mysql://localhost:3306/ghip?autoReconnect=true
/
 /Context


 DBPool.java exert:
 /**
  * Method getConnection.
  * @return Connection New connection from the pool
  */
 public static Connection getConnection() {

Connection conn = null;

try {
Context ctx = (Context) new
 InitialContext().lookup(java:comp/env);
conn = ((DataSource)
 ctx.lookup(jdbc/ghip)).getConnection();
}
catch (Exception e) {
e.printStackTrace(System.err);
}

return conn;
 }


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




-- 
Regards, Youssef