JNDIRealm and password expiration

2008-01-16 Thread Andris Eiduks
Hi!

We use JNDIRealm for users authentication from Tomcat again OpenLDAP.
But users doesn't get notifications about password expiration.

It is possible for current solution (Tomcat and OpenLDAP) ?
Or we must create different functions in web application for passwords
expiry dates searching directly into OpenLDAP?


Thanks in advance,

Andris Eiduks


Re: Hi

2008-01-16 Thread ben short
Sounds like your code might have a memory leak.

The best thing todo is to profile the application and see where all
the memory is being used.

On Jan 16, 2008 8:52 AM, Katama Reddy [EMAIL PROTECTED] wrote:
 Hi,

 I was facing an issue in one of the web application which was deployed in
 Apache Tomcat server. The issue was getting out of memory error after 2-3
 months of deployment and happening frequently(after every 2-3 months). It
 would be great if some one suggest the reasons for occurring this issue.
 The application was build on JSF(MyFaces implementation), Spring and
 Hibernate technologies.

 Thanks
 Katama Reddy Chinnapapi Reddy Gari
 Tata Consultancy Services
 Mailto: [EMAIL PROTECTED]
 Website: http://www.tcs.com
 
 Experience certainty.   IT Services
 Business Solutions
 Outsourcing
 
 =-=-=
 Notice: The information contained in this e-mail
 message and/or attachments to it may contain
 confidential or privileged information. If you are
 not the intended recipient, any dissemination, use,
 review, distribution, printing or copying of the
 information contained in this e-mail message
 and/or attachments to it are strictly prohibited. If
 you have received this communication in error,
 please notify us by reply e-mail or telephone and
 immediately and permanently delete the message
 and any attachments. Thank you




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



RE: How can I get Administration-tool for tomcat 6?

2008-01-16 Thread higaki shoutarou


--- Caldarale, Charles R [EMAIL PROTECTED] wrote:

 The admin webapp was not ported to Tomcat 6 for a variety of reasons.
 You can use Lambda Probe (www.lambdaprobe.org) for some of the
 information, and JConsole to poke around inside the various MBeans
 Tomcat has.  However, neither of these allow the dynamic reconfiguration
 that the admin webapp attempted to provide.

Thanks. I'll try Lamdda Probe.

Shotaro

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



Hi

2008-01-16 Thread Katama Reddy
Hi,

I was facing an issue in one of the web application which was deployed in 
Apache Tomcat server. The issue was getting out of memory error after 2-3 
months of deployment and happening frequently(after every 2-3 months). It 
would be great if some one suggest the reasons for occurring this issue. 
The application was build on JSF(MyFaces implementation), Spring and 
Hibernate technologies.

Thanks
Katama Reddy Chinnapapi Reddy Gari
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com

Experience certainty.   IT Services
Business Solutions
Outsourcing

=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




RE: How can I speed up and reduce load of initialization

2008-01-16 Thread Peter Crowther
 From: Gavan Hood [mailto:[EMAIL PROTECTED]
   My problem is the initialization.
   When I start tomcat it takes about two minutes to complete
 initialization and pegs my little processor at times, often
 it keeps it around 80% untilized...

Yeah, that's not good in an embedded device!

2 minutes with or without your application deployed?  i.e. how much of that 
time is Tomcat startup, and how much is Tomcat deploying your webapp / your 
webapp startup?

How is your application packaged?  Are you unpacking it from a WAR, or is it 
already unpacked?

- Peter

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



java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory

2008-01-16 Thread olk

Hi,

I'm trying to create an applet launching tomcat 6 in embedded mode, but it
seams that the logging from Tomcat 5.5 to 6 has changed and there are some
references left somewhere in the code for the embedded mode.

The org.apache.catalina.core.StandardService has an import
org.apache.juli.logging.LogFactory, but the org.apache.juli in the
catalina.jar of apache-tomcat-6.0.14 is empty ? there is no
LogFactory.class file.




java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
at
org.apache.catalina.core.StandardService.clinit(StandardService.java:56)
at
org.igss.offlineclient.applets.QUController.startTomcat(QUController.java:271)
at 
org.igss.offlineclient.applets.QUController.init(QUController.java:143)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

-- 
View this message in context: 
http://www.nabble.com/java.lang.NoClassDefFoundError%3A-org-apache-juli-logging-LogFactory-tp14875983p14875983.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Effect of MaxThreads

2008-01-16 Thread Berglas, Anthony
Thanks for this.  We tried it and it did fail.  I don't understand the
reasoning though, I would have thought that the whole point of a queue
is to queue requests for which there is no available threads.  And I
would hope that threads would be returned to the pool when a request
ends.

It is not really Threads that we want to control, but rather the number
of concurrent servlet requests processed.

One other odd thing is that when we ran our multi threaded clients from
two different client machines at the same time we received failures.  It
felt like different connectors were being used for different client
machines, which does not make sense.  They both reference the server
with the same URL.

We have Apache in front of Tomcat (for dubious but required reasons).

Anyway, the bottom line is that I could not get maxThreads/acceptCount
to effectively throttle calls to the servlets. (Which was required
because the max connections parameter could not be set via JNDI for the
Oracle Connection pooler, which was required because the application
specifies the password which DBCP could not handle.)

Regards,

Anthony

 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Barker
 Sent: Tuesday, January 15, 2008 12:09 PM
 To: users@tomcat.apache.org
 Subject: Re: Effect of MaxThreads
 
 Yes, but the way that the default, non-APR, AJP/1.3 Connector works,
 connections generally will stay open tying up the corresponding
threads.
 This means that acceptCount doesn't really do very much in this case.
 Tomcat will end up failing the request if it can't find a free thread
for
 it.
 
 The APR and (experimental) NIO AJP/1.3 Connectors don't have this
problem,
 since they don't have any link between the number of threads (which
are
 only
 for active requests) and number of Socket connections.
 
 Caldarale, Charles R [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 EXCH2.na.uis.unisys.com...
  From: Berglas, Anthony [mailto:[EMAIL PROTECTED]
  Subject: Effect of MaxThreads
 
  Tomcat connectors provide maxThreads parameter to throttle
  the number of concurrent transactions.  But what actually
  happens when this number is exceeded?
 
 It's in the doc:
 http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
 
 acceptCount - The maximum queue length for incoming connection
requests
 when all possible request processing threads are in use. Any requests
 received when the queue is full will be refused. The default value is
 10.
 
  We have Apache in front of Tomcat (for dubious reasons).
 
 So why not remove the httpd overhead?
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE
PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete the
e-mail
 and its attachments from all computers.
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: Access a config file located outsite j2ee app [SEC=UNOFFICIAL]

2008-01-16 Thread David Smith
I tried using relative paths once.  My experience is relative paths 
won't work as the current directory is whatever the working directory 
was on tomcat start.  I had to scrap it as it really wasn't consistent 
enough to be usable.  Something to try might be setting this path using:


(inside the Context element for the webapp)
Environment name=confPath value=/path/to/conf/file/or/dir  
type=java.lang.String override=false/


And then call it up in a webapp using a standard JDNI lookup using 
'java:comp/env/confPath':


Context initCtx = new InitialContext();
String confFilePath = (String) initCtx.lookup(java:comp/env/confPath);
// Open the file using standard java.io methods and the path retrieved 
above here


--David

Caldarale, Charles R wrote:
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] 
Subject: Access a config file located outsite j2ee app 
[SEC=UNOFFICIAL]


1. The commented line 
env.put(Context.PROVIDER_URL, 
file:C:\\confluence\\confluence-2.5.1-std\\conf);



Not sure this will work (or even if it's a good idea), but you might try
a relative path with forward slashes (which is what the JVM uses
internally anyway):
file:../conf

Since Tomcat's normal working directory is bin - at the same directory
level as conf - this may work.  

  
2. Can I somehow set the context to look into the conf 
directory of Tomcat without hard coding the path



You could set a context parameter or an environment entry:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html%20Context%20
Parameters
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html%20Environmen
t%20Entries
either in the Context element or in WEB-INF/web.xml, again using a
relative path.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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

  



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



How to get the authenticated user

2008-01-16 Thread Vackar

Hi,

Does anyone know how to get the username of the person who is currently
logged in.
I'm running tomcat 6 and authentication is done using LDAP.
Something link nameOfTagLib: nameofMethodToGetUsername woulf be nice :-D

Thanks,
Vackar
-- 
View this message in context: 
http://www.nabble.com/How-to-get-the-authenticated-user-tp14877650p14877650.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: How to get the authenticated user

2008-01-16 Thread David Smith
1. Reposts are annoying and I saw this post *3* times.  Please wait for 
answers.


2. Assuming you are trying to do this in a jsp, have your considered 
${pageContext.request.remoteUser} ?


--David

Vackar wrote:

Hi,

Does anyone know how to get the username of the person who is currently
logged in.
I'm running tomcat 6 and authentication is done using LDAP.
Something line nameOfTagLib: nameofMethodToGetUsername woulf be nice :-D

Thanks,
Vackar
  



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



Re: Effect of MaxThreads

2008-01-16 Thread Rainer Jung
How do you connect httpd to Tomcat? Via mod_jk, mod_proxy_http or 
mod_proxy_ajp?


Which MPM do you use in httpd, prefork (single-threaded) or worker 
(multi-threaded) or something else?


To give you hints, it would be nice to see your connector configuration, 
and the configuration of your httpd to Tomcat connection module (e.g. 
mod_jk) and the MPM config as well.


What do you mean by tried it and by it did fail?

Regards,

Rainer

Berglas, Anthony wrote:

Thanks for this.  We tried it and it did fail.  I don't understand the
reasoning though, I would have thought that the whole point of a queue
is to queue requests for which there is no available threads.  And I
would hope that threads would be returned to the pool when a request
ends.

It is not really Threads that we want to control, but rather the number
of concurrent servlet requests processed.

One other odd thing is that when we ran our multi threaded clients from
two different client machines at the same time we received failures.  It
felt like different connectors were being used for different client
machines, which does not make sense.  They both reference the server
with the same URL.

We have Apache in front of Tomcat (for dubious but required reasons).

Anyway, the bottom line is that I could not get maxThreads/acceptCount
to effectively throttle calls to the servlets. (Which was required
because the max connections parameter could not be set via JNDI for the
Oracle Connection pooler, which was required because the application
specifies the password which DBCP could not handle.)

Regards,

Anthony


-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Barker
Sent: Tuesday, January 15, 2008 12:09 PM
To: users@tomcat.apache.org
Subject: Re: Effect of MaxThreads

Yes, but the way that the default, non-APR, AJP/1.3 Connector works,
connections generally will stay open tying up the corresponding

threads.

This means that acceptCount doesn't really do very much in this case.
Tomcat will end up failing the request if it can't find a free thread

for

it.

The APR and (experimental) NIO AJP/1.3 Connectors don't have this

problem,

since they don't have any link between the number of threads (which

are

only
for active requests) and number of Socket connections.

Caldarale, Charles R [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
EXCH2.na.uis.unisys.com...

From: Berglas, Anthony [mailto:[EMAIL PROTECTED]
Subject: Effect of MaxThreads

Tomcat connectors provide maxThreads parameter to throttle
the number of concurrent transactions.  But what actually
happens when this number is exceeded?

It's in the doc:
http://tomcat.apache.org/tomcat-6.0-doc/config/http.html

acceptCount - The maximum queue length for incoming connection

requests

when all possible request processing threads are in use. Any requests
received when the queue is full will be refused. The default value is
10.


We have Apache in front of Tomcat (for dubious reasons).

So why not remove the httpd overhead?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE

PROPRIETARY

MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the

e-mail

and its attachments from all computers.


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



Re: How to get the authenticated user

2008-01-16 Thread Vackar

Apologies for re-posts, I edited the original message a couple of times
because I can't type... Sorry:-((

David Smith-2 wrote:
 
 1. Reposts are annoying and I saw this post *3* times.  Please wait for 
 answers.
 
 2. Assuming you are trying to do this in a jsp, have your considered 
 ${pageContext.request.remoteUser} ?
 
 --David
 
 Vackar wrote:
 Hi,

 Does anyone know how to get the username of the person who is currently
 logged in.
 I'm running tomcat 6 and authentication is done using LDAP.
 Something line nameOfTagLib: nameofMethodToGetUsername woulf be nice
 :-D

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

-- 
View this message in context: 
http://www.nabble.com/How-to-get-the-authenticated-user-tp14877650p14878232.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: How to get the authenticated user

2008-01-16 Thread Vackar

Thanks for the tip David! For those who are uding jsf then it's done like
this:
FacesContext.getCurrentInstance().getExternalContext().getRemoteUser();

Next question is:- does anyone know how to expire the authenticated session
- used for logout.

Thanks,
Vackar



Vackar wrote:
 
 Apologies for re-posts, I edited the original message a couple of times
 because I can't type... Sorry:-((
 
 David Smith-2 wrote:
 
 1. Reposts are annoying and I saw this post *3* times.  Please wait for 
 answers.
 
 2. Assuming you are trying to do this in a jsp, have your considered 
 ${pageContext.request.remoteUser} ?
 
 --David
 
 Vackar wrote:
 Hi,

 Does anyone know how to get the username of the person who is currently
 logged in.
 I'm running tomcat 6 and authentication is done using LDAP.
 Something line nameOfTagLib: nameofMethodToGetUsername woulf be nice
 :-D

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

-- 
View this message in context: 
http://www.nabble.com/How-to-get-the-authenticated-user-tp14877650p14878654.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Cluster error, timeouts.

2008-01-16 Thread Raúl García
Hi all, I'm Raúl.

We had a tomcat 5.0.28 server configured with 2 clustered instances(working
perfectly), and we decided to migrate to java6 and the new tomcat 6.0.14.

We modify the configuration files to match the new tomcat 6.0.14 structure.
But now we have really annoying problems with the cluster.

This server receives aprox. 1 petition per second. We have pen as the load
balancer between 2 instances.

Once started, both instances report member.added and seems to be clustered.
Works fine.
But around 12 days after being started, instance number 2, report a
cluster.member disappear, then the session replication doesn't work,
instance 2 is unstable and gives a timeout error (But instance 1 is
working!!).

Intance2 Log:
=
Jan 14, 2008 7:05:17 PM org.apache.catalina.tribes.transport.nio.NioReceiver
socketTimeouts
WARNING: Channel key is registered, but has had no interest ops for the last
3000 ms. (cancelled:false):[EMAIL PROTECTED] last
access:2008-01-14 19:05:12.847
Jan 14, 2008 7:05:22 PM org.apache.catalina.tribes.transport.nio.NioReceiver
socketTimeouts
WARNING: Channel key is registered, but has had no interest ops for the last
3000 ms. (cancelled:false):[EMAIL PROTECTED] last
access:2008-01-14 19:05:17.848
Jan 14, 2008 7:05:27 PM org.apache.catalina.tribes.transport.nio.NioReceiver
socketTimeouts
WARNING: Channel key is registered, but has had no interest ops for the last
3000 ms. (cancelled:false):[EMAIL PROTECTED] last
access:2008-01-14 19:05:22.85
Jan 14, 2008 7:05:35 PM org.apache.catalina.tribes.transport.nio.NioReceiver
socketTimeouts
WARNING: Channel key is registered, but has had no interest ops for the last
3000 ms. (cancelled:false):[EMAIL PROTECTED] last
access:2008-01-14 19:05:30.111
Jan 14, 2008 7:05:35 PM org.apache.catalina.tribes.transport.nio.NioReceiver
socketTimeouts
WARNING: Channel key is registered, but has had no interest ops for the last
3000 ms. (cancelled:false):[EMAIL PROTECTED] last
access:2008-01-14 19:05:27.852
Jan 15, 2008 1:56:37 AM
org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor report
INFO: ThroughputInterceptor Report[
Tx Msg:2 messages
Sent:11.00 MB (total)
Sent:11.00 MB (application)
Time:28.14 seconds
Tx Speed:0.39 MB/sec (total)
TxSpeed:0.39 MB/sec (application)
Error Msg:0
Rx Msg:12195 messages
Rx Speed:0.00 MB/sec (since 1st msg)
Received:6.74 MB]
Jan 15, 2008 8:48:36 AM org.apache.catalina.ha.tcp.SimpleTcpCluster
memberDisappeared
INFO: Received member
disappeared:org.apache.catalina.tribes.membership.MemberImpl[tcp://localhost
:4001,localhost,4001, alive=72702012,id={-44 -75 50 38 26 -53 72 -63 -76 -94
12 82 127 106 126 -61 }, payload={}, command={}, domain={}, ]
Jan 15, 2008 8:48:36 AM
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
performBasicCheck
INFO: Suspect member, confirmed
dead.[org.apache.catalina.tribes.membership.MemberImpl[tcp://localhost:4001,
localhost,4001, alive=72702012,id={-44 -75 50 38 26 -53 72 -63 -76 -94 12 82
127 106 126 -61 }, payload={}, command={}, domain={}, ]]
Jan 15, 2008 8:48:39 AM
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
memberDisappeared
INFO: Received
memberDisappeared[org.apache.catalina.tribes.membership.MemberImpl[tcp://loc
alhost:4001,localhost,4001, alive=72705018,id={-44 -75 50 38 26 -53 72 -63
-76 -94 12 82 127 106 126 -61 }, payload={}, command={}, domain={}, ]]
message. Will verify.
Jan 15, 2008 8:48:39 AM
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
memberDisappeared
INFO: Verification complete. Member still
alive[org.apache.catalina.tribes.membership.MemberImpl[tcp://localhost:4001,
localhost,4001, alive=72705018,id={-44 -75 50 38 26 -53 72 -63 -76 -94 12 82
127 106 126 -61 }, payload={}, command={}, domain={}, ]]
Jan 15, 2008 8:48:39 AM org.apache.catalina.ha.tcp.SimpleTcpCluster send
SEVERE: Unable to send message through cluster sender.
org.apache.catalina.tribes.ChannelException: Operation has timed out(6
ms.).; Faulty members:tcp://localhost:4001;
at
org.apache.catalina.tribes.transport.nio.ParallelNioSender.sendMessage(Paral
lelNioSender.java:97)
at
org.apache.catalina.tribes.transport.nio.PooledParallelSender.sendMessage(Po
oledParallelSender.java:53)
at
org.apache.catalina.tribes.transport.ReplicationTransmitter.sendMessage(Repl
icationTransmitter.java:80)
at
org.apache.catalina.tribes.group.ChannelCoordinator.sendMessage(ChannelCoord
inator.java:78)
at
org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelI
nterceptorBase.java:75)
at
org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor.sendMess
age(ThroughputInterceptor.java:61)
at
org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelI
nterceptorBase.java:75)
at
org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor.sen

Re: mod_jk maintenance, recovery

2008-01-16 Thread Rainer Jung

Dominik Pospisil wrote:

Indeed. It would be OK to return 503, for requests, that already have
been received by the first node, but not returned yet. New requests


That's the case. All errors I am getting are from requests which were allready 
in processing by failing node. Why it is OK to return 503 for such requests? 
Why after mod_jk detect failure does not redirect them to second node? I have 
recovery_option attribute set to zero.


I am sorry for disturbing you with questins again, but it is really essential 
for me to learn how mod_jk failover works in detail.


Let's see, if this matches your experience: assuming recovery_options=0, 
the request should be retried on other lb member workers (if such exist 
and are OK), unless it's a POST and the POST body is bigger than 8186 
bytes and more than the first 8186 bytes have already been sent to the 
backend.


Why doesn't it get retried in this case? Because we only buffer that 
many data for retry.


POST bodies can get very big (uploads), so it's not good to buffer 
complete POST bodies (could take a lot of memory). AJP tries to stream 
packets through the web server to the backend as they arrive. The actual 
design simply decides to buffer one ajp packet, which is 8192 bytes 
minus ajp head = 8186 bytes.


Does that fit your observations?



Thanks again,

Dominik


Regards,

Rainer

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



Re: mod_jk maintenance, recovery

2008-01-16 Thread Rainer Jung

... adding to previous post:

It also does not retry/fail over, in the following (more or less obvious 
cases):


- there was a problem with the client (browser) connection
- we already started to send back parts of the response to the client, 
typically the headers (depending on recovery_options; default: 
retry/fail over)

- Internal JK error (not observed in practise yet)
- depending on recovery_options: if the backend received the request 
(default: retry/fail over)


Regards,

Rainer

Dominik Pospisil wrote:

Indeed. It would be OK to return 503, for requests, that already have
been received by the first node, but not returned yet. New requests


That's the case. All errors I am getting are from requests which were allready 
in processing by failing node. Why it is OK to return 503 for such requests? 
Why after mod_jk detect failure does not redirect them to second node? I have 
recovery_option attribute set to zero.


I am sorry for disturbing you with questins again, but it is really essential 
for me to learn how mod_jk failover works in detail.


Thanks again,

Dominik


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



RE: [Axis2] FileNotFoundException (SESSIONS.ser) during tomcat shutdown

2008-01-16 Thread aschoedl


Caldarale, Charles R wrote:
 
 From: Michele Mazzucco [mailto:[EMAIL PROTECTED] 
 
 The folder is created at tomcat startup but when I stop tomcat  
 it still complains because it doesn't find the file SESSIONS.ser  
 (i.e. the same error occurs).
 
 

Looks a lot like an Axis problem after all:
https://issues.apache.org/jira/browse/AXIS2-3052
Undeploy fails to persist sessions on Tomcat 5.5 and 6

- Andreas
-- 
View this message in context: 
http://www.nabble.com/FileNotFoundException-%28SESSIONS.ser%29-tp14292358p14878817.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Problem by deploy WAR to Tomcat

2008-01-16 Thread Thomas Chang
Hi all,
   
  I deployed my WAR to Tomcat by using mvn tomcat:deploy  Though I got 
result BUILD SUCCESSFUL, I can't see this web-app in Tomcat.
   
  Someone knows why?

   
-
Ihr erstes Fernweh? Wo gibt es den schönsten Strand. 

PDF problem on IF from JSP

2008-01-16 Thread Jonadan

Hi,

I am generating PDF documents from JSP directly to output stream. However
when I try it from IE, it does not work properly. Sometime nothing happens.
Sometimes, show data corruption error. Sometimes connection error, etc.

I suspect it may be something to do with partial content reading from IE and
Tomcat does not support or my JSP does not take care, etc.

Anyone had the same problems before?

Jonadan.

-- 
View this message in context: 
http://www.nabble.com/PDF-problem-on-IF-from-JSP-tp14879788p14879788.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Forwarding with jkmount

2008-01-16 Thread Edwin Walsh

Hi,

It is a bit late for a reply, but it took our system administrators some 
time to finally commit the changes. The last thing you wrote did indeed 
work, although you must make sure to remember to set the SetHandler 
jakarta-servlet or it won't do anything with the values you have set.


Now I did turn out to work a little different. I did eventually change 
the name of the newer applications for reasons other then described in 
the problem. So the solution turned out to be a combination of a 
rewriterule, proxypassreverse and a jkmount.


I did not have to change anything for the old applications, so I will 
only list the configuration of the new ones (and this only if anybody 
ever comes across the same problem...

So the rewriterule is something like this:
  RewriteRule ^/cartagenia/bench/(.*) /bench_$1 [P]
  ProxyPassReverse  /cartagenia/bench/ http://www.esat.kuleuven.be/bench_
Notice that I only use the option [P], and not [PT]. This because I 
forward the original url to a new url on the same server, which causes 
it to actually go back into the start of the process but with a 
different url. It seems logical now, but was something I overlooked when 
trying things out...


I then have a separate JkMount rule that forwards everything starting 
with bench_:

JkMount  /bench_* cartagen

So the solution turned out to be completely different from what I 
initially planned, but eventually we found a way to get the needed 
results. Thanks again for all your help Rainer.


Greetings
Edwin

Rainer Jung wrote:


OK, then plan B:

mod_jk has a less known way of deciding which worker to use when 
forwarding requests. You can also put the name of the worker to use in 
an httpd environment variable. If no JkMount matches, mod_jk checks 
the value of this variable, and if set, it sends the request to the 
worker that has the same name as the value of the variable.


What's nice: mod_rewrite in httpd 2.2 is able to set environment 
variables.


So you can first have a rule, that takes the original URL and sets the 
name of the worker (old_worker vs. new_worker9 into the variable, and 
the next rule rewrites the URL (removing the /something).


See 'env|E=VAR:VAL' (set environment variable) in 
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html.


For the name of the environment variable, it is JK_WORKER_NAME. You 
can even change the name of the variable, if you don't like it with 
the directive JkWorkerIndicator. For the details and an example see 
Using SetHandler and Environment Variables in 
http://tomcat.apache.org/connectors-doc/reference/apache.html


Have fun!

Rainer




Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm


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



Re: strange forwarding problem with jkmount

2008-01-16 Thread Edwin Walsh

Hi,

It was as I expected and a virtual server was 'eating' my requests. The 
JkMount was actually already set up in the global server, but by adding 
the line JkMountCopy All it got forwarded to all the virtualhosts as 
well. Since this is only a temporary problem for us, it will have to do...


Greetings
Edwin

Rainer Jung wrote:

Hi Edwin,

Edwin Walsh wrote:

Hi,

I have the most peculiar problem (at least in my point of view) with 
forwarding with jkmount. JkMount has always worked on my server, but 
suddenly, without changing anything but the mod_jk settings (adding a 
new jkmount and some rewriterules), JkMount suddenly only works if I 
connect to my server from localhost and not from any other location.
I can't post the entire configuration of the server here, only the 
section of mod_jk which you can find below.


Is there anybody that could give me a hint on where I might start 
looking for the problem? What I suspect myself is that there might be 
some virtualhost or directory that eats the incoming external request 
so that I never get to the mod_jk section. And that it doesn't do 
this when I connect from localhost. But it beats me why it would do 
that.


I actually didn't read your config, but the description reminds me of 
a problem I had to analyze a few weeks ago. Customer had a SuSE linux 
system, which included an entry into /etc/hosts like


127.0.0.2 myserver

and myserver was the name of the machine.

Now if you configure a virtual host myserver:80 in your httpd 
configuration, what will happen?


When httpd starts, it will resolve myserver, and by the usual 
configuration, /etc/hosts will come first and resolve into 127.0.0.2. 
So requests will be mapped to this vhost, if they actually talk to 
127.0.0.2.


Clients connection from local to myserver:80 will also resolve the 
name into 127.0.0.2, and thus the request will be successfully mapped 
by httpd to the vhost.


Clients connecting from remote, will find myserver in DNS etc. and 
resolve the official address. Even if httpd listens to it, it will not 
associate the request with the myserver vhost.


Check your /etc/hosts, if there is a nonsense entry for the name of 
your server in there. Also check your /etc/nsswitch.conf (assuming 
it's *nix), and go through those name services, checking for your 
server entries in them.


If you are not allowed to control/fix those name services, you can put 
the JkMount into the global server and JkMountCopy On into each vhost, 
which is suspect to catch the request. That might not be what you 
want, though.


Regards,

Rainer

P.S.: If you want to debug, which virtual server (or even the global 
server) catches a request, configure a different access log for each 
vhost and the global server. That way you can easily find out, which 
vhost handles your request.




The error that I get from the apache logs is :
[Mon Jan 14 15:30:06 2008] [error] [client 10.33.132.252] File does 
not exist: /volume1/www/htdocs/esat/jsp-examples
which makes me thing that the section in the configuration that is 
'eating' my requests has a document base of  
/volume1/www/htdocs/esat/, but I am not sure if that is a right 
presumption.


Greetings,
Edwin

IfModule jk_module
   JkWorkersFile   conf/extra/workers.properties
   JkLogFile   /volume1/www/logs/mod_jk.log
   JkLogLevel  info
   JkLogStampFormat[%a %d %b %Y %H:%M:%S] 
   JkShmFile   /volume1/www/logs/mod_jk-runtime-status
   JkMount /jsp-examples/* tomcat

   RewriteEngine   On
   JkMount /bench_* cartagen
/IfModule

Location /jkmanager/
JkMount jkstatus
Order deny,allow
Deny from all
Allow from 127.0.0.1
/Location


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



Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm


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



Tomcat 6 embedded use - problems with jsp - No Java compiler available

2008-01-16 Thread olk

Hi,

I'm running tomcat in embedded mode from an applet. When I open a html page
the embedded server responds correct. When I call a jsp I get the error
java.lang.IllegalStateException: No Java compiler available below. Does
maybe someone know what the reason could be ? - or point me to a good
documentation for the embedded use of tomcat 6 ?

Thx.

INFO: Starting tomcat server
Jan 16, 2008 12:10:23 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
Jan 16, 2008 12:10:23 PM org.apache.catalina.startup.ContextConfig
defaultWebConfig
INFO: No default web.xml
Jan 16, 2008 12:10:24 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jan 16, 2008 12:10:24 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jan 16, 2008 12:10:48 PM org.apache.catalina.core.StandardWrapperValve
invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.IllegalStateException: No Java compiler available
at
org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:229)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:561)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at 
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
at 
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
at
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)
at
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
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:263)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)

-- 
View this message in context: 
http://www.nabble.com/Tomcat-6-embedded-use---problems-with-jsp---No-Java-compiler-available-tp14881179p14881179.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



setting cookie and ProxyPassReverse

2008-01-16 Thread Edwin Walsh

Hi,

One of our web applications is set up to have people agree to a license 
agreement before using our site. This is done by setting up a cookie 
that tells our browser that they have accepted the agreement. This to 
avoid that people would have to accept it every time they brows to that 
web application.
I have also set up a system (thanks to Rainer ;) ) that takes a certain 
url, parses it to a different less convenient one and then forwards it 
to our Tomcat applications with JkMount.


The problem is that when people accept the cookie, they get forwarded to 
the introduction page, but the url changes to the less convenient one 
(so it doesn't get intercepted by the ProxyPassReverse) and the cookie 
is not set (at least not for the convenient one).


Settings are:
-convenient url:
http://www.esat.kuleuven.be/cartagenia/bench/demo2/
-inconvenient url:
http://www.esat.kuleuven.be/bench_demo2/
-rewrite options:
RewriteRule ^/cartagenia/bench/(.*) /bench_$1 [P]
ProxyPassReverse  /cartagenia/bench/ http://localhost/bench_
JkMount  /bench_* cartagen
-cookie settings:
if (agree != null  !.equals(agree)) {
   Cookie cookie = new Cookie(agree,  + 1);
   cookie.setMaxAge(Integer.MAX_VALUE);
   response.addCookie(cookie);
   response.resetBuffer();
   RequestDispatcher patcher = request.getRequestDispatcher(/);
   patcher.forward(request, response);
   }

Anybody any idea how this can be solved?
By the way, at some point all this will probably have to go over https. 
I presume that the best way of setting this up is by having apache http 
handle the ssl connection and have an open connection between the http 
server and tomcat (tomcat is only accessible through the http server 
anyway...)


Greetings
Edwin


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm


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



Cannot invoke Tomcat manager Embedded error: Server redirected too many times (20)

2008-01-16 Thread VanIngen, Erik (ESTG)

I am using maven tomcat:deploy to deploy. It worked fine but now I am having
this error:

Cannot invoke Tomcat manager Embedded error: Server redirected too many
times (20)

Any ideas?




RE: PDF problem on IE from JSP

2008-01-16 Thread Pitre, Russell
How are you writing to the outputstream?  You should be doing something
like this below( taken from
org.springframework.web.servlet.view.document .AbstractPdfView)

private static final int OUTPUT_BYTE_ARRAY_INITIAL_SIZE = 4096;

// IE workaround: write into byte array first.
ByteArrayOutputStream baos = new
BteArrayOutputStream(OUTPUT_BYTE_ARRAY_INITIAL_SIZE);

.
.
Your code to write pdf to baos
.
.

// Write content type and also length (determined via byte array).
response.setContentType(application/pdf);
response.setContentLength(baos.size());

// Flush byte array to servlet output stream.
ServletOutputStream out = response.getOutputStream();
baos.writeTo(out);
out.flush();



-Original Message-
From: Jonadan [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 16, 2008 7:46 AM
To: users@tomcat.apache.org
Subject: PDF problem on IE from JSP


Hi,

I am generating PDF documents from JSP directly to output stream.
However
when I try it from IE, it does not work properly. Sometime nothing
happens.
Sometimes, show data corruption error. Sometimes connection error, etc.

I suspect it may be something to do with partial content reading from IE
and
Tomcat does not support or my JSP does not take care, etc.

Anyone had the same problems before?

Jonadan.

-- 
View this message in context:
http://www.nabble.com/PDF-problem-on-IE-from-JSP-tp14879788p14879788.htm
l
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


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



Re: PDF problem on IE from JSP

2008-01-16 Thread Pid

Jonadan wrote:

Hi,

I am generating PDF documents from JSP directly to output stream. However
when I try it from IE, it does not work properly. Sometime nothing happens.
Sometimes, show data corruption error. Sometimes connection error, etc.

I suspect it may be something to do with partial content reading from IE and
Tomcat does not support or my JSP does not take care, etc.

Anyone had the same problems before?

Jonadan.



Yes, it's pretty common, especially if you're using SSL. Search google.

The best solution I found was to avoid sending the official PDF 
mimetype, send a generic one instead, and force it to download*.


Something like:

response.setContentType(application/x-download-file);
response.setHeader(Content-Disposition,
  attachment; filename= + filename + ; size= + content.length );



(Also because the Acrobat browser plugin used to take so long to start 
up, but I'm not sure if that's still true.)




p

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



Re: How can I preserve a directory on Deployment?

2008-01-16 Thread Mark H. Wood
Well, I probably wouldn't put that directory anywhere near
$TOMCAT_HOME; I'd want it somewhere on /var with other volatile and
temporary stuff.

-- 
Mark H. Wood, Lead System Programmer   [EMAIL PROTECTED]
Typically when a software vendor says that a product is intuitive he
means the exact opposite.



pgpM42K5LPgaD.pgp
Description: PGP signature


RE: java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory

2008-01-16 Thread Caldarale, Charles R
 From: olk [mailto:[EMAIL PROTECTED] 
 Subject: java.lang.NoClassDefFoundError: 
 org/apache/juli/logging/LogFactory
 
 The org.apache.catalina.core.StandardService has an import
 org.apache.juli.logging.LogFactory, but the org.apache.juli in the
 catalina.jar of apache-tomcat-6.0.14 is empty ? there is no
 LogFactory.class file.

The org.apache.juli.logging.LogFactory class is in tomcat-juli.jar, not
catalina.jar.  For a non-embedded environment, the tomcat-juli.jar
(along with several others) is specified as a classpath extension in the
manifest of bootstrap.jar; don't know how it should work in an embedded
environment.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



Re: How can I speed up and reduce load of initialization

2008-01-16 Thread Len Popp
On Jan 16, 2008 4:21 AM, Peter Crowther [EMAIL PROTECTED] wrote:
  From: Gavan Hood [mailto:[EMAIL PROTECTED]
My problem is the initialization.
When I start tomcat it takes about two minutes to complete
  initialization and pegs my little processor at times, often
  it keeps it around 80% untilized...

 Yeah, that's not good in an embedded device!

Well, that depends on the device. If it's embedded in the Space
Shuttle, countdown takes 2 days so they can probably spare 2 minutes
to boot Tomcat. :-)

Seriously, how big is the Java heap and how much memory does your app
use? It could be spending a lot of time in garbage collection.  If you
can test the app on a real computer, try different heap sizes to see
if that makes a difference.
-- 
Len

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



Re: Doubt in how lbfactor works with load balancing of Apache with Tomcat cluster

2008-01-16 Thread Rainer Jung

Shiby Maria John wrote:

I was getting confused with setting the load balancer to be
sticky_session and setting of lbfactor together.
By session, i meant new sessions being created in the server.
Are they mutually exclusive ?


sticky_session: if a request carries a session id, either via JSESSIONID 
cookie or a ;jsessionid=... URL encoding, mod_jk looks, if the session 
id contains a route, i.e. a suffix separated with a dot '.'.


If so, it checks, if the load balancer has a member, with route 
attribute equal to the session route, or name of the worker equal to the 
session route. If so, and this worker is in OK state and not stopped, it 
sends the request there. If there is no such worker, or the worker is 
nor usable, the request is handled like it wouldn't have a route in the 
session id, or no session at all.


The route is put into the id automatically by Tomcat, if you set the 
jvmRoute in server.xml. The route added to the session id is equal to 
the value of jvmRoute.


No lbfactor used for this decision.

lbfactor influences the decision, to which member of a load balancer a 
request gets forwarded only, if the request isn't already handled 
sticky, e.g. it doesn't carry a session id or the session id does not 
have a route in it.


In this case, mod_jk chooses the member with least load. How we count 
load, depends on the method attribute of the load balancer. When we look 
for the least load, we divide the load of the individual members by 
their lbfactor, s.t. the load of a member with lbfactor 10 only counts 
1/10 of the load of a member with lbfactor 1. That way the member with 
lbfactor 10 will approximately get 10 times the number of requests than 
the one with lbfactor 1.


Technically we don't really divide, but do something similar, that 
doesn't need floating point, but leads to the same result (see below).



Can you please explain the effect of setting both those values along
with method=R.
Please clarify.


Method R: Each request forwarded to some member changes the load value 
of the member. The load value is used like described above, when we need 
to decide, which member should get the next request, that's not already 
handled by stickyness.


R: if a request goes to a member, increase the load value of it by 1.
T: if a request goes to a member, increase the load value by the number 
of bytes read and written for this request
B: if a request goes to a member, increase the load value by 1, and 
directly after the end of the request, decrese by 1 (so the load value 
should be equal to the number of requests currently processed in 
parallel by this member)

S: Like R, but only count the request, if it is not handled by stickyness.

More precisely, to avoid the division by the lbfactor, we don't increase 
by one or by the number of bytes, but we increase the load value instead 
with a multiple of 1 or the number of bytes. The factor is an integer 
number and those factors for the members are proportional to 1/lbfactor.


The factors can be seen in the status worker output (I think the column 
is named M for multiplicity) and I think the resulting load values are 
V. See the status worker and its legend.


Furthermore: in order to keep the influence of load local in time, the 
load values of all workers are divided by 2 approximately once a minute. 
This is true for all methods, apart from B, where the load value does 
not accumulate, so there's no need to decay.



Regards,
Shiby


Regards,

Rainer

 Rainer Jung  
 [EMAIL PROTECTED]  
 ppdata.deTo 
 Tomcat Users List
 01/14/2008  users@tomcat.apache.org
 04:58 PM  cc 
  
  Subject 
 Please respond  Re: Doubt in how lbfactor works  
   towith load balancing of Apache
  Tomcat Users  with Tomcat cluster  
  List   
 [EMAIL PROTECTED]  
   pache.org 
  
  
  





Hi Shiby,

Shiby Maria John schrieb:

Hi,

This is my worker.properties for Apache server for clustering 3
instances of Tomcat in my machine.

# The advanced router LB worker
worker.list=router

# Define a worker using ajp13
worker.worker1.port=8009
worker.worker1.host=localhost

Re: Doubt in how lbfactor works with load balancing of Apache with Tomcat cluster

2008-01-16 Thread Mladen Turk

Rainer Jung wrote:
If there is no such worker, or the worker is 
nor usable, the request is handled like it wouldn't have a route in the 
session id, or no session at all.




Also if there is directive sticky_session_force=true
and the worker is not usable then the 503 is returned to the user.

Just my 2 cents :)
--
™

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



Re: MultiContext War

2008-01-16 Thread Shelley
The maven-war-plugin allows for war overlays [1], which may accomplish what
you need.

[1] http://maven.apache.org/plugins/maven-war-plugin/overlays.html


On Jan 15, 2008 6:04 AM, Peter Crowther [EMAIL PROTECTED] wrote:

  From: DCVer [mailto:[EMAIL PROTECTED]
  I am trying to merge 4 web applications (WARs) into 1 WAR file. Is it
  possible?

 Yes, but it can be a lot of manual work.

  Shall I have e.g. 4 web.xml files or should I
  manually merge them into 1 file?

 One WAR = one webapp.
 One webapp = one web.xml, one WEB-INF, etc.
 Therefore you need exactly one web.xml.

 You may also need to merge quite a lot of your code by hand, depending on
 exactly what it does.

  I am using Maven, so I would be happy if most of
  the work could be done by Maven.

 I think a lot of people would be happy if this was so.

- Peter

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




Underlying implementations of SOAPBody, SOAPElement etc.

2008-01-16 Thread Chris Mannion
Hi All

I'm not sure this is exactly the place to be asking but I can't think of
anywhere else so here goes.  I have the same piece of code running on two
different Tomcat installations, one Tomcat 5.0, the other Tomcat 5.5.  The
code calls and web service and produces a javax.xml.soap.SOAPMessage in
response.  Having noticed a slight difference in behaviour I debugged and
found that on the Tomcat 5.0 system the underlying implementations of the
javax.xml.soap interfaces (SOAPBody, SOAPElement etc.) were Axis classes
such as org.apache.axis.message.SOAPBody.  On the Tomcat 5.5 system the
underlying implementations are all from a
com.sun.xml.internal.messaging.saaj.soap.impl package.

My question is what would be causing this difference, I thought perhaps
libraries in Tomcat but have tried replacing all my libraries on
Tomcat 5.0(including common, endorsed and those in the webapp) with
those from Tomcat
5.5 but that didn't make any difference.  Has anyone got any more ideas?


-- 
Chris Mannion
iCasework and LocalAlert implementation team
0208 144 4416


Re: Can we use the balance_members attribute

2008-01-16 Thread Mohan2005

Thank you.

So the only way you can do domain wide fail-over is by using the  domain
name given in worker.node1.domain=A in the Jboss server.xml's jvmRoute ?

And there are no attributes in the workers.property file to do that ?

Regards
Mohan


Mohan2005 wrote:
 
 Hello 
 I saw this in http://people.apache.org/~mturk/docs/article/ftwai.html
 
 But does not see the balance_members attribute in workers.properties
 documentation.
 Is it valid ?
 
  worker.node1.type=ajp13
 worker.node1.host=10.0.0.10
 worker.node1.lbfactor=1
 
 worker.node2.type=ajp13
 worker.node2.host=10.0.0.11
 worker.node2.lbfactor=2
 
 worker.node3.type=ajp13
 worker.node3.host=10.0.0.12
 worker.node3.lbfactor=1
 
 worker.list=lbworker
 worker.lbworker.type=lb
 worker.lbworker.balance_members=node1,node2,node3
 
 Thanks
 
 Regards
 Mohan
 

-- 
View this message in context: 
http://www.nabble.com/Can-we-use-the-balance_members-attribute-tp14871671p14883389.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Doubt in how lbfactor works with load balancing of Apache with Tomcat cluster

2008-01-16 Thread Rainer Jung

Mladen Turk wrote:

Rainer Jung wrote:
If there is no such worker, or the worker is nor usable, the request 
is handled like it wouldn't have a route in the session id, or no 
session at all.




Also if there is directive sticky_session_force=true
and the worker is not usable then the 503 is returned to the user.

Just my 2 cents :)


... it's time to write a book ...

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



Re: Tomcat 6 UTF-8 GET and POST - please Help..

2008-01-16 Thread Martin Gainty
The connector URIEncoding defaults to ISO-88591
has its roots in the Multinational Character Set produced for Digital
Equipment Corporation in 85
the original architecture did'nt handle 'other character sets contingency'
mainly as DBCS did'nt figure in until Shift-JIS, GB2312 and Big5 code pages
became more heavily used..

Interesting analysis..
M-
- Original Message -
From: david delbecq [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, January 10, 2008 4:59 PM
Subject: Re: Tomcat 6 UTF-8 GET and POST - please Help..


 Aleksandar Matijaca a écrit :
  I will try the filter, and let you know -- I don't think that Struts is
too
  worried about
  the encoding, while debugging, I saw that things go wrong much earlier,
  above
  struts, in the regular servlet layer on which Struts Action sits...
 
 Well, you saw it using getParameter probably, which activates the
 default iso-8859-1 behaviour if no character encoding provided. Now, i
 know struts has a similar code somewhere to default to iso-8859-1 when
 nothing else is specified
  Thanks for the suggestion..  You know, it is really disappointing, that
one
  has
  to do custom programming (filter) depending on what kind of a
container
  engine is
  used - in the ideal world, this should just work for all different
  application servers..
 
 In ideal world it would have been defined in the servlet specs how to
 set default chaset for post decoding :) In ideal world, browser would
 write in their request header what encoding the request was made in :)
 In ideal world, there wouldn't exist more than one, universal, charset.
 In the ideal world, my pay would be bigger ^^

  God only knows, what if anything I would have to do for Websphere,
Weblogic,
  Oracle server etc...
 
 Thought top manager of those companies may be near to that position at
 some point, i don't think God has anything to do with it ;)
  Thanks for your help.
 
  Alex.
 
 
  On Jan 10, 2008 2:12 PM, David Delbecq [EMAIL PROTECTED] wrote:
 
 
  As you might infer, URIEncoding=UTF-8 only work on the Uri part, and
  thus affect only GET. The post is decoded using the browser provided
  content-encoding. Most borwser don't bother to set that header.
  Behaviour of tomcat is to then use some default (ISO-8859-1). Best way
  to ensure tomcat will use UTF-8 for post decoding is to force it using
  request.setCharacterEncoding(UTF-8), before any call to
  getParameter(s). a filter or a valve might be a good place :)
 
  btw, be carefull, struts (i see you use struts) tends to also have his
  default behaviour when decoding POST :)
 
 
 
  Aleksandar Matijaca a écrit :
 
  Hi there,
 
  I am having some issue with submitting foreign language fonts in HTML
 
  form
 
  to Tomcat.
  If I set up the FORM with method=GET everything works just fine.
 
   However,
 
  when I use
  POST, things don't work -  I get garbled characters in my servlet from
 
  the
 
  FORM.
  In the example below, I am showing the headers for both
  GET and POST - the character being sent is a single lower case letter
 
  f in
 
  cyrillic.
 
 
  
 
  The POST method does not work - gives garbled characters - please note
 
  that
 
  the mytext is PROPERLY ENCODED IN BOTH methods - GET and POST,
  so I don't think that it is a browser issue (i think that my HTML is
ok
  too).
 
 
  http://localhost:8080/Inter/takeText.do
 
  POST /Inter/takeText.do HTTP/1.1
  Host: localhost:8080
  User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.8.1.11)
  Gecko/20071127 Firefox/2.0.0.11
  Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
  ,text/plain;q=0.8,image/png,*/*;q=0.5
  Accept-Language: en-us,en;q=0.8,sr;q=0.5,hi;q=0.3
  Accept-Encoding: gzip,deflate
  Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
  Keep-Alive: 300
  Connection: keep-alive
  Referer: http://localhost:8080/Inter/takeText.do
  Cookie: JSESSIONID=yhhvgybm2jfa; sensitivity=1000.0;
  JSESSIONID=AF8D24C63CE9C16D5DF78E5CDDE26146
  Content-Type: application/x-www-form-urlencoded
  Content-Length: 13
  mytext=%D1%84
 
 
  
 
  This is the request using GET - this works just fine - the servlet
gets
  mytext nicely decoded...
 
 
  http://localhost:8080/Inter/takeText.do?mytext=%D1%84
 
  GET /Inter/takeText.do?mytext=%D1%84 HTTP/1.1
  Host: localhost:8080
  User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.8.1.11)
  Gecko/20071127 Firefox/2.0.0.11
  Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
  ,text/plain;q=0.8,image/png,*/*;q=0.5
  Accept-Language: en-us,en;q=0.8,sr;q=0.5,hi;q=0.3
  Accept-Encoding: gzip,deflate
  Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
  Keep-Alive: 300
  Connection: keep-alive
  Referer: http://localhost:8080/Inter/takeText.do?mytext=%D1%84
  Cookie: JSESSIONID=yhhvgybm2jfa; sensitivity=1000.0;
  

Re: Tomcat 6 UTF-8 GET and POST - please Help..

2008-01-16 Thread Aleksandar Matijaca
I think that it boils down to - change everything to UTF-8 wherever you see
that it is using something else...  Perhaps there is a cookbook solution
indicating in gory detail, how to setup Tomcat for internationalization,
xml files, web.xml, config files, property files, any custom programming
etc...
For example, when it comes to using struts, I had no idea, that I could not
use the properties files as they are (in UTF-8) format, but had to convert
them using native2ascii utility.  Wish there was something that explains
it soup-to-nuts...  But now, I truly understand it..   And my world make
sense..
Many thanks to members of this list, who pointed me in the right direction..

Cheers, Alex.



On Jan 16, 2008 11:22 AM, Martin Gainty [EMAIL PROTECTED] wrote:

 The connector URIEncoding defaults to ISO-88591
 has its roots in the Multinational Character Set produced for Digital
 Equipment Corporation in 85
 the original architecture did'nt handle 'other character sets contingency'
 mainly as DBCS did'nt figure in until Shift-JIS, GB2312 and Big5 code
 pages
 became more heavily used..

 Interesting analysis..
 M-
 - Original Message -
 From: david delbecq [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Thursday, January 10, 2008 4:59 PM
 Subject: Re: Tomcat 6 UTF-8 GET and POST - please Help..


  Aleksandar Matijaca a écrit :
   I will try the filter, and let you know -- I don't think that Struts
 is
 too
   worried about
   the encoding, while debugging, I saw that things go wrong much
 earlier,
   above
   struts, in the regular servlet layer on which Struts Action sits...
  
  Well, you saw it using getParameter probably, which activates the
  default iso-8859-1 behaviour if no character encoding provided. Now, i
  know struts has a similar code somewhere to default to iso-8859-1 when
  nothing else is specified
   Thanks for the suggestion..  You know, it is really disappointing,
 that
 one
   has
   to do custom programming (filter) depending on what kind of a
 container
   engine is
   used - in the ideal world, this should just work for all different
   application servers..
  
  In ideal world it would have been defined in the servlet specs how to
  set default chaset for post decoding :) In ideal world, browser would
  write in their request header what encoding the request was made in :)
  In ideal world, there wouldn't exist more than one, universal, charset.
  In the ideal world, my pay would be bigger ^^
 
   God only knows, what if anything I would have to do for Websphere,
 Weblogic,
   Oracle server etc...
  
  Thought top manager of those companies may be near to that position at
  some point, i don't think God has anything to do with it ;)
   Thanks for your help.
  
   Alex.
  
  
   On Jan 10, 2008 2:12 PM, David Delbecq [EMAIL PROTECTED] wrote:
  
  
   As you might infer, URIEncoding=UTF-8 only work on the Uri part,
 and
   thus affect only GET. The post is decoded using the browser provided
   content-encoding. Most borwser don't bother to set that header.
   Behaviour of tomcat is to then use some default (ISO-8859-1). Best
 way
   to ensure tomcat will use UTF-8 for post decoding is to force it
 using
   request.setCharacterEncoding(UTF-8), before any call to
   getParameter(s). a filter or a valve might be a good place :)
  
   btw, be carefull, struts (i see you use struts) tends to also have
 his
   default behaviour when decoding POST :)
  
  
  
   Aleksandar Matijaca a écrit :
  
   Hi there,
  
   I am having some issue with submitting foreign language fonts in
 HTML
  
   form
  
   to Tomcat.
   If I set up the FORM with method=GET everything works just fine.
  
However,
  
   when I use
   POST, things don't work -  I get garbled characters in my servlet
 from
  
   the
  
   FORM.
   In the example below, I am showing the headers for both
   GET and POST - the character being sent is a single lower case
 letter
  
   f in
  
   cyrillic.
  
  
   
  
   The POST method does not work - gives garbled characters - please
 note
  
   that
  
   the mytext is PROPERLY ENCODED IN BOTH methods - GET and POST,
   so I don't think that it is a browser issue (i think that my HTML is
 ok
   too).
  
  
   http://localhost:8080/Inter/takeText.do
  
   POST /Inter/takeText.do HTTP/1.1
   Host: localhost:8080
   User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
 rv:1.8.1.11)
   Gecko/20071127 Firefox/2.0.0.11
   Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=
 0.9
   ,text/plain;q=0.8,image/png,*/*;q=0.5
   Accept-Language: en-us,en;q=0.8,sr;q=0.5,hi;q=0.3
   Accept-Encoding: gzip,deflate
   Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
   Keep-Alive: 300
   Connection: keep-alive
   Referer: http://localhost:8080/Inter/takeText.do
   Cookie: JSESSIONID=yhhvgybm2jfa; sensitivity=1000.0;
   JSESSIONID=AF8D24C63CE9C16D5DF78E5CDDE26146
   Content-Type: 

Re: Cluster error, timeouts.

2008-01-16 Thread Filip Hanik - Dev Lists

ok, it looks like you might have ended up with a rogue socket,
and what happens is that any message sent to that socket just gets lost 
in the ether, since it doesn't have any interest ops.
There is a workaround for this, turn off keep alives all together, or 
implement a keep alive timeout


Option 1 - no keep alives at all

Transport 
className=org.apache.catalina.tribes.transport.nio.PooledParallelSender
  timeout=6
  keepAliveCount=0/

Option 2 - implement a keep alive timeout

Transport 
className=org.apache.catalina.tribes.transport.nio.PooledParallelSender
  timeout=6
  keepAliveTime=12/

either option should work for you.

On a side note, I'm interested if the scenario you run into is reproducible, it 
keeps happening over and over again, then if possible, I'd like to get some 
debug logs from you

Filip


   





Raúl García wrote:

Hi all, I'm Raúl.

We had a tomcat 5.0.28 server configured with 2 clustered instances(working
perfectly), and we decided to migrate to java6 and the new tomcat 6.0.14.

We modify the configuration files to match the new tomcat 6.0.14 structure.
But now we have really annoying problems with the cluster.

This server receives aprox. 1 petition per second. We have pen as the load
balancer between 2 instances.

Once started, both instances report member.added and seems to be clustered.
Works fine.
But around 12 days after being started, instance number 2, report a
cluster.member disappear, then the session replication doesn't work,
instance 2 is unstable and gives a timeout error (But instance 1 is
working!!).

Intance2 Log:
=
Jan 14, 2008 7:05:17 PM org.apache.catalina.tribes.transport.nio.NioReceiver
socketTimeouts
WARNING: Channel key is registered, but has had no interest ops for the last
3000 ms. (cancelled:false):[EMAIL PROTECTED] last
access:2008-01-14 19:05:12.847
Jan 14, 2008 7:05:22 PM org.apache.catalina.tribes.transport.nio.NioReceiver
socketTimeouts
WARNING: Channel key is registered, but has had no interest ops for the last
3000 ms. (cancelled:false):[EMAIL PROTECTED] last
access:2008-01-14 19:05:17.848
Jan 14, 2008 7:05:27 PM org.apache.catalina.tribes.transport.nio.NioReceiver
socketTimeouts
WARNING: Channel key is registered, but has had no interest ops for the last
3000 ms. (cancelled:false):[EMAIL PROTECTED] last
access:2008-01-14 19:05:22.85
Jan 14, 2008 7:05:35 PM org.apache.catalina.tribes.transport.nio.NioReceiver
socketTimeouts
WARNING: Channel key is registered, but has had no interest ops for the last
3000 ms. (cancelled:false):[EMAIL PROTECTED] last
access:2008-01-14 19:05:30.111
Jan 14, 2008 7:05:35 PM org.apache.catalina.tribes.transport.nio.NioReceiver
socketTimeouts
WARNING: Channel key is registered, but has had no interest ops for the last
3000 ms. (cancelled:false):[EMAIL PROTECTED] last
access:2008-01-14 19:05:27.852
Jan 15, 2008 1:56:37 AM
org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor report
INFO: ThroughputInterceptor Report[
Tx Msg:2 messages
Sent:11.00 MB (total)
Sent:11.00 MB (application)
Time:28.14 seconds
Tx Speed:0.39 MB/sec (total)
TxSpeed:0.39 MB/sec (application)
Error Msg:0
Rx Msg:12195 messages
Rx Speed:0.00 MB/sec (since 1st msg)
Received:6.74 MB]
Jan 15, 2008 8:48:36 AM org.apache.catalina.ha.tcp.SimpleTcpCluster
memberDisappeared
INFO: Received member
disappeared:org.apache.catalina.tribes.membership.MemberImpl[tcp://localhost
:4001,localhost,4001, alive=72702012,id={-44 -75 50 38 26 -53 72 -63 -76 -94
12 82 127 106 126 -61 }, payload={}, command={}, domain={}, ]
Jan 15, 2008 8:48:36 AM
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
performBasicCheck
INFO: Suspect member, confirmed
dead.[org.apache.catalina.tribes.membership.MemberImpl[tcp://localhost:4001,
localhost,4001, alive=72702012,id={-44 -75 50 38 26 -53 72 -63 -76 -94 12 82
127 106 126 -61 }, payload={}, command={}, domain={}, ]]
Jan 15, 2008 8:48:39 AM
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
memberDisappeared
INFO: Received
memberDisappeared[org.apache.catalina.tribes.membership.MemberImpl[tcp://loc
alhost:4001,localhost,4001, alive=72705018,id={-44 -75 50 38 26 -53 72 -63
-76 -94 12 82 127 106 126 -61 }, payload={}, command={}, domain={}, ]]
message. Will verify.
Jan 15, 2008 8:48:39 AM
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
memberDisappeared
INFO: Verification complete. Member still
alive[org.apache.catalina.tribes.membership.MemberImpl[tcp://localhost:4001,
localhost,4001, alive=72705018,id={-44 -75 50 38 26 -53 72 -63 -76 -94 12 82
127 106 126 -61 }, payload={}, command={}, domain={}, ]]
Jan 15, 2008 8:48:39 AM org.apache.catalina.ha.tcp.SimpleTcpCluster send
SEVERE: Unable to send message through cluster sender.
org.apache.catalina.tribes.ChannelException: Operation has timed out(6
ms.).; Faulty 

Re: One of my boxes, the cluster is not working anymore

2008-01-16 Thread Filip Hanik - Dev Lists

download wireshark, and trace udp packets,
there must be something on your system, that is not broadcasting or 
receiving multicast packets


Filip

Randy Paries wrote:

Filip

So here is what i do not understand , and i appreciate your help.
1) I have completely swapped out the hardware. Entirely new box.
2) completely new OS, FC4 to centos 5
3) same version of tomcat and same config files.
4) tried two different switches.
5) no fw or iptables currently running.

that is what is so confusing . The other servers seem to bee running fine.

Randy

On Jan 15, 2008 12:27 PM, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote:
  

question is, why are you using tcpdump, when you need to track down UDP
packets :)

the reason there is no membership established is because the machine is
not receiving multicast packets (UDP), so that's what you need to track down


Filip

Randy Paries wrote:


On Jan 7, 2008 2:49 PM, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote:

  

easiest way to see your packets fly by, is to use wireshark and just
sniff UDP packets

Filip


Randy Paries wrote:



On Jan 7, 2008 1:55 PM, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote:


  

org.apache.catalina.cluster.session.DeltaManager getAllClusterSessions
INFO: Manager []: skipping state transfer. No members active in cluster group.

this indicates that the box not working, is not receiving multicast
messages from the other nodes.
you'd need to look into the multicasting configuration in server.xml and
also on your box/network

Filip


Randy Paries wrote:




Hello,
I need some help.
I rolled out a new version of my web app last night
Stopped and started tomcat and now one of my boxes (they all have the
same webapp) will not attach(if that is the correct term) to the
cluster. I am doing session sharing between three tomcat servers.  I
did not change any of the server.xml stuff
I am running tomcat 5.5.15

Please help ASAP, this is a production box and not sure what to do.

this is from the catalina.out on a working Box.


  

///Stuff Deleted ---

Filip,

thanks for responding.

All three boxes have this in the server.xml

Any ideas on how to test to see if this one box is recieving multicast messages?

Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

managerClassName=org.apache.catalina.cluster.session.DeltaManager
 expireSessionsOnShutdown=false
 useDirtyFlag=true
 notifyListenersOnReplication=true

Membership
className=org.apache.catalina.cluster.mcast.McastService
mcastAddr=228.0.0.9
mcastPort=45564
mcastFrequency=500
mcastDropTime=3000/

Receiver
className=org.apache.catalina.cluster.tcp.ReplicationListener
tcpListenAddress=auto
tcpListenPort=4001
tcpSelectorTimeout=100
tcpThreadCount=35/

Sender

className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
replicationMode=pooled
ackTimeout=15000/

Valve className=org.apache.catalina.cluster.tcp.ReplicationValve

filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;.*\.pdf;\*.wav;\*.mp3;/

Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
  tempDir=/tmp/war-temp/
  deployDir=/tmp/war-deploy/
  watchDir=/tmp/war-listen/
  watchEnabled=false/

ClusterListener
className=org.apache.catalina.cluster.session.ClusterSessionListener/
/Cluster


  

Hello,

So here is an update, still struggling  with this problem.
if I do a tcpdump port 4001, i can see lots of traffic on box2 and
box3 but none on box 1

so tonight i swapped out eth1 (i was told that maybe a nic card could
not transmit UDP)
i also went into the server.xml and forced tcpListenAddress to eth1 on each box.
tcpdump port 4001 -i eth1 gives me traffic on box2 and box3 but not box1

i am no longer getthing the exception on boot up, all get now is:
INFO: Cluster is about to start
Jan 8, 2008 11:06:08 PM
org.apache.catalina.cluster.tcp.ReplicationTransmitter start
INFO: Start ClusterSender at cluster
Catalina:type=Cluster,host=localhost with name
Catalina:type=ClusterSender,host=localhost
Jan 8, 2008 11:06:08 PM org.apache.catalina.cluster.mcast.McastService start
INFO: Sleeping for 2000 secs to establish cluster membership
Jan 8, 2008 11:06:10 PM org.apache.catalina.cluster.mcast.McastService
registerMBean
INFO: membership mbean registered
(Catalina:type=ClusterMembership,host=localhost)
Jan 8, 2008 11:06:10 PM org.apache.catalina.cluster.deploy.FarmWarDeployer start
INFO: Cluster FarmWarDeployer started.
Jan 8, 2008 11:06:11 PM 

RE: One of my boxes, the cluster is not working anymore

2008-01-16 Thread Siobhan
To anyone who has successfully used Comet:

I've been trying to use Comet with Tomcat 6.0 for a few weeks now and have
been unsuccessful. I'm so frustrated with the lack of documentation and the
unusable example that was given with Tomcat.

Are there any step-by-step instructions on how to successfully implement a
test program? 

-SB



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



Re: Tomcat 6's nio protocol is slower than the regular HTTP/1.1 protocol

2008-01-16 Thread Filip Hanik - Dev Lists

that's expected, maybe not 30% but it all depends on the test.

What the NIO allows you for, is to have more sockets than threads, and 
also being able to free up a worker thread when sending down static 
content to the client.


Filip

Shlomi Tsur wrote:

Hi

We are testing the new nio connector, and in our load tests we are getting
30% better results

in terms of fetches/sec in favor of the old HTTP/1.1 protocol.

All we are doing in the servlet is just returning status 200 in the
response, nothing more.

Does the new io really slower then the regular protocol?

Thank you.


  



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



Comet Development

2008-01-16 Thread Siobhan
To anyone who has successfully used Comet:

 

I've been trying to use Comet with Tomcat 6.0 for a few weeks now and have
been unsuccessful. I'm so frustrated with the lack of documentation and the
unusable example that was given with Tomcat.

 

Are there any step-by-step instructions on how to successfully implement a
test program? 

 

-SB



Re: Comet Development

2008-01-16 Thread Peter Warren
This post (http://www.nabble.com/comet-questions-td14673697.html#a14673697)
contains test code for both a client  comet servlet.  See if it
helps.

On Jan 16, 2008 10:35 AM, Siobhan [EMAIL PROTECTED] wrote:
 To anyone who has successfully used Comet:



 I've been trying to use Comet with Tomcat 6.0 for a few weeks now and have
 been unsuccessful. I'm so frustrated with the lack of documentation and the
 unusable example that was given with Tomcat.



 Are there any step-by-step instructions on how to successfully implement a
 test program?



 -SB



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



Re: Question about apache - tomcat connector

2008-01-16 Thread german . a . luisi
Hello Christopher

The redirection is in my hands. 

If I edit /etc/httpd/conf/httpd.conf:
JkMount / worker1

I'm sent to Tomcat home page (root level /)
--- /TOMCAT_HOME/webapps/
And the special headers are comming.

But... if I edit /etc/httpd/conf/httpd.conf:
JkMount /RS/* worker1

Trying to be send to my webApp
--- /TOMCAT_HOME/webapps/RS/

I'm sent to my webApp( /RS )
BUT !!! in this case I lose the special headers.

PloP !!!

Do you have any idea where I have to focus ?






| Now I put SSO (SiteMinder) to my app, for that I had to use apache,
| because the SSO work with apache.

Okay, so SiteMinder adds headers to requests that match certain criteria.

| When I go there, I'm authenticated and if everything is ok (with my
| user/pass)
| this SSO add some extra-headers like this:
| header=SM_USER=w024461
| header=SM_USERDN=uid=W024461,ou=People,dc=bankone,dc=net

Can you get those headers in Tomcat? Or, are you saying that your can
observe the request while still in Apache?

| That mean, the extra-headers that SiteMinder (SSO) is putting in
| the request are coming to Tomcat. Untils here all is ok.

Sounds like Tomcat /is/ getting the headers.

| But now I don't know what configuration I should do it
| if I wanna be re-direct to mi wepApp;
| http://sscllinuxora03.santiago.cl.jpmorganchase.com:8084/RS
| passing the extra-headers without lossing them.

You cannot pass HTTP headers through a redirect, not matter what
configuration you use. The headers must be added with each request. That
means that, after a redirect, SiteMinder has to re-add the headers to
the new request. Thus, the redirect is not relevant to your problem.

| Need I make some configurations on:
| /home/tigger/jakarta-tomcat-5.0.28/webapps/RS/WEB-INF/web.xml
| or:
| /home/tigger/jakarta-tomcat-5.0.28/conf/server.xml

You should not have to do anything to these files at all.

Are you sure that SiteMinder is modifying the requests that ultimately
go to Tomcat?





-
This communication is for informational purposes only. It is not
intended as an offer or solicitation for the purchase or sale of
any financial instrument or as an official confirmation of any
transaction. All market prices, data and other information are not
warranted as to completeness or accuracy and are subject to change
without notice. Any comments or statements made herein do not
necessarily reflect those of JPMorgan Chase  Co., its subsidiaries
and affiliates.

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

Please refer to http://www.jpmorgan.com/pages/disclosures for
disclosures relating to UK legal entities.

Container-based authentication and Shibboleth SSO - issue with redirecting login to Shibboleth after session timeout

2008-01-16 Thread Gary Weaver

Hello,

We're having a timeout issue (probably configuration) with Tomcat 5.5.25 
and Shibboleth 1.3f ( http://shibboleth.internet2.edu/ ).


The environment is a dev server setup such that the Shibboleth SP is 
integrated with Apache 2.0.52 via mod_shib which is in turn using Tomcat 
(via AJP/JK). Bedework (event calendar) is using Tomcat's built-in authN 
which has been configured to use Shibboleth for authN via the method 
described at: 
https://spaces.internet2.edu/display/SHIB/ShibbolizedBedework (Bedework 
uses container-based authentication as defined by the Java servlet 
specification. There is no authentication code within Bedework.)


The issue is that when user authenticates to Bedework (via Shibboleth) 
and leaves their browser open for a long time (over the weekend), 
instead of getting the Shibboleth login screen when they return and 
attempt to access a page in Bedework that requires authN, the user gets 
the grey Tomcat (default) login screen which won't let them login 
(because authN is only allowed via the Shibboleth SSO). If the user 
closes the browser (or clears cache/cookies/authenticated sessions) and 
tries the page again, they get the Shibboleth login (as we intended them 
to get).


Below are (hopefully the) relevant Tomcat and Shibboleth SP config 
settings on the dev server that displayed this issue. Do any of these 
look suspicious/wrong? Sent this to the Shibboleth and Bedework user 
mailing list as well as our local Shib guy, and collectively they think 
is not Shib or Bedework but is something with the Tomcat config. Mike 
Douglass (lead Bedework developer) said My guess is you might need to 
disable servlet container login processing and ensure that shibboleth 
will always catch unauthenticated sessions and do its thing. It's also 
possible there are hooks in tomcat to redirect login processing to 
something like shibboleth. Mattias Amnefelt (another Bedework user) 
said If you could try using the request dumper valve to see if you 
actually have REMOTE_USER set that would help the debugging. If it's set 
when the request comes to tomcat then it's definitely not a shibboleth 
issue.


I noticed also that two of the web.xml's for the webapps in Bedework 
define login and (login) error pages for form auth-method, and another 
is configured for basic auth-method. I could possibly override those 
form configs in our Bedework repackaging build to point at Shibboleth SP 
login paths, but if there is an easy way to both get the session 
timeouts and maybe the login URL redirect set correctly in local tomcat 
config (tomcat/conf/) maybe that would be better.


If you have any ideas, please let me know.

Thanks in advance!

--
Gary Weaver
Internet Framework Services
Office of Information Technology
Duke University


Configuration:

shibboleth.xml:

...
 !--
   See Wiki for details:
   cacheTimeout - how long before expired sessions 
are purged from the cache

   AATimeout - how long to wait for an AA to respond
   AAConnectTimeout - how long to wait while 
connecting to an AA
   defaultLifetime - if attributes come back 
without guidance, how long should they last?
   strictValidity - if we have expired attrs, and 
can't get new ones, keep using them?
   propagateErrors - suppress errors while getting 
attrs or let user see them?
   retryInterval - if propagateErrors is false and 
query fails, how long to wait before trying again

   Only one session cache can be defined.
   --

MemorySessionCache cleanupInterval=300 cacheTimeout=3600 
AATimeout=30 AAConnectTimeout=15 defaultLifetime=1800 
retryInterval=300 ...

...
(under Applications)
Sessions lifetime=7200 timeout=3600 ...
...

tomcat config:

tomcat/conf/server.xml:
...
 Realm className=org.apache.catalina.realm.UserDatabaseRealm
resourceName=UserDatabase
allRolesMode=authOnly /
...

(session timeout in minutes)
tomcat/conf/web.xml: session-timeout30/session-timeout


(Bedework) webapp configs:

webapps/ucal/WEB-INF/web.xml:  login-config
webapps/ucal/WEB-INF/web.xml:auth-methodFORM/auth-method
webapps/ucal/WEB-INF/web.xml:realm-namedemo/realm-name
webapps/ucal/WEB-INF/web.xml:form-login-config
webapps/ucal/WEB-INF/web.xml:  
form-login-page/docs/login/login.html/form-login-page
webapps/ucal/WEB-INF/web.xml:  
form-error-page/docs/login/error.html/form-error-page

webapps/ucal/WEB-INF/web.xml:/form-login-config
webapps/ucal/WEB-INF/web.xml:  /login-config
--
webapps/caladmin/WEB-INF/web.xml:  login-config
webapps/caladmin/WEB-INF/web.xml:auth-methodFORM/auth-method
webapps/caladmin/WEB-INF/web.xml:realm-namedemo/realm-name
webapps/caladmin/WEB-INF/web.xml:form-login-config
webapps/caladmin/WEB-INF/web.xml:  
form-login-page/docs/login/login.html/form-login-page

RE: Comet Development

2008-01-16 Thread Siobhan
Ok. But how is it all suppose to be put together? I want to use comet using
jsp, but I don't see any jsp code.


-Original Message-
From: Peter Warren [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 16, 2008 12:42 PM
To: Tomcat Users List
Subject: Re: Comet Development

This post (http://www.nabble.com/comet-questions-td14673697.html#a14673697)
contains test code for both a client  comet servlet.  See if it
helps.

On Jan 16, 2008 10:35 AM, Siobhan [EMAIL PROTECTED] wrote:
 To anyone who has successfully used Comet:



 I've been trying to use Comet with Tomcat 6.0 for a few weeks now and have
 been unsuccessful. I'm so frustrated with the lack of documentation and
the
 unusable example that was given with Tomcat.



 Are there any step-by-step instructions on how to successfully implement a
 test program?



 -SB



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



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



Servlet and DB2 databases (error 500 )

2008-01-16 Thread Joly M
Hello all,



I'm trying to update a DB2 database via servlet pieces of data coming from
an html form, but I'm getting an error message.
Basically, everything works well when i make two separated programs :

-One sending html forms data to the servlet and another one running a simple
java class to update a DB2 database.

I'm getting troubles when I try to send data from the servlet to the
database.

As I'm using two technologies :servlet and databases, i don't really know
where Ishould head my investigation for...

There is the error message :

Etat HTTP 500 -

java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver
at org.apache.catalina.loader.WebappClassLoader.loadClass(
WebappClassLoader.java:1358)
at org.apache.catalina.loader.WebappClassLoader.loadClass(
WebappClassLoader.java:1204)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at T4DB2Connect.init(T4DB2Connect.java:43)
at CreateAccount.doGet(CreateAccount.java:39)
at CreateAccount.doPost(CreateAccount.java:176)
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 filters.ExampleFilter.doFilter(ExampleFilter.java:101)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:235)
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.authenticator.AuthenticatorBase.invoke(
AuthenticatorBase.java:433)
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
:263)
at org.apache.coyote.http11.Http11AprProcessor.process(
Http11AprProcessor.java:852)
at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(
Http11AprProtocol.java:584)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508)
at java.lang.Thread.run(Unknown Source)
java.sql.SQLException: No suitable driver found for
jdbc:db2://localhost:5/USER
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at T4DB2Connect.init(T4DB2Connect.java:52)
at CreateAccount.doGet(CreateAccount.java:39)
at CreateAccount.doPost(CreateAccount.java:176)
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 filters.ExampleFilter.doFilter(ExampleFilter.java:101)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:235)
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.authenticator.AuthenticatorBase.invoke(
AuthenticatorBase.java:433)
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
:263)
at org.apache.coyote.http11.Http11AprProcessor.process(
Http11AprProcessor.java:852)
at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(
Http11AprProtocol.java:584)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508)
at java.lang.Thread.run(Unknown Source)



Do I need to include IBM DB2 driver into my servlet? How? How do I configure
Web.xml?

You might have noticed that I'm quite new, so I will accept any of your
advice


Joly


Tomcat 6 requires config to run on JSE 5?

2008-01-16 Thread gb1071nx
I recently got bit by this: 
http://marc.info/?t=10970926148r=1w=2 
 
 
So I was looking for some statement somewhere on if that issue is now
fixed in 5.0.x and/or if it's an issue in either 5.5 or 6.0, and what
JVMs are 'safe' to use in 5.5 and 6.0. 
 

That's when I saw this: 


Tomcat 6.0 is designed to run on JSE 5.0 and later, 
and requires configuration to run on JSE 5.0.


from:
http://tomcat.apache.org/tomcat-6.0-doc/RELEASE-NOTES.txt
 
 
The corresponding note from the previous version is: 

Tomcat 5.5 is designed to run on J2SE 5.0 and later, 
and requires configuration to run on J2SE 1.4.  
Make sure to read the RUNNING.txt file in the 
fulldocs downloadable file(s) if you are using J2SE 1.4.

from: 
http://tomcat.apache.org/tomcat-5.5-doc/RELEASE-NOTES.txt
 
 
 
I'm wondering if someone in the know could confirm that the text of the
TC6 release notes is correct?  It seems off. Why say it's designed for
x, then say it requires config to run on x. 
 
Thanks 

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



RE: Tomcat 6 requires config to run on JSE 5?

2008-01-16 Thread Caldarale, Charles R
 From: gb1071nx [mailto:[EMAIL PROTECTED] 
 Subject: Tomcat 6 requires config to run on JSE 5?
 
 So I was looking for some statement somewhere on if that
 issue is now fixed in 5.0.x and/or if it's an issue in
 either 5.5 or 6.0,

5.0 is now deprecated, so the first part of that question is somewhat
moot.  Haven't seen any problems with JSP compilation running Tomcat 5.5
and 6.0 on the 1.5 and 1.6 JREs.

 what JVMs are 'safe' to use in 5.5 and 6.0. 

Sun's HotSpot 1.5 and 1.6 are known to work.  IBM's 1.5 has been used,
as has JRockit, but to what extent, I don't know.  GNU's JVM is not
adequate.

 I'm wondering if someone in the know could confirm that
 the text of the TC6 release notes is correct?

It's not really incorrect, but is certainly misleading.  Chalk it up to
programmers not being writers or editors.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



Tomcat 6 cluster

2008-01-16 Thread Hehl, Thomas
I've built tomcat 5 and 5.5 single servers a lot, but now I'm trying to
build a tomcat 6 cluster for testing.

 

The docs seem pretty straightforward (just uncomment the Cluster line) and
I've followed it, but I'm getting errors. The error looks like:

 

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (Can't load driver
java.lang.reflect.InvocationTargetException)

at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource
.java:1225)

at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.ja
va:880)

at
org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConn
ection(LocalDataSourceConnectionProvider.java:81)

at
org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)

at
org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)

at
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)

at
org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory
(LocalSessionFactoryBean.java:805)

at
org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFacto
ry(LocalSessionFactoryBean.java:745)

at
org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertie
sSet(AbstractSessionFactoryBean.java:134)

at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1198)

at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.initializeBean(AbstractAutowireCapableBeanFactory.java:1167)

at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBean(AbstractAutowireCapableBeanFactory.java:427)

at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
stractBeanFactory.java:249)

at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
ngleton(DefaultSingletonBeanRegistry.java:155)

at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:246)

at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:160)

at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolv
eReference(BeanDefinitionValueResolver.java:267)

at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolv
eValueIfNecessary(BeanDefinitionValueResolver.java:110)

at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1095)

at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.populateBean(AbstractAutowireCapableBeanFactory.java:857)

at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBean(AbstractAutowireCapableBeanFactory.java:423)

at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
stractBeanFactory.java:249)

at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
ngleton(DefaultSingletonBeanRegistry.java:155)

at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:246)

at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:160)

at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolv
eReference(BeanDefinitionValueResolver.java:267)

at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolv
eValueIfNecessary(BeanDefinitionValueResolver.java:110)

at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1095)

at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.populateBean(AbstractAutowireCapableBeanFactory.java:857)

at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBean(AbstractAutowireCapableBeanFactory.java:423)

at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
stractBeanFactory.java:249)

at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
ngleton(DefaultSingletonBeanRegistry.java:155)

at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:246)

at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:160)

at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst

RE: Problems with VirtualWebappLoader (Was RE: Tomcat 6.0.x Classloader sequence)

2008-01-16 Thread uma_rk
Charles,

Thanks for your patient responses. Unfortunately, the shared classloader does 
not
work either. This is in summary what I am trying to do: I have 3 webapp 
contexts that
use a number of commons libraries (say, digester, betwixt, beanutils). I do not 
want to
pack these jarfiles in each webapp, as it makes the warfiles unwieldy. Hence I 
want the
deployment structure:

 (CATALINA_HOME
   (mycommonlibs)
   (webapps
  (webapp1)
  (webapp2)
  (webapp3)
   )
 )

I merely want the webapp classloader of each webapp1 to load classes not only 
from WEB-INF/{classes|lib}
but also from ${CATALINA_HOME}/mycommonlib. That is, I am willing to load each 
common jar
distinctly in each webapp and pay the price in terms of memory for the 
duplicate loads. I merely
want to co-locate the common jarfiles in a common directory.

Now, when I opt to use the shared classloader with the following entry in
catalina.properties:

  ##  catalina.properties::
  shared.loader=${catalina.home}/myapplib,${catalina.home}/myapplib/*.jar

it turns out that the classes in ${catalina.home}/myapplib/*.jar are loaded by 
StandardClassLoader (parent of WebappClassLoader) while the libraries in
webapp?/WEB-INF/{classes|lib} are loaded by WebappClassLoader. This causes
strange errors with classes not being found or, worse still, methods not being 
found.

For instance, I have placed commons-digester in ${catalina.home}/myapplib/.
I have an XML file in webapp3 which is parsed into JavaBeans which are defined 
in
webapp3/WEB-INF/lib/foo.jar.

With the catalina.properties specified as above, it turns out that digester
is loaded by the StandardClassLoader while foo.jar is loaded by 
WebappClassLoader:
(I am printing the class loader lineage of a bean):

2008-01-16 11:43:37.0522 INFO  Bean:foo, class:Foo  loaded by:
 org.apache.catalina.loader.WebappClassLoader
   org.apache.catalina.loader.StandardClassLoader
  org.apache.catalina.loader.StandardClassLoader
 sun.misc.Launcher$AppClassLoader
sun.misc.Launcher$ExtClassLoader

2008-01-16 11:43:37.0412 INFO  Bean:Digester, 
class:org.apache.commons.digester.Digester, loaded by:
 org.apache.catalina.loader.StandardClassLoader
org.apache.catalina.loader.StandardClassLoader
   sun.misc.Launcher$AppClassLoader
   sun.misc.Launcher$ExtClassLoader

Hence while digester is loaded by StandardClassLoader, the beans that Digester 
must 
instantiate are loaded by WebappClassLoader. 

Since StandardClassLoader is the parent of WebappClassLoader, per the 
delegation model,
digester will fail to find the application beans it needs.

I need the libs in myapplib/ loaded by the webappclass loader of each webapp 
context.
What is the simplest way to accomplish this?

Regards,

/U
--

 -- Original message --
From: Caldarale, Charles R [EMAIL PROTECTED]
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
  Subject: Problems with VirtualWebappLoader (Was RE: Tomcat 
  6.0.x Classloader sequence)
  
  Following on an earlier thread: I am trying to place 
  the libraries common to a number of webapp contexts
  in a common directory (${catalina.home}/myapplib)
 
 Have you thought about just configuring this in the shared classloader
 in conf/catalina.properties?
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete the e-mail
 and its attachments from all computers.
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: secure JSessionID

2008-01-16 Thread GF
 I believe if your session starts through HTTPS, the cookie will be
 marked as secure and it won't be sent if the user switches to non-secure
 HTTP.

Maybe my question is stupid, but, is it possible to browse a site on
HTTP and having just the JSESSIONID cookie sent on HTTPS to prevent
session stealing?
And if possible i would like to set up it... on apache, mod_jk and tomcat 6.
Thank you.

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



Re: Question about apache - tomcat connector

2008-01-16 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

German,

[EMAIL PROTECTED] wrote:
| JkMount / worker1
|
| And the special headers are coming.
|
| JkMount /RS/* worker1
|
| BUT !!! in this case I lose the special headers.

If it's working for / but not for other URLs, I don't believe there is
any mod_jk or Tomcat configuration changes that will help.

To me, this suggests that SiteMinder is not configured correctly to
modify headers for /RS/*, since they work well for /

It seems that a reasonable SSO product would modify all requests that
matched certain rules, rather than only modifying requests related to
authentication, so my guess is that your SiteMinder configuration is
incorrect.

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

iEYEARECAAYFAkeOfCoACgkQ9CaO5/Lv0PDRxACfX9fo6ShJda1vweMq8bIgeHxU
XqYAnjD5zvcP+lvZD5Xj6aaQamgceBOE
=Oo+w
-END PGP SIGNATURE-

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



Re: Tomcat 6 cluster

2008-01-16 Thread Filip Hanik - Dev Lists
it would be very strange to how the cluster would have anything to do 
with this :)


the error you are getting is:

Caused by: java.net.UnknownHostException: lexecfin

the JDBC driver is unable to resolve that name, put the name in your hosts 
file, or put the IP address instead of hostname for the jdbc connection and try 
again

Filip



Hehl, Thomas wrote:

I've built tomcat 5 and 5.5 single servers a lot, but now I'm trying to
build a tomcat 6 cluster for testing.

 


The docs seem pretty straightforward (just uncomment the Cluster line) and
I've followed it, but I'm getting errors. The error looks like:

 


org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (Can't load driver
java.lang.reflect.InvocationTargetException)

at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource
.java:1225)

at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.ja
va:880)

at
org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConn
ection(LocalDataSourceConnectionProvider.java:81)

at
org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)

at
org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)

at
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)

at
org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory
(LocalSessionFactoryBean.java:805)

at
org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFacto
ry(LocalSessionFactoryBean.java:745)

at
org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertie
sSet(AbstractSessionFactoryBean.java:134)

at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1198)

at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.initializeBean(AbstractAutowireCapableBeanFactory.java:1167)

at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBean(AbstractAutowireCapableBeanFactory.java:427)

at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
stractBeanFactory.java:249)

at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
ngleton(DefaultSingletonBeanRegistry.java:155)

at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:246)

at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:160)

at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolv
eReference(BeanDefinitionValueResolver.java:267)

at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolv
eValueIfNecessary(BeanDefinitionValueResolver.java:110)

at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1095)

at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.populateBean(AbstractAutowireCapableBeanFactory.java:857)

at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBean(AbstractAutowireCapableBeanFactory.java:423)

at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
stractBeanFactory.java:249)

at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
ngleton(DefaultSingletonBeanRegistry.java:155)

at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:246)

at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:160)

at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolv
eReference(BeanDefinitionValueResolver.java:267)

at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolv
eValueIfNecessary(BeanDefinitionValueResolver.java:110)

at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1095)

at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.populateBean(AbstractAutowireCapableBeanFactory.java:857)

at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBean(AbstractAutowireCapableBeanFactory.java:423)

at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
stractBeanFactory.java:249)

at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi

Re: secure JSessionID

2008-01-16 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

GF,

GF wrote:
| I believe if your session starts through HTTPS, the cookie will be
| marked as secure and it won't be sent if the user switches to non-secure
| HTTP.
|
| Maybe my question is stupid, but, is it possible to browse a site on
| HTTP and having just the JSESSIONID cookie sent on HTTPS to prevent
| session stealing?

Do you mean you want to configure Tomcat such that cookies are only sent
via HTTPS and suppressed for all HTTP traffic?

If yes, then I already told you how to do it: just make sure that your
cookies are created during an HTTPS request and that should be all you need.

If you need your HTTP requests to be related to the same server-side
session, then this is not going to work out for you.

With regard to session stealing... someone on the list recently asked if
Tomcat could be configured to ignore JSESSIONID cookies even if
cookies had been turned off in the configuration. I believe the answer
was that Tomcat will use a cookie if it was found, so an attacker could
always send JSESSIONID cookies to you just looking to see if he hits a
valid one.

If you really want to get paranoid, you can create a filter that vetos
all requests that contain a JSESSIONID cookie but don't use the HTTPS
scheme.

- -chris

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

iEYEARECAAYFAkeOfTIACgkQ9CaO5/Lv0PDgQgCgvyQN73aBeJ7EQJZIV4EfjkfQ
i+0AoMQUCGyc+LKjAvgzoM6cbTyGG+fa
=LzGc
-END PGP SIGNATURE-

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



Re: JNDIRealm and password expiration

2008-01-16 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andris,

Andris Eiduks wrote:
| We use JNDIRealm for users authentication from Tomcat again OpenLDAP.
| But users doesn't get notifications about password expiration.
|
| It is possible for current solution (Tomcat and OpenLDAP) ?
| Or we must create different functions in web application for passwords
| expiry dates searching directly into OpenLDAP?

Tomcat's container-managed authentication and authorization does not
offer this feature.

You may be able to use securityfilter
(http://securityfilter.sourceforge.net/) with a custom Realm (and
possibly some additional custom Filters or something) to meet your
requirements.

I use securityfilter plus my own Filter that checks for a must change
password user account status. The Filter requires that anyone in that
state must change their password before viewing any other pages. It
works quite well, and the code is fairly simple.

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

iEYEARECAAYFAkeOfkUACgkQ9CaO5/Lv0PCzAwCeMv34MYkSDQH0xONzc4Sg2vRC
q6MAoLB3Jbz0QlPpUO3h0DPxL2Pc02Y5
=bHRz
-END PGP SIGNATURE-

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



Re: Underlying implementations of SOAPBody, SOAPElement etc.

2008-01-16 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chris,

Chris Mannion wrote:
| I'm not sure this is exactly the place to be asking but I can't think of
| anywhere else so here goes.  I have the same piece of code running on two
| different Tomcat installations, one Tomcat 5.0, the other Tomcat 5.5.  The
| code calls and web service and produces a javax.xml.soap.SOAPMessage in
| response.  Having noticed a slight difference in behaviour I debugged and
| found that on the Tomcat 5.0 system the underlying implementations of the
| javax.xml.soap interfaces (SOAPBody, SOAPElement etc.) were Axis classes
| such as org.apache.axis.message.SOAPBody.  On the Tomcat 5.5 system the
| underlying implementations are all from a
| com.sun.xml.internal.messaging.saaj.soap.impl package.

I don't believe Tomcat ships with any SOAP classes at all. Are you using
any 3rd-party JARs in either install (like AXIS)? Alternatively, are you
using different versions of JWSDK or anything like that? How about
different JVM versions?

| My question is what would be causing this difference, I thought perhaps
| libraries in Tomcat but have tried replacing all my libraries on
| Tomcat 5.0(including common, endorsed and those in the webapp) with
| those from Tomcat
| 5.5 but that didn't make any difference.

Er, you should undo that. ;)

| Has anyone got any more ideas?

I would find out where the classes themselves are being loaded. Check
your app's WEB-INF/lib directory, Tomcat's common/lib, shared/lib and
endorsed directories, and your JVMs endorsed directories, too.

- -chris

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

iEYEARECAAYFAkeOf9IACgkQ9CaO5/Lv0PAufwCdFoFQtpuTyFSmceKL5syDMa79
keoAnRrSe8DJdOf7wrKeuKVQyqbsZzr2
=IQjn
-END PGP SIGNATURE-

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



Re: Tomcat 6 requires config to run on JSE 5?

2008-01-16 Thread Mark Thomas

Caldarale, Charles R wrote:

It's not really incorrect, but is certainly misleading.  Chalk it up to
programmers not being writers or editors.


Now fixed in trunk. I'll get it ported to 6.0.x.

Mark


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



URL Redirects from Root?

2008-01-16 Thread Justin Stanczak
Anyone have suggestions on setting up redirect for the ROOT folder? What I
have is an old IIS server that I'm moving to Linux Tomcat. The IIS has all
kinds of redirects. My first thought was to just create folders and
index.jsp pages with a redirect tag, but is there a better way?

-- 
All that is necessary for the triumph of evil is that good men do nothing.
- Edmund Burke


Tomcat 4.1 question(viewing html pages)

2008-01-16 Thread ram . sriharsha
Hi,

I have the following question: to view a html page from the webapps
directory of Tomcat, what do I need to do? In Tomcat 5.5 all I had to do
was create a sub-folder in webapps and put the html page inside it. Then
using the right URL, I can access the page...This does not work in Tomcat
4.1 as I'm now finding out. Could anyone please explain the difference
between Tomcat 4.1 and 5.5 in this regard, and how to fix the problem?

Sincerely

Ram








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



Tomcat worked before, now it doesn't

2008-01-16 Thread B McFee

Hi, My tomcat worked before but now for some reason the browser won't find the 
localhost. I am using the same address(http://localhost:8080 etc) Also for some 
reason it wont shut down when I type inbin/shutdown Here is the error message I 
get: 
Using CLASSPATH: c:\tomcat\jakarta-tomcat-3.2.3\classes;c:\tomcat\jakarta-tomcat
-3.2.3\lib\ant.jar;c:\tomcat\jakarta-tomcat-3.2.3\lib\jasper.jar;c:\tomcat\jakar
ta-tomcat-3.2.3\lib\jaxp.jar;c:\tomcat\jakarta-tomcat-3.2.3\lib\parser.jar;c:\to
mcat\jakarta-tomcat-3.2.3\lib\servlet.jar;c:\tomcat\jakarta-tomcat-3.2.3\lib\web
server.jar;c:\jdk1.3.1\lib\tools.jar

Stop tomcat
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:320)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120)
at java.net.Socket.init(Socket.java:273)
at java.net.Socket.init(Socket.java:100)
at org.apache.tomcat.task.StopTomcat.execute(StopTomcat.java:104)
at org.apache.tomcat.startup.Tomcat.stopTomcat(Tomcat.java:267)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:174)
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
C:\tomcat\jakarta-tomcat-3.2.3
 
I checked the archives and FAQ which said try control/break
to stop all threads. This still didnt solve the problem.
 
Here are the log messeges I get on startup
 
servlet.log

2008-01-16 11:40:44 - path=/examples :jsp: init
2008-01-16 11:40:44 - path=/admin :jsp: init
2008-01-16 11:40:44 - path=/mydev :jsp: init
2008-01-16 11:40:44 - path= :jsp: init
2008-01-16 11:40:44 - path=/test :jsp: init
 

jasper.log

2008-01-16 11:40:44 - Scratch dir for the JSP engine is: 
C:\tomcat\jakarta-tomcat-3.2.3
\work\localhost_8080%2Fexamples
2008-01-16 11:40:44 - IMPORTANT: Do not modify the generated servlets
 
Here is what the tomcat window looks like on start up:
(cannot see any anomolies here)
 
2008-01-13 08:57:14 - ContextManager: Adding context Ctx( /examples )
2008-01-13 08:57:14 - ContextManager: Adding context Ctx( /admin )
Starting tomcat. Check logs/tomcat.log for error messages
2008-01-13 08:57:14 - ContextManager: Adding context Ctx( /mydev )
2008-01-13 08:57:14 - ContextManager: Adding context Ctx( )
2008-01-13 08:57:14 - ContextManager: Adding context Ctx( /test )
2008-01-13 08:57:15 - PoolTcpConnector: Starting HttpConnectionHandler on 8080
2008-01-13 08:57:15 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007
 
Here is what the DOS window looks like on startup:
 
Using CLASSPATH: c:\tomcat\jakarta-tomcat-3.2.3\classes;c:\tomcat\jakarta-tomcat
-3.2.3\lib\ant.jar;c:\tomcat\jakarta-tomcat-3.2.3\lib\jasper.jar;c:\tomcat\jakar
ta-tomcat-3.2.3\lib\jaxp.jar;c:\tomcat\jakarta-tomcat-3.2.3\lib\parser.jar;c:\to
mcat\jakarta-tomcat-3.2.3\lib\servlet.jar;c:\tomcat\jakarta-tomcat-3.2.3\lib\web
server.jar;c:\jdk1.3.1\lib\tools.jar
 
I am using windows 2000. Can anybody help?
_
Put your friends on the big screen with Windows Vista® + Windows Live™.
http://www.microsoft.com/windows/shop/specialoffers.mspx?ocid=TXT_TAGLM_CPC_MediaCtr_bigscreen_012008

Re: Tomcat worked before, now it doesn't

2008-01-16 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

B,

B McFee wrote:
| Hi, My tomcat worked before but now for some reason the browser won't
|  find the localhost. I am using the same
| address(http://localhost:8080 etc) Also for some reason it wont shut
| down when I type inbin/shutdown Here is the error message I get:
|
| Using CLASSPATH:
c:\tomcat\jakarta-tomcat-3.2.3\classes;c:\tomcat\jakarta-tomcat
| -3.2.3\lib\ant.jar;[...]

Yikes! Tomcat 3.2.3? Time to upgrade, man.

| I am using windows 2000. Can anybody help?

Did you change anything recently?

Try using netstat -abn and look through the output for port 8080 to
see if Java has correctly bound itself to the port. Tcpview might be
even better.

I would definitely start with a clean slate: run the Task Manager and
kill any existing tomcats that are running, delete all the logs (or move
them out of the way), delete the work directory, and re-start Tomcat.

Good luck!
- -chris

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

iEYEARECAAYFAkeOiJsACgkQ9CaO5/Lv0PAwewCdGW02hxJAQvmxkGfHIisZQHbN
TdUAn20C9EffIOJSm0mVqKMI+YbXf7ym
=g4Ef
-END PGP SIGNATURE-

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



RE: PDF problem on IE from JSP

2008-01-16 Thread Jonadan


Pitre, Russell wrote:
 
 response.setContentLength(baos.size());
 
Hi,

I added the size information as follows;

response.setContentType(application/pdf;charset=UTF-8);
// response.setHeader(Content-Disposition,
inline;filename=\Document.pdf\); 
response.setHeader(Content-Disposition,
attachment;filename=\Document.pdf\); 
response.setContentLength(baos.size());
response.setHeader(Cache-Control,no-cache); 
response.setHeader(Pragma,no-cache);
response.setDateHeader(Expires, 0);

ServletOutputStream outstream = response.getOutputStream(); 
baos.writeTo(outstream); 
// outstream.flush(); 

If I change the disposition to inline, nothing changes in the browser.
With the attachement, I get this error message dialog;

==
Internet Explore cannot download pdf example.jsp from localhost.

Internet Explore was not able to open this Internet site. The requested site
is 
unavailable or cannot be found. Please try again later.
==

I suspect that Tomcat is not handling partial content request properly. IE
tends 
to read PDF page by page as we read pages.

Regards.







-- 
View this message in context: 
http://www.nabble.com/PDF-problem-on-IE-from-JSP-tp14879788p14896465.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Tomcat 4.1 question(viewing html pages)

2008-01-16 Thread Mark Thomas

[EMAIL PROTECTED] wrote:

Hi,

I have the following question: to view a html page from the webapps
directory of Tomcat, what do I need to do? In Tomcat 5.5 all I had to do
was create a sub-folder in webapps and put the html page inside it. Then
using the right URL, I can access the page...This does not work in Tomcat
4.1 as I'm now finding out. Could anyone please explain the difference
between Tomcat 4.1 and 5.5 in this regard, and how to fix the problem?


It is related to the spec versions they implement.

In Tomcat 4 you'll need to create a WEB-INF directory and (I think) add a 
web.xml file. You can copy the web.xml from the ROOT webapp. You might want 
to change the display name and description but you don't have to for a 
quick test.


Mark


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



RE: Problems with VirtualWebappLoader (Was RE: Tomcat 6.0.x Classloader sequence)

2008-01-16 Thread Caldarale, Charles R
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Subject: RE: Problems with VirtualWebappLoader (Was RE: 
 Tomcat 6.0.x Classloader sequence)
 
 I merely want the webapp classloader of each webapp1 to load 
 classes not only from WEB-INF/{classes|lib} but also from 
 ${CATALINA_HOME}/mycommonlib.

O.k., try this undocumented capability.  Inside each Context element
that needs it, specify a Loader element with the following attributes:
  className=org.apache.catalina.loader.VirtualWebappLoader
  virtualClasspath=${CATALINA_HOME}/mycommonlib

This should append the common library directory to the classpath used by
each WebappClassLoader, so they'll each load their own copies.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



RE: Problems with VirtualWebappLoader (Was RE: Tomcat 6.0.x Classloader sequence)

2008-01-16 Thread Caldarale, Charles R
 From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
 Subject: RE: Problems with VirtualWebappLoader (Was RE: 
 Tomcat 6.0.x Classloader sequence)
 
 O.k., try this undocumented capability.  Inside each Context element
 that needs it, specify a Loader element with the following 
 attributes:
   className=org.apache.catalina.loader.VirtualWebappLoader
   virtualClasspath=${CATALINA_HOME}/mycommonlib

I see by looking back at the beginning of this thread that you already
tried something similar. However, the virtualClasspath setting with the
variable reference doesn't seem to work, but this does:
  virtualClasspath=../mycommonlib
assuming your working directory is $CATALINA_HOME/bin, which it should
be.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.


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



Re: Tomcat 4.1 question(viewing html pages)

2008-01-16 Thread ram . sriharsha
Hi Mark,

Thanks for your helpful comment..it solved the problem.

Ram


 [EMAIL PROTECTED] wrote:
 Hi,

 I have the following question: to view a html page from the webapps
 directory of Tomcat, what do I need to do? In Tomcat 5.5 all I had to do
 was create a sub-folder in webapps and put the html page inside it. Then
 using the right URL, I can access the page...This does not work in
 Tomcat
 4.1 as I'm now finding out. Could anyone please explain the difference
 between Tomcat 4.1 and 5.5 in this regard, and how to fix the problem?

 It is related to the spec versions they implement.

 In Tomcat 4 you'll need to create a WEB-INF directory and (I think) add a
 web.xml file. You can copy the web.xml from the ROOT webapp. You might
 want
 to change the display name and description but you don't have to for a
 quick test.

 Mark


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





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



RE: PDF problem on IE from JSP

2008-01-16 Thread Jonadan

Or IE does not like content or does not expect as valid connection.


-- 
View this message in context: 
http://www.nabble.com/PDF-problem-on-IE-from-JSP-tp14879788p14899461.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Cluster Not Syncing After Restart

2008-01-16 Thread David Rees
I'm running a Tomcat 5.5.25 cluster with 2 nodes and the following
cluster configuration in the Host/ element:

Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
Valve className=org.apache.catalina.cluster.tcp.ReplicationValve
   
filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/
Valve 
className=org.apache.catalina.cluster.session.JvmRouteBinderValve
enabled=true/
ClusterListener
className=org.apache.catalina.cluster.session.ClusterSessionListener/
ClusterListener
className=org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener/
/Cluster

Every night, I restart the two nodes of the cluster, one at a time,
using a standard shutdown with a processing monitoring Tomcat to start
it back up automatically after it has exited (daemontools for those
interested).

But after restarting the first node, it does not rejoin the cluster.
In the logs of node 1 are this (node was shut down at 04:30):

2008-01-17 04:30:07,212 INFO : SimpleTcpCluster: Cluster is about to start
2008-01-17 04:30:07,317 INFO : SimpleTcpCluster: Add Default
ClusterReceiver at cluster localhost
2008-01-17 04:30:07,326 INFO : SimpleTcpCluster: Add Default
ClusterSender at cluster localhost
2008-01-17 04:30:07,341 INFO : SocketReplicationListener: Open Socket
at [10.1.1.5:8015]
2008-01-17 04:30:07,363 ERROR: ClusterListener: Context manager doesn't exist:
^^^ That line repeats ~25,000 times for a couple seconds
2008-01-17 04:30:10,110 ERROR: ClusterListener: Context manager doesn't exist:
2008-01-17 04:30:11,443 INFO : McastService: membership mbean
registered (Catalina:type=ClusterMembership,host=localhost)
2008-01-17 04:30:11,790 INFO : DeltaManager: Starting clustering manager...:
2008-01-17 04:30:11,790 INFO : DeltaManager: Register manager  to
cluster element Host with name localhost
2008-01-17 04:30:11,790 INFO : DeltaManager: Starting clustering manager at
2008-01-17 04:30:11,794 WARN : DeltaManager: Manager [], requesting
session state from
org.apache.catalina.cluster.mcast.McastMember[tcp://10.1.1.6:8015,catalina,10.1.1.6,8015,
alive=86161577]. This operation will timeout if no session state has
been received within 60 seconds.
2008-01-17 04:30:21,894 ERROR: DeltaManager: Manager []: No session
state send at 17/01/08 04:30 received, timing out after 10,102 ms.

While node 1 is shutting down, ~4000 messages like this are generated on node 2:

2008-01-17 04:30:06,233 WARN : FastAsyncSocketSender: Unable to
asynchronously send session with id=[x.c-web2-1200438737718] -
message will be ignored.
java.lang.NullPointerException
at 
org.apache.catalina.cluster.tcp.DataSender.pushMessage(DataSender.java:1057)
at 
org.apache.catalina.cluster.tcp.FastAsyncSocketSender$FastQueueThread.pushQueuedMessages(FastAsyncSocketSender.java:524)
at 
org.apache.catalina.cluster.tcp.FastAsyncSocketSender$FastQueueThread.run(FastAsyncSocketSender.java:487)
2008-01-17 04:30:06,235 WARN : FastAsyncSocketSender: Unable to
asynchronously send session with id=[x.c-web2-1200438739053] -
message will be ignored.
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at 
org.apache.catalina.cluster.tcp.DataSender.createSocket(DataSender.java:897)
at 
org.apache.catalina.cluster.tcp.DataSender.openSocket(DataSender.java:866)
at 
org.apache.catalina.cluster.tcp.DataSender.pushMessage(DataSender.java:1009)
at 
org.apache.catalina.cluster.tcp.FastAsyncSocketSender$FastQueueThread.pushQueuedMessages(FastAsyncSocketSender.java:524)
at 
org.apache.catalina.cluster.tcp.FastAsyncSocketSender$FastQueueThread.run(FastAsyncSocketSender.java:487)

These stop after about 1 second (last one at 04:30:07.340), and then a
decent number of Send stats lines are then printed on node 2:

2008-01-17 04:30:07,376 INFO : DataSender: Send stats from
[10.1.1.5:8,015], Nr of bytes sent=20,441,242 over 26,000 = 786
bytes/request, processing time 58,669,413 msec, avg processing time
2,257 msec
!-- More lines similar to the above and below --
2008-01-17 04:30:10,053 INFO : DataSender: Send stats from
[10.1.1.5:8,015], Nr of bytes sent=39,242,737 over 50,000 = 784
bytes/request, processing time 58,672,059 msec, avg processing time
1,173 msec

When node 2 restarts a couple minutes later, it is able to
successfully rejoin the cluster:

2008-01-17 04:34:05,433 INFO : SimpleTcpCluster: Cluster is about to start
2008-01-17 04:34:05,515 INFO : SimpleTcpCluster: Add Default
ClusterReceiver at cluster localhost
2008-01-17 04:34:05,521 INFO : 

Tomcat 5.5 classloading behavior

2008-01-16 Thread Michel Betancourt
Hi,

I am wondering if someone may be able to point me in the right direction
here...  after reviewing the J2SE spec, and the Servlet 2.4 Spec, its not
too clear whether circular dependecies  such as the one I am investigating
below are legal or supported by Tomcat.  Sun J2SE 5.0 classloader does not
seem to support such initialization although the Tomcat classloader (v5.5)
seems to an operation such as my example below.

An exert of the Java specification states:
12.4.2, #3 If initialization is in progress for the class or interface by
the current thread, then this must be a recursive request for
initialization. Release the lock on the Class object and complete normally.

Servlet 2.4 spec says that Classloaders need to follow the J2SE
specification.


So as I am investigating the Tomcat 5.5 classloader I am wondering if either
one of these situations are legal for Tomcat 5.5 or whether I should be
observing a ClassCircularityError... debugging my App shows the following
behavior:

Examples :

Class A {

static {
System.out.println(B.somefield); // debugger shows that A is checked and the
static block is invoked.  B is loaded which initializes B.somefield through
the constructor of A.
}


}

Class B {
public static final A somefield;
}

and/or circular dependecy from Parent static initializers

Class Parent {
static {
System.out.println(B.somefield); // debugger shows A is checked, Parent is
loaded which loads B which loads somefield through the constructor of class
A
}
}

Class A extends Parent {
}

Class B {
public static final A somefield;
}

Thanks in advance.

Best Regards,
Mich


RE: How can I speed up and reduce load of initialization

2008-01-16 Thread Gavan Hood
My web app is very simple, two servlets already installed so no war file. 
  Once it finally gets going it is very responsive, the initialization just 
takes forever...
   
  I have some war files coming, but I figure if I cannt get this basic 
initialization to work theres not much point.
   
  Is tomcat supposed to work in embedded environments like this, is it 
something others are trying / have working , Is it part of the roadmap ?
   
  

Peter Crowther [EMAIL PROTECTED] wrote:
   From: Gavan Hood [mailto:[EMAIL PROTECTED]
 My problem is the initialization.
 When I start tomcat it takes about two minutes to complete
 initialization and pegs my little processor at times, often
 it keeps it around 80% untilized...

Yeah, that's not good in an embedded device!

2 minutes with or without your application deployed? i.e. how much of that time 
is Tomcat startup, and how much is Tomcat deploying your webapp / your webapp 
startup?

How is your application packaged? Are you unpacking it from a WAR, or is it 
already unpacked?

- Peter

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



   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

username/password in DataSource configuration

2008-01-16 Thread [EMAIL PROTECTED]
Hi everyone,

The connection to SQL server in my machine is by default so username and
password are not needed to login. In this case, what should I specify in
Resource.../ for username and password attributes? I tried not to include
them but got an error of Login failed for user ''. The user is not
associated with a trusted SQL Server connection.

Context path=/DBTest docBase=DBTest
debug=5 reloadable=true crossContext=true
  Resource name=jdbc/EmployeeDB auth=Container type=
javax.sql.DataSource username=user name password=pwd
  driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
  url=jdbc:sqlserver://localhost:1433;databaseName=EmployeeDB
  maxActive=8 maxIdle=4/
/Context

Thanks.


Re: username/password in DataSource configuration

2008-01-16 Thread David Smith
What happens if you include them, but empty -- eg username= 
password=?  I don't configure my datasources without a username and 
password, so I've never actually tried it myself but it's worth trying.


--David

[EMAIL PROTECTED] wrote:

Hi everyone,

The connection to SQL server in my machine is by default so username and
password are not needed to login. In this case, what should I specify in
Resource.../ for username and password attributes? I tried not to include
them but got an error of Login failed for user ''. The user is not
associated with a trusted SQL Server connection.

Context path=/DBTest docBase=DBTest
debug=5 reloadable=true crossContext=true
  Resource name=jdbc/EmployeeDB auth=Container type=
javax.sql.DataSource username=user name password=pwd
  driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
  url=jdbc:sqlserver://localhost:1433;databaseName=EmployeeDB
  maxActive=8 maxIdle=4/
/Context

Thanks.

  



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



RE: Problems with VirtualWebappLoader (Was RE: Tomcat 6.0.x Classloader sequence)

2008-01-16 Thread Caldarale, Charles R
 From: Caldarale, Charles R 
 Subject: RE: Problems with VirtualWebappLoader (Was RE: 
 Tomcat 6.0.x Classloader sequence)
 
 I see by looking back at the beginning of this thread that 
 you already tried something similar.

Now let's really go back to your original question:

 There are three platform/location specific elements 
 here which I need to get rid of:
1) catalina.home

You may use any system property inside the ${} expression, so you can
establish whatever you need at Tomcat startup time with a -D
command-line option.

2) path separator: '\' vs '/' for windoze and *nix)

That's more properly known as the file separator in JVM terminology.
The forward slash (/) works fine in both *nix and Windows for the
purposes of the virtualClasspath attribute.

3) field separate: ';' vs ':' for windoze and *nix)

This was a bit trickier, but the JVM defines a system property with the
necessary value: path.separator.

The following was successful on a WinXP box with Tomcat 6.0.14 and JDK
1.6:

Context
  Loader className=org.apache.catalina.loader.VirtualWebappLoader
 
virtualClasspath=${catalina.home}/webapps/sample/dir/lib/mypackage1.jar
${path.separator}${catalina.home}/webapps/sample/dir/lib/mypackage2.jar
/
/Context

(There are no line breaks in the virtualClasspath setting, of course.)

Since you can set a system property to any arbitrary string, you could
set the entire virtualClasspath with one system property reference.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



Re: PDF problem on IE from JSP

2008-01-16 Thread MrKimi

This solved a similar problem for me

String mimeType = sc.getMimeType(filename);
FileHelper helper = new FileHelper();

InputStream in = helper.fetch(filename, m_dir);
response.setContentType(mimeType!=null?mimeType:text/html);
response.setHeader(Pragma, cache);
response.setHeader(Cache-Control, cache);

OutputStream out = response.getOutputStream();
byte[] buf = new byte[1024];
int count = 0;
while ((count = in.read(buf)) = 0)
{
out.write(buf, 0, count);
}
in.close();
if (mimeType == null)
out.write(/pre/html.getBytes());
out.close();

-- 
View this message in context: 
http://www.nabble.com/PDF-problem-on-IE-from-JSP-tp14879788p14905302.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Tomcat 5.5 classloading behavior

2008-01-16 Thread Johnny Kewl


What language is this guy talking  ha ha.
This has got to be for a thesis or something or its attempted suicide ;)

- Original Message - 
From: Michel Betancourt [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Thursday, January 17, 2008 3:33 AM
Subject: Tomcat 5.5 classloading behavior



Hi,

I am wondering if someone may be able to point me in the right direction
here...  after reviewing the J2SE spec, and the Servlet 2.4 Spec, its not
too clear whether circular dependecies  such as the one I am investigating
below are legal or supported by Tomcat.  Sun J2SE 5.0 classloader does not
seem to support such initialization although the Tomcat classloader (v5.5)
seems to an operation such as my example below.

An exert of the Java specification states:
12.4.2, #3 If initialization is in progress for the class or interface by
the current thread, then this must be a recursive request for
initialization. Release the lock on the Class object and complete 
normally.


You know what you should do... find a little custom class loader example on 
the web and run it through a debugger.
They look simple but when you actually watch them work, and how reentrent 
the things are, this will hopefully all start to make sense.


I think most guys havnt even started thinking about this... 
ClassCircularityError Wow! dont trap that in my code ;)


This is what I think the normal system classloader, and the tomcat 
classloader when it comes to threads and reentrant code will
behave exactly the same... the reason is that one class loader inherets from 
another and thus one can expect the behavior to be similar.
The only diffirence is where the tomcat classloader will look for jars and 
class's.


ie the same stuff is happening but when it comes time to find Your 
Class... it will look for it in the web-app, after that i think

its much of a muchness.
Thats different because outside of web servlets... class loaders are not 
allowed to work like that... they always ask the classloader
above them if it has the class already, if not the parent class loader 
tries to find it, and ONLY if it cant find it, will the child classloader

try and get it.

If you watch a cl working you'll see that recursive request stuff 
happenning... and I'm no academic, in plain talk it just means
that all those dependencies must be gotten out of the way, before the next 
thread can come in and ask for a class to load.
So if A - B - C and thread one is busy with A, and thread 2 really just 
wants C it has to wait, because otherwise
C would load... and then A would eventually get to it and it would load 
again because its already kicked off that recursive pattern.
Then because C is waiting A will actually will have done it already... 
and the cl will then just say... thread 2, you lucky, class is loaded, you 
can go now.


Normal CL or Tomcat no diffs.

The other thing with these examples is that yes I guess it is possible to be 
surprised in the way STATIC variables are inited in complex
class structure... but remember is LOADING, not INSTANTIATING the class, 
that comes later outside of the CL, so in most cases

it not an issue one would even encounter.

I dont think its possible to make an ClassCircularityError error with a 
modern IDE... I dont think it will let you compile the code


Class A extends A

so if you actually making these classes and compiling them I dont think 
its possible to simulate it without hacking byte code.

 be interesting to hear if anyone ever seen that.

Thanks... I never ever thought about static variables before... and I've 
never seen it in practical code.
ie I think in normal code a programmer may go what the... I thought 
static A was going to be 5, why is it 10, or whatever...
and then eventually see the curcular RELATIONSHIP but I doubt that would 
cause an error.
If its compiling... I dont think you can break a classloader... short of it 
just cant find the Jar


interesting things these classloaders... good luck.
If its practical stuff... I can help you a little, heavy specs and theory... 
you on your own ;)



Servlet 2.4 spec says that Classloaders need to follow the J2SE
specification.


So as I am investigating the Tomcat 5.5 classloader I am wondering if 
either

one of these situations are legal for Tomcat 5.5 or whether I should be
observing a ClassCircularityError... debugging my App shows the following
behavior:

Examples :

Class A {

static {
System.out.println(B.somefield); // debugger shows that A is checked and 
the
static block is invoked.  B is loaded which initializes B.somefield 
through

the constructor of A.
}


}

Class B {
public static final A somefield;
}

and/or circular dependecy from Parent static initializers

Class Parent {
static {
System.out.println(B.somefield); // debugger shows A is checked, Parent is
loaded which loads B which loads somefield through the constructor of 
class

A
}
}

Class A extends Parent {
}

Class B {

Re: Doubt in how lbfactor works with load balancing of Apache with Tomcat cluster

2008-01-16 Thread Shiby Maria John
Thanks a lot for the whole explanation.

Let me plesase summarise to clear my understanding.
So it all means that if sticky_session is true, then a session started
in one machine will be routed to the same tomcat server always
whatever the load factor is set. And for any other new sessions being
created, it may be created in the other tomcat server depending on the
load factor set.

And one more thing is if I set the redirect for first server as the
second and disable the second for any requests, then also the lbfactor
will not have any have any effect, am I right ?

Thanks again for the patience you are showing to anwser me : )
I have tried to put the setup steps as a research paper and meanwhile
I got these doubts : )
Thanks again.

Regards,
Shiby


  
 Rainer Jung  
 [EMAIL PROTECTED]  
 ppdata.deTo 
 Tomcat Users List
 01/16/2008  users@tomcat.apache.org
 08:36 PM  cc 
  
  Subject 
 Please respond  Re: Doubt in how lbfactor works  
   towith load balancing of Apache
  Tomcat Users  with Tomcat cluster  
  List   
 [EMAIL PROTECTED]  
   pache.org 
  
  
  




Shiby Maria John wrote:
 I was getting confused with setting the load balancer to be
 sticky_session and setting of lbfactor together.
 By session, i meant new sessions being created in the server.
 Are they mutually exclusive ?

sticky_session: if a request carries a session id, either via
JSESSIONID
cookie or a ;jsessionid=... URL encoding, mod_jk looks, if the session

id contains a route, i.e. a suffix separated with a dot '.'.

If so, it checks, if the load balancer has a member, with route
attribute equal to the session route, or name of the worker equal to
the
session route. If so, and this worker is in OK state and not stopped,
it
sends the request there. If there is no such worker, or the worker is
nor usable, the request is handled like it wouldn't have a route in
the
session id, or no session at all.

The route is put into the id automatically by Tomcat, if you set the
jvmRoute in server.xml. The route added to the session id is equal to
the value of jvmRoute.

No lbfactor used for this decision.

lbfactor influences the decision, to which member of a load balancer a

request gets forwarded only, if the request isn't already handled
sticky, e.g. it doesn't carry a session id or the session id does not
have a route in it.

In this case, mod_jk chooses the member with least load. How we count
load, depends on the method attribute of the load balancer. When we
look
for the least load, we divide the load of the individual members by
their lbfactor, s.t. the load of a member with lbfactor 10 only counts

1/10 of the load of a member with lbfactor 1. That way the member with

lbfactor 10 will approximately get 10 times the number of requests
than
the one with lbfactor 1.

Technically we don't really divide, but do something similar, that
doesn't need floating point, but leads to the same result (see below).

 Can you please explain the effect of setting both those values along
 with method=R.
 Please clarify.

Method R: Each request forwarded to some member changes the load
value
of the member. The load value is used like described above, when we
need
to decide, which member should get the next request, that's not
already
handled by stickyness.

R: if a request goes to a member, increase the load value of it by 1.
T: if a request goes to a member, increase the load value by the
number
of bytes read and written for this request
B: if a request goes to a member, increase the load value by 1, and
directly after the end of the request, decrese by 1 (so the load value

should be equal to the number of requests currently processed in
parallel by this member)
S: Like R, but only count the request, if it is not handled by
stickyness.

More precisely, to avoid the division by the lbfactor, we don't
increase
by one or by the number of bytes, but we increase the load value
instead
with a multiple of 1 or the number of bytes. The factor is an integer
number and those factors for the members are proportional to

Re: Tomcat 5.5 classloading behavior

2008-01-16 Thread Gabe Wong

Johnny Kewl wrote:


What language is this guy talking  ha ha.
This has got to be for a thesis or something or its attempted 
suicide ;)


- Original Message - From: Michel Betancourt 
[EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Thursday, January 17, 2008 3:33 AM
Subject: Tomcat 5.5 classloading behavior



Hi,

I am wondering if someone may be able to point me in the right direction
here...  after reviewing the J2SE spec, and the Servlet 2.4 Spec, its 
not
too clear whether circular dependecies  such as the one I am 
investigating
below are legal or supported by Tomcat.  Sun J2SE 5.0 classloader 
does not
seem to support such initialization although the Tomcat classloader 
(v5.5)

seems to an operation such as my example below.

An exert of the Java specification states:
12.4.2, #3 If initialization is in progress for the class or 
interface by

the current thread, then this must be a recursive request for
initialization. Release the lock on the Class object and complete 
normally.


You know what you should do... find a little custom class loader 
example on the web and run it through a debugger.
They look simple but when you actually watch them work, and how 
reentrent the things are, this will hopefully all start to make sense.


I think most guys havnt even started thinking about this... 
ClassCircularityError Wow! dont trap that in my code ;)


This is what I think the normal system classloader, and the tomcat 
classloader when it comes to threads and reentrant code will
behave exactly the same... the reason is that one class loader 
inherets from another and thus one can expect the behavior to be similar.
The only diffirence is where the tomcat classloader will look for jars 
and class's.


ie the same stuff is happening but when it comes time to find Your 
Class... it will look for it in the web-app, after that i think

its much of a muchness.
Thats different because outside of web servlets... class loaders are 
not allowed to work like that... they always ask the classloader
above them if it has the class already, if not the parent class 
loader tries to find it, and ONLY if it cant find it, will the child 
classloader

try and get it.

If you watch a cl working you'll see that recursive request stuff 
happenning... and I'm no academic, in plain talk it just means
that all those dependencies must be gotten out of the way, before the 
next thread can come in and ask for a class to load.
So if A - B - C and thread one is busy with A, and thread 2 really 
just wants C it has to wait, because otherwise
C would load... and then A would eventually get to it and it would 
load again because its already kicked off that recursive pattern.
Then because C is waiting A will actually will have done it 
already... and the cl will then just say... thread 2, you lucky, class 
is loaded, you can go now.


Normal CL or Tomcat no diffs.

The other thing with these examples is that yes I guess it is possible 
to be surprised in the way STATIC variables are inited in complex
class structure... but remember is LOADING, not INSTANTIATING the 
class, that comes later outside of the CL, so in most cases

it not an issue one would even encounter.

I dont think its possible to make an ClassCircularityError error with 
a modern IDE... I dont think it will let you compile the code


Class A extends A

so if you actually making these classes and compiling them I dont 
think its possible to simulate it without hacking byte code.

 be interesting to hear if anyone ever seen that.

Thanks... I never ever thought about static variables before... and 
I've never seen it in practical code.
ie I think in normal code a programmer may go what the... I 
thought static A was going to be 5, why is it 10, or whatever...
and then eventually see the curcular RELATIONSHIP but I doubt that 
would cause an error.
If its compiling... I dont think you can break a classloader... short 
of it just cant find the Jar


interesting things these classloaders... good luck.
If its practical stuff... I can help you a little, heavy specs and 
theory... you on your own ;)
Nice analysis Johnny. To add to your thought (even though slightly off 
topic) -
Yes there is a big difference between theory (specification) and 
practice (implementation).

So it may be confusing for someone starting off from the theoretical side.


--
Regards

Gabe Wong
NGASI AppServer Manager
JAVA AUTOMATION and SaaS Enablement
a href=http://www.ngasi.comhttp://www.ngasi.com/a
NEW! 8.0 - Centrally manage multiple physical servers


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



RE: Tomcat 5.5 classloading behavior

2008-01-16 Thread Caldarale, Charles R
 From: Michel Betancourt [mailto:[EMAIL PROTECTED] 
 Subject: Tomcat 5.5 classloading behavior
 
 its not too clear whether circular dependecies such as 
 the one I am investigating below are legal or supported
 by Tomcat.

Detection of circular dependencies is not the responsibility of any
classloader, let alone a Java application such as Tomcat.  Such
determination is done by the core JVM.

 Sun J2SE 5.0 classloader does not seem to support such
 initialization 

Neither of your examples involves a true circular dependency, and they
both work fine for me on JDK 1.5 and 1.6.  Perhaps you can supply a real
example.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



Re: How can I preserve a directory on Deployment?

2008-01-16 Thread Jonadan

Option 1: Deploy as unpacked. Simple and I use!
Option 2: If you deploy as war files, you may be able to read files
 inside wars using classloader resource stream readers.



Greg Kontos wrote:
 
When I redeploy my .war file I want this upload directory to remain 
 unchanged.  Is there a way for me to tell Tomcat to leave this directory 
 unchanged when the .war file is unpacked?
 

-- 
View this message in context: 
http://www.nabble.com/How-can-I-preserve-a-directory-on-Deployment--tp14845804p14909597.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



how to communicate between different tomcat servers

2008-01-16 Thread 印华
hi, all
I build a web application based on tomcat. In my design, I devide the server 
side into several separate logic parts,and each part is deployed on a separate 
Tomcat server. e.g. the first tomcat server is to process login request, second 
tomcat server is to calculate user data, the third tomcat server is to store 
all the user information. It is a distribute architecure, and I hope in this 
way, this system can be extended by adding tomcat server when the application 
load on one Tomcat server is big enough.  For example, when the second tomcat 
server's calculation work is too big, I can add a new Tomcat server to do 
calculation work, so do the first Tomcat server for processing login, while in 
the system, there is only one Tomcat server to store the total user 
information. This architecture is widely used in the Client/Server mode 
application, while I'm not sure whether in Browser/Server mode it can work. 
I think this requirment is different to the Tomcat cluster, because Tomcat 
cluster can solve the load balance problem, while in my case, I would like to 
keep some global data on one Tomcat server such as the third tomcat server. So 
currently, I meet a problem of how to communicate between the tomcat servers, I 
think http or webservice can do this work simply, but the efficiency is not 
good, and I don't know whether JMS is a good choice for this. I wonder if there 
is any other way to communicate between the tomcat server? Can tomcat servers 
work in such a distribute way?

Any help and suggestion will be welcome.

Thank you very much

Frank


RE: Tomcat Shutdown error transport error 202: bind failed

2008-01-16 Thread varunsuresh



I tired not giving $JPDA_OPTS to  CATALINA_OPTS, but after that debugging
wasnt hapenning at all.



Caldarale, Charles R wrote:
 
 From: varunsuresh [mailto:[EMAIL PROTECTED] 
 Subject: Re: Tomcat Shutdown error transport error 202: bind failed
 
export CATALINA_OPTS=$CATALINA_OPTS $JPDA_OPTS
 
 The above is wrong. By appending JPDA_OPTS to CATALINA_OPTS, you end up
 with the JPDA settings twice on the command line.  Just take out the
 above line.
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete the e-mail
 and its attachments from all computers.
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Tomcat-Shutdown-error-transport-error-202%3A-bind-failed-tp14737139p14912916.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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