Re: Transfer all HttpSessions from one cluster node to another

2009-01-28 Thread nlif

Thanks, Chris,

Yes, this is an option, but we prefer being able to offload session at will.
However, if that proves to be too difficult to do, we may settle for the
behavior you describe.

Naaman




Christopher Schultz-2 wrote:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Nilf,
 
 nlif wrote:
 We intend to run in a cluster, with stickiness enabled, and without
 replication. This of course does not give us failover capabilities, in
 case
 of a server crash, but it is sufficient for our needs. 
 
 However, we would like to be able to transfer all sessions currently on
 one
 node, to another node, when we are about to shutdown a server for
 maintenance.
 
 Would it be acceptable to slowly siphon-off all traffic to the server
 you are taking out of service? If so, you can instruct mod_jk to take
 the to-be-removed server out of the pool for new visitors, and simply
 wait for the existing users to eventually die off. Then you can take
 that server out of service and re-join it to the cluster, later.
 
 The advantage of this technique is that it is available /right now/
 without any further infrastructure. The disadvantage, of course, is that
 you can't really do it on-demand: you have to wait for users to die off
 before you can take the server out of service (unless you just kill the
 last few stragglers).
 
 - -chris
 
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
 iEYEARECAAYFAkl/yQMACgkQ9CaO5/Lv0PBSMQCeIjFOV9+H9csskzn9b2JgBVLZ
 npIAoL2HjVaAHHDoiZLHYkfgo3HUURRA
 =Zq0K
 -END PGP SIGNATURE-
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Transfer-all-HttpSessions-from-one-cluster-node-to-another-tp21649886p21701502.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Transfer all HttpSessions from one cluster node to another

2009-01-28 Thread nlif

Filip,

Thanks. If you could elaborate some more, then maybe I can go ahead and
implement this, and I'd be happy to send you the result, so you can use it
and save yourself some of the work.

Naaman



Filip Hanik - Dev Lists wrote:
 
 nlif wrote:
 Hi all,

 We intend to run in a cluster, with stickiness enabled, and without
 replication. This of course does not give us failover capabilities, in
 case
 of a server crash, but it is sufficient for our needs. 

 However, we would like to be able to transfer all sessions currently on
 one
 node, to another node, when we are about to shutdown a server for
 maintenance. This is different from the default behavior of
 session-replication, in that it only happens when we trigger it (e.g. via
 JMX), and with us specifying the source node and destination node.

 Is this supported?
 Has anyone done such a thing?
   
 hi Naaman, while this feature is not currently in place, it's something 
 that has been brewing in the back of my head for a long time.
 It is an extremely useful feature, and its just a matter of time for me 
 to get it implemented.
 
 The simplest way would be to start with the BackupManager, but simple 
 remove the nr of backup nodes and therefore not replicate.
 And then simply implement a move sessions during a graceful shutdown.
 
 Filip
 I would appreciate any tips.

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

-- 
View this message in context: 
http://www.nabble.com/Transfer-all-HttpSessions-from-one-cluster-node-to-another-tp21649886p21701505.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: setting catalina_opts in the windows installer

2009-01-28 Thread André Warnier

offbyone wrote:

I installed tomcat 6.0.18 using the windows installer.  There is no
catalina.sh or catalina.bat to set this variable in.  So what is the best
way to set it?

tomcat6w.exe ?
(This is just off the top of my head. tomcat6w is the GUI program that 
allows to set a number of run-time parameters for the running JVM and 
Tomcat. I don't know if that includes CATALINA_OPTS or its equivalent.)



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



RE: Thread dump analysis

2009-01-28 Thread Pieter Temmerman
Thanks to all for your helpful input.
As a result of trying to reproduce the problem on pre-production
servers, I used JMeter to generate some load.

Let me give some more specific information about the setup.
I have two Tomcat servers: 
  - Tomcat 5.5.7 (jdk 1.5.0_09) (I know, it's old. But this is the
version that is used in production. I don't administer the actual
production server, thus I'm not in the position to upgrade it).
  - Tomcat 6.0.16 (jdk 1.6.0_07)

On Tomcat 6.0 I'm running a webservice which is implemented using XFire
and connects to an Oracle 9i database. On Tomcat 5.5.7 I'm running web
application X which uses the webservice on Tomcat 6.

Normally, what we see on the production server is that Tomcat 5.5 is
hanging (CPU goes to 100%). However, this time when trying to reproduce
on the pre-production servers, it's Tomcat 6 which is going to 100%,
which on his turn makes the webapp on Tomcat 5.5 not to respond.

Ok, so I thought that the webservice on TC 6.0 crashed or something.
So I used SOAPUI to invoke a request to the webservice, just to be sure
whether the webservice was down. Strangely the webservice successfully
answered my request. 

Have you found any java.lang.Thread.State: RUNNABLE threads? They are
usually more interesting if it comes to a high cpu :-)

These are the RUNNABLE threads on Tomcat 6:

RMI TCP Connection(42)-173.x.x.x - Thread t...@112
   java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
- locked java.io.bufferedinputstr...@32c1b3
at java.io.FilterInputStream.read(FilterInputStream.java:66)
at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:517)
at sun.rmi.transport.tcp.TCPTransport
$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport
$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)

   Locked ownable synchronizers:
- locked java.util.concurrent.locks.reentrantlock$nonfairs...@4adf48


NOTE!: There are 6 more of those RMI threads


http-8081-35 - Thread t...@71
   java.lang.Thread.State: RUNNABLE
at java.lang.String.equals(String.java:1018)
at
com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:554)
at
org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:44)
at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at
org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
at
org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
at
org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:304)
at
org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:129)
at
org.codehaus.xfire.transport.http.XFireServlet.doPost(XFireServlet.java:116)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint
$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)

   Locked ownable synchronizers:
- None

http-8081-34 - Thread t...@70
   java.lang.Thread.State: WAITING on
org.apache.tomcat.util.net.jioendpoint$wor...@186f141
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:485)
at org.apache.tomcat.util.net.JIoEndpoint
$Worker.await(JIoEndpoint.java:416)
at 

Re: Thread dump analysis

2009-01-28 Thread Leon Rosenberg
On Wed, Jan 28, 2009 at 10:42 AM, Pieter Temmerman
ptemmerman@sadiel.es wrote:


Have you found any java.lang.Thread.State: RUNNABLE threads? They are
usually more interesting if it comes to a high cpu :-)

 These are the RUNNABLE threads on Tomcat 6:

 RMI TCP Connection(42)-173.x.x.x - Thread t...@112
   java.lang.Thread.State: RUNNABLE

reading from socket, usually not a problem.

 http-8081-35 - Thread t...@71
   java.lang.Thread.State: RUNNABLE
at java.lang.String.equals(String.java:1018)
at
 com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:554)
at
 org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:44)
at
 org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at
 org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
at
 org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
at
 org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:304)
at
 org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:129)
at
 org.codehaus.xfire.transport.http.XFireServlet.doPost(XFireServlet.java:116)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at

This one actually looks like a problem, was the server under load as
you created the dump, or did you removed the load first?
If there were no external requests to the server, you most probably
have an infinite loop somewhere (how stable is xfire anyway?) or you
have a really really really large xml file to parse. If there were
requests to the server as you took the dump, you might just happen to
catch this part of the execution. In this case you should remove the
traffic first and create a dump afterwards (of course only if the load
remains after the traffic is cut off)


 http-8081-31 - Thread t...@67
   java.lang.Thread.State: RUNNABLE
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl
 $PrologDriver.next(XMLDocumentScannerImpl.java:930)
at
 com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at
 com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at
 com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:548)
at
 org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:44)
at
 org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at
 org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
at
 org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
at
 org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:304)
at
 org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:129)
at
 org.codehaus.xfire.transport.http.XFireServlet.doPost(XFireServlet.java:116)


note that the XFire path is almost identical.
Personally I neved managed to catch healthy code in something like
String.equals(), but it may be possible, even imho unlikeable.


 The Tomcat 5.5 webapp which connects to the webservice is not
 responding. I saw the following thread on Tomcat 5.5 which may be the
 connection to the webservice:

 The fact that it's reading from a socket, which I think it the
 connection to the webservice, may explain why the application is not
 doing anything.

Yep


Also, as David posted, what is the HEAP usage? it's usually at the end
of the dump.

 vdebian2:/usr/local/jdk1.6.0_07/bin# ./jmap 8100
 Attaching to process ID 8100, please wait...
 Debugger attached successfully.
 Server compiler detected.
 JVM version is 10.0-b23

 using thread-local object allocation.
 Parallel GC with 2 thread(s)

 Heap Configuration:
   MinHeapFreeRatio = 40
   MaxHeapFreeRatio = 70
   MaxHeapSize  = 1073741824 (1024.0MB)
   NewSize  = 1048576 (1.0MB)
   MaxNewSize   = 4294901760 (4095.9375MB)
   OldSize  = 4194304 (4.0MB)
   NewRatio = 8
   SurvivorRatio= 8
   PermSize = 16777216 (16.0MB)
   MaxPermSize  = 268435456 (256.0MB)

 Heap Usage:
 PS Young Generation
 Eden Space:
   capacity = 58851328 (56.125MB)
   used = 18383664 (17.532028198242188MB)
   free = 40467664 (38.59297180175781MB)
   31.237466722925948% used
 From Space:
   capacity = 327680 (0.3125MB)
   used = 131072 (0.125MB)
   free = 196608 (0.1875MB)
   40.0% used
 To Space:
   capacity = 393216 (0.375MB)
   used = 0 (0.0MB)
   free = 393216 (0.375MB)
   0.0% used
 PS Old Generation
   capacity = 477233152 (455.125MB)
   used = 86499376 (82.49223327636719MB)
   free = 

public IPadresse is non-local

2009-01-28 Thread Mihamina Rakotomandimby (R12y)

Hi,
I have a test box on my LAN.
The internet connexion is shared by a router (linksys box)

I test my application locally thourgh http://localhost;.
But when testing, my application displays:
  RemoteException occurred in server thread; nested exception is:
  java.rmi.AccessException: Registry.Registry.bind disallowed; origin
  /public_ip_adress is non-local host

rmiregistry is just launched and it runs on 1099

The router already NATs to the test box

I found this:
http://www.coderanch.com/t/209942/Distributed-Java/java/RMI-app-behind-NAT-firewall

I use ubuntu packaged Tomcat 6.

I already hacked /etc/default/tomcat6
[...]
JAVA_OPTS=-Djava.awt.headless=true -Xmx512M \
   -Djava.rmi.server.hostname=public_ip_adress
TOMCAT6_SECURITY=no
[...]

No more way?

--
Chef de projet chez Vectoris
http://www.google.com/search?q=mihamina+rakotomandimby


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



Tomcat and OpenSSL 9.8.0j ?

2009-01-28 Thread franziska.olivier
Hi all,

I need a Tomcat version with Open SSL 9.8.0j (came out beginning of January 
2009). Does anyone know when this version of OpenSSL will be integrated in a 
Tomcat distribution? I haven't found any information on this issue on the 
Tomcat-Site.

Thanks in advance for your help!

Franziska

Sicherheitshinweis:
Dieses E-Mail von PostFinance ist signiert. Weitere Informationen finden Sie 
unter: 
https://www.postfinance.ch/e-signature.
Geben Sie Ihre Sicherheitselemente niemals Dritten bekannt.

smime.p7s
Description: S/MIME Cryptographic Signature


logging outgoing requests from Tomcat to SQL

2009-01-28 Thread Gergely Paljak
Hi,

I have encountered the following challenge regarding which I would like to
ask you!

A want to realize a logging system for tomcat that is capable of:
- logging the incoming request for Servlets (easy)
- logging the outgoing SQL queries inside Tomcat while maintaining a mapping
between the requested Servlet and the sent SQL queries
- logging the incoming SQL query results
- and logging the time when the Tomcat response is sent (easy as well)

I would like to ask for you advice on how to log the SQL part? How to match
the SQL queries with Servlets without modifying the Servlet code? Could it
be realized by a valve? I have taken a look at the valves, but I haven't
found anything useful.

All comments are welcome!

Thank you,
Gergely Paljak


Re: does this mod_jk.log look healthy?

2009-01-28 Thread Arne Riecken
Thanks for Your answer.

There are at least two (watchdog) ajp requests through the web server to the
workers every minute, and as i wrote, the ajp connection_pool_timeout ist
600, connectionTimeout in Tomcats server.xml is accordingly 60. So I
cannot image how the web server can be more idle than the pool timeout, even
at busy daytime, where the log messages also occure every few minutes?

We will look forward to upgrade to 1.2.26.


2009/1/27 Rainer Jung rainer.j...@kippdata.de


 Without additional error level messages that's OK. The web server noticed,
 that there was no connection to the backend open and will transparently
 create a new one. This could happen, if your web server is more idle than
 configured with the JK connection pool timeout or Tomcat's
 connectionTimeout.

 You should update to 1.2.27, it's better than 1.2.23 :)




Re: Tomcat and OpenSSL 9.8.0j ?

2009-01-28 Thread Gregor Schneider
AFAIK Tomcat does not include OpenSSL.

If you want to use OpenSSL within Tomcat, you'll need to use the APR
(Apache Portable Runtime) which is using OpenSSL for all SSL-related
requests.

However, you'll need to download the OpenSSL/APR--dev-packages /
sources and compile them.

However, I have no idea if APR compiles with OpenSSL 9.8.0j since I
haven't tried.

For more information on the APR, check out
http://tomcat.apache.org/tomcat-6.0-doc/apr.html

Rgds

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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



Re: Tomcat and OpenSSL 9.8.0j ?

2009-01-28 Thread Markus Schönhaber
franziska.oliv...@postfinance.ch:

 I need a Tomcat version with Open SSL 9.8.0j (came out beginning of
 January 2009). Does anyone know when this version of OpenSSL will be
 integrated in a Tomcat distribution?

Probably never. At least, I don't know of an official Tomcat
distribution that is bundled with OpenSSL.
OTOH: Tomcat's native lib can make use of APR which in turn can make use
of OpenSSL. And there are pre-built binaries which are statically linked
against APR and OpenSSL. If you're asking about those: I don't have the
slightest idea if or when a version linked against the current OpenSSL
version will be made available. But you can always build your own
version of libtcnative. In this case, it might be a good idea to follow
the advice of the Tomcat APR docs and link it dynamically.

Regards
  mks


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



virtual hosts

2009-01-28 Thread Josh Pollara
Does Tomcat support wildcard virtual hosts?

I'm looking to do something like this:

  Host name=example.com  appBase=webapps
Alias*.example.com/Alias
  /Host

This does not work though. Any suggestions?

-josh



Re: Thread dump analysis

2009-01-28 Thread Pieter Temmerman
I really appreciate your input Leon.

On Wed, 2009-01-28 at 11:07 +0100, Leon Rosenberg wrote:

  RMI TCP Connection(42)-173.x.x.x - Thread t...@112
java.lang.Thread.State: RUNNABLE
 
 reading from socket, usually not a problem.
 
I thought so. Thanks.

  http-8081-35 - Thread t...@71
java.lang.Thread.State: RUNNABLE
 at java.lang.String.equals(String.java:1018)
 at
  com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:554)
 at
  org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:44)

 This one actually looks like a problem, was the server under load as
 you created the dump, or did you removed the load first?
No, the server was not under load at all. And I took various thread
dumps at random intervals, and they thread was still there (same thread
number). Maybe there is an infinite loop, but I don't know why it works
for a random amount of time, and then freezes.

 If there were no external requests to the server, you most probably
 have an infinite loop somewhere (how stable is xfire anyway?) or you
 have a really really really large xml file to parse. 
That's a good question. I have no experience with XFire. Would there be
a way to know which XML file it's parsing?

 
  http-8081-31 - Thread t...@67
java.lang.Thread.State: RUNNABLE
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl
  $PrologDriver.next(XMLDocumentScannerImpl.java:930)
 at
  com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
 at
  com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
 at
  com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:548)
 at
  org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:44)
 at
  org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
 at
  org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
 at
  org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
 at
  org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:304)
 at
  org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:129)
 at
  org.codehaus.xfire.transport.http.XFireServlet.doPost(XFireServlet.java:116)
 
 
 note that the XFire path is almost identical.
 Personally I neved managed to catch healthy code in something like
 String.equals(), but it may be possible, even imho unlikeable.

 The dump looks healthy, but is it the dump from the tomcat 5.5 or tomcat 6?
 Because if tomcat 6 is the problem and the dump is from tomcat 5 its useless 
 :-)
 
This was the heap dump from Tomcat 6.

 you need more research :-) For now it looks like your first tomcat is
 waiting for the second tomcat which just can't handle the requests as
 fast as its expected. You may want to check configuration options of
 both (threads in the connector etc).
If the threadMax would be too low in the connector, wouldn't the
freeze be over once there are free connections? And also, how can a
small threadMax make a thread hang? For example the one that is trying
to read an XML file.

 Also the heap dump of the second tomcat would be useful (if this one
 is from first).
 And a thread dump shortly after the traffic has gone (for example kill
 first tomcat, wait 1 minute, make thread dump).
 
Did this, see the output (I removed the RMI threads):

TP-Monitor - Thread t...@28
   java.lang.Thread.State: TIMED_WAITING on 
org.apache.tomcat.util.threads.threadpool$monitorrunna...@498364
at java.lang.Object.wait(Native Method)
at 
org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable.run(ThreadPool.java:565)
at java.lang.Thread.run(Thread.java:619)

   Locked ownable synchronizers:
- None

TP-Processor4 - Thread t...@27
   java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
- locked java.net.sockssocketi...@134af1
at java.net.ServerSocket.implAccept(ServerSocket.java:453)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:306)
at 
org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:660)
at 
org.apache.jk.common.ChannelSocket$SocketAcceptor.runIt(ChannelSocket.java:870)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)

   Locked ownable synchronizers:
- None

TP-Processor3 - Thread t...@26
   java.lang.Thread.State: WAITING on 
org.apache.tomcat.util.threads.threadpool$controlrunna...@514577
  

Re: virtual hosts

2009-01-28 Thread Serge Fonville
Hi,

Is your dns properly configured?
And what does your environment look like?

Regards,

Serge Fonville

On Wed, Jan 28, 2009 at 1:28 PM, Josh Pollara
jpoll...@millennialmedia.comwrote:

 Does Tomcat support wildcard virtual hosts?

 I'm looking to do something like this:

  Host name=example.com  appBase=webapps
Alias*.example.com/Alias
  /Host

 This does not work though. Any suggestions?

 -josh




Re: Java Crash

2009-01-28 Thread Stephen Caine

Chris,


This is very helpful.  It strongly suggests the issue is memory  
management, not JFreeChart.


I'd put my money on bad hardware. Every single time I've seen a  
release version of a JVM fail, it's because of bad memory, CPU,  
motherboard, or the combination thereof.


I recommend trying the same code and configuration on a separate  
physical machine to see if that might be the problem. Does Mac have  
anything like memtest86? Can you even run that on x86-based Macs?


My initial presumption was bad memory, but after running a very  
intensive memory test (provided by Apple), no problems were found.   
Also, no other process results in a JVM crash.  Only when JFreeChart  
is run does the JVM crash.  This is an X-Serve, dual core intel that  
has 12 gigs of RAM running OS X 10.5.


Stephen Caine
Soft Breeze Systems, LLC

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



Re: Thread dump analysis

2009-01-28 Thread Pieter Temmerman
If the threadMax would be too low in the connector, wouldn't the
 freeze be over once there are free connections? And also, how can a
 small threadMax make a thread hang? For example the one that is trying
 to read an XML file.

As a follow up on my own question. This is what the docs say:

At server startup time, this Connector will create a number of request
processing threads (based on the value configured for the
minSpareThreads attribute). Each incoming request requires a thread for
the duration of that request. If more simultaneous requests are received
than can be handled by the currently available request processing
threads, additional threads will be created up to the configured maximum
(the value of the maxThreads attribute). If still more simultaneous
requests are received, they are stacked up inside the server socket
created by the Connector, up to the configured maximum (the value of the
acceptCount attribute. Any further simultaneous requests will receive
connection refused errors, until resources are available to process
them.


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



RE: virtual hosts

2009-01-28 Thread Josh Pollara
I am making a transition from apache http - tomcat. DNS is all configured 
correctly etc. example.com and *.example.com point to the same place.

I'm quite certain that tomcat does not support wildcard virtual hosts, I just 
wanted to confirm with someone who was positive.

-Original Message-
From: Serge Fonville [mailto:serge.fonvi...@gmail.com]
Sent: Wed 1/28/2009 4:50 AM
To: Tomcat Users List
Subject: Re: virtual hosts
 
Hi,

Is your dns properly configured?
And what does your environment look like?

Regards,

Serge Fonville

On Wed, Jan 28, 2009 at 1:28 PM, Josh Pollara
jpoll...@millennialmedia.comwrote:

 Does Tomcat support wildcard virtual hosts?

 I'm looking to do something like this:

  Host name=example.com  appBase=webapps
Alias*.example.com/Alias
  /Host

 This does not work though. Any suggestions?

 -josh





RE: SECURITY breach in Tomcat

2009-01-28 Thread Hubert de Heer
Hi,
If you really, really need the manager webapp, you can restrict access
to that one not only by password but also by source-ip, e.g. access is
only allowed from your office IP.

In server.xml:
Context path=/manager
docBase=${catalina.home}/server/webapps/manager debug=0
privileged=true
  Valve className=org.apache.catalina.valves.RemoteAddrValve
allow=office_ip/
/Context

Hubert
-Original Message-
From: Toby Kurien [mailto:tobyis7...@gmail.com] 
Sent: 22 January 2009 16:17
To: users@tomcat.apache.org
Subject: SECURITY breach in Tomcat

Hi,
I have a webapp for my company that has been running for several
years. Recently, we got infected by a trojan or virus and this has
been causing a lot of abnormal behavior. The trojan creates user
accounts in Windows and also creates web applications like safee.war
and zhu.war into the webapps folder of Tomcat and also shuts down
Tomcat. The trojan webapps have jsp and exe files which try to modify,
copy and delete files in the system and also try to access the
database. Symantec and Norton have not been able to rectify or detect
much.
I am totally at loss on what's going on and how to tighten or rectify
this. Anyone with any ideas is highly appreciated.

Thanks,
-Toby

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



Re: virtual hosts

2009-01-28 Thread Serge Fonville
I tried it at my dev machine and added an alias to the host section for
*.domain.tldevery attempt to access a tomcat host on a resolvable address
works.

Hope this helps.

Regards,

Serge Fonville

On Wed, Jan 28, 2009 at 1:53 PM, Josh Pollara
jpoll...@millennialmedia.comwrote:

 I am making a transition from apache http - tomcat. DNS is all configured
 correctly etc. example.com and *.example.com point to the same place.

 I'm quite certain that tomcat does not support wildcard virtual hosts, I
 just wanted to confirm with someone who was positive.

 -Original Message-
 From: Serge Fonville [mailto:serge.fonvi...@gmail.com]
 Sent: Wed 1/28/2009 4:50 AM
 To: Tomcat Users List
 Subject: Re: virtual hosts

 Hi,

 Is your dns properly configured?
 And what does your environment look like?

 Regards,

 Serge Fonville

 On Wed, Jan 28, 2009 at 1:28 PM, Josh Pollara
 jpoll...@millennialmedia.comwrote:

  Does Tomcat support wildcard virtual hosts?
 
  I'm looking to do something like this:
 
   Host name=example.com  appBase=webapps
 Alias*.example.com/Alias
   /Host
 
  This does not work though. Any suggestions?
 
  -josh
 
 




RE: virtual hosts

2009-01-28 Thread Josh Pollara
Please paste your config because I just tried this and it does not work for me. 
What tomcat version are you using?


-Original Message-
From: Serge Fonville [mailto:serge.fonvi...@gmail.com]
Sent: Wed 1/28/2009 5:16 AM
To: Tomcat Users List
Subject: Re: virtual hosts
 
I tried it at my dev machine and added an alias to the host section for
*.domain.tldevery attempt to access a tomcat host on a resolvable address
works.

Hope this helps.

Regards,

Serge Fonville

On Wed, Jan 28, 2009 at 1:53 PM, Josh Pollara
jpoll...@millennialmedia.comwrote:

 I am making a transition from apache http - tomcat. DNS is all configured
 correctly etc. example.com and *.example.com point to the same place.

 I'm quite certain that tomcat does not support wildcard virtual hosts, I
 just wanted to confirm with someone who was positive.

 -Original Message-
 From: Serge Fonville [mailto:serge.fonvi...@gmail.com]
 Sent: Wed 1/28/2009 4:50 AM
 To: Tomcat Users List
 Subject: Re: virtual hosts

 Hi,

 Is your dns properly configured?
 And what does your environment look like?

 Regards,

 Serge Fonville

 On Wed, Jan 28, 2009 at 1:28 PM, Josh Pollara
 jpoll...@millennialmedia.comwrote:

  Does Tomcat support wildcard virtual hosts?
 
  I'm looking to do something like this:
 
   Host name=example.com  appBase=webapps
 Alias*.example.com/Alias
   /Host
 
  This does not work though. Any suggestions?
 
  -josh
 
 





Re: virtual hosts

2009-01-28 Thread Serge Fonville
On Wed, Jan 28, 2009 at 2:16 PM, Serge Fonville serge.fonvi...@gmail.com
 wrote:

 I tried it at my dev machine and added an alias to the host section for
 *.domain.tldevery attempt to access a tomcat host on a resolvable address
 works.


Sorry, my bad.
I had only configured a default host.

Probably then the only way to do this would put httpd in front of tomcat.

Regards,

Serge Fonville


tomcat 6 cluster deploy

2009-01-28 Thread Joe Rosiak
According to the apache site the tomcat Cluster Deployer object does not work 
in version 6.  Is this accurate?  If so has anyone heard of a fix for this in 
the near future?



  

Re: public IPadresse is non-local

2009-01-28 Thread Mihamina Rakotomandimby (R12y)

Mihamina Rakotomandimby (R12y) wrote:

Hi,
I have a test box on my LAN.
The internet connexion is shared by a router (linksys box)


Reading one of the last posts of this:
http://www.generation-nt.com/reponses/rmi-probleme-de-creation-d-un-serveur-sous-linux-ubuntu-entraide-59447.html?page=3#reponse
It has to do with RMI plying with name resolution...:
  My take on the problem is as follows: The java rmi registry gets a
  Naming.lookup request, it resolves the request and returns the ip to
  the machine running the requested service
Which seem to tell RMI loooks up oninternet and get back, but through 
the public adress.


how to avoid that?
--
Chef de projet chez Vectoris
http://www.google.com/search?q=mihamina+rakotomandimby

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



Re: virtual hosts

2009-01-28 Thread Serge Fonville
Alternatively you may be able to create a wildcard CNAME in dns
Hope this helps.

Regards,

Serge Fonville

On Wed, Jan 28, 2009 at 2:25 PM, Serge Fonville serge.fonvi...@gmail.comwrote:

 On Wed, Jan 28, 2009 at 2:16 PM, Serge Fonville serge.fonvi...@gmail.com
  wrote:

 I tried it at my dev machine and added an alias to the host section for
 *.domain.tldevery attempt to access a tomcat host on a resolvable address
 works.


 Sorry, my bad.
 I had only configured a default host.

 Probably then the only way to do this would put httpd in front of tomcat.

 Regards,

 Serge Fonville



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

2009-01-28 Thread Hamacher, Eric
Hello:

This has been a truly frustrating problem.  Here is what I did:

Tomcat 6.0.18
JDK 1.5 u 16
Eclipse w/ WTP 3.4.1
Ojdbc14dms.jar
Dms.jar

I placed my drivers in lib.

In web.xml, I put

resource-ref
  res-ref-namejdbc/GFDataSource/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref

I placed the following in three different places, conf/server.xml, 
conf/context.xml, and in a context file in my app's META-INF directory:

  Resource name=jdbc/GFDataSource auth=Container
type=javax.sql.DataSource
maxActive=30
maxIdle=2
maxWait=1000
username=username
password=password
driverClassName=oracle.jdbc.OracleDriver
uri=jdbc:oracle:thin:@aserver:2224:DB/

For driverClassName, I've also tried oracle.jdbc.driver.OracleDriver.

This application works on other servers.

Please help!

J.  ERIC  HAMACHER
Software Application Developer
608.664.3859
8476 Greenway Boulevard
Suite 100
Middleton, WI  53562
USA
GALLUP Technology

Achiever | Learner | Restorative | Intellection | Deliberative



RE: Servlet 2.5 and RequestDispatcher.include + Response.setHeader, invalid?

2009-01-28 Thread Caldarale, Charles R
 From: Ken Johanson [mailto:tomcat-u...@kensystem.com]
 Subject: Servlet 2.5 and RequestDispatcher.include +
 Response.setHeader, invalid?

 It's my understanding that servlet 2.5 loosened the requirement that a
 included/callee Servlet (and JSP?) cannot set the resp headers/status,
 and should now be able to set them if not already committed.

Why do you think your understanding would override an explicit statement in 
the spec?  Here's the exact text from SRV.8.3 of the servlet spec version 
2.5mr6:

It cannot set headers or call any method that affects the headers of the 
response, with the exception of the HttpServletRequest.getSession() and 
HttpServletRequest.getSession(boolean) methods. Any attempt to set the headers 
must be ignored, and any call to HttpServletRequest.getSession() or 
HttpServletRequest.getSession(boolean) that would require adding a Cookie 
response header must throw an IllegalStateException if the response has been 
committed.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Thread dump analysis

2009-01-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Pieter,

Pieter Temmerman wrote:
 Memory usage looks healthy, but CPU usage goes sky high (mainly caused
 by the Java Tomcat process).

That's interesting. Looking at your thread dump snippet, it looks like
your database connection pool is exhausted. If that were the only
problem, you'd have very low CPU usage because everything would be
blocked waiting. Something else must be going on.

 My first question is, what is a TP-Processor exactly? Is each client
 connection to Tomcat being assigned a TP-Processor or am I wrong?

Each HTTP connection is assigned a TP-Processor for the duration of the
request.

 But for some kind of reason, there is never a free
 one available, and the application just won't work until Tomcat is
 restarted.

You are probably leaking them somewhere. The fact that your server stays
up for an arbitrary amount of time leads me to believe that you have a
leak in one place, but not everywhere. So, if someone is using that
leak-prone code a lot, you exhaust your connection pool quickly, but if
not, the server stays up for a long time.

Are you using Tomcat's DBCP? If so, enable all the debugging features
(logAbandoned, removeAbandoned, etc.) which should lead you to the code
that is leaking connections.

 Note the line locked 0x2aabadaabff8 and waiting on
 0x2aabadaabff8 later on. So first it's locking that thing and
 then it's waiting on that thing. This same number is coming back in
 each TP-Processor that is in waiting state. That seems rather weird to
 me.

That's just the way the thread dump looks.

 So I was wondering:
   a. Is that normal behavior?

Yes, assuming that resource exhaustion is considered normal.

   b. Is there any way to know what the 0x2aabadaabff8 means?

Yes.

 My scientific calculator says it's rather an insane number when trying
 to convert it to decimal.

It's just a pointer, so knowing the decimal value is pretty useless.

 Maybe it's just as easy as it reads: Waiting on 0x0002aabadwhich is
 a GenericObjectPool.

Right: the JVM tells you what object 0xabababa... is.

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

iEYEARECAAYFAkmAexUACgkQ9CaO5/Lv0PAPvgCeOdXkDSuJLihFpmJkoM8H76wB
sQYAnjbok0n5vgaeJHv5x0P25N+6ayMJ
=SkV/
-END PGP SIGNATURE-

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



Re: virtual hosts

2009-01-28 Thread Pid
Josh Pollara wrote:
 I am making a transition from apache http - tomcat. DNS is all configured 
 correctly etc. example.com and *.example.com point to the same place.
 
 I'm quite certain that tomcat does not support wildcard virtual hosts, I just 
 wanted to confirm with someone who was positive.

It won't support multiple virtual Hosts, but you can set one webapp to
be the default Host - it will then catch all requests that fail to match
another Host.

Check the Engine config element.

p


 -Original Message-
 From: Serge Fonville [mailto:serge.fonvi...@gmail.com]
 Sent: Wed 1/28/2009 4:50 AM
 To: Tomcat Users List
 Subject: Re: virtual hosts
  
 Hi,
 
 Is your dns properly configured?
 And what does your environment look like?
 
 Regards,
 
 Serge Fonville
 
 On Wed, Jan 28, 2009 at 1:28 PM, Josh Pollara
 jpoll...@millennialmedia.comwrote:
 
 Does Tomcat support wildcard virtual hosts?

 I'm looking to do something like this:

  Host name=example.com  appBase=webapps
Alias*.example.com/Alias
  /Host

 This does not work though. Any suggestions?

 -josh


 
 


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



Graceful Stop

2009-01-28 Thread Mohit Anchlia
tomcat 6:

Is there a way to gracefully stop tomcat similar to apache?

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



Re: Graceful Stop

2009-01-28 Thread David kerber

Mohit Anchlia wrote:

tomcat 6:

Is there a way to gracefully stop tomcat similar to apache?

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



  
On windows, stop the service, either through the service manager, or at 
a command line with the net stop servicename command.


D



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



Re: Graceful Stop

2009-01-28 Thread Mohit Anchlia
On linux we did /etc/init.d/tomcat stop but it doesn't look like it
gracefully stopped tomcat.

On Wed, Jan 28, 2009 at 7:54 AM, David kerber dcker...@verizon.net wrote:
 Mohit Anchlia wrote:

 tomcat 6:

 Is there a way to gracefully stop tomcat similar to apache?

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





 On windows, stop the service, either through the service manager, or at a
 command line with the net stop servicename command.

 D



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



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



Re: Graceful Stop

2009-01-28 Thread Gregor Schneider
Could you specify your understanding of a graceful *stop?

Within Apache HTTPD, I'm only aware of a graceful *restart*

But maybe I'm missing something...

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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



Re: Graceful Stop

2009-01-28 Thread André Warnier

Mohit Anchlia wrote:

tomcat 6:

Is there a way to gracefully stop tomcat similar to apache?


There is a whole page here, if you understand it (I don't) :
http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html

Also, there is a special port defined in the server.xml/Server tag, 
which I believe works as follows :

- connect to it (allowed from localhost only)
- send the defined shutdown string
I assume that Tomcat will then, gracefully, stop serving new requests, 
finish the ones being processed right now, and shut itself down nicely.


There does not seem to exist a graceful restart however.

I may be wrong of course, but in that case expect a few additional 
contradictory messages right here in the next few minutes..

There's nothing like a wrong guess to trigger them.



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



Variable returning context name

2009-01-28 Thread rubach
Hi list,
is there  an tomcat (5.5x) variable which gives back the context name such
as webappRoot returns the path to the webapp!?
I plan to use this to specify an logfile such as
log4j.appender.logfile.File=${log.dir}/${contextnamevariable}_test.log

Thanks
H


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



Re: Variable returning context name

2009-01-28 Thread Ingmar Lötzsch
 is there  an tomcat (5.5x) variable which gives back the context name such
 as webappRoot returns the path to the webapp!?
 I plan to use this to specify an logfile such as
 log4j.appender.logfile.File=${log.dir}/${contextnamevariable}_test.log

I'am using ServletContext.getContextPath() inside a
ServletContextListener implementation.

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



Re: does this mod_jk.log look healthy?

2009-01-28 Thread Rainer Jung

On 28.01.2009 12:00, Arne Riecken wrote:

Thanks for Your answer.

There are at least two (watchdog) ajp requests through the web server to the
workers every minute, and as i wrote, the ajp connection_pool_timeout ist
600, connectionTimeout in Tomcats server.xml is accordingly 60. So I
cannot image how the web server can be more idle than the pool timeout, even
at busy daytime, where the log messages also occure every few minutes?

We will look forward to upgrade to 1.2.26.


The pool is local to any Apache httpd process. I assume your requests 
get distributed to more than one httpd process. You can log the process 
ID of the httpd process with %P in the access log, and if you are using 
a multi-threaded MPM (worker) also the thread id (%{tid}P).


1.2.27 would be better than 1,2,26 ;)

Regards,

Rainer


2009/1/27 Rainer Jungrainer.j...@kippdata.de


Without additional error level messages that's OK. The web server noticed,
that there was no connection to the backend open and will transparently
create a new one. This could happen, if your web server is more idle than
configured with the JK connection pool timeout or Tomcat's
connectionTimeout.

You should update to 1.2.27, it's better than 1.2.23 :)


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



Java/Tomcat 5 CPU utilization very high under low load

2009-01-28 Thread David Wall
We are running Tomcat 5.5.27 on Linux 2.6.18-53.1.4.el5xen (Red Hat 
4.1.2-14) with Java 1.6.0_05 (32 bit) in a Xen virtualization 
environment (not my server, so unsure what version that is).  It has 3 
webapps running, two of ours and Tomcat's manager.


Normally, when we run 'top', Java and it's related PG 8.3.3 database 
that drives the Tomcat webapps show very low CPU utilization (0-1%) and 
even leave the 'top' listing.  When there is higher user activity, we 
see Java increase to 4-20% utilization, but these are spikes that also 
tend to return to the low utilization shortly after the burst.  We run 
Java with options: -server -Xms2200m -Xmx2200m -XX:MaxPermSize=128m.


But every so often, Java goes crazy and reaches 95-99% CPU 
utilization, and it sticks there, even though there is little Tomcat 
activity.  What is unusual to me is that during this initial phase of 
high CPU utilization, the webapps themselves appear to run smoothly 
(don't really notice a slowdown like you'd expect from such high 
utilization), logging in, using the web interface, doing queries, 
updates, etc.  Also, the tomcat access log show little actual user 
activity while it's running so busy.


Unfortunately, after some time, it seems that Tomcat eventually locks up 
and we have to restart the system, where the process repeats itself: 
initially normal low utilization, followed by 99% utilization with the 
system still working okay, followed by a lock-up and restart.


So it seems like there's a Java thread that is running amok, yet not a 
critical thread (at least not initially) since the apps appear to be 
working fine.


How best can I find the troubled thread on a running production system? 


Thanks,
David

P.S.  Note that our webapps run on lots of servers in a similar 
configuration (albeit without Xen) and we've never seen this before 
after years of running production systems -- it's just this one system.


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



Re: Java/Tomcat 5 CPU utilization very high under low load

2009-01-28 Thread Leon Rosenberg
 How best can I find the troubled thread on a running production system?

kill -QUIT id_of_the_tomcat_process

the thread dump will be printed into the catalina.out

Its best to restart the server after the thread dump, but since it's
handing anyway...

also include the heap info: jmap -heap pid

regards
Leon

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



Re: Thread dump analysis

2009-01-28 Thread Leon Rosenberg
I omit the whole quoting to save traffic for clarity.

Do I understand you correctly, that after you killed the first tomcat
(in my understanding the one which fires soap requests, tomcat 5) than
all the RUNNABLE threads in the second tomcat (the one that answers
soap, tomcat 6 with xfire) went away and it (tomcat) was idle?

Leon

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



Re: Thread dump analysis

2009-01-28 Thread Pieter Temmerman
Thanks Chris,

I just bumped into a very nice plugin for Jconsole called TopThread.
It's a linux top alike and shows the CPU usage of all threads.
This only confirms what I figured out before, there are two threads
taking up all CPU. See below for their stack trace:

com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl
$PrologDriver.next(XMLDocumentScannerImpl.java:930)
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:548)
IT SEEMS THE ABOVE PART IS REPORTEDLY EXECUTED BY THE
BELOW LINE 
org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:44)
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:304)
org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:129)
org.codehaus.xfire.transport.http.XFireServlet.doPost(XFireServlet.java:116)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:619)


Also, I noticed something else..
After a while (15-20mins) the webapp is accessible again (without
restarting Tomcat), although CPU usage keeps hitting 100%. Could it be
that Tomcat ran out of connectors (maxThreads was hit) and after a while
they get closed by the timeout?
This could be a plausible explanation, although, the weird thing still
is why this coincides with the CPU topping 100%.

Still puzzled :)

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



Re: Thread dump analysis

2009-01-28 Thread Pieter Temmerman

 Do I understand you correctly, that after you killed the first tomcat
 (in my understanding the one which fires soap requests, tomcat 5) than
 all the RUNNABLE threads in the second tomcat (the one that answers
 soap, tomcat 6 with xfire) went away and it (tomcat) was idle?

No, I did not restart Tomcat 5 (the one that fires soap requests).
I restarted Tomcat 6 (that showed 100% CPU usage). The application on Tomcat5 
worked fine now.


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



RE: Thread dump analysis

2009-01-28 Thread Caldarale, Charles R
 From: Pieter Temmerman [mailto:ptemmerman@sadiel.es]
 Subject: Re: Thread dump analysis

 Could it be that Tomcat ran out of connectors (maxThreads
 was hit) and after a while they get closed by the timeout?

Depends on how your DB connector pool is configured.

 This could be a plausible explanation, although, the weird thing still
 is why this coincides with the CPU topping 100%.

Could the infinite loop that these threads sometime get into include 
acquisition of a DB connection at some point inside the loop?  If your DBC pool 
is set to discard unreturned connections after some period of time, it will 
acquire more and those will become available for new requests.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



And how about this mod_jk.log ?

2009-01-28 Thread André Warnier

Hi.

I impolitely invaded/hijacked another thread before, was (justifiably) 
ignored as a result, and stand duly chastised.

I apologise and this is a new posting to the same effect.

I have a case very similar to one previously mentioned, at a customer, 
running under RHEL 5, with Apache 2.0.x, mod_jk 1.2.28-dev and Tomcat 
5.5.x.
(The mod_jk 1.2.6 originally installed showed the same issues, only 
slightly different error messages; the mod_jk-dev version installed now 
is one that was provided tome to correct another Apache segfault issue, 
and I installed because of the ping-pong addition in the meantime).


Note that I am not saying that mod_jk has any responsibility in the 
issue.  It is just that the mod_jk log seems to be the only one that 
actually shows where the error happens.


I see mod_jk messages as listed below (from mod_jk to client, and from 
mod_jk to Tomcat).  What concerns me is the ones to the clients.
These messages happen very regularly (every few minutes), sometimes in 
bursts.
The browser is IE6, and often returns a This page cannot be displayed 
(friendly IE error message, which unfortunately cannot be turned off 
by the users, settings locked).
It is pretty-well established that the users do not click away from the 
page and do not click the cancel button.
When users, after the IE error page, click the reload button, the same 
request/response usually works fine.


The users are getting pretty p.. off by what they perceive as an 
application problem, but we do not see a problem at the application 
level (logfiles etc..).
The users say that this problem affects only this application and/or 
server, but we do not know if they actually use any other comparable 
service.
The server is hosted by a service company, in a location physically 
distant from the users, but supposedly with good connectivity.
The server/application can sometimes take a while to respond to a 
request, but never more than say 10 seconds at most, and the users kind 
of know when they ask a heavy question, so they would not really get so 
impatient.
The users are spread out, so even when monitoring the mod_jk log in real 
time it is not easy to immediately connect one of these client-side 
mod_jk error messages with the occurrence of an error at IE level.  We 
just kind of suppose that they are linked.
The problem is specific to that customer site. We have similar setups at 
many other places, none of them exhibiting the same issue.


Any ideas/suggestions of what we could do to better pin-point the 
problem ? (or of some setting to overcome it ?)



Thanks.

mod_jk log excerpt :

[Mon Jan 19 15:02:52 2009] [6802:4416] [info] 
ajp_process_callback::jk_ajp_common.c (1447): Writing to client aborted 
or client network problems
[Mon Jan 19 15:02:52 2009] [6802:4416] [info] 
ajp_service::jk_ajp_common.c (1846): (ajp13) request failed, because of 
client write error without recovery in send loop attempt=0
[Mon Jan 19 15:02:52 2009] [6802:4416] [info]  jk_handler::mod_jk.c 
(2190): Aborting connection for worker=ajp13
[Mon Jan 19 15:03:12 2009] [6804:4416] [info] 
ajp_process_callback::jk_ajp_common.c (1447): Writing to client aborted 
or client network problems
[Mon Jan 19 15:03:12 2009] [6804:4416] [info] 
ajp_service::jk_ajp_common.c (1846): (ajp13) request failed, because of 
client write error without recovery in send loop attempt=0
[Mon Jan 19 15:03:12 2009] [6804:4416] [info]  jk_handler::mod_jk.c 
(2190): Aborting connection for worker=ajp13
[Mon Jan 19 15:21:18 2009] [6952:4416] [info] 
ajp_send_request::jk_ajp_common.c (1215): (ajp13) error sending request. 
Will try another pooled connection
[Mon Jan 19 15:21:18 2009] [6952:4416] [info] 
ajp_send_request::jk_ajp_common.c (1241): (ajp13) all endpoints are 
disconnected
[Mon Jan 19 15:21:18 2009] [6952:4416] [info] 
ajp_send_request::jk_ajp_common.c (1244): (ajp13) increase the backend 
idle connection timeout or the connection_pool_minsize
[Mon Jan 19 15:21:18 2009] [6952:4416] [info] 
ajp_service::jk_ajp_common.c (1930): (ajp13) sending request to tomcat 
failed,  recoverable operation attempt=1
[Mon Jan 19 15:27:04 2009] [7709:4416] [info] 
ajp_process_callback::jk_ajp_common.c (1447): Writing to client aborted 
or client network problems
[Mon Jan 19 15:27:04 2009] [7709:4416] [info] 
ajp_service::jk_ajp_common.c (1846): (ajp13) request failed, because of 
client write error without recovery in send loop attempt=0
[Mon Jan 19 15:27:04 2009] [7709:4416] [info]  jk_handler::mod_jk.c 
(2190): Aborting connection for worker=ajp13
[Mon Jan 19 15:27:50 2009] [7711:4416] [info] 
ajp_send_request::jk_ajp_common.c (1215): (ajp13) error sending request. 
Will try another pooled connection
[Mon Jan 19 15:27:50 2009] [7711:4416] [info] 
ajp_send_request::jk_ajp_common.c (1241): (ajp13) all endpoints are 
disconnected
[Mon Jan 19 15:27:50 2009] [7711:4416] [info] 
ajp_send_request::jk_ajp_common.c (1244): (ajp13) increase the backend 
idle connection timeout or the 

Re: Graceful Stop

2009-01-28 Thread Mohit Anchlia
There is a graceful-stop option in apache2 which stops taking new
requests and gracefully waits untill existing requests have been
serviced

On Wed, Jan 28, 2009 at 7:59 AM, André Warnier a...@ice-sa.com wrote:
 Mohit Anchlia wrote:

 tomcat 6:

 Is there a way to gracefully stop tomcat similar to apache?

 There is a whole page here, if you understand it (I don't) :
 http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html

 Also, there is a special port defined in the server.xml/Server tag, which
 I believe works as follows :
 - connect to it (allowed from localhost only)
 - send the defined shutdown string
 I assume that Tomcat will then, gracefully, stop serving new requests,
 finish the ones being processed right now, and shut itself down nicely.

 There does not seem to exist a graceful restart however.

 I may be wrong of course, but in that case expect a few additional
 contradictory messages right here in the next few minutes..
 There's nothing like a wrong guess to trigger them.



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



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



RE: And how about this mod_jk.log ?

2009-01-28 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com]
 Subject: And how about this mod_jk.log ?

 I see mod_jk messages as listed below (from mod_jk to client, and from
 mod_jk to Tomcat).

Any chance of getting network traces for both the httpd-Tomcat and httpd-client 
connections?  Might shed some light on what's really going on.

 The browser is IE6, and often returns a This page cannot be
 displayed (friendly IE error message, which unfortunately
 cannot be turned off by the users, settings locked).

It is possible to defeat the IE silliness by generating a relatively long error 
page (I forget what the threshold is, but it's discussed on this mailing list 
occasionally), although this may well be just a timeout so it wouldn't matter.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: SECURITY breach in Tomcat

2009-01-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hubert,

Hubert de Heer wrote:
 If you really, really need the manager webapp, you can restrict access
 to that one not only by password but also by source-ip, e.g. access is
 only allowed from your office IP.
 
 In server.xml:
 Context path=/manager
 docBase=${catalina.home}/server/webapps/manager debug=0
 privileged=true
   Valve className=org.apache.catalina.valves.RemoteAddrValve
 allow=office_ip/
 /Context

This is a really bad Context declaration for several reasons:

1a. It is defined in server.xml. The OP is using Tomcat 6.x. You aren't
supposed to do this anymore - not since TC 5.5 at least.
1b. You are specifying the path to the application, which is a no-no
these days. Tomcat can detect the deployment path of the application
from the name of the directory (or WAR file or XML file).
2.  You are explicitly deploying a webapp from the webapps directory.
Since Tomcat typically has autoDeploy=true, you'll end up
deploying the application twice. This is confusing at best and
insecure at the worst (because the winning deployment may not
have that RemoteAddrValve configured).

To sum up, you should:

1. Use META-INF/context.xml if you want to use autoDeploy=true
   to add your RemoteAddrFilter.

2. Use conf/[engine]/[host]/[appname].xml if you don't want to use
   autoDeploy=true or if you want to deploy your application from
   somewhere other than the auto-deploy webapps directory.

3. Stop using path and docBase.

Hope that helps,
- -chris

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

iEYEARECAAYFAkmAobYACgkQ9CaO5/Lv0PDgggCeKmqBTFW7OVMEJSTSPReUNDj6
3LcAn313qpJGMG2NDjXwt3k4wqW2aHYU
=GRtt
-END PGP SIGNATURE-

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



Re: And how about this mod_jk.log ?

2009-01-28 Thread André Warnier

Caldarale, Charles R wrote:

From: André Warnier [mailto:a...@ice-sa.com]
Subject: And how about this mod_jk.log ?

I see mod_jk messages as listed below (from mod_jk to client, and from
mod_jk to Tomcat).


Any chance of getting network traces for both the httpd-Tomcat and httpd-client 
connections?  Might shed some light on what's really going on.


Well..
The flow is as follows :
Request:
Windows/IE6 - Apache2.2 - mod_jk1.2.28 - Tomcat5.5 - database app.
Response:
Windows/IE6 - Apache2.2 - mod_jk1.2.28 - Tomcat5.5 - database app.

Apache, mod_jk and Tomcat run on a single Linux host.
I do have remote access to the host, but only through a Citrix 
firewall/console where my only accesses are a putty client (SSH) and a 
kind of Norton Commander file explorer.

I do not have remote access at all to the workstations.
Whatever I could ask the customer to do at their end would have to be 
relatively simple.


So what are my simplest options ?

My plan right now would be to run a simple HTTP-getter program on a 
workstation, to see if that one confirms what IE is saying.
My first candidate is ab, which belongs to the standard Apache MSI 
installer too, and which I could ask to customer to install, then 
disable (http), then run ab in a command window, re-directing the output 
to a file.
I have tried that locally and it seems to work.  Unfortunately, on my 
own network I have trouble reproducing the error that the customer is 
seeing, everything works fine here unfortunately.  So I don't know how 
much error information ab provides when there is actually a problem.
It is not really a debugging tool, more like a tool to measure server 
performance.


Any tip on something else, easy to install and run, which would be 
better suited to what I need ?




The browser is IE6, and often returns a This page cannot be
displayed (friendly IE error message, which unfortunately
cannot be turned off by the users, settings locked).


It is possible to defeat the IE silliness by generating a relatively long error 
page (I forget what the threshold is, but it's discussed on this mailing list 
occasionally), although this may well be just a timeout so it wouldn't matter.

Yes, I thought of that, and 1025 bytes should be enough.  But I thought 
of that too..: if there is never an error page sent by the server (which 
looks likely here, since it can't even send a normal response), then the 
IE error page is IE's internal one anyway.  For once it is not hiding 
the useful server information, and being friendly in a way.



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



Re: Variable returning context name

2009-01-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

To whom it may concern,

rub...@lat-lon.de wrote:
 Hi list,
 is there  an tomcat (5.5x) variable which gives back the context name such
 as webappRoot returns the path to the webapp!?
 I plan to use this to specify an logfile such as
 log4j.appender.logfile.File=${log.dir}/${contextnamevariable}_test.log

Not really. I recommend you use a deployment procedure that does
parametric replacement of such things during deployment time (using,
say, ant).

Tomcat doesn't set any system properties containing the context name of
any application because it's not clear which one should be set (there
could be any number of apps being deployed... which one should it pick?).

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

iEYEARECAAYFAkmApAsACgkQ9CaO5/Lv0PDVfwCgqve1gbVRUetDY3lNo4zJxjrL
q5oAn3iJy2Ze0eu5jtWH8+xWjc2S6MjA
=rfnO
-END PGP SIGNATURE-

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



Re: Specific Tomcat version for Java6

2009-01-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Stefan,

stlecho wrote:
 Does there exist a Tomcat version that is specific for Java6 (i.e. a version
 that exploits features available in Java6) ?

No. I believe all versions of Tomcat can be run on all versions of Java
from 1.2 onward (where Java collections were added). If you want to use
Tomcat 5.x on Java 1.4 or below, you need to include the compatibility
libraries which add, among other things, XML processing libraries.

If you are starting a new project, using the current release (6.0.x) of
Tomcat is definitely recommended.

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

iEYEARECAAYFAkmApTEACgkQ9CaO5/Lv0PAq5gCfVT2UId9ZI7X9COV8+hkwJvnZ
+UsAn0DSrvrZrz8ivqFxdrvOpPCd8zWR
=HP85
-END PGP SIGNATURE-

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



Re: Java/Tomcat 5 CPU utilization very high under low load

2009-01-28 Thread Juha Laiho
David Wall wrote:
 We are running Tomcat 5.5.27 on Linux 2.6.18-53.1.4.el5xen (Red Hat
 4.1.2-14) with Java 1.6.0_05 (32 bit) in a Xen virtualization
 environment (not my server, so unsure what version that is).  It has 3
 webapps running, two of ours and Tomcat's manager.
 
 Normally, when we run 'top', Java and it's related PG 8.3.3 database
 that drives the Tomcat webapps show very low CPU utilization (0-1%) and
 even leave the 'top' listing.  When there is higher user activity, we
 see Java increase to 4-20% utilization, but these are spikes that also
 tend to return to the low utilization shortly after the burst.  We run
 Java with options: -server -Xms2200m -Xmx2200m -XX:MaxPermSize=128m.
 
 But every so often, Java goes crazy and reaches 95-99% CPU
 utilization, and it sticks there, even though there is little Tomcat
 activity.

To me this sounds like the garbage collection kicking in (and not
finding much to throw out).

You should be able to see thread-level elapsed CPU time with
ps -fLp tomcat_process_id. By running this command a few
consecutive times and comparing the results, you should be able
to see if there's a certain single thread that is taking up all
or most of the CPU. Then it'd be a task to match these thread ids
to information from the thread dump.

F.ex. from my toy machine;
$ ps -fLp 7044
UIDPID  PPID   LWP  C NLWP STIME TTY  TIME CMD
tomcat7044 1  7044  0   40  2008 ?00:00:12 /usr/lib/jvm/java/bin
tomcat7044 1  7118  0   40  2008 ?00:02:58 /usr/lib/jvm/java/bin
tomcat7044 1  7119  0   40  2008 ?00:00:00 /usr/lib/jvm/java/bin
...
tomcat7044 1  7892  0   40  2008 ?00:36:26 /usr/lib/jvm/java/bin
... (there are a number of other threads)

Then, at least on my JVM, the thread ids are shown in hexadecimal, so
it's best to convert the interesting thread ids to hex; from the above,
7044=0x1b84
7118=0x1bce
7119=0x1bcf
7892=0x1ed4

... and the thread info from the dump matchind to the above:
main prio=1 tid=0x0805cfb8 nid=0x1b84 runnable [0xbfffc000..0xbfffd708]
VM Thread prio=1 tid=0x08099f38 nid=0x1bce runnable
Reference Handler daemon prio=1 tid=0x0809cae0 nid=0x1bcf in Object.wait() 
[0xb2519000..0xb2519f20]
ContainerBackgroundProcessor[StandardEngine[Catalina]] daemon prio=1 
tid=0x083444e0 nid=0x1ed4 waiting on condition [0xb135c000..0xb135cfa0]

In the dump there is also the call stack for each of the threads,
so if it's an application thread that's using CPU, you'll get at least
some glimpse where in the code the time is spent.

The call stack may also contain information about threads being
deadlocked with each other (but this wouldn't lead to high
CPU usage -- instead this would lead to a standstill without
any CPU being used).

I hope these were of any help,
-- 
..Juha

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



Re: logging outgoing requests from Tomcat to SQL

2009-01-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Gergely,

Gergely Paljak wrote:
 A want to realize a logging system for tomcat that is capable of:
 - logging the incoming request for Servlets (easy)
 - and logging the time when the Tomcat response is sent (easy as well)

As you say, these are relatively easy to accomplish.

 - logging the outgoing SQL queries inside Tomcat while maintaining a mapping
 between the requested Servlet and the sent SQL queries
 - logging the incoming SQL query results

I think your best bet is to implement your own DataSource that extends
Tomcat's built-in datasource (or some other one, if you like). Have your
DataSource return Connection objects that wrap the ones provided by
Tomcat's DataSource object.

Your Connection class should produce wrapped Statement classes that log
the statements as they are executed, and wrapped ResultSet objects that
do ... something else. Due to the specific JDBC spec requirements about
how results are read, you may have to settle for only reading those
values /actually read/ by the application, instead of the entire result set.

I have implemented JDBC interface wrappers before, and they are
completely miserable to do (just sooo much plumbing code). I wrote a
super-sexy class wrapper generator if you're interested in doing
something like this.

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

iEYEARECAAYFAkmAplsACgkQ9CaO5/Lv0PAySgCfZSTz2qkBq4yZD3HCuvAYDTBb
2ygAnR3SMz+fR0Ow1rBF+lJcfjm5YJEU
=wTg7
-END PGP SIGNATURE-

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



RE: Specific Tomcat version for Java6

2009-01-28 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Subject: Re: Specific Tomcat version for Java6

 No. I believe all versions of Tomcat can be run on all
 versions of Java from 1.2 onward

Don't think so.  Tomcat 6 requires Java 1.5 or newer (seems to work happily 
even on the 1.7 beta).  I'm also pretty certain you can't run 5.5 on a 1.3 JVM, 
but I haven't actually tried it.  Don't know about the 4.x Tomcat levels.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Connecting Apache Tomcat to Apache

2009-01-28 Thread Mike Eller
Hi,

I am new to Tomcat and trying to get it up and running.

I have an Apache server (2.2.3) running on CentOS 5.2.  I want to add
the capabilities that tomcat brings, mainly JSP for now.
I followed the connector tutorial/guide on the web site.  I have tomcat
running and can access pages if I use the port number in the url.
According to the guide, Apache should be handing .jsp requests over to
tomcat automatically.  I have went through the guide twice...still no
luck.
Can anyone provide a point in the right direction to resolve this?  I
have no idea where to look.  I have tried several different config
solutions

Apache is serving two domains.
I am assuming that I should be able to access the default index.jsp page
by adding that onto the end of the domain, i.e.  the web site is 
www.mungusandcleatus.com

so I add www.mungusandcleatus.com/index.jsp

If this is the wrong approach...can someone push me in the right
direction?

Thanks List...you are the best!

Mike


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



Re: Java/Tomcat 5 CPU utilization very high under low load

2009-01-28 Thread David Wall



F.ex. from my toy machine;
$ ps -fLp 7044
UIDPID  PPID   LWP  C NLWP STIME TTY  TIME CMD
tomcat7044 1  7044  0   40  2008 ?00:00:12 /usr/lib/jvm/java/bin
tomcat7044 1  7118  0   40  2008 ?00:02:58 /usr/lib/jvm/java/bin
tomcat7044 1  7119  0   40  2008 ?00:00:00 /usr/lib/jvm/java/bin
...
tomcat7044 1  7892  0   40  2008 ?00:36:26 /usr/lib/jvm/java/bin
... (there are a number of other threads)

Then, at least on my JVM, the thread ids are shown in hexadecimal, so
it's best to convert the interesting thread ids to hex; from the above,
7044=0x1b84
7118=0x1bce
7119=0x1bcf
7892=0x1ed4

... and the thread info from the dump matchind to the above:
main prio=1 tid=0x0805cfb8 nid=0x1b84 runnable [0xbfffc000..0xbfffd708]
VM Thread prio=1 tid=0x08099f38 nid=0x1bce runnable
Reference Handler daemon prio=1 tid=0x0809cae0 nid=0x1bcf in Object.wait() 
[0xb2519000..0xb2519f20]
ContainerBackgroundProcessor[StandardEngine[Catalina]] daemon prio=1 
tid=0x083444e0 nid=0x1ed4 waiting on condition [0xb135c000..0xb135cfa0]

In the dump there is also the call stack for each of the threads,
so if it's an application thread that's using CPU, you'll get at least
some glimpse where in the code the time is spent.
  


Thanks for the detailed explanation, Juha.  When I get some info, I'll 
post back what I find.  I've added your 'ps' commands to our checking, 
along with the jmap and thread dumps suggested as well.   Hopefully 
we'll be able to find it.


I was interested to see that it could also be SOAP threads that get in 
trouble, since another aspect of this particular deployment is that it 
uses the Salesforce SOAP APIs to update data back in Salesforce, so 
perhaps it will be something there. 


David


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



Re: Connecting Apache Tomcat to Apache

2009-01-28 Thread Gregor Schneider
If you want people to help you, it's a good idea to post

- workers.properties (should be in /etc/apache2)

- your jkmount-directives (should be in the httpd-conf-file of your domain)

Not knowing CentOS, therefore just a shot from the hip:

- do you have a directory /etc/apache2/mods-available?

If so, are there two file jk.conf and jk.load?

Can you post your jk.conf?

- do you have a directory /etc/apache2/mods-enabled?

If so, do you also find there symbolic links pointing to
/etc/apache2/mods-available/jk.load and
/etc/apache2/mods-available/jk.conf?

In ${CATALINA_HOME}/conf/server.xml, have you specified a connector
for AJP/1.3? Should look similar to

Connector port=8009
   enableLookups=false redirectPort=8443
protocol=AJP/1.3 address=127.0.0.1/

Can you post your connector-definition?

rgds

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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



Re: Connecting Apache Tomcat to Apache

2009-01-28 Thread Mike Eller
Ok,
workers.properties is as follows:

workers.tomcat_home=/usr/lib/apache-tomcat
 
workers.java_home=/usr/lib/jdk
 
worker.list=worker1
 
worker.worker1.port=8009
worker.worker1.host=webber
worker.worker1.type=ajp13

This is a simple file from the tutorial.

The jkmount directives in httpd-conf... I followed the tutorial to use
the auto config, so in httpd.conf I have the following:

Include /usr/lib/apache-tomcat/conf/auto/mod_jk.conf

The contents of mod_jk.conf is as follows:

## Auto generated on Wed Jan 28 15:05:37 EST 2009##

IfModule !mod_jk.c
  LoadModule jk_module
/usr/lib/httpd/modules/mod_jk-1.2.27-httpd-2.2.6.so
/IfModule

JkWorkersFile /usr/lib/apache-tomcat/conf/jk/workers.properties
JkLogFile /usr/lib/apache-tomcat/logs/mod_jk.log

JkLogLevel emerg

I do not have a directory /etc/apache2/mods-available nor can I find the
files jk.conf and jk.load

there is also no directory /etc/apache2/mods-enabled

my connector definition from ${CATALINA_HOME}/conf/server.xml is:

Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /

Again, all this was created and configured according to the
guide/tutorial.

Thanks,
Mike


On Wed, 2009-01-28 at 20:54 +0100, Gregor Schneider wrote:
 If you want people to help you, it's a good idea to post
 
 - workers.properties (should be in /etc/apache2)
 
 - your jkmount-directives (should be in the httpd-conf-file of your domain)
 
 Not knowing CentOS, therefore just a shot from the hip:
 
 - do you have a directory /etc/apache2/mods-available?
 
 If so, are there two file jk.conf and jk.load?
 
 Can you post your jk.conf?
 
 - do you have a directory /etc/apache2/mods-enabled?
 
 If so, do you also find there symbolic links pointing to
 /etc/apache2/mods-available/jk.load and
 /etc/apache2/mods-available/jk.conf?
 
 In ${CATALINA_HOME}/conf/server.xml, have you specified a connector
 for AJP/1.3? Should look similar to
 
 Connector port=8009
enableLookups=false redirectPort=8443
 protocol=AJP/1.3 address=127.0.0.1/
 
 Can you post your connector-definition?
 
 rgds
 
 Gregor


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



Programmatically Force JSP Reload

2009-01-28 Thread Eric Grunzke

Hello,

I am developing an app framework that has a very costly startup cycle. 
Consequently, I try to avoid restarting apps because it takes a long time
for the core to get spooled up.  In this vein I have a custom classloader
that reloads the WEB-INF/classes directory without doing a full restart of
the app.  I've run into a problem, however, in JSPs.  It's possible for JSPs
to contain a reference to a .class file that becomes stale when I reload
behind the scenes, which results in a ClassCastException.

The bottom line here is that I am searching for a way to programmatically
force tomcat to drop all loaded JSPs from memory.  I do not need to
recompile them, just reload the classes.  However, if compilation and
reloading are inextricably linked, that's a cost I'm willing to accept.

I've tried looking around the documentation and searching the mailing list,
but I've been unsuccessful so far.  Any insight is greatly appreciated. 
Thanks!

-Eric
-- 
View this message in context: 
http://www.nabble.com/Programmatically-Force-JSP-Reload-tp21715300p21715300.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Connecting Apache Tomcat to Apache

2009-01-28 Thread André Warnier

Mike Eller wrote:

Hi,

I am new to Tomcat and trying to get it up and running.

I have an Apache server (2.2.3) running on CentOS 5.2.  I want to add
the capabilities that tomcat brings, mainly JSP for now.
I followed the connector tutorial/guide on the web site.  I have tomcat
running and can access pages if I use the port number in the url.
According to the guide, Apache should be handing .jsp requests over to
tomcat automatically.  I have went through the guide twice...still no
luck.

...
Ok, I'll bite, even if there are quite detailed instructions available 
here :

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

..and even if Gregor gave you the short answer before.

First, a bit of theory.

I) If you look at your Tomcat's conf/server.xml file, you will see that 
there are two types of Connector defined, one for HTTP, and one for 
AJP.  The HTTP one listens for requests to Tomcat, in the normal HTTP 
format and usually on port 8080 or 8180 or so.  That is the one you say 
you can access directly from the browser.
The other one listens for requests in a different format (AJP) and on a 
different port (usually 8009 by default).
For a Tomcat application (for example a JSP page), it does not matter 
through which of these channels the request comes in.  It will process 
the request, and respond to it.  Tomcat will then route the response 
back through the same Connector on which it came in.



II) From Apache, there are three ways to communicate with Tomcat :

1) via the Tomcat HTTP connector, using normal HTTP requests.  At the 
Apache level, that is done by using the mod_proxy module.
Basically, this is the same mechanism as the one used when Apache acts 
as a proxy for any other webserver. You have to tell Apache which 
requests it must process itself, and which requests it should forward to 
the back-end server for which it acts as a proxy. Apache will forward 
the request, receive the answer from the back-end server, and pass it 
through to the waiting browser.


2) via the Tomcat AJP connector, using the AJP format, but still at the 
Apache level using the mod_proxy module, this time with the addition of 
a helper mod_proxy_ajp module.  Apache will still receive the original 
request, decide if it has to go to the back-end Tomcat server, and if 
yes pass it on, but this time it passes it on through the mod_proxy_ajp 
module, which transforms the request format from pure HTTP into some 
different format called AJP.  Then this mod_proxy_ajp module forwards 
the request, not to the HTTP Connector of Tomcat, but to the AJP 
Connector of Tomcat.  Other than that, it is the same configuration as 
(1) above.


3) via the Apache add-on mod_jk module, also to the Tomcat AJP 
Connector.  That is presumably the one you are trying to use.
It differs of the above two methods, in that you are no longer using the 
standard proxy module of Apache, you are using a special dedicated 
handler, mod_jk.


There is a slight performance difference between the 3 above options, 
and quite a bit of difference in terms of configuration and 
capabilities.  But we'll leave that for another time.


III) Telling Apache which requests (which URLs) it needs to pass to 
Tomcat.

There again, there are 2 ways to indicate this to Apache :

1) through Apache configuration directives called JkMount and 
JkUnMount.  For example, to tell Apache that all requests for URLs 
starting with /examples should go to Tomcat, you would use these two 
lines :

JkMount /examples worker1
JkMount /examples/* worker1

(where worker1 is just a name that you will encounter again in the 
workers.properties file, see in IV below).


2) with a section like this (same basic effect, but more flexible):
Location /examples
  setHandler jakarta-servlet
/Location

Now with either (1) or (2) Apache knows that if a request URL starts 
with /examples, then it should pass it to the mod_jk module in order 
to generate a response.

That's basically all that Apache knows.

When the mod_jk module is given this request, it will try to pass it to 
Tomcat for processing, and wait for the answer.  When the answer comes 
back, mod_jk gives it to Apache, which sends it to your browser, et 
voila, you run Java servlet examples in Apache !


IV) configuring mod_jk

Of course, for mod_jk to know where Tomcat is, and how to pass it the 
request, it needs instructions.

That is the role of the workers.properties file.
Basically, this file contains parameters that tell mod_jk that the 
Tomcat that you called worker1 above, is located at a certain host 
address (in your case probably localhost) and at a certain port (the 
one referenced in the port attribute of the Tomcat AJP Connector in 
Tomcat's server.xml file, probably 8009).


Now go back to Gregor's instructions about where to find these various 
files and instructions.




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

Re: Connecting Apache Tomcat to Apache

2009-01-28 Thread André Warnier

Mike Eller wrote:

Ok,
workers.properties is as follows:

workers.tomcat_home=/usr/lib/apache-tomcat

comment out or delete, obsolete
 
workers.java_home=/usr/lib/jdk

comment out or delete, no longer needed
 
worker.list=worker1

good, and it matches my earlier explanation

 
worker.worker1.port=8009
good too, if that is the port mentioned in the AJP Connector of your 
Tomcat's server.xml file. (It is, I just peeked below..)



worker.worker1.host=webber
that needs to be localhost instead of webber (cause your Tomcat runs on 
the same machine, right ?). Unless your machine knows itself as webber 
of course.



worker.worker1.type=ajp13

that's good, and it's always like that.  That line never changes.



This is a simple file from the tutorial.

The jkmount directives in httpd-conf... I followed the tutorial to use
the auto config, so in httpd.conf I have the following:

Include /usr/lib/apache-tomcat/conf/auto/mod_jk.conf

The contents of mod_jk.conf is as follows:

## Auto generated on Wed Jan 28 15:05:37 EST 2009##

IfModule !mod_jk.c
  LoadModule jk_module
/usr/lib/httpd/modules/mod_jk-1.2.27-httpd-2.2.6.so
/IfModule
That tells Apache where to find the mod_jk module.  And it is a recent 
version too.




JkWorkersFile /usr/lib/apache-tomcat/conf/jk/workers.properties
that's the workers.properties both Gregor and I were talking about 
then, good too.



JkLogFile /usr/lib/apache-tomcat/logs/mod_jk.log

That's where you will find a log of any errors encountered by mod_jk


JkLogLevel emerg
You could set this to info to get a better idea of what mod_jk is 
doing. Even to debug if you are really curious.




I do not have a directory /etc/apache2/mods-available nor can I find the
files jk.conf and jk.load

there is also no directory /etc/apache2/mods-enabled
That's ok, each Linux distribution has some fun putting files in some 
other place. Keeps the world interesting and sysadmins from getting bored.




my connector definition from ${CATALINA_HOME}/conf/server.xml is:

Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /


Very good. That is thus where Tomcat will be listening for request 
coming from Apache through the mod_jk module, as I mentioned before.




Again, all this was created and configured according to the
guide/tutorial.


You did a pretty good job too. I suspect only the webber part is 
wrong, and maybe your JkMount are missing in Apache.




Thanks,
Mike


On Wed, 2009-01-28 at 20:54 +0100, Gregor Schneider wrote:

If you want people to help you, it's a good idea to post

- workers.properties (should be in /etc/apache2)

- your jkmount-directives (should be in the httpd-conf-file of your domain)

Not knowing CentOS, therefore just a shot from the hip:

- do you have a directory /etc/apache2/mods-available?

If so, are there two file jk.conf and jk.load?

Can you post your jk.conf?

- do you have a directory /etc/apache2/mods-enabled?

If so, do you also find there symbolic links pointing to
/etc/apache2/mods-available/jk.load and
/etc/apache2/mods-available/jk.conf?

In ${CATALINA_HOME}/conf/server.xml, have you specified a connector
for AJP/1.3? Should look similar to

Connector port=8009
   enableLookups=false redirectPort=8443
protocol=AJP/1.3 address=127.0.0.1/

Can you post your connector-definition?

rgds

Gregor



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




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



Re: And how about this mod_jk.log ?

2009-01-28 Thread Rainer Jung

Hi André,

On 28.01.2009 19:15, André Warnier wrote:

Caldarale, Charles R wrote:

From: André Warnier [mailto:a...@ice-sa.com]
Subject: And how about this mod_jk.log ?

I see mod_jk messages as listed below (from mod_jk to client, and from
mod_jk to Tomcat).


Any chance of getting network traces for both the httpd-Tomcat and
httpd-client connections? Might shed some light on what's really going
on.


Well..
The flow is as follows :
Request:
Windows/IE6 - Apache2.2 - mod_jk1.2.28 - Tomcat5.5 - database app.
Response:
Windows/IE6 - Apache2.2 - mod_jk1.2.28 - Tomcat5.5 - database app.

Apache, mod_jk and Tomcat run on a single Linux host.
I do have remote access to the host, but only through a Citrix
firewall/console where my only accesses are a putty client (SSH) and a
kind of Norton Commander file explorer.


Putty ssh access to the Linux system is great :)


I do not have remote access at all to the workstations.
Whatever I could ask the customer to do at their end would have to be
relatively simple.


Simple will not necessarily help for a complex problem.


So what are my simplest options ?

My plan right now would be to run a simple HTTP-getter program on a
workstation, to see if that one confirms what IE is saying.
My first candidate is ab, which belongs to the standard Apache MSI
installer too, and which I could ask to customer to install, then
disable (http), then run ab in a command window, re-directing the output
to a file.
I have tried that locally and it seems to work. Unfortunately, on my own
network I have trouble reproducing the error that the customer is
seeing, everything works fine here unfortunately. So I don't know how
much error information ab provides when there is actually a problem.
It is not really a debugging tool, more like a tool to measure server
performance.

Any tip on something else, easy to install and run, which would be
better suited to what I need ?


Although I'm mainly repeating what Chuck already said, I'll paste my 
original answer here, which unfortunately never left my Drafts mailbox :(


I would sniff network traffic. Since there is a chance that an active 
network component is involved, first sniff directly in front of Apache. 
Use the JK logs to get the timestamps fo the write error. Try to find 
the corresponding packets in the sniff and then look at the 
corresponding TCP connection and see, whether the client actually reset 
or closed the connection before mod_jk ran into the error. If so, move 
your sniffer closer to the clinet in terms of network components until 
you finally reach the internet router.


It is some work, but if the problem is important it will allow you to 
narrow down the root cause.


Sniffing here means using tcpdump on the linux system. Don't retrieve 
life decoded data, instead use tcpdump with -s 0 and -r filename to 
dump the full packets to a file (on a file system with enough space) and 
analyze the data later. Of course you would also add a port filter 
expression for your HTTP(S) port(s). See man tcpdump.


I wish you success, and if your sniffer analysis indicates any JK or 
httpd problem, come back here.


Regards,

Rainer


The browser is IE6, and often returns a This page cannot be
displayed (friendly IE error message, which unfortunately
cannot be turned off by the users, settings locked).


It is possible to defeat the IE silliness by generating a relatively
long error page (I forget what the threshold is, but it's discussed on
this mailing list occasionally), although this may well be just a
timeout so it wouldn't matter.


Yes, I thought of that, and 1025 bytes should be enough. But I thought
of that too..: if there is never an error page sent by the server (which
looks likely here, since it can't even send a normal response), then the
IE error page is IE's internal one anyway. For once it is not hiding the
useful server information, and being friendly in a way.


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



Re: Connecting Apache Tomcat to Apache

2009-01-28 Thread Rainer Jung

On 28.01.2009 22:58, André Warnier wrote:

Mike Eller wrote:

Ok,
workers.properties is as follows:

workers.tomcat_home=/usr/lib/apache-tomcat

comment out or delete, obsolete


workers.java_home=/usr/lib/jdk

comment out or delete, no longer needed


worker.list=worker1

good, and it matches my earlier explanation



worker.worker1.port=8009

good too, if that is the port mentioned in the AJP Connector of your
Tomcat's server.xml file. (It is, I just peeked below..)


worker.worker1.host=webber

that needs to be localhost instead of webber (cause your Tomcat runs on
the same machine, right ?). Unless your machine knows itself as webber
of course.


worker.worker1.type=ajp13

that's good, and it's always like that. That line never changes.



This is a simple file from the tutorial.

The jkmount directives in httpd-conf... I followed the tutorial to use
the auto config, so in httpd.conf I have the following:

Include /usr/lib/apache-tomcat/conf/auto/mod_jk.conf

The contents of mod_jk.conf is as follows:

## Auto generated on Wed Jan 28 15:05:37 EST 2009##

IfModule !mod_jk.c
LoadModule jk_module
/usr/lib/httpd/modules/mod_jk-1.2.27-httpd-2.2.6.so
/IfModule

That tells Apache where to find the mod_jk module. And it is a recent
version too.



JkWorkersFile /usr/lib/apache-tomcat/conf/jk/workers.properties

that's the workers.properties both Gregor and I were talking about
then, good too.


JkLogFile /usr/lib/apache-tomcat/logs/mod_jk.log

That's where you will find a log of any errors encountered by mod_jk


JkLogLevel emerg

You could set this to info to get a better idea of what mod_jk is
doing. Even to debug if you are really curious.



I do not have a directory /etc/apache2/mods-available nor can I find the
files jk.conf and jk.load

there is also no directory /etc/apache2/mods-enabled

That's ok, each Linux distribution has some fun putting files in some
other place. Keeps the world interesting and sysadmins from getting bored.



my connector definition from ${CATALINA_HOME}/conf/server.xml is:

Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /


Very good. That is thus where Tomcat will be listening for request
coming from Apache through the mod_jk module, as I mentioned before.



Again, all this was created and configured according to the
guide/tutorial.


You did a pretty good job too. I suspect only the webber part is
wrong, and maybe your JkMount are missing in Apache.


Well answered until here. I assume it's the old put your JkMount into 
the virtual host problem.


kMount does only apply to the virtual host they are put into. So when 
they are in the global server, but your requests to httpd are handled by 
a VirtualHost, then the JkMounts are not effective for those requests.


To keep it simple, you can set JkMountCopy all in the global server, 
or you can move the JkMount lines to the virtual hosts which should 
actually do the forwarding.


Regards,

Rainer




On Wed, 2009-01-28 at 20:54 +0100, Gregor Schneider wrote:

If you want people to help you, it's a good idea to post

- workers.properties (should be in /etc/apache2)

- your jkmount-directives (should be in the httpd-conf-file of your
domain)

Not knowing CentOS, therefore just a shot from the hip:

- do you have a directory /etc/apache2/mods-available?

If so, are there two file jk.conf and jk.load?

Can you post your jk.conf?

- do you have a directory /etc/apache2/mods-enabled?

If so, do you also find there symbolic links pointing to
/etc/apache2/mods-available/jk.load and
/etc/apache2/mods-available/jk.conf?

In ${CATALINA_HOME}/conf/server.xml, have you specified a connector
for AJP/1.3? Should look similar to

Connector port=8009
enableLookups=false redirectPort=8443
protocol=AJP/1.3 address=127.0.0.1/

Can you post your connector-definition?

rgds

Gregor


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



Deploy 1st Service to Tomcat proper

2009-01-28 Thread Toriacht

Hi,

I have developed my first web service. It works fine with Tomcat within my
Eclipse IDE and the web service client within  Eclipse can connect fine and
so on.

The service is a particular class name specified by my 'service provider'.
The provider will send notifications to my webservice, it expects it to be
the name of this class. The majority of the project is standard java classes
processing the received messages and storing in a MySQL database. The
Eclipse project is called 'mywebservice' and the web service class itself
has another name, it's just a very simple java class that I exposed as a
service using Eclipse/Axis2. I want to deploy this web service to a live
Tomcat server (running on my laptop).

I am unsure how to do this. Exportwar exports a war file with the same name
of my project. I can then browse from Tomcat, import and deploy this
service. but if I click on teh service it get brought to an error page. 

Also, the java project had a lot of dependencies on jar files. Do these get
exported or do I have to manually deploy/copy these to my Tomcat server?

Thanks for reading,
Tori
-- 
View this message in context: 
http://www.nabble.com/Deploy-1st-Service-to-Tomcat-proper-tp21716925p21716925.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: UnsatisfiedLinkError in Windows Service (tomcat6w/5w.exe)

2009-01-28 Thread Michael Ludwig
Konstantin Kolinko schrieb am 23.01.2009 um 04:57:31 (+0300):
 
 I think that the answer is (and your solution proves this) that the
 statement that service does not need environment variables is not 100%
 true.
 
 That is, if you compare *.bat/*.sh with how the service is started,
 you can see that  *.bat/*.sh processes some env variables and builds
 up a java -jar command from those variables.

Thanks for your help, Konstantin.

Yes, I can see the command is built up in catalina.bat, although there
is no -jar option in my version 6.0.18.

 The service launcher from the other hand, launches that jar directly,
 thus you have to configure all the arguments explicitly, and not
 relying on the env variables. It is those vars that are not needed.
 
 If I remember correctly, the PATH variable is respected by the Win32
 API that loads the dll libraries. Thus the behavior that you had to
 include that folder into the PATH. Win32 API help should provide more
 information.
 
 http://msdn.microsoft.com/en-us/library/ms684175(VS.85).aspx
 http://msdn.microsoft.com/en-us/library/ms682586(VS.85).aspx

Yes, the second of these docs mentions the PATH environment variable is
searched in order to load, failing all other possibilities.

Thanks,

Michael

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



Re: Connecting Apache Tomcat to Apache

2009-01-28 Thread Jordan Michaels
Thanks folks. Oddly enough I ran into this same issue with almost an 
identical system at the same time as the original poster (odd in 
itself), and this solution fixed me right up. I added the JkMountCopy 
all line under the rest of my global jkmount lines and that fixed me 
right up.


Thank you!

Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
Open BlueDragon Steering Committee
Adobe Solution Provider


Rainer Jung wrote:
Well answered until here. I assume it's the old put your JkMount into 
the virtual host problem.


kMount does only apply to the virtual host they are put into. So when 
they are in the global server, but your requests to httpd are handled by 
a VirtualHost, then the JkMounts are not effective for those requests.


To keep it simple, you can set JkMountCopy all in the global server, 
or you can move the JkMount lines to the virtual hosts which should 
actually do the forwarding.


Regards,

Rainer


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



RE: Thread dump analysis

2009-01-28 Thread Pieter Temmerman
Hi Chuck


 Could it be that Tomcat ran out of connectors (maxThreads
 was hit) and after a while they get closed by the timeout?

Depends on how your DB connector pool is configured.

I was actually referring to the limit of http connections, set by maxThreads.

 This could be a plausible explanation, although, the weird thing still
 is why this coincides with the CPU topping 100%.

Could the infinite loop that these threads sometime get into include 
acquisition of a DB connection at some point inside the loop?  If your DBC 
pool is set to discard unreturned connections after some period of time, it 
will acquire more and those will become available for new requests.

Yes, the webservice connects at one point to a DB. Although, from the thread it 
seems that it's looping when reading an XML document. 

Instead of the Tomcat DB pool, the developers implemented CP30. They said that 
was better. I don't know whether it will change anything, but it's definitely 
worth the try.

I'll keep digging...

Thanks!


Re: UnsatisfiedLinkError in Windows Service (tomcat6w/5w.exe)

2009-01-28 Thread Michael Ludwig
Caldarale, Charles R schrieb am 22.01.2009 um 21:52:36 (-0600):
  From: Michael Ludwig [mailto:mil...@gmx.de]
  Subject: Re: UnsatisfiedLinkError in Windows Service (tomcat6w/5w.exe)

 If you don't mind running another experiment, please start Tomcat as a
 service once with and once without the -Djava.library.path setting in
 the Java tab of tomcat6w.exe, and use LambdaProbe or JConsole to
 examine the system properties.

I'm connected to the Tomcat service via JConsole 1.6.0_11. On the
VM Summary tab, I can see the following for Library path:

-Djava.library.path=C:\Server;C:\src\BerkeleyDbXml\dbxml-2.4.16\bin\debug;...

(I shortened it a bit.)

This is what I specified in the Java tab of tomcat6w, and is also
reflected among the VM arguments in JConsole.

Now I'm going to take that away, restart the service, reconnect and see.
First thing to notice is that the server starts fine, including the
context sporting a ServletContextListener dependent on the Berkeley
DbXml library. The library definitely loads fine. Now pasting the same
thing as before:

C:\Server\apache-tomcat-6.0.18\bin;.;C:\WINDOWS\Sun\Java\bin;...

Where you see ... I can see what looks like the value of my PATH. After
the other day's reboot, it includes the Berkeley DbXml directory.

 If -Djava.library.path is not set, you should see the system property
 set to the PATH value prefixed with Tomcat's bin directory and the
 current directory (.);

Plus, in my case, C:\WINDOWS\Sun\Java\bin. Shouldn't matter, as this
doesn't exist.

 if -Djava.library.path is set, the system property should be just the
 value from the -D.

That's precisely what I'm seeing.

Another test: I move one of the DLLs to another directory, C:\TempLib,
and include it in java.library.path, but it won't be in PATH.

And this doesn't work: Error listenerStart on startup, the context in
question isn't loaded, although C:\TempLib is included in both the VM
arguments and the Library path.

So I guess there is something wrong with Tomcat here.

Thanks for your help!

Michael Ludwig

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



Re: Programmatically Force JSP Reload

2009-01-28 Thread Landon Fabbricino
Not sure if this helps you or not.

You could use the following.

www.yourdomain.com/jspfile.jsp?jsp_precompile=true

You may be able to use this to your advantage somehow.

Landon Fabbricino
IT Applications

Phone: 403.225.7515
Fax: 403.225.7604
lfabb...@agrium.com

 
From:   Eric Grunzke eric.grun...@gmail.com
To: users@tomcat.apache.org
Date:   1/28/2009 2:20 PM
Subject:Programmatically Force JSP Reload


Hello,

I am developing an app framework that has a very costly startup cycle. 
Consequently, I try to avoid restarting apps because it takes a long time
for the core to get spooled up.  In this vein I have a custom classloader
that reloads the WEB-INF/classes directory without doing a full restart of
the app.  I've run into a problem, however, in JSPs.  It's possible for JSPs
to contain a reference to a .class file that becomes stale when I reload
behind the scenes, which results in a ClassCastException.

The bottom line here is that I am searching for a way to programmatically
force tomcat to drop all loaded JSPs from memory.  I do not need to
recompile them, just reload the classes.  However, if compilation and
reloading are inextricably linked, that's a cost I'm willing to accept.

I've tried looking around the documentation and searching the mailing list,
but I've been unsuccessful so far.  Any insight is greatly appreciated. 
Thanks!

-Eric
-- 
View this message in context: 
http://www.nabble.com/Programmatically-Force-JSP-Reload-tp21715300p21715300.html
 
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


IMPORTANT NOTICE ! 
This E-Mail transmission and any accompanying attachments may contain 
confidential information intended only for the use of the individual or entity 
named above. Any dissemination, distribution, copying or action taken in 
reliance on the contents of this E-Mail by anyone other than the intended 
recipient is strictly prohibited and is not intended to, in anyway, waive 
privilege or confidentiality. If you have received this E-Mail in error please 
immediately delete it and notify sender at the above E-Mail address.  
Agrium uses state of the art anti-virus technology on all incoming and outgoing 
E-Mail. We encourage and promote the use of safe E-Mail management practices 
and recommend you check this, and all other E-Mail and attachments you receive 
for the presence of viruses. The sender and Agrium accept no liability for any 
damage caused by a virus or otherwise by the transmittal of this E-Mail. 


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



Re: Deploy 1st Service to Tomcat proper

2009-01-28 Thread Michael Ludwig
Toriacht schrieb am 28.01.2009 um 14:48:59 (-0800):
 
 Exportwar exports a war file with the same name of my project. I can
 then browse from Tomcat, import and deploy this service. but if I
 click on teh service it get brought to an error page. 

Then the error message might give a hint as to what the problem is. It
is probably in one of the log files in $Tomcat/logs.

 Also, the java project had a lot of dependencies on jar files. Do
 these get exported or do I have to manually deploy/copy these to my
 Tomcat server?

That depends. You can use jar tf your.war to check what's in the JAR.

Michael Ludwig

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



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

2009-01-28 Thread Michael Ludwig
Hamacher, Eric schrieb am 28.01.2009 um 08:18:21 (-0600):
 
   Resource name=jdbc/GFDataSource auth=Container
 type=javax.sql.DataSource
 maxActive=30
 maxIdle=2
 maxWait=1000
 username=username
 password=password
 driverClassName=oracle.jdbc.OracleDriver
 uri=jdbc:oracle:thin:@aserver:2224:DB/

Try changing the attribute uri to url. Even though the connect URL
doesn't look like your typical web URL, it is actually used to locate
the service, not only to identify it.

Michael Ludwig

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



Re: Tomcat 6 vs Apache running as services

2009-01-28 Thread Michael Ludwig
kareda schrieb am 27.01.2009 um 09:01:57 (-0800):
 
 I have tomcat 6.0.18 running as service on win2003 server. 
 Now I also need to run php5, so I'm thinking of installing Apache HTTP
 Server 2.2.11 (should also run as service)

You might want to have a look at Caucho Quercus, a PHP 5 interpreter
written in pure Java. It also runs in servlet containers other than
Caucho Resin, for example Tomcat. Quercus runs Drupal, Wordpress and
other stuff. On the other hand, it doesn't implement all of PHP. Which
might actually be construed as an advantage.

http://quercus.caucho.com/

 I need them to run parallel and be completely independent - tomcat for
 java apps and apache for php5. 

You can have them run in separate contexts.

Michael Ludwig

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



Re: Programmatically Force JSP Reload

2009-01-28 Thread Eric Grunzke

Thanks for the response, but that doesn't appear to solve my problem.  I'm
not really concerned with when jsps are compiled, or even when they are
loaded, but rather when they are reloaded.  Allow me to provide a sample
jsp:

%...@page import=load.test.Car%
html
  body
  %
out.write(Car.get(Mustang).getTopSpeed() + br/);
  %
  /body
/html

This code will execute with no difficulties, until the domain model changes
for the type Car.  Once changed, my framework will reload the definition of
Car, but tomcat will not reload the jsp, because it is unchanged.  The next
visit to the jsp will throw a ClassCastException, as Car.get() in the jsp
will return the new class definition of Car, but attempt to cast it to the
old definition of Car that the jsp still has in memory.  I can manually fake
it by overwriting the jsp with an identical copy of itself, which tomcat
detects and then reloads.  This (along with additional sandboxing I've done)
proves that the jsp classes hold on to stale definitions.  Thus I need to
reload (but not necessarily recompile) jsp classes when I reload domain
classes, and I need to be able to do it programmatically.

-Eric


Landon Fabbricino wrote:
 
 Not sure if this helps you or not.
 
 You could use the following.
 
 www.yourdomain.com/jspfile.jsp?jsp_precompile=true
 
 You may be able to use this to your advantage somehow.
 
 Landon Fabbricino
 IT Applications
 
 Phone: 403.225.7515
 Fax: 403.225.7604
 lfabb...@agrium.com
 

-- 
View this message in context: 
http://www.nabble.com/Programmatically-Force-JSP-Reload-tp21715300p21718708.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: enableLookups=true, getRemoteHost returns ip

2009-01-28 Thread Konstantin Kolinko
2009/1/28 otismo pe...@nomad.org:

 I'm struggling to get enableLookups to work on a new Ubuntu 8.10 tomcat
 6.0.18 install.  Calls to httpServletRequest.getHostName() always return the
 IP, instead of the host name.  I set the access log to resolve hosts and it
 also shows the ip.

 Tomcat 6.0.18 and the same webapp perform the reverse lookups fine on a
 WindowsXP machine.  It doesn't appear to be a permissions problem, as I've
 temporarily granted AllPermission to my webapp.  I've traced it down to
 java.net.InetAddress.getAddressFromNameService(String host, InetAddress
 reqAddr) and the subsequent call to
 sun.net.spi.nameservice.NameService.lookupAllHostAddr(host), which returns
 null.

 Inside getAddressFromNameService, the host is the valid host that I wish
 would be returned.  Since the lookupAllHostAddr(host) call fails,
 getAddressFromNameService then throws an UnknownHostException.

 I also tried setting -Dsun.net.spi.nameservice.provider.1=dns,sun but that
 didn't make a difference.

 Could it be a dns config issue on my ubuntu box (hosted by slicehost)?
 Using the host command and an IP in question returns the host name that I
 want to get back from httpServletRequest.getRemoteHost().  Any tips for me?
 I'm a linux noob.


It is a bit hard to read your message, because you traced it down
too deeply - the real cause / explanation is one level above that
getAddressFromNameService() call.

To get host name from its IP a reverse DNS lookup is performed.
That is,

java.net.InetAddress.getHostName() is called.

You problem is that that call fails and does not return the name of
the remote host. You can write a simple standalone Java program
and test that call on that ubuntu box.

Looking in to the JDK sources (I have 1.6.0_07 one), I see that
getHostName() method is implemented as a call to private method
java.net.InetAddress.getHostFromNameService()

The implementation of getHostFromNameService() has two steps:

1). reverse DNS lookup of Host name by its IP,
 - nameService.getHostByAddr( ..) call

2). forward DNS lookup of IP addresses for the found host name,
 - InetAddress.getAllByName0(...) call

and the second step checks, that the IP address whose Host name
you were asking is among the IP addresses for that name.

It does it to prevent DNS spoofing. If the check fails, the method rejects
the host name that it has found, and returns the IP address.

It is this second step that fails in your case.

Thus, it is Sun JRE issue, or feature, and not Tomcat one.


Some searching found the following:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4148388

That is, such behavior is there since 1.1.* versions of JRE.

Also,
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4670102
proposes a workaround that uses a JNDI call to implement a DNS
lookup. Do not know, whether that works. Also, a comment there
mentions the https://javadns.dev.java.net/ project.


Best regards,
Konstantin Kolinko

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



Re: public IPadresse is non-local

2009-01-28 Thread Mihamina Rakotomandimby (R12y)

Mihamina Rakotomandimby (R12y) wrote:

I have a test box on my LAN.
The internet connexion is shared by a router (linksys box)

Reading one of the last posts of this:
http://www.generation-nt.com/reponses/rmi-probleme-de-creation-d-un-serveur-sous-linux-ubuntu-entraide-59447.html?page=3#reponse  
It has to do with RMI plying with name resolution...:


Well, it was about a network configuration issue and an unclean tomcat6 
installation.

On a clean install and a properly configured network, it works.

--
Chef de projet chez Vectoris
http://www.google.com/search?q=mihamina+rakotomandimby

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



unwar and unjar an application

2009-01-28 Thread Mihamina Rakotomandimby (R12y)

Hi,
A developer gave me just a .war file to deploy on a tomcat.
I read [w|j]ar files are just zipped.
The .war contains some .jar...

I would like to explode all the .war (and the contained jars) and have 
the full code source. I could do it manually. But then there are two 
questions:


- How to jar and war the exploded code back (to get it all archived it 
it was)?
- if I unarchive some .jar, they dont unarchive in a subdir but directly 
in the current dir. How to manage that (when unarchiving _and_ 
re-archiving)?


Well, the developper used some environment, I want to
- put the code under SVN
- edit it with Emacs/JDE

That's why I need to get it all clear.
Thank you for any advice.

--
Chef de projet chez Vectoris
http://www.google.com/search?q=mihamina+rakotomandimby

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



Re: unwar and unjar an application

2009-01-28 Thread Kirk True

Hi Mihamina,

Mihamina Rakotomandimby (R12y) wrote:

Hi,
A developer gave me just a .war file to deploy on a tomcat.
I read [w|j]ar files are just zipped.
The .war contains some .jar...

I would like to explode all the .war (and the contained jars) and 
have the full code source. I could do it manually. 


Are you sure that the WAR and its contained JARs actually have source 
code? They don't by default (and I've never seen one that does)...



But then there are two questions:

- How to jar and war the exploded code back (to get it all archived it 
it was)?
- if I unarchive some .jar, they dont unarchive in a subdir but 
directly in the current dir. How to manage that (when unarchiving 
_and_ re-archiving)?


Well, the developper used some environment, I want to
- put the code under SVN
- edit it with Emacs/JDE


These aren't really Tomcat-specific questions at all :( I'd advise 
taking each question and finding its answer via your favorite search engine.


Kirk

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



Re: Programmatically Force JSP Reload

2009-01-28 Thread Kirk True

Hi Eric,

If you call touch on the JSP does it update? This used to work on 
versions of JRun back in the 90's.


Just a shot in the dark...

Kirk

Eric Grunzke wrote:

Hello,

I am developing an app framework that has a very costly startup cycle. 
Consequently, I try to avoid restarting apps because it takes a long time

for the core to get spooled up.  In this vein I have a custom classloader
that reloads the WEB-INF/classes directory without doing a full restart of
the app.  I've run into a problem, however, in JSPs.  It's possible for JSPs
to contain a reference to a .class file that becomes stale when I reload
behind the scenes, which results in a ClassCastException.

The bottom line here is that I am searching for a way to programmatically
force tomcat to drop all loaded JSPs from memory.  I do not need to
recompile them, just reload the classes.  However, if compilation and
reloading are inextricably linked, that's a cost I'm willing to accept.

I've tried looking around the documentation and searching the mailing list,
but I've been unsuccessful so far.  Any insight is greatly appreciated. 
Thanks!


-Eric
  


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



Re: unwar and unjar an application

2009-01-28 Thread Mihamina Rakotomandimby (R12y)

Kirk True wrote:

A developer gave me just a .war file to deploy on a tomcat.
I read [w|j]ar files are just zipped.
The .war contains some .jar...
I would like to explode all the .war (and the contained jars) and 
have the full code source. I could do it manually. 
Are you sure that the WAR and its contained JARs actually have source 
code? They don't by default (and I've never seen one that does)...


To deplay the application, they usually put the WAR into the webapp 
directory and they it runs: I concluded the source code is in there.


In case the war dont contain the source code:
- Where is the application code?
- Why do they need to upload that big file (1.1Mo big in my case)?


But then there are two questions:
- How to jar and war the exploded code back (to get it all archived it 
it was)?
- if I unarchive some .jar, they dont unarchive in a subdir but 
directly in the current dir. How to manage that (when unarchiving 
_and_ re-archiving)?

Well, the developper used some environment, I want to
- put the code under SVN
- edit it with Emacs/JDE
These aren't really Tomcat-specific questions at all :( I'd advise 
taking each question and finding its answer via your favorite search 
engine.


The last section of my post was to explain the goal, so that people 
could understand my request. Obviously I did not expect some indication 
about that.


--
Chef de projet chez Vectoris
http://www.google.com/search?q=mihamina+rakotomandimby

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



Re: Tomcat 6.0 loading servlet twice

2009-01-28 Thread Ani



 On Thu, Jan 29, 2009 at 11:40, Ani jadhao.anirud...@gmail.com wrote:

 Hello,
 I have a web application in which I am facing one wiered pbm. I see tomcat
 loading servlet twice , on which my application logic is failing and quits.
 Getting below error in log file.
 My findings : One thing I did was , inside comp folder I made a copy of
 website folder and renamed it to website_old. Now both folders contains
 servlet.jar. Will it be causing a pbm???
 ==
 Jan 29, 2009 10:48:34 AM org.apache.catalina.loader.WebappClassLoader
 validateJarFile
 INFO: validateJarFile(.\comp\website_old\WEB-INF\lib\servlet.jar) - jar no

 t loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
 javax/servlet/Servlet.class
 ==


 I have
 Server.xml has an entry of below

 Context docBase=C:\Program Files\Avaya/comp/website path=/website
 reloadable=false crossContext=true /

 So tomcat should look for website folder in the specified directory, but
 in the C:\Program Files\Avaya/comp directory, there are two directories ,
 website and website_old.
 Why tomcat is searching for C:\Program Files\Avaya/comp/website_old
 application if it gets the C:\Program Files\Avaya/comp/website . ??
 I have tomcat6.

 Any reason??
 --Ani





Re: Programmatically Force JSP Reload

2009-01-28 Thread Eric Grunzke

Thanks for the reply, Kirk.  Calling touch probably would force Tomcat to
reload the jsp, but it's not a complete solution.  In production
environments, Tomcat polls the filesystem for changes, so until the next
polling cycle hits, the app would still get a ClassCastException. 
Additionally, there are performance implications for for continually
recompiling in a production environment (the default checkInterval is zero,
which results in no runtime checks for modification).

I considered calling touch or making a trivial change to the jsp (like extra
whitespace at the end), but I can never completely eliminate the failure
window that way, and it's a bit of a kludge anyways.  When Context.reload()
is called, something in there reloads the jsps.  I just need to find that
something.

-Eric


Kirk True wrote:
 
 Hi Eric,
 
 If you call touch on the JSP does it update? This used to work on 
 versions of JRun back in the 90's.
 
 Just a shot in the dark...
 
 Kirk
 

-- 
View this message in context: 
http://www.nabble.com/Programmatically-Force-JSP-Reload-tp21715300p21721735.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: HTTP status 404 - Context config

2009-01-28 Thread Stephen Vaughan
Nevermind, I've resolved it.

thank you for replying.

On Wed, Jan 28, 2009 at 2:04 AM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Stephen Vaughan [mailto:stephenvaug...@gmail.com]
  Subject: HTTP status 404 - Context config
 
  I'm having trouble setting up a context with jdbc.postgresql

 What version of Tomcat?

 What vendor and version of JVM?

 What platform?

 Where is your Context element located?

 What's in the Tomcat logs?

 (Don't muck with log4j unless your webapp requires it - start over with a
 clean install of Tomcat.)

  - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-- 
Best Regards,
Stephen


Tomcat getting stopped automatically

2009-01-28 Thread Javed420

Hi,

I am doing processing over data from xls file on perticular request. But
Tomcat gets automatically stopped in middle of execution. If anybody
know reply.
-- 
View this message in context: 
http://www.nabble.com/Tomcat-getting-stopped-automatically-tp21721882p21721882.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



[Fwd: [ANN-pmcs] Registration for ApacheCon Europe 2009 is now open!]

2009-01-28 Thread Mark Thomas
ApacheCon EU 2009 registration is now open!
23-27 March -- Mövenpick Hotel, Amsterdam, Netherlands
http://www.eu.apachecon.com/


Registration for ApacheCon Europe 2009 is now open - act before early
bird prices expire 6 February.  Remember to book a room at the Mövenpick
and use the Registration Code: Special package attendees for the
conference registration, and get 150 Euros off your full conference
registration.

Lower Costs - Thanks to new VAT tax laws, our prices this year are 19%
lower than last year in Europe!  We've also negotiated a Mövenpick rate
 of a maximum of 155 Euros per night for attendees in our room block.

Quick Links:

   http://xrl.us/aceu09sp  See the schedule
   http://xrl.us/aceu09hp  Get your hotel room
   http://xrl.us/aceu09rp  Register for the conference

Other important notes:

- Geeks for Geeks is a new mini-track where we can feature advanced
technical content from project committers.  And our Hackathon on Monday
and Tuesday is open to all attendees - be sure to check it off in your
registration.

- The Call for Papers for ApacheCon US 2009, held 2-6 November
2009 in Oakland, CA, is open through 28 February, so get your
submissions in now.  This ApacheCon will feature special events with
some of the ASF's original founders in celebration of the 10th
anniversary of The Apache Software Foundation.

   http://www.us.apachecon.com/c/acus2009/

- Interested in sponsoring the ApacheCon conferences?  There are plenty
of sponsor packages available - please contact Delia Frees at
de...@apachecon.com for further information.

==
ApacheCon EU 2008: A week of Open Source at it's best!

Hackathon - open to all! | Geeks for Geeks | Lunchtime Sessions
In-Depth Trainings | Multi-Track Sessions | BOFs | Business Panel
Lightning Talks | Receptions | Fast Feather Track | Expo... and more!

- Shane Curcuru, on behalf of
  Noirin Shirley, Conference Lead,
  and the whole ApacheCon Europe 2009 Team
  http://www.eu.apachecon.com/  23-27 March -- Amsterdam, Netherlands




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