Re: parallel webapp initialization

2012-01-25 Thread Pid
On 24/01/2012 21:01, David Rees wrote:
 On Mon, Jan 23, 2012 at 11:53 PM, Pid * p...@pidster.com wrote:
 On 23 Jan 2012, at 21:12, David Rees dree...@gmail.com wrote:
 On Tue, Oct 11, 2011 at 6:42 AM, Mark Thomas ma...@apache.org wrote:
 I have added a patch based on the previous patches that adds:
 - threaded start/stop for Contexts
 - threaded start/stop for Hosts
 - threaded deployment

 Control over the number of threads is via server.xml and/or JMX. This
 can be changed dynamically.

 Review, feedback, testing etc. welcome.

 With 4 threads rather than the current 1 (on a 8-core machine), I saw a
 20-25% improvement in start time with a large number of Contexts that
 all start quickly. I'd expect to see better results in situations where
 1 few Contexts start slowly but most are quick.

 Resurrecting an old thread, but I've started using this in Tomcat
 7.0.25 with good results - have a Tomcat instance used for testing
 with a couple dozen contexts that take a while to load each, but with
 startStopThreads bumped up it reduces startup time from 60 seconds to
 20 seconds using all available CPU cores.  Very helpful!

 That's great - and thanks for letting us know.

 If you have time, I think it would be interesting to know your
 application sizes, individual startup time and how many
 startStopThreads you are using.
 
 On this example there's about 30 webapps, each war file ranges between
 30-60MB.  Single threaded startup, each application takes about 2
 seconds to start up.  This is on a warm restart, webapps already
 deployed, cold restarts are slower if the server has to read from
 disk.

Awesome, thanks.

 The system has 8 CPU cores, Opteron 2378 CPU.  Going beyond 4
 startStopThreads for the host where the webapps are deployed doesn't
 speed things up much more as it appears that the webapps can use up to
 2 cores when initializing as seen in single threaded startup mode.

In single threaded startup mode, the process uses 2 cores?

You refer to system and host separately, is it virtualised?

 Going to 6 threads pretty much maxed it out, but I've left it set to 7.

:)


p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat memory requirements

2012-01-25 Thread Pid *
On 25 Jan 2012, at 12:53, Mark Thomas ma...@apache.org wrote:

 On 25/01/2012 11:45, Celso Magalhães Dantas Neto wrote:
 Hey everyone!

 Does anyone knows where I can find any information about Tomcat memory
 requirements?

 Tomcat needs less than 20MB to start up. Everything after that depends
 on the application and the load level.

 Here's the problem: I got a client who's running a Tomcat process in his
 machine and it is taking around 150MB of RAM and he is complaining about
 it. It's a webapp and for me it's normal to a webapp to take that amount of
 memory, but I want to argue with him with some data.

 I have seen Tomcat running on JVMs with memory settings ranging from
 32MB to 8GB. 150MB isn't unreasonable at first glance but it all depends
 on the app.

 So I'm looking for some Tomcat memory requirements info, even if it's a
 memory requirements to run Tomcat only, with no deployed webapp. It will
 help me to argue with him.

 See above. The Tomcat only figure is less than 20MB.

And of this, a Tomcat instance with just the ROOT application can be
observed to consume from ~6Mb to ~10Mb of RAM in the object heap with
a nice stable sawtooth on most systems.

VisualVM connected to Tomcat will provide you with a nice graph
demonstrating this, which you can compare to a graph from the
customers application.


p

 You'll need to use a profiler to determine where the memory is actually
 used.

 Also note that there is a low memory usage/ low GC pause / high
 throughput trade-off. Very simply you can pick any two at the expense of
 the third.

 Mark

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


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



Re: not able to access URL in 2nd app in 7.0.23

2012-01-25 Thread Pid
On 25/01/2012 18:35, removeps-c...@yahoo.com wrote:
 OK here's what I tried:  I removed https.  A request through Firefox to 
 http://localhost:6144/myapp/folder/action.do still gives 404.  I overrode 
 doGet of the servlet class to print whether get/post and the 
 request.getRequestURI and it is
 
 get /myapp/folder/action.do
 
 This is the same as before.  My servlet has code like this
 
   if (uri.equals(/myapp/folder/action.do))
 
 in the doPost method so it would process this action.
 
 So the problem has to do with https.  I put the security-constraint stuff 
 back in but removed the auth-constraint, so everything is https but requires 
 no authentication.  What gets printed when you go to 
 https://localhost:6143/myapp/folder/action.do is still
 
 get /myapp/folder/action.do
 
 So the issue is with the auth-constraint.
 
 In my real code, my code makes a POST request to the given URL.  I re-ran 
 this test:
 
 So now it looks like the issue is this:
 
 (a) In 7.0.22 and earlier versions my code made a POST request to 
 https://localhost:6143/myapp/folder/action.do.
 (b) Tomcat made a POST request to the login page 
 https://localhost:6143/myapp/login.html
 (c) My servlet got called, and the doPost method of the servlet got called.
 
 But in 7.0.23 (b) Tomcat is making a GET request to 
 https://localhost:6143/myapp/login.html
 
 Thus I must move/copy my code in doPost to build login.html into doGet.
 
 This did work.

So, you're saying that the method value 'POST' is not preserved after
successful authentication and appears to be converted to a 'GET'?


p

 --- On Wed, 1/25/12, removeps-c...@yahoo.com removeps-c...@yahoo.com wrote:
 
 From: removeps-c...@yahoo.com removeps-c...@yahoo.com
 Subject: Re: not able to access URL in 2nd app in 7.0.23
 To: Tomcat Users List users@tomcat.apache.org
 Date: Wednesday, January 25, 2012, 9:10 AM
 Replies in place

 --- On Wed, 1/25/12, Pid p...@pidster.com
 wrote:

 From: Pid p...@pidster.com
 Subject: Re: not able to access URL in 2nd app in
 7.0.23
 To: Tomcat Users List users@tomcat.apache.org
 Date: Wednesday, January 25, 2012, 12:55 AM
 On 25/01/2012 02:49, removeps-c...@yahoo.com
 wrote:
 In my webapps folder there are two folders:
 ROOT,
 myapp.  ROOT is the default app.

 In myapp/WEB-INF/web.xml there is

servlet
  

servlet-nameMyServlet/servlet-name
  

servlet-classpackage.MyServlet/servlet-class
  

load-on-startup1/load-on-startup
/servlet
servlet-mapping
  

servlet-nameMyServlet/servlet-name
  

url-pattern/folder/action.do/url-pattern
/servlet-mapping

 When I go to http://host/myapp/folder/action.do in Tomcat 7.0.22 it
 invokes myapp, MyServlet.  Even some versions of
 Tomcat
 6.x did this.

 But in Tomcat 7.0.23 it generates 404 page not
 found.

 Any idea what I can do?

 What do the log files report, during application
 startup
 and when you
 try to access the page?

 During startup I see

 INFO: Deploying web application directory
 /home/myusername/jvm/apache-tomcat-7.0.23/domains/mydomain/myapp

 When going to the page, no logs are generated. 
 However I put a System.out.println statement in the default
 servlet of myapp to print the getRequestURI() and find that
 the following URI is hit /myapp/404.html.

 The myapp/WEB-INF/web.xml has

   error-page
 error-code404/error-code
 location/404.html/location
   /error-page

 So this means that the myapp servlet is invoked, which is a
 good thing.  But the URL I went to is 
 https://mydomain/myapp/folder/action.do.

 The servlet that is supposed to handle /folder/action.do is
 not invoked.

 Nor should it be invoked.  There is an https security
 constraint in myapp/WEB-INF/web.xml to direct the user to
 myapp/login.html.  This page is generated by the
 default servlet as well.

 So I will try two things.  First, remove the https to
 see if it works.  Second, change the url-mapping from
 an exact match like /myapps/folder/action.do to
 *.action.do
  

 p

 I'm gonna check if it works in 7.0.25.

 FYI, it does not work in 7.0.25 either.

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


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


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat memory requirements

2012-01-25 Thread Pid
On 25/01/2012 18:19, Celso Magalhães Dantas Neto wrote:
 Thanks everyone for the reply!
 
 My problem is not to argue how the application is consuming RAM, but to
 show that 150MB is not too much memory. But for that I'd like to use
 trusted information such as an article, or official info. The client
 doesn't understand anything about technologies but has opened the Windows
 Task Manager and saw that Tomcat is on top 3 in memory consumption. I just
 need to argue with him that 150MB is normal for a Java web app.
 
 I know that normal really depends on how your/my application has been
 developed but I was just wondering if I could find information about memory
 consumption of a small 1 CRUD application (for example).
 
 And yes I could start Tomcat with no app, and create a 1 CRUD application,
 but I would prefer to argue with some trusted article or official
 information.
 
 Ah! BTW, I'm not complaining about Java or Tomcat memory consumption! I'm
 just trying to argue with the client. =D
 And I'm running Tomcat 6 and Java 1.6

I work for a fairly large  well known company that ships a commercial
version of Tomcat with the default heap size set to 512Mb.

I regularly see heaps of 2Gb and more at work with customers.

Quibbling about memory size because the number 'seems a bit large' is a
waste of your customer and your own time.  If they're not paying for you
for the time you take to explain, just tell them it's normal  move on.


p

 thanks, again!
 
 --
 http://www.reconcavo.org.br/ *CELSO DANTAS*
 
 *Pesquisa  Inovação
 + 55 71 2101.4104  |  skype: celsomdantas*
 Antes de imprimir pense em seu compromisso com o Meio Ambiente.
 
 
 
 
 On Wed, Jan 25, 2012 at 3:45 PM, André Warnier a...@ice-sa.com wrote:
 
 Pid * wrote:
 ...



 And of this, a Tomcat instance with just the ROOT application can be
 observed to consume from ~6Mb to ~10Mb of RAM in the object heap with
 a nice stable sawtooth on most systems.

  Not that I want to cast doubt upon your measurements, but somehow that
 seems hard to believe.  This is without any requests being processed,
 surely ?

 A standard out-of-the-box tomcat-7 on my Windows XP 32-bit laptop, started
 from the command window with startup.bat, shows 40 MB in Task Manager,
 without any requests being processed. Granted, that probably includes the
 demo apps, but still.
 It goes to 50 MB as soon as I call up the home page.

 Ah, OK, you were just talking about the heap..





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


 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: not able to access URL in 2nd app in 7.0.23

2012-01-25 Thread Pid
On 25/01/2012 22:03, removeps-c...@yahoo.com wrote:
 So, you're saying that the method value 'POST' is not
 preserved after
 successful authentication and appears to be converted to a
 'GET'?
 
 No, what I said is the my original request to 
 https://mydomain/myapp/action.do is a POST request, and the web.xml says to 
 send me the the login-config page and this request used to be POST in 7.0.22 
 and is GET in 7.0.23.  After successful authentication the user must resubmit 
 the original POST request because this does not happen automatically.

I don't understand, what does and this request used to be POST mean then?

The login form defines the method used to send the request, the browser
sends it, not Tomcat.

When Tomcat receives an unauthenticated request for a protected resource
it intercepts and saves that request, then forwards to the resource
defined in the login config.

If the login form action is successful, the previous request is restored
and executed.  So I asked if the request is not being restored properly...

So either you're telling us that there's a bug in Tomcat, or you're
telling us something else and I don't know what that is.

Can you reproduce the error using a clean  simple application config?


p


 --- On Wed, 1/25/12, Pid p...@pidster.com wrote:
 
 From: Pid p...@pidster.com
 Subject: Re: not able to access URL in 2nd app in 7.0.23
 To: Tomcat Users List users@tomcat.apache.org
 Date: Wednesday, January 25, 2012, 1:24 PM
 On 25/01/2012 18:35, removeps-c...@yahoo.com
 wrote:
 OK here's what I tried:  I removed https.  A
 request through Firefox to http://localhost:6144/myapp/folder/action.do still
 gives 404.  I overrode doGet of the servlet class to
 print whether get/post and the request.getRequestURI and it
 is

 get /myapp/folder/action.do

 This is the same as before.  My servlet has code
 like this

if
 (uri.equals(/myapp/folder/action.do))

 in the doPost method so it would process this action.

 So the problem has to do with https.  I put the
 security-constraint stuff back in but removed the
 auth-constraint, so everything is https but requires no
 authentication.  What gets printed when you go to 
 https://localhost:6143/myapp/folder/action.do is still

 get /myapp/folder/action.do

 So the issue is with the auth-constraint.

 In my real code, my code makes a POST request to the
 given URL.  I re-ran this test:

 So now it looks like the issue is this:

 (a) In 7.0.22 and earlier versions my code made a POST
 request to https://localhost:6143/myapp/folder/action.do.
 (b) Tomcat made a POST request to the login page 
 https://localhost:6143/myapp/login.html
 (c) My servlet got called, and the doPost method of
 the servlet got called.

 But in 7.0.23 (b) Tomcat is making a GET request to 
 https://localhost:6143/myapp/login.html

 Thus I must move/copy my code in doPost to build
 login.html into doGet.

 This did work.

 So, you're saying that the method value 'POST' is not
 preserved after
 successful authentication and appears to be converted to a
 'GET'?


 p

 --- On Wed, 1/25/12, removeps-c...@yahoo.com
 removeps-c...@yahoo.com
 wrote:

 From: removeps-c...@yahoo.com
 removeps-c...@yahoo.com
 Subject: Re: not able to access URL in 2nd app in
 7.0.23
 To: Tomcat Users List users@tomcat.apache.org
 Date: Wednesday, January 25, 2012, 9:10 AM
 Replies in place

 --- On Wed, 1/25/12, Pid p...@pidster.com
 wrote:

 From: Pid p...@pidster.com
 Subject: Re: not able to access URL in 2nd app
 in
 7.0.23
 To: Tomcat Users List users@tomcat.apache.org
 Date: Wednesday, January 25, 2012, 12:55 AM
 On 25/01/2012 02:49, removeps-c...@yahoo.com
 wrote:
 In my webapps folder there are two
 folders:
 ROOT,
 myapp.  ROOT is the default app.

 In myapp/WEB-INF/web.xml there is

 servlet
   


 servlet-nameMyServlet/servlet-name
   


 servlet-classpackage.MyServlet/servlet-class
   


 load-on-startup1/load-on-startup
 /servlet
 servlet-mapping
   


 servlet-nameMyServlet/servlet-name
   


 url-pattern/folder/action.do/url-pattern
 /servlet-mapping

 When I go to http://host/myapp/folder/action.do in Tomcat 7.0.22 it
 invokes myapp, MyServlet.  Even some
 versions of
 Tomcat
 6.x did this.

 But in Tomcat 7.0.23 it generates 404 page
 not
 found.

 Any idea what I can do?

 What do the log files report, during
 application
 startup
 and when you
 try to access the page?

 During startup I see

 INFO: Deploying web application directory

 /home/myusername/jvm/apache-tomcat-7.0.23/domains/mydomain/myapp

 When going to the page, no logs are generated. 
 However I put a System.out.println statement in
 the default
 servlet of myapp to print the getRequestURI() and
 find that
 the following URI is hit /myapp/404.html.

 The myapp/WEB-INF/web.xml has

error-page
  
error-code404/error-code
  
location/404.html/location
/error-page

 So this means that the myapp servlet is invoked,
 which is a
 good thing.  But the URL I went

Re: Tomcat memory requirements

2012-01-25 Thread Pid
On 25/01/2012 21:48, André Warnier wrote:
 Celso Magalhães Dantas Neto wrote:
 Thanks everyone for the reply!

 My problem is not to argue how the application is consuming RAM, but to
 show that 150MB is not too much memory. But for that I'd like to use
 trusted information such as an article, or official info. The client
 doesn't understand anything about technologies but has opened the Windows
 Task Manager and saw that Tomcat is on top 3 in memory consumption. I
 just
 need to argue with him that 150MB is normal for a Java web app.
 
 Celso,
 
 your client, as you describe, knows nothing about technology or
 programming.
 And in this case, you are his expert.
 So if he knows nothing about the subject, but he does not accept the
 opinion of an expert, then the problem with your customer is bigger than
 about a few MB of RAM, and you are probably wasting your time.
 
 As mentioned previously, the current cost of 150 MB of RAM is about US$
 2.00.
 So why are you (both) wasting your time about this ?
 

 I know that normal really depends on how your/my application
 
 Exactly.  And nobody here knows your application, so nobody can tell you
 if 150 MB total is justified or not in this case.
 
 And yes I could start Tomcat with no app, and create a 1 CRUD
 application,
 but I would prefer to argue with some trusted article or official
 information.
 
 This user list is the official Apache Tomcat project's users list, where
 Tomcat users from the whole world come to report problems and get advice
 and help.
 Many of the people here answering questions are members of the official
 Tomcat development team.  MarkT and Pid who answered before, /are/
 Tomcat developers.  How much more official do you need ?  Would some
 article on Google written by some unknown expert be better ?

I'm not actually a committer.  Just a mailing list lurker.


p

 And what these real experts have been telling you so far is that 150 MB
 of total memory shown in the Windows Task Manager, to run a Java JVM +
 Tomcat + an application is nothing that makes anybody wonder.  It looks
 perfectly normal for an application which does something useful, as we
 assume yours does.
 
 
 If it may help :
 
 Following are some snapshots taken tonight on different production Linux
 systems, using the Linux ps utility, and sorting the processes by
 memory usage (more memory first).
 In each case, Tomcat runs basically the same simple application,
 consisting of a single servlet.
 As you can see, in most cases the top slots are occupied by java
 processes, with Tomcat among them.  And they all use much more than 150
 MB, despite the fact that all these systems are in Europe, and not doing
 very much right now.
 
 
 system # 1 :
 
   PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
 26076 root  20   0 2386m 1.1g 9232 S0  9.5  13:41.97 java
 21875 tomcat55  20   0  698m 209m 9.8m S0  1.7  54:02.10 jsvc
  3862 star  20   0  418m 176m 8936 S0  1.5  20:24.53 java
 
 system # 2 :
 
   PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
  3053 tomcat55  20   0  320m 120m  12m S0  6.0 462:27.13 jsvc
  2916 star  20   0  353m  93m  11m S0  4.7 376:03.26 java
 21871 star  20   0  285m  79m 7648 S0  4.0   2:49.06 java
 
 system # 3 :
 
   PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
 32116 www-data  20   0  717m 198m 6044 S0  9.9   0:57.12 apache2
  2958 tomcat55  20   0  456m 195m 9368 S0  9.7   2120:42 java
 32065 star  20   0  411m 142m 8996 S0  7.1  12:34.17 java
 32126 www-data  20   0  667m 138m 6056 S0  6.9   0:37.78 apache2
 
 system # 4 :
 
   PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
  3189 tomcat55  20   0  435m 296m  12m S 89.1 14.6   3049:49 jsvc
  2744 root  20   0  3276 1348 1108 R  9.6  0.1   3658:11 vmware-guestd
 17156 mira  20   0 40488  36m 2340 S  0.7  1.8 104:18.14 MiraLoader.pl
  3234 star  20   0  214m  38m  11m S  0.3  1.9  46:10.17 java
 
 The RES column is the resident memory, VIRT is the virtual memory.
 Compare that with the equivalent columns in your customer's Windows Task
 Manager.
 Note : the jsvc program is also java, running Tomcat.
 
 Unfortunately, I do not have an equivalent system running Windows, but
 the figures would be much the same.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Restarting tomcat 7.0.23 on MAC OS X 10.6

2012-01-24 Thread Pid
On 24/01/2012 07:35, Oliver Due Billing wrote:
 Did a thread dump.. I have some locked threads and it just keeps going, any
 smoking gun here?
 
 Oliver-Billings-MacBook-Pro:bin ob$ sudo jstack -l 18866
 2012-01-24 08:26:03
 Full thread dump Java HotSpot(TM) 64-Bit Server VM (20.4-b02-402 mixed
 mode):
 
 http-bio-80-exec-11 daemon prio=5 tid=10d0e2000 nid=0x116732000 waiting
 on condition [116731000]
java.lang.Thread.State: WAITING (parking)
 at sun.misc.Unsafe.park(Native Method)
 - parking to wait for  7f49d0798 (a
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:156)
 at
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
 at
 java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)
 at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:104)
 at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:32)
 at
 java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
 at java.lang.Thread.run(Thread.java:680)
 
Locked ownable synchronizers:
 - None
 
 Attach Listener daemon prio=9 tid=101d5e800 nid=0x111fd9000 waiting on
 condition []
java.lang.Thread.State: RUNNABLE
 
Locked ownable synchronizers:
 - None

So, just to confirm, did you stop this Tomcat instance and then generate
the thread dump?

I ask because all of the application threads are daemon threads and
don't appear to be blocked...


p


 GameSessionDB.DBUpdateEventJob daemon prio=5 tid=10d4df800
 nid=0x1164ee000 waiting on condition [1164ed000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
 at java.lang.Thread.sleep(Native Method)
 at
 com.watagame.gosupermodel.gamesession.GameSessionDB$DBUpdateEventJob.run(GameSessionDB.java:513)
 at java.lang.Thread.run(Thread.java:680)
 
Locked ownable synchronizers:
 - None
 
 GameSessionDB.DBUpdateEventJob daemon prio=5 tid=103e06800
 nid=0x129203000 waiting on condition [129202000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
 at java.lang.Thread.sleep(Native Method)
 at
 com.watagame.gosupermodel.gamesession.GameSessionDB$DBUpdateEventJob.run(GameSessionDB.java:513)
 at java.lang.Thread.run(Thread.java:680)
 
Locked ownable synchronizers:
 - None
 
 GameSessionDB.DBUpdateEventJob daemon prio=5 tid=103a7d800
 nid=0x111a04000 waiting on condition [111a03000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
 at java.lang.Thread.sleep(Native Method)
 at
 com.watagame.gosupermodel.gamesession.GameSessionDB$DBUpdateEventJob.run(GameSessionDB.java:513)
 at java.lang.Thread.run(Thread.java:680)
 
Locked ownable synchronizers:
 - None
 
 http-bio-80-exec-10 daemon prio=5 tid=101b79800 nid=0x12a9aa000 waiting
 on condition [12a9a9000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
 at java.lang.Thread.sleep(Native Method)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:126)
 at
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
 at
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
 at
 org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
 at
 org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
 at
 org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298)
 - locked 7f42a96f0 (a org.apache.tomcat.util.net.SocketWrapper)
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:680)
 
Locked ownable synchronizers:
 - 7f48c81a0 (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
 
 http-bio-80-exec-9 daemon prio=5 tid=103fc5800 nid=0x12a66c000 waiting on
 condition [12a66b000]
java.lang.Thread.State: WAITING (parking)
 at sun.misc.Unsafe.park(Native Method)
 - parking to wait for  7f49d0798 (a
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:156)
 at
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
 at
 

Re: Restarting tomcat 7.0.23 on MAC OS X 10.6

2012-01-24 Thread Pid
On 24/01/2012 08:31, Oliver Due Billing wrote:
 Ah no, I use intelliJ who does a restart after compile and everything just
 stops.

So... really what we need you to do is take a thread dump during the
'takes forever to restart' period...


p


 2012/1/24 Pid p...@pidster.com
 
 On 24/01/2012 07:35, Oliver Due Billing wrote:
 Did a thread dump.. I have some locked threads and it just keeps going,
 any
 smoking gun here?

 Oliver-Billings-MacBook-Pro:bin ob$ sudo jstack -l 18866
 2012-01-24 08:26:03
 Full thread dump Java HotSpot(TM) 64-Bit Server VM (20.4-b02-402 mixed
 mode):

 http-bio-80-exec-11 daemon prio=5 tid=10d0e2000 nid=0x116732000 waiting
 on condition [116731000]
java.lang.Thread.State: WAITING (parking)
 at sun.misc.Unsafe.park(Native Method)
 - parking to wait for  7f49d0798 (a
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:156)
 at

 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
 at

 java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)
 at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:104)
 at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:32)
 at

 java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
 at

 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
 at java.lang.Thread.run(Thread.java:680)

Locked ownable synchronizers:
 - None

 Attach Listener daemon prio=9 tid=101d5e800 nid=0x111fd9000 waiting on
 condition []
java.lang.Thread.State: RUNNABLE

Locked ownable synchronizers:
 - None

 So, just to confirm, did you stop this Tomcat instance and then generate
 the thread dump?

 I ask because all of the application threads are daemon threads and
 don't appear to be blocked...


 p


 GameSessionDB.DBUpdateEventJob daemon prio=5 tid=10d4df800
 nid=0x1164ee000 waiting on condition [1164ed000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
 at java.lang.Thread.sleep(Native Method)
 at

 com.watagame.gosupermodel.gamesession.GameSessionDB$DBUpdateEventJob.run(GameSessionDB.java:513)
 at java.lang.Thread.run(Thread.java:680)

Locked ownable synchronizers:
 - None

 GameSessionDB.DBUpdateEventJob daemon prio=5 tid=103e06800
 nid=0x129203000 waiting on condition [129202000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
 at java.lang.Thread.sleep(Native Method)
 at

 com.watagame.gosupermodel.gamesession.GameSessionDB$DBUpdateEventJob.run(GameSessionDB.java:513)
 at java.lang.Thread.run(Thread.java:680)

Locked ownable synchronizers:
 - None

 GameSessionDB.DBUpdateEventJob daemon prio=5 tid=103a7d800
 nid=0x111a04000 waiting on condition [111a03000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
 at java.lang.Thread.sleep(Native Method)
 at

 com.watagame.gosupermodel.gamesession.GameSessionDB$DBUpdateEventJob.run(GameSessionDB.java:513)
 at java.lang.Thread.run(Thread.java:680)

Locked ownable synchronizers:
 - None

 http-bio-80-exec-10 daemon prio=5 tid=101b79800 nid=0x12a9aa000 waiting
 on condition [12a9a9000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
 at java.lang.Thread.sleep(Native Method)
 at

 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:126)
 at

 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
 at

 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
 at

 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
 at
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
 at

 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
 at

 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
 at

 org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
 at

 org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
 at

 org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298)
 - locked 7f42a96f0 (a org.apache.tomcat.util.net.SocketWrapper)
 at

 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at

 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:680)

Locked ownable synchronizers:
 - 7f48c81a0 (a
 java.util.concurrent.locks.ReentrantLock$NonfairSync)

 http-bio-80-exec-9 daemon prio=5 tid=103fc5800 nid=0x12a66c000 waiting
 on
 condition [12a66b000]
java.lang.Thread.State: WAITING (parking)
 at sun.misc.Unsafe.park(Native Method)
 - parking to wait for  7f49d0798

[OT] Re: Status of 'kitty' project (JMX CLI Client)

2012-01-24 Thread Pid
On 22/01/2012 18:28, Christopher Schultz wrote:
 Pid,
 
 On 1/22/12 1:19 PM, Pid * wrote:
 It's been incubating for some time, now. Is it cooked, yet?
 
 It stalled for various reasons. I've got some code to commit
 
 I was able to build it but not run it because I couldn't figure out
 what libraries it actually needed to run.
 
 'Gradle dependencies' told me that I need to download the whole
 internet in order to satisfy the deps for the project :)
 
 Obviously, whatever is necessary to build Kitty has been downloaded to
 my computer as part of the build. I have no idea where those libraries
 have been places. ~/.gradle only appears to have gradle-related stuff
 in it.
 
 I'm a bit lost.

Sorry for the delay in responding.  Can you join the
kitty-dev@incubator.a.o list  I'll help you there?


p


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

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat 6.0.35 -crossing maxThreads configured count

2012-01-23 Thread Pid
On 23/01/2012 14:06, Daniel Mikusa wrote:
 On Mon, 2012-01-23 at 05:44 -0800, gnath wrote:
 Hi all, 


 We have Tomcat 6.0.35 in our production Environment running on Linux, and we 
 have configured to use tomcatThreadPool with maxThreads=500 and 
 minSpareThreads=50 with default connectionTimeout(which is 6 sec). 
 
 We have two connectors (http and ssl) It has been giving some problems like 
 'too many open files' or just hangs once in a while which requires a restart 
 to get back to normal. 
 
 Have you taken any thread dumps when the server hangs?  What do you see?
 


 Recently i happened to check our access logs when the server hung and 
 stopped responding. We were printing the thread number in the logs and i 
 have seen the number going upto 770 (though the max is configured at 500). I 
 was under impression that the threads will be shared among the connectors 
 and max it can go to 500. Could you please explain why im seeing very high 
 number than configured? Is that maxThreads value per connector?
 
 It would help to see how you have your thread pool and connectors
 configured.  Please attach your server.xml minus any comments.
 
 Also, a thread dump would be nice to confirm how many threads were
 actually running.

The maxThreads in the Connector only applies to Tomcat request
processing threads, it is not a limit imposed on the whole JVM.

You will usually have 20-30 threads running doing various things in
addition to those that your app starts.

If Tomcat is at 500 + 20 then the rest are likely to be started by your
application or dependencies.  As Dan states, a thread dump is the way to
understand this.


p





-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: parallel webapp initialization

2012-01-23 Thread Pid *
On 23 Jan 2012, at 21:12, David Rees dree...@gmail.com wrote:

 On Tue, Oct 11, 2011 at 6:42 AM, Mark Thomas ma...@apache.org wrote:
 I have added a patch based on the previous patches that adds:
 - threaded start/stop for Contexts
 - threaded start/stop for Hosts
 - threaded deployment

 Control over the number of threads is via server.xml and/or JMX. This
 can be changed dynamically.

 Review, feedback, testing etc. welcome.

 With 4 threads rather than the current 1 (on a 8-core machine), I saw a
 20-25% improvement in start time with a large number of Contexts that
 all start quickly. I'd expect to see better results in situations where
 1 few Contexts start slowly but most are quick.

 Resurrecting an old thread, but I've started using this in Tomcat
 7.0.25 with good results - have a Tomcat instance used for testing
 with a couple dozen contexts that take a while to load each, but with
 startStopThreads bumped up it reduces startup time from 60 seconds to
 20 seconds using all available CPU cores.  Very helpful!

That's great - and thanks for letting us know.

If you have time, I think it would be interesting to know your
application sizes, individual startup time and how many
startStopThreads you are using.


p


 Thanks!

 -Dave

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


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



Re: Status of 'kitty' project (JMX CLI Client)

2012-01-22 Thread Pid *
On 22 Jan 2012, at 17:57, Christopher Schultz
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 All,

 I'm asking here instead of on the Kitty mailing list just in case it
 gets a conversation going among a wider audience and drums-up some
 support for Kitty.

 What's the status of Kitty?

 http://incubator.apache.org/projects/kitty.html

 It's been incubating for some time, now. Is it cooked, yet?

It stalled for various reasons. I've got some code to commit


p



 Thanks,
 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
 Comment: GPGTools - http://gpgtools.org
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAk8cTeQACgkQ9CaO5/Lv0PCpTQCfdDhiTe6hvY7ysH1wlazI9AcD
 Gl4AnAmb18TA3HvdGmwRStvrmrhiKHM7
 =1zV4
 -END PGP SIGNATURE-

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


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



Re: [SOLVED] Cannot inherit from final class

2012-01-20 Thread Pid
On 19/01/2012 22:36, aaron.stro...@rsa.com wrote:
 Ugm. Axis2 sample uses it, so did I

So Spring 3.1 is now out and the internetz says that Spring 1.2.8 was
released 8 May 2006.  Is this a production system, might I ask?


p

 -Original Message-
 From: Pid [mailto:p...@pidster.com] 
 Sent: Thursday, January 19, 2012 5:32 PM
 To: Tomcat Users List
 Subject: Re: [SOLVED] Cannot inherit from final class
 
 On 19/01/2012 21:38, aaron.stro...@rsa.com wrote:
 deployed in it a web service using Spring  v1.2.8
 
 Are you really using Spring 1.2.8?
 
 
 p
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Cannot rid of expired Certificate ...

2012-01-20 Thread Pid
On 20/01/2012 02:28, Brooke Hedrick wrote:
 Are you sure you updated the correct keystore?  Which o/s are you running?

(Please don't top post.)

It's worth noting that some browsers appear to cache certs and sometimes
changes are not immediately apparent.


p

 On Jan 19, 2012 2:54 PM, Darryl Lewis darryl.le...@unsw.edu.au wrote:
 
 Did you restart tomcat?

 On 20/01/12 5:00 AM, Andrew Erskine a.ersk...@darasoft.com wrote:

 I have a self certificate that expired today.



 I removed the certificate from the keystore which the server.xml is
 pointin= g at and generated a new one with the same alias and I can see
 that cert in=  the keystore.



 I've been through all my certificate locations on firefox and removed any
 i= nstance



 On restarting tomcat and starting a new browser the website is still
 saying=  I have an expired certificate - so where is this being picked up
 from ? an= d is there a step I'm missing ?





 Thanks.



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


 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Cannot rid of expired Certificate ...

2012-01-20 Thread Pid
On 20/01/2012 10:52, Andrew Erskine wrote:
 So how do I do that .. I'm only replying to questions ..

So, scroll down a bit...

 On 20 Jan 2012, at 10:51, André Warnier a...@ice-sa.com wrote:

... and reply below

 Top post is like this : when I reply to a message, at the top of the 
 message.
 It makes it much harder to follow the logic flow of a conversation.

 Andrew Erskine wrote:
 Top post ?

... each point.


p


 Win2003svr

 Yes correct store .. the only one I've been using .. did try and clear the 
 cache on firefox will try ie


 Answering below the question is much clearer.

 -- your answer here :


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



-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Single virtual tomcat application which serves multiple contexts

2012-01-20 Thread Pid
On 20/01/2012 15:56, Egor Samarkhanov wrote:
 Hello !
 
 I have multiple clients:
   client 1 - 40 users
   client 2 - 50 users
   client 3 - 60 users
 
 And I have a web application that is supposed to serve the clients.
 The application is deployed into Tomcat. Each client has it's own database.
 
 What I want to implement is the single web application instance which
 servers all  the clients. The client (and the database to connect to)
 is identified by the context path from the URL.
 
 I.e. I imply the following scenario:
 
 1. Some user requestes the http://mydomain.com/client1/
 2. Tomcat invokes a single instance of my application (no matter
which  context is requested)
 3. My application processes the rest of the request thinking that it's
deployed to /client1 context path, i.e. all redirect or relative URLs
should be resolved against http://mydomain.com/client1/
 
 When the client 2 requests the http://mydomain.com/client2/, I want my
 application (the same instance) now process it just like if it was
 deployed to /client2 context path.
 
 Is this possible in Tomcat?

No, it's not.

If you want to build a multi-tenant application, you should:

1. Make your application the ROOT application.
2. Then use the first part of the path to determine which tenant.
3. Use the path data to select a configuration as required.

What is the benefit in making it one application?


p



-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Cannot Validate Signature for apache-tomcat-7.0.23-windows-i64.zip

2012-01-20 Thread Pid
On 20/01/2012 20:39, Bill Rutledge wrote:
  
 
 For apache-tomcat-7.0.23-windows-i64.zip, I used Kleopatra to import the
 KEYS and check the validity of the signatures in
 apache-tomcat-7.0.23-windows-i64.zip.asc and got the following. Does 
 this look like I’ve made some mistake in this process?
 
  
 
  
 
 cid:image001.png@01CCD788.1E255930
 

The list strips attachments and embedded images.

You'll need to post it online somewhere.


p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Problem in apache tomact 6.0

2012-01-19 Thread Pid
On 19/01/2012 08:18, Uttpal Kachhawa wrote:
 Hi
 
I understood the above sentence bt according to that error i had change
 the port number inside server.xml file and then again restart it then dont
 know wht  is prblm here.  actually i import existing prjct on my machine
 and then install apache tomcat mannually in eclipse then after it when i am
 trying to restart it its giving me prblm again

Please reply below the question, not at the top of the email.
Top-posting makes the conversation really hard to follow.

If you are saying that you *have* changed the port and the problem still
persists, you might want to consider stopping Tomcat before you try to
start a new version with the same configuration.

If you have tried to stop Tomcat, and it is still running, you probably
have a bug in your application.

We can't help you unless you provide the following:

- Exact versions of OS, Java and Tomcat.
- Error messages from Tomcat log files
- Cut  paste server.xml into your reply AFTER removing all XML comments
and sensitive information like passwords  ip addresses
- A simple description of how we could reproduce the error


p

 I f u want the scren shot of my project i can send you.
 
 Thanks
 
 On Thu, Jan 19, 2012 at 1:10 PM, Mikolaj Rydzewski m...@ceti.pl wrote:
 
 On Thu, 19 Jan 2012 11:41:01 +0530, Uttpal Kachhawa wrote:

 I AM GETTING THAT ERROR PLZ GIVE ME SOLUTION

 Port 8009 required by Tomcat v6.0 Server at localhost is already in use.
 The server may already be running in another process, or a system process
 may be using the port. To start this server you will need to stop the
 other
 process or change the port number(s).


 Which part of the above sentence you do not understand?

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

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


 
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Problem in apache tomact 6.0

2012-01-19 Thread Pid
 8080
 --
 Connector port=8009 protocol=HTTP/1.1
connectionTimeout=2
redirectPort=8443 /
 !-- A Connector using the shared thread pool--
 !--
 Connector executor=tomcatThreadPool
port=8080 protocol=HTTP/1.1
connectionTimeout=2
redirectPort=8443 /
 --
 !-- Define a SSL HTTP/1.1 Connector on port 8443
  This connector uses the JSSE configuration, when using APR, the
  connector should be using the OpenSSL style configuration
  described in the APR documentation --
 !--
 Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true
maxThreads=150 scheme=https secure=true
clientAuth=false sslProtocol=TLS /
 --
 
 !-- Define an AJP 1.3 Connector on port 8009 --
 Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /
 
 
 !-- An Engine represents the entry point (within Catalina) that
 processes
  every request.  The Engine implementation for Tomcat stand alone
  analyzes the HTTP headers included with the request, and passes
 them
  on to the appropriate Host (virtual host).
  Documentation at /docs/config/engine.html --
 
 !-- You should set jvmRoute to support load-balancing via AJP ie :
 Engine name=Catalina defaultHost=localhost jvmRoute=jvm1
 
 --
 Engine name=Catalina defaultHost=localhost
 
   !--For clustering, please take a look at documentation at:
   /docs/cluster-howto.html  (simple how to)
   /docs/config/cluster.html (reference documentation) --
   !--
   Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster/
   --
 
   !-- The request dumper valve dumps useful debugging information about
the request and response data received and sent by Tomcat.
Documentation at: /docs/config/valve.html --
   !--
   Valve className=org.apache.catalina.valves.RequestDumperValve/
   --
 
   !-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key UserDatabase.  Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm.  --
   Realm className=org.apache.catalina.realm.UserDatabaseRealm
  resourceName=UserDatabase/
 
   !-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
--
   Host name=localhost  appBase=webapps
 unpackWARs=true autoDeploy=true
 xmlValidation=false xmlNamespaceAware=false
 
 !-- SingleSignOn valve, share authentication between web
 applications
  Documentation at: /docs/config/valve.html --
 !--
 Valve className=org.apache.catalina.authenticator.SingleSignOn /
 --
 
 !-- Access log processes all example.
  Documentation at: /docs/config/valve.html --
 !--
 Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs
prefix=localhost_access_log. suffix=.txt
 pattern=common resolveHosts=false/
 --
 
   /Host
 /Engine
   /Service
 /Server
 
 
 
 On Thu, Jan 19, 2012 at 2:02 PM, Pid p...@pidster.com wrote:
 
 On 19/01/2012 08:18, Uttpal Kachhawa wrote:
 Hi

I understood the above sentence bt according to that error i had
 change
 the port number inside server.xml file and then again restart it then
 dont
 know wht  is prblm here.  actually i import existing prjct on my machine
 and then install apache tomcat mannually in eclipse then after it when i
 am
 trying to restart it its giving me prblm again

 Please reply below the question, not at the top of the email.
 Top-posting makes the conversation really hard to follow.

 If you are saying that you *have* changed the port and the problem still
 persists, you might want to consider stopping Tomcat before you try to
 start a new version with the same configuration.

 If you have tried to stop Tomcat, and it is still running, you probably
 have a bug in your application.

 We can't help you unless you provide the following:

 - Exact versions of OS, Java and Tomcat.
 - Error messages from Tomcat log files
 - Cut  paste server.xml into your reply AFTER removing all XML comments
 and sensitive information like passwords  ip addresses
 - A simple description of how we could reproduce the error


 p

 I f u want the scren shot of my project i can send you.

 Thanks

 On Thu, Jan 19, 2012 at 1:10 PM, Mikolaj Rydzewski m...@ceti.pl wrote:

 On Thu, 19 Jan 2012 11:41:01 +0530, Uttpal Kachhawa wrote:

 I AM GETTING THAT ERROR PLZ GIVE ME SOLUTION

 Port 8009 required by Tomcat v6.0 Server at localhost is already in
 use.
 The server may already be running in another process, or a system
 process
 may be using the port. To start this server you will need to stop the
 other

Re: Is SSL keystore with AJP connector possible?

2012-01-19 Thread Pid
On 19/01/2012 05:29, mandg wrote:
 handler start failed: java.lang.Exception: Socket bind failed: [730048] Only
 one usage of each socket address (protocol/network address/port) is normally
 permitted.  

Is there an existing version of the application already running?

Does the application bind to a socket too?


p

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: [SOLVED] Cannot inherit from final class

2012-01-19 Thread Pid
On 19/01/2012 21:38, aaron.stro...@rsa.com wrote:
 deployed in it a web service using Spring  v1.2.8

Are you really using Spring 1.2.8?


p

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat 7 JDK 7 access permissions: error or bug?

2012-01-17 Thread Pid
On 17/01/2012 03:44, deniz wrote:
 Hi all,
 
 I am getting a weird error on tomcat 7. at first  i deploy my war file and
 everything is smooth.. but after some time - randomly - i cant access
 anything on tomcat and in the log file I see these lines: 

Exactly which version, Tomcat 7.0.?


p


 code
 Jan 17, 2012 11:37:37 AM org.apache.tomcat.util.net.JIoEndpoint$Acceptor run
 SEVERE: Socket accept failed
 java.security.AccessControlException: access denied
 (java.net.SocketPermission 127.0.0.1:50092 accept,resolve)
 at
 java.security.AccessControlContext.checkPermission(AccessControlContext.java:366)
 at
 java.security.AccessController.checkPermission(AccessController.java:555)
 at
 java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
 at java.lang.SecurityManager.checkAccept(SecurityManager.java:1174)
 at java.net.ServerSocket.implAccept(ServerSocket.java:526)
 at java.net.ServerSocket.accept(ServerSocket.java:490)
 at
 org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:60)
 at
 org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:207)
 at java.lang.Thread.run(Thread.java:722)
 /code
 
 i have to kill tomcat and then after some time it happens again... any
 ideas?
 
 --
 View this message in context: 
 http://tomcat.10.n6.nabble.com/Tomcat-7-JDK-7-access-permissions-error-or-bug-tp3679835p3679835.html
 Sent from the Tomcat - User mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: TC7 + AntCompiler problems with whitespace in pathname

2012-01-17 Thread Pid
On 17/01/2012 10:21, epr...@orpheus.fr wrote:
 And I really, really do not understand why the people who make the
 installer of the
 Windows version of Tomcat - and who are undoubtedly otherwise pretty smart
 people - are
 compounding the issue by installing this by default in a sub-directory
 named Apache
 Software Foundation.
 
 Following Andre's advice, I googled with deployment and found this:
 
 - TC6: In CGI Mode, executable full path with spaces does not work
 https://issues.apache.org/bugzilla/show_bug.cgi?id=49657
 
 - TC5: Tomcat fails to start on linux if CATALINA_HOME contains a space
 https://issues.apache.org/bugzilla/show_bug.cgi?id=43578
 
 - TC5: java.endorsed.dirs is not used when JSP compilation is forked (see
 comment #2)
 https://issues.apache.org/bugzilla/show_bug.cgi?id=31257#c2
 
 It looks like having spaces ought to be ok.
 
 = Does anybody having experience with Tomcat dev team think I should fill
 a new bug?

Answer Mark's email to you first.


p


 Thank you.
 
 epr...@orpheus.fr wrote:
 ### Summary

 TC fails to compile JSP when 1) the compiler is AntCompiler and 2) there
 is a whitespace somewhere in the pathname to TC home dir.

 Personal opinion : you should not do that (use paths with spaces in them).
  It was a
 stupid idea to allow this in the first place, and the person who first
 implemented this in
 an operating system should be found and shot (or at least be awarded an
 IgNobel prize; or
 have the costs of this over the years deducted from their old-age
 pension).  It always
 brings problems somewhere down the line, and not only with Tomcat.

 And I really, really do not understand why the people who make the
 installer of the
 Windows version of Tomcat - and who are undoubtedly otherwise pretty smart
 people - are
 compounding the issue by installing this by default in a sub-directory
 named Apache
 Software Foundation.

 Now about whether this is a bug in Tomcat or its documentation : I am
 fairly sure that not
 long ago, I saw a strong warning somewhere in the on-line Tomcat
 documentation, about not
 using spaces in pathnames somewhere, as it was not supported by some
 component.
 It may have been somewhere related to deployment.

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


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


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Unable to sendViaPost to url...... .... java.net.SocketTimeoutException: Read timed out

2012-01-16 Thread Pid
On 16/01/2012 20:12, Bert Verhees wrote:
 Thanks, André, for your reply
 

 Is that per person, or per POST ?
 
 It is per Person AND per post. The post creates a person-object which is
 stored in a database, and the person-object is formed out of an array of
 strings.

 to an webservice-call.
 After some validation, the webservice 

 of which we here know nothing..
 
 It has nothing to do with the problem. But you may, of course know what
 it is all about. It is about forming OpenEHR-objects, the string arrays
 serve to create path-strings-array and value-string array. The problem
 is not there, I know, because there are three ways of running the code.
 
 One is to call the libraries behind the webservices directly, and also
 do the complete run of posting and validating. It is exact the same
 code, it is only passing the webservices. This runs fine.
 They other one is using axis2 as a standalone service, and the third one
 is using tomcat as a container for axis.
 

 posts the data to a postgresql
 database.

 I have some console-output to see how long it takes.

 storing.  Person:26, ID:27
 Creating EHR for:213d7c09-949c-4757-a91d-da5510215472
 GUIDs saved to table:213d7c09-949c-4757-a91d-da5510215472,
 73b60dd4-d745-4267-9c6f-fc8b067bfeb9
 stored.  Person:26, UID:213d7c09-949c-4757-a91d-da5510215472
 PT0.647S

 As you can see, it starts with less then a second, sometime 0.3
 seconds, sometimes 1.1 second, depending on the number of elements in
 the array to store.

 What array, where ?


 After 1000 persons stored, it takes 4 seconds

 Do you mean that you send data in one POST about 1000 persons (each
 with 50 text data elements) ?
 
 No, it is each time a separate call.
 
 


 storing.  Person:998, ID:989
 Creating EHR for:49c96d87-38db-491d-a824-78800615e80a
 GUIDs saved to table:49c96d87-38db-491d-a824-78800615e80a,
 3554514f-ccb6-40dd-92f2-d9140760870e
 stored.  Person:998, UID:49c96d87-38db-491d-a824-78800615e80a
 PT4.147S

 When running in Axis2 standalone, it stays about 4 seconds until 8000
 persons stored (which is the complete group to store)

 is that 1 POST, or 8000 POSTs to the server ?
 
 This is one post.

 This is slow, I must investigate the library directly without
 webservice if that is a problem of my coding. So we forget that for
 the moment.

 The problem which bothers me is when I am using Tomcat.

 The problem start to occur after posting 1200 patients, it takes 8
 seconds. When it reaches 1300, it already takes 17 seconds.
 When at Person 1330, it is already 29 seconds, and at 1340 it is 39
 seconds, and than a few persons more and a time-out exception occurs.

 I receive a java.net.SocketTimeoutException: Read timed out from the
 client side-code. The default time-out time for Axis2-code is 40
 seconds.
 The printstacktrace is below, but it is client side stacktrace

 I try a lot of things to solve the problem. I put a
 Thread.sleep(1000); in my client-code between to postings, I thought,
 maybe the webservice needs some rest to do garbage-clean up. Because
 it looks very much like a memory blowing up. But it didn't help.

 Of course, if you need any information, I will be happy to provide
 it, please give some hints how to provide it


 You could start by telling us which version of Tomcat this is, under
 with Java JVM version, and on which platform (Windows, Linux,..).
 Then tell us with how much available memory this Tomcat is running.
 
 I did tell in the message which Tomcat version I use, and I also did
 tell which platform I use
 I don't mind telling you again
 I am using Tomcat6 6.0.32-5ubuntu1.1 together with Axis2 1.6.1 
 
 I did not tell you which JVM I use, that is
 OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre11-0ubuntu1.11.10)
 OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
 
 I don't know how much memory is avalaible for tomcat, but this is what
 top tells me
 Mem:   4055608k total,  3277200k used,   778408k free, 2876k buffers
 Swap:  9764860k total,  1102476k used,  8662384k free,   243536k cached

The system is using swap.  What else is running on the system?

The top output should also be able to tell you how much memory Tomcat is
consuming.


 I see there is 8 Gb swap unused, so Tomcat does not bother claiming it.

That is not clear from the above.

The JConsole and VisualVM applications provided with the JDK will tell
you how much memory is being consumed by the application in various
areas of the Java program's process heap.

You may use them to observe behaviour during the operation you are
experimenting with.


p


 Making some wild guesses here, because you do not really provide any
 precise information about what exactly you are trying to do :
 
 Excuse me for putting you in this situation. I did not know which
 information to provide.
 

 Let's suppose that your client application puts together one POST
 request, consisting of XML data composed of 1000, 2000, 3000 elements
 person, each composed of up to 50 

Re: static content not served for non-root apps via mod_jk

2012-01-14 Thread Pid
On 14/01/2012 03:52, Eric P wrote:
 I remember now why static content works for my ROOT app.  I have
 Apache aliases set-up pointing to specific system directories for all
 static content.
 
 For example, I have all images for the ROOT app aliased here.
 Alias /img /opt/tomcat7/webapps/ROOT/img
 Directory /opt/tomcat7/webapps/ROOT/img
 Options Indexes MultiViews
 AllowOverride None
 Order allow,deny
 Allow from all
 /Directory

Why bother - do you have a compelling reason to use HTTPD for this?
Tomcat + APR will work just fine.


p


 But is there a better approach for this so that I don't have to create
 static content aliases for each new Tomcat app I deploy?  I would be
 stuck using a unique alias for every app which seems crazy.
 
 Thanks,
 Eric
 
 2012/1/13 Eric P eric.maill...@gmail.com:
 Hi all,

 I'm having trouble getting Apache to serve static content (jpg, css, js, 
 etc.) for Tomcat apps via mod_jk for any
 application except the ROOT Tomcat app.  The ROOT app shows static content 
 just fine.

 I have the following Apache settings attempting to point *all* requests to 
 Tomcat and unsetting certain static content
 extensions so that Apache will serve them.

 ...clip...
 # Send everything to Tomcat
 JkMount /* ajp13

 # And then unsend static content so that httpd will serve it
 JkUnMount /*.js ajp13
 JkUnMount /*.css ajp13
 JkUnMount /*.jpg ajp13
 JkUnMount /*.png ajp13
 JkUnMount /*.gif ajp13
 ...clip...

 These settings work for the ROOT Tomcat app but not for anything else 
 including Tomcat's manager app.

 FYI. when I access via Tomcat's port/web server everything works.
 E.g., http://localhost:8080/manager/html

 But not when I access via port 80.
 E.g., http://localhost/manager/html

 Im seeing a 404 Not Found for all static content via port 80/Apache (again, 
 the only exception is any static content
 belonging to the ROOT Tomcat app).  I'm experiencing the exact same behavior 
 on both an Ubuntu and CentOS.

 Thanks for any ideas.
 Eric
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat default initial context factory values

2012-01-13 Thread Pid
On 13/01/2012 01:39, 이재만 wrote:
 
 hi there.
 what's default values at tomcat when i write some client programs on tomcat.
 java.naming.factory.initial = ?
 provide url = ?
  
 thanks.

Please don't reply to an existing thread unless you are contributing to
it.  If you wish to ask a new question, start a wholly new email rather
than editing a reply to another thread - which is called thread hijacking.


p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Accessing peer certificates of SSL in tomcat

2012-01-13 Thread Pid
On 13/01/2012 12:03, ciphe wrote:
 Hi,
 
 I have setup tomcat to be accessible through SSL, both client and
 server authenticate each other. (i.e. Client must present a certificate to
 server and vice versa, much like what is described in this link -
 http://java-notes.com/index.php/two-way-ssl-on-tomcat).
 
 Now, I'd like to access the certificate presented by client inside a
 servlet. Any ideas how it can be done?

Did you mean to send two copies of this email?

Have you read the relevant sections of the appropriate version of the
Servlet Spec?  (You didn't say which version of Tomcat, so I'll guess
6.0.x) See: SRV.3.7

You may also benefit from reading:

 http://tomcat.apache.org/tomcat-6.0-doc/config/http.html

and

 http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html


p
-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: periodic (60 sec) problem from Vysper bosh servlet embedded in Tomcat 7.0.23

2012-01-13 Thread Pid

 -Original Message-
 From: Pid [mailto:p...@pidster.com] 
 Sent: Wednesday, January 11, 2012 4:30 AM
 To: Tomcat Users List
 Subject: Re: periodic (60 sec) problem from Vysper bosh servlet embedded in 
 Tomcat 7.0.23
 
 On 10/01/2012 21:04, Bob DeRemer wrote:
 Tomcat Community,

  

 I'm not sure if this should be posted here or on the Mina/Vysper list, 
 but since the problem seems to be around Jetty Servlet3 continuation 
 functionality within the context of Tomcat, I thought I'd post here first.
 
 Which version of Tomcat, exactly?
 
 On 12/01/2012 12:02, Bob DeRemer wrote:
 Tomcat 7.0.23 64-bit on windows server 2008 R2 64-bit

Please don't top-post.


 PROBLEM

 We're using vysper in an embedded mode and have modified the 
 BoshServlet to work in the context of our web application.  The Vysper 
 bosh servlet seems to make use of Jetty servlet3 continuation, and 
 we're getting the following stack trace every 60 seconds.  60 seconds 
 seems to be the default bosh session timeout when there is no activity:

Are you expecting the timeout to fire at this point, for those requests?

The request seems to think it is in the DISPATCHING state - is this
perhaps a long running stream of events?


 I'm not sure what's going on with the low-level servlet3 continuation 
 stuff, but if anyone has any suggestions/recommendations, I'd greatly 
 appreciate it.

I would also investigate whether that library supports a particular
version of Tomcat.


p

 Thanks,

 Bob

  

 SEVERE: null

 _java.lang.IllegalStateException_: Calling [asyncDispatch()] is not 
 valid for a request with Async state [DISPATCHING]

   at
 org.apache.coyote.AsyncStateMachine.asyncDispatch(_AsyncStateMachine.j
 ava:256_)

   at
 org.apache.coyote.http11.Http11AprProcessor.actionInternal(_Http11AprP
 rocessor.java:468_)

   at
 org.apache.coyote.http11.AbstractHttp11Processor.action(_AbstractHttp1
 1Processor.java:834_)

   at org.apache.coyote.Request.action(_Request.java:344_)

   at
 org.apache.catalina.core.AsyncContextImpl.dispatch(_AsyncContextImpl.j
 ava:185_)

   at
 org.apache.catalina.core.AsyncContextImpl.dispatch(_AsyncContextImpl.j
 ava:146_)

   at
 org.apache.catalina.core.AsyncContextImpl.dispatch(_AsyncContextImpl.j
 ava:140_)

   at
 org.eclipse.jetty.continuation.Servlet3Continuation.resume(_Servlet3Co
 ntinuation.java:153_)

   at
 org.apache.vysper.xmpp.extension.xep0124.BoshBackedSessionContext.writ
 e0(_BoshBackedSessionContext.java:233_)

   at
 org.apache.vysper.xmpp.extension.xep0124.BoshBackedSessionContext.requ
 estExpired(_BoshBackedSessionContext.java:451_)

   at
 org.apache.vysper.xmpp.extension.xep0124.BoshBackedSessionContext.acce
 ss$000(_BoshBackedSessionContext.java:46_)

   at
 org.apache.vysper.xmpp.extension.xep0124.BoshBackedSessionContext$1.on
 Timeout(_BoshBackedSessionContext.java:605_)

   at
 org.eclipse.jetty.continuation.Servlet3Continuation$2.onTimeout(_Servl
 et3Continuation.java:90_)

   at
 org.apache.catalina.core.AsyncListenerWrapper.fireOnTimeout(_AsyncList
 enerWrapper.java:45_)

   at
 org.apache.catalina.core.AsyncContextImpl.timeout(_AsyncContextImpl.ja
 va:118_)

   at
 org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(_CoyoteAdapt
 er.java:292_)

   at
 org.apache.coyote.http11.AbstractHttp11Processor.asyncDispatch(_Abstra
 ctHttp11Processor.java:1515_)

   at
 org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(_
 AbstractProtocol.java:523_)

   at
 org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(_AprEndpoin
 t.java:1817_)

   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
 Source)

   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown 
 Source)

   at java.lang.Thread.run(Unknown Source)

  

  

  

 *Bob DeRemer*

 *Senior Director, Architecture and Development*

  

 Description: Description: Description: Description:
 cid:image001.png@01CBE3DE.51A12030

 http://www.thingworx.com http://www.thingworx.com/

 Skype: bob.deremer.thingworx

 O: 610.594.6200 x812

 M: 717.881.3986

  

 
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Clarification regarding JULI logger

2012-01-13 Thread Pid
On 13/01/2012 11:04, Parthiban P wrote:
 Dear Team,
 
 We are using TOMCAT-JULI logger for logging purpose in our application.
 
 We bundle tomcat(6.0.28) in our product and start the tomcat when our
 product is started (i.e. we start tomcat from our product-startup-code).
 
 For debugging purpose our application needs to change the Logger LEVEL
 dynamically. When tried to implement this using
 LogManager.getLogger(className).setLevel(requiredLevel) we found that its
 not working. And when analyzed the JULI code we found that it is searching
 for the loggers of the currentClassLoader classes only (i.e. not searching
 the loggers from parentClassLoader). Kindly advise us how to proceed
 further to handle our use-case.

What is changing the log level and where is the code doing it located,
relative to your other applications?


 Is it advisable for us to change the
 ClassLoaderLogInfo.getClassLoaderInfo() method accordingly?

Probably not.  Have you looked at the JMX MBeans for JUL?


p

 Need your help at the earliest.
 
 Thanks
 
 Parthiban P
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Interactive Services Detection

2012-01-13 Thread Pid
On 13/01/2012 19:47, Shoffey, Montreal wrote:
 
 Tomcat 64-bit is running on Windows 2008 Server. I have an application
 that is using Apache + Tomcat 6.0.30 and the application seems to be
 running fine.
 
 The popup error is from Interactive Services Detection with the message
 that tomcat6.exe is requesting attention.

Any more detail than that?  It's a bit tricky to know what's happened
without any more information.


 In the Tomcat properties, I have Log on as Local System account and the
 Allow service to interact with desktop is checked.
 
 If I disable the service, I would just be ignoring the problem and not
 fixing it.

Disable which service?  The Tomcat one?


 Is this an unhandled exception of some kind? Can someone help me fix
 this? 

There are a number of log files in the 'logs' directory of your Tomcat
installation.  Have a look in each file for additional information and
report back.


p


 v/r
 Montreal
 _
 Gail Montreal Shoffey
 VA Office of Information and Technology IT Workforce Development
 304-262-7713 Office
 202-400-7970 Mobile
 304-262-7701 FAX
 Visit the ITWD Portal
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Error: Unable to compile class for JSP

2012-01-12 Thread Pid
On 11/01/2012 20:44, Justin Larose wrote:
 ma...@apache.org wrote on 01/11/2012 01:19:17 PM:
 
 From: ma...@apache.org
 To: Tomcat Users List users@tomcat.apache.org
 Date: 01/11/2012 01:20 PM
 Subject: Re: Error: Unable to compile class for JSP

 Justin Larose justin.lar...@nexweb.org wrote:
 
 An error occurred at line: 230 in the jsp file: /object_table.jsp
 The type Part is ambiguous
 227:{
 228: //do nothing here - we don't want the filter to be
 displayed
 for lifecycles
 229: }
 230: else if (objType.equals(Part.class))
 231: {

 Have you imported more than one Part.class by accident, via a
 wildcard
 import perhaps?

 I did not import any classes.
 
 You must have at least one import to resolve the class Part. Since 
 I'm pretty sure a class with that name was added in servlet 3, 
 wildcard imports are very likely the problem.
 
 I downgraded the Tomcat to Version 6.0.35 and looks to be working 
 correctly now.
 Maybe Serena Dimensions cannot work with that higher version of Tomcat 
 (version 7.0.23)? 
 
 The only files I copied over from the 6.0 version to the 6.0.35 version 
 were the webapps directory the web.xml file and the server.xml file.
 The only difference in the server.xml file between the 2 versions is this:
 
 Listener className=org.apache.catalina.mbeans.ServerLifecycleListener 
 /
  Listener className=org.apache.catalina.core.AprLifecycleListener 
 SSLEngine=on /

So what Mark  are both saying is this: in the JSP there is some code
which imports, via a wildcard, two packages that both contains a Part class.

We are not talking about importing things on the file system.  We are
talking about a specific Java command which is part of the code.  E.g.

If both of the packages below contain a class called Part, then the
compiler can't tell which one you are trying to use.

 import com.examples.stuff.*
 import com.examples.other.*


You can use an editor to look in the the JSP file in question for the
word import somewhere near the top of the file and the '*' character.

If there is more than one '*', you can report the error to Serena
Dimensions or try to fix it yourself.


p


 - Thanks, Justin
 **
 This email and any files transmitted with it are intended solely for 
 the use of the individual or agency to whom they are addressed. 
 If you have received this email in error please notify the Navy 
 Exchange Service Command e-mail administrator. This footnote 
 also confirms that this email message has been scanned for the
 presence of computer viruses.
 
 Thank You!
 **
 
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat 7 (64 bit) does not seem to honor session timeout?

2012-01-12 Thread Pid
On 11/01/2012 21:50, Paul Joseph wrote:
 Hi there,
 
 I am running the Cocoon (2.11) servlet in Tomcat 7.0.23 (64 bit version)
 on Windows 2008 R2 (and also in 32 bit on Redhat linux).  I am using the
 Java 1.6 JRE.
 
 I have my session timeout set in web.xml to 60 minutes.

Just to clarify, which web.xml file?

 However I find that with about 44 minutes of inactivity that my session
 appears to have expired.

Can you reproduce this with a simple single Servlet application?


p

 I tried it with the default 30 minute time out and found that after
 about 25 minutes my session had expired...
 
 Is there any one else who has had this issue...or what could I be doing
 wrong?
 
 best
 Paul
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: About certificates in Tomcat SSL support

2012-01-12 Thread Pid *
On 12 Jan 2012, at 17:15, James Lampert jam...@touchtonecorp.com wrote:

 Scenario:

 I created a self-signed certificate for the box I was testing:
 CN = James Lampert
 OU = Development Lab
 O = Touchtone Corporation
 L = Costa Mesa
 ST = California
 C = US

 I then installed it into the Tomcat server on that box. Connecting to the 
 site with Firefox, I was told that the certificate was not trusted, and asked 
 whether to trust it. After I said to trust it, Firefox now lets me in without 
 further question.

 Then, I temporarily installed the certificate on a customer's Tomcat server, 
 just to verify that SSL support was working there. When I connected to it 
 with Firefox, the initial message questioning the validity of the certificate 
 said something about it being for a different server (so far as I'm aware, it 
 isn't for *any* particular server).

 Looking at the two Tomcat servers in Microsloth Imploder, even after telling 
 it to trust the certificate, I consistently get a message, The security 
 certificate presented by this website was issued for a different website's 
 address.

 Looking at the two Tomcat servers in a different version of Firefox, on a 
 different WinDoze box, both Tomcat servers give me the message, that it is 
 not trusted because it is self-signed, and that it is only valid for James 
 Lampert.

 What exactly do I need to do, for a certificate to be recognized as the 
 correct one for a given server?

The Common Name must match the domain name of the server as seen by the client.


 Also: we have a CA-signed certificate that we use to sign JARs. Is that the 
 same sort of certificate used for Tomcat?

You would need to purchase a different one to comply with the terms of
purchase anyhow.


p


 --
 JHHL


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


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



Re: periodic (60 sec) problem from Vysper bosh servlet embedded in Tomcat 7.0.23

2012-01-11 Thread Pid
On 10/01/2012 21:04, Bob DeRemer wrote:
 Tomcat Community,
 
  
 
 I’m not sure if this should be posted here or on the Mina/Vysper list,
 but since the problem seems to be around Jetty Servlet3 continuation
 functionality within the context of Tomcat, I thought I’d post here first.

Which version of Tomcat, exactly?


p

 PROBLEM
 
 We’re using vysper in an embedded mode and have modified the BoshServlet
 to work in the context of our web application.  The Vysper bosh servlet
 seems to make use of Jetty servlet3 continuation, and we’re getting the
 following stack trace every 60 seconds.  60 seconds seems to be the
 default bosh session timeout when there is no activity:
 
  
 
 I’m not sure what’s going on with the low-level servlet3 continuation
 stuff, but if anyone has any suggestions/recommendations, I’d greatly
 appreciate it.
 
  
 
 Thanks,
 
 Bob
 
  
 
 SEVERE: null
 
 _java.lang.IllegalStateException_: Calling [asyncDispatch()] is not
 valid for a request with Async state [DISPATCHING]
 
   at
 org.apache.coyote.AsyncStateMachine.asyncDispatch(_AsyncStateMachine.java:256_)
 
   at
 org.apache.coyote.http11.Http11AprProcessor.actionInternal(_Http11AprProcessor.java:468_)
 
   at
 org.apache.coyote.http11.AbstractHttp11Processor.action(_AbstractHttp11Processor.java:834_)
 
   at org.apache.coyote.Request.action(_Request.java:344_)
 
   at
 org.apache.catalina.core.AsyncContextImpl.dispatch(_AsyncContextImpl.java:185_)
 
   at
 org.apache.catalina.core.AsyncContextImpl.dispatch(_AsyncContextImpl.java:146_)
 
   at
 org.apache.catalina.core.AsyncContextImpl.dispatch(_AsyncContextImpl.java:140_)
 
   at
 org.eclipse.jetty.continuation.Servlet3Continuation.resume(_Servlet3Continuation.java:153_)
 
   at
 org.apache.vysper.xmpp.extension.xep0124.BoshBackedSessionContext.write0(_BoshBackedSessionContext.java:233_)
 
   at
 org.apache.vysper.xmpp.extension.xep0124.BoshBackedSessionContext.requestExpired(_BoshBackedSessionContext.java:451_)
 
   at
 org.apache.vysper.xmpp.extension.xep0124.BoshBackedSessionContext.access$000(_BoshBackedSessionContext.java:46_)
 
   at
 org.apache.vysper.xmpp.extension.xep0124.BoshBackedSessionContext$1.onTimeout(_BoshBackedSessionContext.java:605_)
 
   at
 org.eclipse.jetty.continuation.Servlet3Continuation$2.onTimeout(_Servlet3Continuation.java:90_)
 
   at
 org.apache.catalina.core.AsyncListenerWrapper.fireOnTimeout(_AsyncListenerWrapper.java:45_)
 
   at
 org.apache.catalina.core.AsyncContextImpl.timeout(_AsyncContextImpl.java:118_)
 
   at
 org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(_CoyoteAdapter.java:292_)
 
   at
 org.apache.coyote.http11.AbstractHttp11Processor.asyncDispatch(_AbstractHttp11Processor.java:1515_)
 
   at
 org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(_AbstractProtocol.java:523_)
 
   at
 org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(_AprEndpoint.java:1817_)
 
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
 Source)
 
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 
   at java.lang.Thread.run(Unknown Source)
 
  
 
  
 
  
 
 *Bob DeRemer*
 
 *Senior Director, Architecture and Development*
 
  
 
 Description: Description: Description: Description:
 cid:image001.png@01CBE3DE.51A12030
 
 http://www.thingworx.com http://www.thingworx.com/
 
 Skype: bob.deremer.thingworx
 
 O: 610.594.6200 x812
 
 M: 717.881.3986
 
  
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


[OT-ish] Apache Tomcat FTW

2012-01-11 Thread Pid
All,

A work colleague shared this:

 http://blog.newrelic.com/2012/01/10/infographic-oss-java-wins-in-the-cloud-era/


p



-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Context configuration file

2012-01-11 Thread Pid
On 11/01/2012 13:01, Thom Hehl wrote:
 We are using a context configuration file to provide our database
 connectivity through a JNDI entry to our application so that the file
 can change without the purchasers of our software having to tinker about
 with it internally. Here is our file:

Which version of Tomcat is this?

Which file is this?


p

 Context path=/chronicle debug=5 reloadable=true
 crossContext=true

 Logger className=org.apache.catalina.logger.FileLogger
 prefix=ej-Log. suffix=.txt timestamp=true/
 
 Resource  name=jdbc/chronicle 
 
  
 auth=Container
 
 type=javax.sql.DataSource
 
 username=sa
 
 password=xxx
 
  
 driverClassName=net.sourceforge.jtds.jdbc.Driver 
 
  
 url=jdbc:jtds:sqlserver://localhost/PsDb
 
  
 maxActive=-1
 
  
 maxIdle=0
 
 /
 
 /Context
 
  
 
 I picked this trick up from a predecessor on a job and have never found
 it documented anywhere. I would like to use the same approach to define
 JNDI keys for the mail server. Can someone help?
 
  
 
 Thanks.
 
  
 
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Context configuration file

2012-01-11 Thread Pid
On 11/01/2012 15:53, Thom Hehl wrote:
 7.0.8
 
 This is the configuration file in conf/Catalina/localhost and shares the
 name of my webapp.

Please don't top-post.

 -Original Message-
 From: Pid [mailto:p...@pidster.com] 
 Sent: Wednesday, January 11, 2012 10:52 AM
 To: Tomcat Users List
 Subject: Re: Context configuration file
 
 On 11/01/2012 13:01, Thom Hehl wrote:
 We are using a context configuration file to provide our database 
 connectivity through a JNDI entry to our application so that the file 
 can change without the purchasers of our software having to tinker 
 about with it internally. Here is our file:
 
 Which version of Tomcat is this?
 
 Which file is this?
 
 
 p
 
 Context path=/chronicle debug=5 reloadable=true
 crossContext=true

The attributes path and debug are not valid here.

The file should be called chronicle.xml and the context takes its name
from the file.


 Logger className=org.apache.catalina.logger.FileLogger
 prefix=ej-Log. suffix=.txt timestamp=true/

Logger is no longer a valid element.


p

 Resource name=jdbc/chronicle 
 auth=Container
 type=javax.sql.DataSource
 username=sa
 password=xxx
 driverClassName=net.sourceforge.jtds.jdbc.Driver 
 url=jdbc:jtds:sqlserver://localhost/PsDb
 maxActive=-1
 maxIdle=0
 /

 /Context

  

 I picked this trick up from a predecessor on a job and have never 
 found it documented anywhere. I would like to use the same approach to
 
 define JNDI keys for the mail server. Can someone help?

  

 Thanks.

  


 
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: capturing total number of active sessions

2012-01-11 Thread Pid
On 11/01/2012 15:45, Kari Scott wrote:
 
 We are in the process of migrating a number of servers to Tomcat 7.0.23 and 
 we're looking for the best way to write the total number of active sessions 
 to a text file. Can someone point me to the documentation or sample code that 
 explains/can do this?

Session counts are per-application.
You can connect via a (secure) JMX connection and extract this
information to do whatever you want with it.


 As a side note, is the manager safe to run in a production environment?

Yes, but I would limit access to known IPs using the RemoteIpValve.


p


 Thank you,
 -Kari
 
 
 _
 Kari Scott
 Senior Programmer
 kari.sc...@cdw.commailto:kari.sc...@cdw.com
 
 CDW
 5520 Research Park Drive
 Madison, WI 53711
 Office: 608 298 1223
 Fax: 608 288 3007
 
 
 
 
 
 
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat 7 service not starting

2012-01-11 Thread Pid
On 11/01/2012 07:43, André Warnier wrote:
 Writing log to C:\Program Files\Apache Software Foundation\Tomcat
 7.0.6\webapps\sree\WEB-INF\classes/sree.log
 The logging properties is: sree.properties
 
 That is quite a bizarre place for a logfile (in the same location as the
 application's classes ?).  If it really writes a logfile there, this is
 bound to create some problems later on, probably when you least expect
 them.

+1  That location is a really bad one for a log file.


p

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Error: Unable to compile class for JSP

2012-01-11 Thread Pid
On 11/01/2012 13:53, Justin Larose wrote:
 An error occurred at line: 230 in the jsp file: /object_table.jsp
 The type Part is ambiguous
 227:{
 228: //do nothing here - we don't want the filter to be displayed 
 for lifecycles
 229: }
 230: else if (objType.equals(Part.class))
 231: {

Have you imported more than one Part.class by accident, via a wildcard
import perhaps?


p

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Error: Unable to compile class for JSP

2012-01-11 Thread Pid
On 11/01/2012 16:56, Justin Larose wrote:
 An error occurred at line: 230 in the jsp file: /object_table.jsp
 The type Part is ambiguous
 227:{
 228: //do nothing here - we don't want the filter to be 
 displayed
 for lifecycles
 229: }
 230: else if (objType.equals(Part.class))
 231: {
 
 Have you imported more than one Part.class by accident, via a wildcard
 import perhaps?
 
 I did not import any classes. I installed Tomcat 7 in a different 
 directory and copied all the webapp directories to the new location.

The error message says you have a bug in the JSP.

The bug appears to be that the Part.class reference is ambiguous.

This means that more than one Part.class reference is visible in the
scope of the JSP, possibly via an import statement inside the JSP.

Can you examine the JSP code?


p



 - Justin
 **
 This email and any files transmitted with it are intended solely for 
 the use of the individual or agency to whom they are addressed. 
 If you have received this email in error please notify the Navy 
 Exchange Service Command e-mail administrator. This footnote 
 also confirms that this email message has been scanned for the
 presence of computer viruses.
 
 Thank You!
 **
 
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat 7 service not starting

2012-01-10 Thread Pid
On 10/01/2012 01:16, Debbie Shapiro wrote:
 Hello -
 I use Tomcat with the Business Intelligence Web Application InetSoft. I am in 
 the process of upgrading our development server to their latest version 
 (11.2). I also upgraded Java from 1.6.0_20 to 1.6.0_30. The upgrade procedure 
 for InetSoft is to replace a couple of jar files, which I have done. But now 
 Tomcat is no longer starting up. I get an Error 1067. The process terminated 
 unexpectedly. Can anyone provide any guidance on where to look for why this 
 is no longer starting up?

What does update a couple of jar files refer to?  Tomcat or InetSoft?

Does this procedure also involve updating Tomcat and if so, how did you
do that?

You didn't actually say, but I assume from the error that you are using
Windows.  Did you check the Tomcat log files and find any errors there?


p



 Debbie Shapiro
 Data Warehouse Manager
 Cardiac Science
 Office: 425.402.2233
 
 Visit us at www.cardiacscience.comhttp://www.cardiacscience.com/
 Suppliers of Cardiac Science, Criticare, Unetixs, Powerheart, Burdick, and 
 Quinton products Part of the Opto Circuits Family
 
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Endorsed directory classloader

2012-01-10 Thread Pid
On 10/01/2012 00:47, Ryan wrote:
 Hi-
 
 I've got single Tomcat instance with 10 different webapps deployed. I'm in
 the process of converting the webapps logging from using Tomcat's JULI via
 java.util.logging to SLF4J, initally backed by log4j.
 
 I've run into a classloader problem due to my usage of the endorsed/
 directory: we place 2 jars in the endorsed/ dir so that the classes
 contained within are shared across webapps. 

Endorsed is for overriding classes supplied in the JDK.

 http://docs.oracle.com/javase/6/docs/technotes/guides/standards/

If you want to share JARs (why do you want to do that?) between webapps
in Tomcat 6.0.x you just need to put them in tomcat/lib.


p

 However, now that these classes
 depends on SLF4J class initialization fails since the SLF4J classes are not
 found on the classpath. I have attempted to put the required jars in:
 ${catalina.base}/lib, ${catalina.home}/lib and the endorsed/ directory
 itself, and each time the dependent classes fail to load due to an
 inability to locate the org.slf4j classes.
 
 What do you recommend I do to make the slf4j jars available to the classes
 within the endorsed/ directory?





-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Problem running my webapp with Tomcat 7.0.22.0 Security Manager enabled (Windows Vista)

2012-01-10 Thread Pid
On 09/01/2012 19:22, ja...@mobilewebexpert.co.uk wrote:
 Hiya,
 
 I've just turned on Tomcat's Security Manager and (not surprisingly) I'm now 
 having a problem running my webapp. I know I probably need to specify some 
 security privileges somewhere, but not sure where - possibly catalina.policy? 
 Can anyone help??

Yes, in catalina.policy.  Have fun.


p

 Here's the error from the log file:
 
 09-Jan-2012 17:33:34 org.apache.catalina.core.StandardWrapperValve invoke
 SEVERE: Servlet.service() for servlet [Manager] in context with path 
 [/manager] threw exception [Could not initialize class 
 org.netbeans.modules.schema2beans.DDLogFlags] with root cause
 java.lang.NoClassDefFoundError: Could not initialize class 
 org.netbeans.modules.schema2beans.DDLogFlags
 at org.netbeans.modules.schema2beans.DOMBinding.register(DOMBinding.java:166)
 at 
 org.netbeans.modules.schema2beans.BeanProp.registerDomNode(BeanProp.java:1809)
 at 
 org.netbeans.modules.schema2beans.GraphManager.createRootBinding(GraphManager.java:232)
 at org.netbeans.modules.schema2beans.BaseBean.createRoot(BaseBean.java:288)
 at 
 org.netbeans.modules.web.monitor.data.MonitorData.init(MonitorData.java:98)
 at 
 org.netbeans.modules.web.monitor.data.MonitorData.init(MonitorData.java:75)
 at 
 org.netbeans.modules.web.monitor.data.MonitorData.init(MonitorData.java:71)
 at 
 org.netbeans.modules.web.monitor.server.MonitorFilter.setupDataRecord(MonitorFilter.java:484)
 at 
 org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:331)
 at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:273)
 at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:270)
 at java.security.AccessController.doPrivileged(Native Method)
 at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
 at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:305)
 at 
 org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:245)
 at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
 at 
 org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:57)
 at 
 org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:193)
 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:188)
 at 
 org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
 at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:273)
 at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:270)
 at java.security.AccessController.doPrivileged(Native Method)
 at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
 at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:305)
 at 
 org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:245)
 at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
 at 
 org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:57)
 at 
 org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:193)
 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:188)
 at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
 at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
 at 
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
 at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
 at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
 at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
 at 
 org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)
 at 
 org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
 at 
 

Re: tomcat7 autoDeploy problem..

2012-01-10 Thread Pid
On 10/01/2012 00:04, 이재만 wrote:
 hi.
 clould somebody help me to AutoDeploy reload problem..
 false, I was set to autodeploy.
 Why reloading the source again?on tomcat7 with autoDeploy=false ???
  
 thank you.

Are you using Eclipse or an IDE?

How are you deploying the update application, is it a WAR or directory?


p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: multi-tented connection queues

2012-01-10 Thread Pid
On 10/01/2012 12:25, Tharindu Patikirikorala wrote:
 Hi All,
 
 
 I am doing a case study to make tomcat to host multi-tented web
 applications. i.e., a single web application/service container is serving
 logically partitioned customers.  For the basic implementation (let’s say
 number of customers/tenant are 2) I want to make following modifications.
 
 1)  Identify the tenant and implementing a request/connection queues
 for each tenant. Then queue will have ‘acceptcount’ which reject the system
 to avoid severe overloads.

Queue of what?  Tomcat doesn't have any queues.  Queuing is usually
associated with messaging products or applications.


 2)  The worker threads have to be allocated to serve these requests
 based on a new scheduling. Two queues will be processed by this scheduler
 based on a priority scheme.

Sounds like an application problem.  A messaging application problem.


 After looking at the code, currently a single connection queue
 (ServerSocket.listen(backlog)) is used which is not aware about the tenants
 request. However, for the implementation we need another level of queuing
 which will reject the requests based on the tenant.

You are referring to the Connector.  The Connector processes requests.
You could extend it yourself to do whatever you wanted, but you are
probably just better creating a separate instance for each tenant and
starting it in its own JVM.

See RUNNING.txt for details of how to separate CATALINA_HOME and
CATALINA_BASE so you can use a common runtime for multiple instances.


p


 Please suggest a way to implement such a scheme.
 
 
 Thank you
 
 Pati
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: response.isCommited() returns false after sendRedirect is called?

2012-01-10 Thread Pid
On 10/01/2012 14:31, Polina Genova wrote:
 Hi Konstantin,
 
 You previously said:
 The spec says about HttpServletResponse.
 isCommitted(), but your valve is calling
 org.apache.catalina.connector.Response.isCommitted().
 
 But org.apache.catalina.connector.Response implements HttpServletResponse.
 Don't you think it should conform with the spec (HttpServletResponse API)
 then?

So does org.apache.catalina.connector.ResponseFacade.

When you do Response.getResponse() you get a ResponseFacade, just like
an application does, with a different implementation.

So call that one instead.


p


 Thanks and Best Regards,
 Polina
 
 
 On Mon, Dec 26, 2011 at 12:44 AM, Polina Genova 
 polina.gen...@gmail.comwrote:
 
 Thanks for the answer, Konstantin,

 Actually I was referring to the HttpServletResponse interface simply
 because org.apache.catalina.connector.
 Response implements it and I would expect that its isCommited()
 implementation complies with it just like ResponseFacade's one does.

 Thanks!

 Best Regards,
 Polina

 On Fri, Dec 23, 2011 at 10:55 AM, Konstantin Kolinko 
 knst.koli...@gmail.com wrote:

 2011/12/23 Polina Genova polina.gen...@gmail.com:
 Hi,

 I accidentally noticed that in valves response.isCommitted()  returns
 false
 after sendRedirect() is called.
 According to the HttpServletResponse API (and Servlet Specification
 v.2.5)
 after sendRedirect() is called the response should be considered
 committed
 so I believe isCommitted() should return true in this case, shouldn't
 it?
 Reproducible on Tomcat 6.35.

 To reproduce this, you may use the attached test materials:
- test dummy valve
- simple test app with 2 jsps (test.jsp redirects to
 index.jsp).


 The spec says about HttpServletResponse.isCommitted(), but your valve is
 calling
 org.apache.catalina.connector.Response.isCommitted().

 Those are different methods.

 See o.a.c.connector.ResponseFacade#isCommitted() and
 Response.isAppCommitted().

 Best regards,
 Konstantin Kolinko

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



 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Problem running my webapp with Tomcat 7.0.22.0 Security Manager enabled (Windows Vista)

2012-01-10 Thread Pid
On 10/01/2012 15:51, ja...@mobilewebexpert.co.uk wrote:
 Thanks for the reply.
 
 Afraid I'm very new to Tomcat - please could you explain to me what
 changes I need to make to catalina.policy?

It's can be tricky and it's application specific.

You'll need to add specific policy rules that permit the application to
do whatever it needs to do.  E.g. access to network, file system, jars etc.

Is there a particular reason you want to enable the Security Manager?
Are you hosting untrusted 3rd party applications for example?


p


 Thanks,
 James
 
 - Original Message - From: Pid p...@pidster.com
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Tuesday, January 10, 2012 9:19 AM
 Subject: Re: Problem running my webapp with Tomcat 7.0.22.0 Security
 Manager enabled (Windows Vista)
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: SEVERE: Allocate exception for servlet helloworld Apache-Tomcat 7.0.23

2012-01-10 Thread Pid
On 10/01/2012 18:34, Caldarale, Charles R wrote:
 From: Alastair Baldwin [mailto:alastairgbald...@yahoo.co.uk] 
 Subject: SEVERE: Allocate exception for servlet helloworld Apache-Tomcat 
 7.0.23
 
 CLASSPATH= 
 .;c:\apache-tomcat-7.0.23-windows-x86\apache-tomcat-7.0.23\servlet-api.jar 
 
 Probably not the cause of your problem, but don't set the CLASSPATH variable 
 - ever.  It's guaranteed to cause confusion for unsuspecting programs that 
 don't know how to protect themselves from such abuse.  (Fortunately, the 
 standard Tomcat startup scripts usually do handle it properly by ignoring the 
 variable.)

... and that URL is unlikely to work anyway, unless you've got a really
broken Tomcat.  (It's missing a 'lib' directory in the path.)


p


  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
 MATERIAL and is thus for use only by the intended recipient. If you received 
 this in error, please contact the sender and delete the e-mail and its 
 attachments from all computers.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: SSL Certificate Update Not Reflected on the Website

2012-01-09 Thread Pid *
On 9 Jan 2012, at 10:20, Conway Liu c...@xtra.co.nz wrote:

 Hi,

 We used to use Thawte for our SSL certificate. Today I installed new SSL
 certificate issued by VeriSign and there were no errors. The primary and
 secondary intermediate CAs both imported into the keystore file properly,
 and then the SSL issued by VeriSign imported as well. I updated the
 server.xml to indicate the new keystore file with the keystore password.
 Started Tomcat, checked the log files and there were no errors. But when I
 browse to the website, it is still saying the SSL has expired and it's
 showing the one issued by Thawte.

 I tried to put an incorrect keystore password in server.xml and Tomcat did
 generate errors in the log file, which means Tomcat is looking at the
 correct keystore file.

 We have also tried to reboot the server in case the old SSL was cached
 somewhere but that didn't help.

 Does anyone have any suggestion where might be wrong?

Which browser are you using? Some cache Certs and don't reflect the
change immediately.

Have you tried with a command line tool?


p





 Thank you very much

 Conway


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



Re: SSL Certificate Update Not Reflected on the Website

2012-01-09 Thread Pid
On 09/01/2012 10:44, Conway Liu wrote:
 Hi Pid,
 
 I tried different browsers, and tried different computers.
 
 What command line tool are you talking about?

Something like: curl or openssl


p

 Thanks
 Conway
 
 -Original Message-
 From: Pid * [mailto:p...@pidster.com] 
 Sent: Monday, 9 January 2012 11:37 p.m.
 To: Tomcat Users List
 Subject: Re: SSL Certificate Update Not Reflected on the Website
 
 On 9 Jan 2012, at 10:20, Conway Liu c...@xtra.co.nz wrote:
 
 Hi,

 We used to use Thawte for our SSL certificate. Today I installed new 
 SSL certificate issued by VeriSign and there were no errors. The 
 primary and secondary intermediate CAs both imported into the keystore 
 file properly, and then the SSL issued by VeriSign imported as well. I 
 updated the server.xml to indicate the new keystore file with the keystore 
 password.
 Started Tomcat, checked the log files and there were no errors. But 
 when I browse to the website, it is still saying the SSL has expired 
 and it's showing the one issued by Thawte.

 I tried to put an incorrect keystore password in server.xml and Tomcat 
 did generate errors in the log file, which means Tomcat is looking at 
 the correct keystore file.

 We have also tried to reboot the server in case the old SSL was cached 
 somewhere but that didn't help.

 Does anyone have any suggestion where might be wrong?
 
 Which browser are you using? Some cache Certs and don't reflect the change 
 immediately.
 
 Have you tried with a command line tool?
 
 
 p
 
 



 Thank you very much

 Conway

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


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Why TC 7.0.22 can not response any request?

2012-01-09 Thread Pid
On 09/01/2012 09:38, 孙文 wrote:
 Enviroment:
 jdk 1.6.0_29 64bit 
 solaris 10
 TC 7.0.22 
 every visual machine installed two tc 7.0.22,one 8080 , the other 8081.
 
 randomly tomcat can't response any request.but no oom,when use IE.the
 PID is still there.
 
 attachment show something be locked,but why?
 
 Maybe someone can help me .

Please downgrade to 7.0.21 and repeat your test.


p



-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: sombody help me...!! tomcat AutoDeploy issue ~~

2012-01-08 Thread Pid *
On 9 Jan 2012, at 07:03, 이재만 leejaeman...@naver.com wrote:


 Hello. Guys..

 i am useing Apache Tomcat/7.0.14 and i was setup AutoDeploy to false as 
 blow.
 but when i deployed web application to my docs , all class and library is 
 reloaded by new classloader..
 i never restarted this tomcat7 after deploying...

 i want not to reload all source (except for jsp) after restarting tomcat7.

 how do i solve this issue? please tell me  is there other option???

 thank you in advance..



 server.xml
 

Did you forget to paste it in?

p






 my server imformation.
 ---
 Using CATALINA_BASE: /webserver/tomcat7
 Using CATALINA_HOME: /webserver/tomcat7
 Using CATALINA_TMPDIR: /webserver/tomcat7/temp
 Using JRE_HOME: /usr/java/jdk1.6.0_26_64
 Using CLASSPATH: 
 /webserver/tomcat7/bin/bootstrap.jar:/webserver/tomcat7/bin/tomcat-juli.jar
 Server version: Apache Tomcat/7.0.14
 Server built: May 9 2011 10:40:56
 Server number: 7.0.14.0
 OS Name: Linux
 OS Version: 2.6.18-194.el5
 Architecture: amd64
 JVM Version: 1.6.0_26-b03
 JVM Vendor: Sun Microsystems Inc.
 

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



Re: is der any default username for tomcat?

2012-01-06 Thread Pid
On 06/01/2012 06:24, srilaxmi deevela wrote:
 is der any default username for tomcat?
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 

http://catb.org/~esr/faqs/smart-questions.html


p

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: How many number of web-applications web-server can have

2012-01-06 Thread Pid
On 06/01/2012 06:25, srilaxmi deevela wrote:
 hi users,
   How many number of web-applications web-server can have?
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 

http://catb.org/~esr/faqs/smart-questions.html


p

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: In order to give jre path while installing tomcat server which path we need to give?

2012-01-06 Thread Pid
On 06/01/2012 06:27, srilaxmi deevela wrote:
   In order to give jre path while installing tomcat server which path
 we need to give?
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 

http://catb.org/~esr/faqs/smart-questions.html


p

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: After installation of tomcat which url we need to give to web browser to run the home page of tomcat?

2012-01-06 Thread Pid
On 06/01/2012 07:22, srilaxmi deevela wrote:
 After installation of tomcat which url we need to give to web browser
 to run the home page of tomcat?
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 

http://catb.org/~esr/faqs/smart-questions.html


p

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: In order to use third party classes which environmental variable we need to set?

2012-01-06 Thread Pid
On 06/01/2012 07:28, srilaxmi deevela wrote:
 In order to use third party classes which environmental variable we need to 
 set?

http://catb.org/~esr/faqs/smart-questions.html


p

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: SSL Configuration Errors

2012-01-06 Thread Pid
On 05/01/2012 18:22, Justin Larose wrote:
 Sorry. Comments removed.
 
 ___

snip No APR, nothing to see here, move along, move along...

You can use an executor to provide a common thread pool for all linked
connectors - to reduce the overhead of unused threads.

  Connector port=18080 protocol=HTTP/1.1
 connectionTimeout=2
 redirectPort=8443 /
 
   Connector

Are you actually using Client auth?

 clientAuth=true port=8443 minSpareThreads=5 maxSpareThreads=75
 enableLookups=true disableUploadTimeout=true
 acceptCount=100 maxThreads=200
 scheme=https secure=true SSLEnabled=true

 keystoreFile=F:\Serena\Dimensions 2009 R2\Common Tools\Tomcat 
 7.0\conf\wcmdev-ssl.jks
 keystoreType=JKS keystorePass=**

keystoreType has the default, you can remove it.
I don't like the look of those paths, this is neater:

 keystoreFile=${catalina.base}\conf\wcmdev-ssl.jks


 truststoreFile=F:\Serena\Dimensions 2009 R2\Common Tools\Tomcat 
 7.0\conf\wcmdev-ssl.jks

 truststoreType has the default, you can remove it.

 truststoreType=JKS truststorePass=**
 SSLVerifyClient=require SSLEngine=on SSLVerifyDepth=2 
 sslProtocol=TLS /

sslProtocol is also the default, you can remove it.


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

Are you actually using the AJP connector?

Can you remove all of the client auth config and just configure the
keystore alone, first to try to get the SSL working?

Did you follow the steps here?

 http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html


p

 Engine name=Catalina defaultHost=localhost
 
 Realm className=org.apache.catalina.realm.LockOutRealm
  Realm className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase/
/Realm
 
Host name=localhost  appBase=webapps
  unpackWARs=true autoDeploy=true
 
  Valve className=org.apache.catalina.valves.AccessLogValve 
 directory=logs
 prefix=localhost_access_log. suffix=.txt
 pattern=%h %l %u %t quot;%rquot; %s %b 
 resolveHosts=false/
 
/Host
  /Engine
/Service
  /Server
 
 
 Thanks,
 Justin LaRose
 
 

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat multiple instances runs as service from same exe file

2012-01-06 Thread Pid
On 05/01/2012 17:19, Khailovsky, Igor wrote:
 Hi Jeff,
 
 Our application should provide ability to manage the application instances 
 dynamically (runs into separate Tomcat container). One of requirements is 
 using same execution in case multiple instances - option to provide to 
 customer an easy way for update/upgrade Tomcat core.
 
 Thanks for your help. 

I will assume you have read the RUNNING.txt file in your distribution.

These are the relevant documentation pages:

 http://tomcat.apache.org/tomcat-6.0-doc/setup.html#Windows

 http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html


p

 -Original Message-
 From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] 
 Sent: Thursday, January 05, 2012 17:19
 To: 'Tomcat Users List'
 Subject: RE: Tomcat multiple instances runs as service from same exe file
 
 Igor -
 Since you are using Tomcat 6.x, why not just perform a second install.
 The latest installer lets you install multiple instances with different names.
 Each install only takes up 10MB and it is much easier doing it this way than 
 the old way of duplicating folders and running the procrun setups manually.
 I run several servers this way (5 to 6 instances per server), and it takes a 
 whole lot less effort to maintain than the old way of doing things that I had 
 to use back in the tomcat 5.5.x days.
 Jeff
 
 -Original Message-
 From: Khailovsky, Igor [mailto:igor.khailov...@verint.com]
 Sent: Thursday, January 05, 2012 6:01 AM
 To: users@tomcat.apache.org
 Subject: RE: Tomcat multiple instances runs as service from same exe 
 file

 Hello All,

 How to execute multiple instances of Tomcat server as windows services 
 from same physical location (CATALINA_HOME) without tomcat executable 
 replication? In other words, how to point a Tomcat windows service to 
 specific server.xml (not a default location)?

 I know that this option is available for Tomcat that was executed from 
 command line.

 The question is about Tomcat v.6.0 that runs as Windows 2008 service.



 Thanks!

 This electronic message may contain proprietary and confidential 
 information of Verint Systems Inc., its affiliates and/or subsidiaries.
 The information is intended to be for the use of the individual(s) or
 entity(ies) named above.  If you are not the intended recipient (or 
 authorized to receive this e-mail for the intended recipient), you may 
 not use, copy, disclose or distribute to anyone this message or any 
 information contained in this message.  If you have received this 
 electronic message in error, please notify us by replying to this e- 
 mail.

 
 __
 
 Confidentiality Notice:  This Transmission (including any attachments) may 
 contain information that is privileged, confidential, and exempt from 
 disclosure under applicable law.  If the reader of this message is not the 
 intended recipient you are hereby notified that any dissemination, 
 distribution, or copying of this communication is strictly prohibited.  
 
 If you have received this transmission in error, please immediately reply to 
 the sender or telephone (512) 343-9100 and delete this transmission from your 
 system.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 This electronic message may contain proprietary and confidential information 
 of Verint Systems Inc., its affiliates and/or subsidiaries.
 The information is intended to be for the use of the individual(s) or
 entity(ies) named above.  If you are not the intended recipient (or 
 authorized to receive this e-mail for the intended recipient), you may not 
 use, copy, disclose or distribute to anyone this message or any information 
 contained in this message.  If you have received this electronic message in 
 error, please notify us by replying to this e-mail.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: mod_jk linux binaries

2012-01-06 Thread Pid
On 06/01/2012 10:01, Leon Kolchinsky wrote:
 Yes there is -
 http://apache.mirror.aussiehq.net.au//tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.32-src.tar.gz

'src' ?


p

 Check out this page -  http://tomcat.apache.org/download-connectors.cgi
 
 Cheers,
 Leon Kolchinsky
 
 
 
 On Fri, Jan 6, 2012 at 20:54, Olivier MENUEL omen...@vdocsoftware.comwrote:
 
 Ok
 Thank you very much

 I was hoping I could find already compiled binaries (there are the 1.2.31
 in the archives, but not the 1.2.32).
 I'll do that.

 Thanks


 -Message d'origine-
 De : Leon Kolchinsky [mailto:lkolc...@gmail.com]
 Envoyé : vendredi 6 janvier 2012 10:45
 À : Tomcat Users List
 Objet : Re: mod_jk linux binaries

 Hi,

 You can compile mod_jk and it's pretty straight forward (please use latest
 source, mine is just an example):
 1.
 # yum install httpd httpd-devel gcc gcc-c++

 2.
 Go to http://tomcat.apache.org/download-connectors.cgi and download the
 source code:
 # wget

 http://apache.mirror.aussiehq.net.au//tomcat/tomcat-connectors/jk/source/jk-1.2.31/tomcat-connectors-1.2.31-src.tar.gz
 3.
 # tar -xvzf tomcat-connectors-1.2.31-src.tar.gz

 Read docs/webserver_howto/apache.html or native/BUILDING.txt for options.

 # cd tomcat-connectors-1.2.31-src/native/
 # which apxs
 # ./configure --with-apxs=/usr/sbin/apxs --enable-api-compatibility
 # make
 # make install

 Cheers,
 Leon Kolchinsky



 On Fri, Jan 6, 2012 at 20:35, Olivier MENUEL omen...@vdocsoftware.com
 wrote:

 Hi,

 Where can I find binaries for mod_jk 1.2.32 for linux httpd 2.2 ?
 I can find only windows/netware...

 Thanks


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



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


 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat and LDAP (handling password expiration)

2012-01-06 Thread Pid
On 06/01/2012 14:56, sigzero wrote:
 The scenario is that Tomcat (6) is sitting on Windows and it talks to
 an LDAP server sitting on Linux (RHEL). What is the best way to handle
 the Tomcat LDAP account password expiring? I know that the password
 needs to change on the LDAP and the Tomcat server.xml file needs to be
 updated. 

You can replace the contents of XML attributes in server.xml with variables.

 Connector port=${http.port} /

The variables are taken from conf/catalina.properties which is a Java
Properties file.

You could programmatically update that file and then restart the Tomcat
instance.  You will need to restart the Tomcat instance if 'talks to an
LDAP server' refers to a Realm or DataSource defined in server.xml.


p



I see no go way to automate that and the only workaround that
 I see is to have the Tomcat LDAP account password not expire.
 
 Any suggestions?
 
 Thanks for your time.
 
 Bob
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: is der any default username for tomcat?

2012-01-06 Thread Pid
On 06/01/2012 14:49, charan raj wrote:
 Hi can any one tell me how to install multiple tomcat instance apart from c
 drive

1. Don't top-post.
2. Don't hijack threads.
3. If you're going to reply to a thread, at least read it beforehand.
4. Particularly this: http://catb.org/~esr/faqs/smart-questions.html


p


 On Fri, Jan 6, 2012 at 8:15 PM, André Warnier a...@ice-sa.com wrote:
 
  Pid wrote:

 On 06/01/2012 06:24, srilaxmi deevela wrote:

 is der any default username for tomcat?

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


 http://catb.org/~esr/faqs/**smart-questions.htmlhttp://catb.org/~esr/faqs/smart-questions.html

 I don't agree. I think it's a good question.
 For example, in Germany it could be Tom Katze, in France Tom Chat, and Tom
 Gato for Spanish-speaking countries..
 Why don't we put this to a vote ?


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


 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: is der any default username for tomcat?

2012-01-06 Thread Pid
On 06/01/2012 14:59, Caldarale, Charles R wrote:
 From: charan raj [mailto:charanraj...@gmail.com] 
 Subject: Re: is der any default username for tomcat?
 
 can any one tell me how to install multiple tomcat instance 
 apart from c drive
 
 1) Don't hijack threads.
 
 2) Make at least a cursory attempt to read the Tomcat docs.
 
 3) http://www.catb.org/~esr/faqs/smart-questions.html

Ahh... you beat me to it.


 Is it a full moon?

I was thinking the same thing...


p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: mod_jk linux binaries

2012-01-06 Thread Pid
On 06/01/2012 15:06, André Warnier wrote:
 Caldarale, Charles R wrote:

 Is it a full moon?

 No, but it may be the start of a new semester somewhere.

+1


p

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: mod_jk linux binaries

2012-01-06 Thread Pid
On 06/01/2012 15:16, Konstantin Kolinko wrote:
 2012/1/6 Pid p...@pidster.com:
 On 06/01/2012 15:06, André Warnier wrote:
 Caldarale, Charles R wrote:

 Is it a full moon?

 No, but it may be the start of a new semester somewhere.

 +1

 
 It is near full moon. ;) One cite says it is 93% full.
 It will be 100% on January 9th.

So, you're saying that it could get /worse/ before it gets better?

:)


p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: mod_jk linux binaries

2012-01-06 Thread Pid
On 06/01/2012 15:28, André Warnier wrote:
 Pid wrote:
 On 06/01/2012 15:16, Konstantin Kolinko wrote:
 2012/1/6 Pid p...@pidster.com:
 On 06/01/2012 15:06, André Warnier wrote:
 Caldarale, Charles R wrote:
 Is it a full moon?

 No, but it may be the start of a new semester somewhere.
 +1

 It is near full moon. ;) One cite says it is 93% full.
 It will be 100% on January 9th.

 So, you're saying that it could get /worse/ before it gets better?

 Actually, the world was supposed to end (again) these days. But I just
 read in a newspaper that the event has been postponed, for technical
 reasons, until 21.12.2012.

No, it was always then.

 So it looks like, apart from this one, we'll still have another semester
 to go.

Better make it count.


p

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


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: SSL Configuration Errors

2012-01-04 Thread Pid
On 04/01/2012 19:33, Justin Larose wrote:
 Hello Group,
 
 I am seeing this error when starting Tomcat 7 on Windows.
 
 SEVERE: Failed to initialize end point associated with ProtocolHandler 
 [http-bio-8443]
 java.io.IOException: SSL configuration is invalid due to No available 
 certificate or key corresponds to the SSL cipher suites which are enabled.
 
 I have 3 certs in the keystore 1 root, 1 intermediate and the one received 
 from the csr. I also confirmed they are pointing to the correct place and 
 I can see them if I do a
 keytool -list -v -keystore keystore.jks -alias mydomain
 
 I have attached my server.xml below. Anyone know where to start?

By removing the comments?


p

 ___
 
 ?xml version='1.0' encoding='utf-8'?
 Server port=8405 shutdown=SHUTDOWN
   !-- Security listener. Documentation at /docs/config/listeners.html
   Listener className=org.apache.catalina.security.SecurityListener /
   --
   !--APR library loader. Documentation at /docs/apr.html --
   !-- Listener className=org.apache.catalina.core.AprLifecycleListener 
 SSLEngine=on / --
   !--Initialize Jasper prior to webapps are loaded. Documentation at 
 /docs/jasper-howto.html --
   Listener className=org.apache.catalina.core.JasperListener /
   !-- Prevent memory leaks due to use of particular java/javax APIs--
   Listener 
 className=org.apache.catalina.core.JreMemoryLeakPreventionListener /
   Listener 
 className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /
   Listener 
 className=org.apache.catalina.core.ThreadLocalLeakPreventionListener /
 
   !-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
   --
   GlobalNamingResources
 !-- Editable user database that can also be used by
  UserDatabaseRealm to authenticate users
 --
 Resource name=UserDatabase auth=Container
   type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved
  factory=org.apache.catalina.users.MemoryUserDatabaseFactory
   pathname=conf/tomcat-users.xml /
   /GlobalNamingResources
 
   !-- A Service is a collection of one or more Connectors that share
a single Container Note:  A Service is not itself a 
 Container, 
so you may not define subcomponents such as Valves at this level.
Documentation at /docs/config/service.html
--
   Service name=Catalina
 
 !--The connectors can use a shared executor, you can define one or 
 more named thread pools--
 !--
 Executor name=tomcatThreadPool namePrefix=catalina-exec- 
 maxThreads=150 minSpareThreads=4/
 --
 
 
 !-- A Connector represents an endpoint by which requests are 
 received
  and responses are returned. Documentation at :
  Java HTTP Connector: /docs/config/http.html (blocking  
 non-blocking)
  Java AJP  Connector: /docs/config/ajp.html
  APR (HTTP/AJP) Connector: /docs/apr.html
  Define a non-SSL HTTP/1.1 Connector on port 8080
 --
 Connector port=18080 protocol=HTTP/1.1 
connectionTimeout=2 
redirectPort=8443 /
 !-- A Connector using the shared thread pool--
 !--
 Connector executor=tomcatThreadPool
port=8080 protocol=HTTP/1.1 
connectionTimeout=2 
redirectPort=8443 /
 -- 
 !-- Define a SSL HTTP/1.1 Connector on port 8443
  This connector uses the JSSE configuration, when using APR, the 
  connector should be using the OpenSSL style configuration
  described in the APR documentation --
 
 !--
 Connector  port=8443 protocol=HTTP/1.1 SSLEnabled=true
 maxThreads=150 scheme=https secure=true
 clientAuth=false sslProtocol=TLS /
  --
 
  Connector
clientAuth=true port=8443 minSpareThreads=5 maxSpareThreads=75
enableLookups=true disableUploadTimeout=true
acceptCount=100 maxThreads=200
scheme=https secure=true SSLEnabled=true
keystoreFile=F:\Serena\Dimensions 2009 R2\Common Tools\Tomcat 
 7.0\conf\wcmdev-ssl.jks
keystoreType=JKS keystorePass=**
truststoreFile=F:\Serena\Dimensions 2009 R2\Common Tools\Tomcat 
 7.0\conf\wcmdev-ssl.jks
truststoreType=JKS truststorePass=**
SSLVerifyClient=require SSLEngine=on SSLVerifyDepth=2 
 sslProtocol=TLS
 /
 
 !-- Define an AJP 1.3 Connector on port 8409 --
 Connector port=8409 protocol=AJP/1.3 redirectPort=8443 /
 
 
 !-- An Engine represents the entry point (within Catalina) that 
 processes
  every request.  The Engine implementation for Tomcat stand alone
  analyzes the HTTP headers included with the request, and passes 
 them
  on to the appropriate Host (virtual host).
  Documentation at /docs/config/engine.html --
 
 !-- You should set jvmRoute to support load-balancing via AJP ie :
 Engine name=Catalina defaultHost=localhost jvmRoute=jvm1  
 -- 
 Engine 

Re: DB Connection error

2012-01-03 Thread Pid
On 03/01/2012 17:08, Anjib Mulepati wrote:
 Hi All,
 
 One simple question If I have JINDI configuration in my application will
 my application reconnect to the DB whenever my DB gets restart.
 I am having DB connection problem every Monday since our DB get
 restarted on weekends which we don't have control of.
 I am using Tomcat 6.0.20

In addition to the other advice, upgrade your Tomcat: that one is
extremely old.


p


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


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: File leak in 7.0.23?

2011-12-31 Thread Pid
On 31/12/2011 13:06, Janne Jalkanen wrote:
 Hi all!
 
 I am seeing odd behaviour with 7.0.23, with the tomcat user's open file count 
 increasing slowly, but consistently. Two other instances running the exact 
 same codebase on identical hardware, BUT with Tomcat 7.0.20, are not 
 exhibiting the same behaviour. 7.0.20 is rock solid, 7.0.23 dies due to too 
 many open files every now and then. I've increased ulimit for now, but this 
 is still a bit nasty.
 
 Any suggestions where to look? Should I file a bug?

Which Connector are you using?

What is the minimum that is required to reproduce the issue?


 lsof says

Did you supply any options to lsof?

 
 ...
 java21299 ubuntu   87r sock0,6   0t0  31983006 
 can't identify protocol
 java21299 ubuntu   88r sock0,6   0t0  31983007 
 can't identify protocol
 java21299 ubuntu   89r sock0,6   0t0  31983008 
 can't identify protocol
 java21299 ubuntu   90r sock0,6   0t0  31989046 
 can't identify protocol
 java21299 ubuntu   91r sock0,6   0t0  31986504 
 can't identify protocol
 java21299 ubuntu   92r sock0,6   0t0  31987223 
 can't identify protocol
 ...
 
 with a new one every couple of minutes.
 
 java version 1.6.0_26
 Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
 Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
 
 /usr/bin/java -Dnop -server -Xmx1024m -Xms128m -XX:MaxPermSize=256m 
 -Dcom.sun.management.jmxremote.port=redacted 
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
 -Djava.endorsed.dirs=/home/ubuntu/tomcat-bin/current/endorsed -classpath 
 /home/ubuntu/tomcat-bin/current/bin/bootstrap.jar:/home/ubuntu/tomcat-bin/current/bin/tomcat-juli.jar
  -Dcatalina.base=/home/ubuntu/tomcat-run 
 -Dcatalina.home=/home/ubuntu/tomcat-bin/current 
 -Djava.io.tmpdir=/home/ubuntu/tomcat-run/temp 
 org.apache.catalina.startup.Bootstrap start
 
 OS: Ubuntu 10.04 LTS, kernel 2.6.32 smp.
 
 No OOM issues, no errors in log files, until the eventual SocketException 
 when ulimit is reached:
 
 30-Dec-2011 19:05:47 sun.rmi.transport.tcp.TCPTransport$AcceptLoop 
 executeAcceptLoop
 WARNING: RMI TCP Accept-0: accept loop for 
 ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=41709] throws

Are you using RMI for anything in your application or is this a
reference to the JMX connection?

Are you using JMX for something specific?


p

 java.net.SocketException: Too many open files
 at java.net.PlainSocketImpl.socketAccept(Native Method)
 at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:408)
 at java.net.ServerSocket.implAccept(ServerSocket.java:462)
 at java.net.ServerSocket.accept(ServerSocket.java:430)
 at 
 sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:369)
 
 at 
 sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:341)
 at java.lang.Thread.run(Thread.java:662)
 
 /Janne
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: single large tomcat or multiple tomcats

2011-12-31 Thread Pid
On 30/12/2011 20:42, Christopher Schultz wrote:
 Ahmed,
 
 On 12/30/11 2:57 PM, S Ahmed wrote:
 I know with other frameworks (like python/rails) people tend to
 run multiple instaces of the web server and round robin requests to
 each using something like haproxy.
 
 Is this known in the tomcat community at all?
 
 Are you asking if the Tomcat community knows how python/rails users
 typically configure their servers? I would ask over there...
 
 If I have a server with 16GB ram, would it make sense to run a few
 tomcat processes on different ports and use haproxy to round robin
 requests to each tomcat instance?

Is it a 64bit OS?

Have you tested your application with a particular target number of
users/requests in mind?


 If your webapp is stable, I would run a single, large JVM. If it's not
 stable, then running multiple JVMs will certainly increase your
 redundancy. A multi-JVM setup also allows you to upgrade one webapp
 instance and then the other to minimize (or eliminate) downtime -- see
 your other thread on this subject.
 
 If you have multiple webapps, then the choice is up to you. In
 production, we run separate webapps in separate JVMs -- that allows us
 the most flexibility and protection against one webapp suffering some
 problem like OOME and affecting the others.

+1

Don't pick a model you like the sound of and try to squeeze your
requirement into it.


p

 I realize python/ruby do this because of their poor threading
 support.
 
 I have no idea.




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

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Merging multiple XML File in Tomcat

2011-12-31 Thread Pid
On 30/12/2011 11:33, Lau Eng Huat wrote:
 Hi guys,
 
 Is it possible to merge multiple xml file into a single xml file in tomcat.

Yes and no.

It is not possible to split web.xml into separate parts and subsequently
merge them.

It is possible (in Servlet 3.0) to create web-fragment.xml files with
distinct application components.  Read the Servlet Spec to understand more.


The server.xml file is parsed separately and can use XML entities, and
can therefore include external files.


 The web.xml file  server.xml is getting large and I want it to be more
 organized. Is this possible ?

Most people just put up with a verbose web.xml file.

Why is server.xml getting so big?  Have you removed all of the XML comments?


p



-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: help analyzing thread dump for Tomcat 7.0.23 issue

2011-12-31 Thread Pid
On 30/12/2011 02:01, Mike Wertheim wrote:
 I have an app that runs on Tomcat 7.0.21 and APR 1.4.7 just fine.  The
 app serves both SSL and non-SSL traffic.  SSL traffic makes up roughly
 1% of the overall traffic.  The Connectors for SSL and non-SSL both
 use the default value (200) for maxThreads.
 
 When I try to run the app on Tomcat 7.0.23 (with the same server.xml,
 context.xml and web.xml) and APR 1.4.7, the app slowly grinds to a
 halt after running on a live production server for about a day.
 
 I took heap dumps of the app on both 7.0.21 and 7.0.23 and don't see
 any significant difference in memory usage.  Memory seems to be fine.
 
 I did a stack dump on 7.0.23 when it was in its messed up state.  No
 threads are blocked on critical sections of my app.
 
 For the port 8080 connector, there are 196 threads in waiting on
 condition and 4 threads in runnable.
 
 For the port 8443 connector, there are 81 threads in waiting on
 condition and 119 threads in runnable.
 
 I don't know how to interpret this data, since I'm not really clear on
 what the difference is between runnable and waiting on condition.
 Do these numbers seem normal, or are they perhaps giving a clue as to
 what the underlying problem might be?

Which Connector are you using?

Can you please remove the XML comments and obscure username/password/ip
addresses if applicable in your server.xml and then post it inline here?


p

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: File leak in 7.0.23?

2011-12-31 Thread Pid
On 31/12/2011 13:38, Janne Jalkanen wrote:
 Which Connector are you using?
 
 Connector port=8080 protocol=HTTP/1.1 
connectionTimeout=2 
redirectPort=8443 
URIEncoding=UTF-8
compression=on

 compressableMimeType=text/html,text/plain,text/css,text/javascript,application/json,application/javascript
noCompressionUserAgents=.*MSIE 6.*/
 
 
 What is the minimum that is required to reproduce the issue?
 
 Wish I knew. This is from our production cluster, so I'm a bit hesitant to 
 start experimenting with it. However, there was no configuration change 
 between 7.0.20 and 7.0.23, I just shut down tomcat, unpacked the 7.0.23 
 tar.gz, changed symlink to point at the new binaries, and restarted.
 


 lsof says

 Did you supply any options to lsof?
 
 lsof -nP -u ubuntu|grep 21299|grep identify protocol
 
 Are you using RMI for anything in your application or is this a
 reference to the JMX connection?
 
 I am using RMI only for JMX monitoring. The socket exception times *do* 
 roughly correspond to Munin contacting my application every five minutes for 
 getting monitoring data, which is logical because they would be requiring a 
 set of new file handles.

When did the problem start occurring and what else has changed?

Can you stop monitoring with Munin and see if the problem goes away?
If it does, I would consider that Munin may not be properly closing the
connections it makes.


p

 Ah yes, I also have Terracotta session clustering configured using their 
 Valve. That might be using RMI, but I would be expecting to see a lot more 
 errors in that case.
 
 /Janne
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Odd NIO connector behavior

2011-12-31 Thread Pid
On 29/12/2011 19:22, Matthew Tyson wrote:
 On Thu, Dec 29, 2011 at 11:07 AM, Pid p...@pidster.com wrote:
 
 On 29/12/2011 17:27, Matthew Tyson wrote:
 On Wed, Dec 28, 2011 at 6:22 PM, Matthew Tyson
 matthewcarlty...@gmail.comwrote:

 On Wed, Dec 28, 2011 at 8:58 AM, Stefan Mayr ste...@mayr-stefan.de
 wrote:

 Am 28.12.2011 10:04, schrieb ma...@apache.org:

  Matthew Tysonmatthewcarltyson@gmail.**com 
 matthewcarlty...@gmail.com
  wrote:

  That's right, there is an f5 load balancer.  The valve is used to
 keep
 track of whether the request was via HTTPS or not.


 What happens if you go direct to Tomcat and bypass the F5?

  tcpdump seems to confirm the same.  What are you thinking?


 Probably, like me, that the F5 isn't handling the Comet requests
 correctly.


 This is what I would guess. We have a loadbalancing device that
 handles n
 client-lb connections with m lb-server connections in its HTTP mode.
 There
 we have to switch to TCP proxy mode to keep 1:1 relations.

 Your F5 is where to do start crosschecking with tcpdump: client - F5
 vs
 F5 - server

  Stefan


 You think its possible that multiplexing or some load-balancer config
 would cause the two observed issues:

 1) When the custom valve is in use, zombie service() executions continue
 with no actual inbound requests
 2) Inbound requests are being replied to with blank 200s, without ever
 executing the service method.

 Thanks,

 Matt Tyson


 I think maybe I wasn't clear before.  I am running ngrep on the server,
 inside the f5.

 F5 - ngrep - tomcat

 So the behavior I am seeing is inbound traffic from the F5 to Tomcat,
 then
 outbound traffic from Tomcat (empty 200s that don't execute the servlet
 service) back to the F5.  It seems very unlikely that F5 configuration is
 the cause there.

 Can you post the CometdServlet code?


 p


 Here is the code from the service method, it is basically from the
 cometd.org project, with some added logging.  There's obviously quite a bit
 more involved in how cometd processes things, but in this case, the servlet
 itself is very simple.  How an empty 200 response could be generated
 without executing the logging statement here is a mystery.

Can you make a minimal test that reproduces the problem?

Is it reproducible with Tomcat's own Comet support?

E.g.

http://svn.apache.org/repos/asf/tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java


p

 protected void service(HttpServletRequest request, HttpServletResponse
 response) throws ServletException, IOException
 {
 logger.info(REQUEST:  + request.getRemoteAddr() ++
 request.getMethod() ++ request.getQueryString() +  | TRACE: , new
 Throwable());
 
 if (OPTIONS.equals(request.getMethod()))
 {
 serviceOptions(request, response);
 return;
 }
 
 HttpTransport transport = null;
 ListString allowedTransports = _bayeux.getAllowedTransports();
 for (String transportName : allowedTransports)
 {
 ServerTransport serverTransport =
 _bayeux.getTransport(transportName);
 if (serverTransport instanceof HttpTransport)
 {
 HttpTransport t = (HttpTransport)serverTransport;
 if (t.accept(request))
 {
 transport = t;
 logger.info(ACCEPTED:  + request.getRemoteAddr() + 
   + t.getClass().getName());
 break;
 } else {
 logger.info(NOT ACCEPTED:  + request.getRemoteAddr() + 
   + t.getClass().getName());
 }
 }
 }
 
 if (transport == null)
 {
 if (!response.isCommitted()) {
 response.sendError(HttpServletResponse.SC_BAD_REQUEST, Unknown
 Bayeux Transport);
 } else {
 logger.info(NULL TRANSPORT:  + request.getRemoteAddr());
 }
 }
 else
 {
 try
 {
 _bayeux.setCurrentTransport(transport);
 transport.setCurrentRequest(request);
 transport.handle(request, response);
 }
 finally
 {
 transport.setCurrentRequest(null);
 BayeuxServerImpl bayeux = _bayeux;
 if (bayeux != null)
 bayeux.setCurrentTransport(null);
 }
 }
 }
 
 Best,
 
 Matt Tyson
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: 403 jsp - display required roles

2011-12-31 Thread Pid
On 29/12/2011 08:43, Jürgen Jakobitsch wrote:
 hi,
 
 i have a custom 403 error page.
 on that page i'd like to display the securityConstraints that apply
 to the requested resource.
 
 example :
 
 i have a securityConstraint in my web.xml that says that only users with role 
 X
 are allowed to view resource myPage.
 when someone tries to access myPage without being in the role X, i'd like 
 to
 display Role X is required to view myPage
 
 is there a way to access the security constraints defined in web.xml from 
 within
 a jsp?

There is no Servlet API for this.

It might be possible to access the web.xml file (on the file system or
by JMX) and reparse it, but I would be cautious about doing this myself.

Seems like a lot of work for very little return.


p


 any pointer really appreciated
 wkr http://www.turnguard.com/turnguard
 
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Database Connection Neteban DataSource

2011-12-31 Thread Pid
On 29/12/2011 05:45, Lau Eng Huat wrote:
 Hi tomcat experts,
 
 I'm having this problem with the mysql connection in tomcat using netbeans.
 I'm always having a exclamation mark on the Blue World Globe in netbeans
 project tabs. 

I don't know what that means.


 Everytime I try to resolve the data source problem using New
 Connection Wizard in netbeans, the database textfield is always mysql. 

No idea about this either.


 I
 change it to abc_admin and press test connection button , it managed to
 connect. When I press the finished button I always get  Unable to add
 connection. Connection already exist 

Are you having an issue with Netbeans rather than with Tomcat?  If so,
you may find more help with that community.


p


 Web.xml :
 
 resource-ref
 descriptionGRANT SELECT, INSERT, DELETE, UPDATE ON abc_admin.*
  TO 'all_100'@'localhost' IDENTIFIED BY 'gpwd_admin'/description
 res-ref-namejdbc/my_admin/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
 /resource-ref
 
 Context.xml
 ==
 Resource name=jdbc/my_admin auth=Container
 type=javax.sql.DataSource
 maxActive=20
 maxIdle=30
 maxWait=1
 username=all_100
 password=gpwd_abc_admin
 driverClassName=com.mysql.jdbc.Driver
 url=jdbc:mysql://localhost:3306/abc_admin?autoReconnect=true
 /
 
 MYSQL Create Users
 =
 
 CREATE USER 'all_100'@'localhost' IDENTIFIED BY  'pwd_abc_admin',
 FLUSH PRIVILEGES,
 
 GRANT SELECT, INSERT, DELETE, UPDATE ON abc_admin.*TO
 'all_100'@'localhost' IDENTIFIED BY 'gpwd_abc_admin',
 FLUSH PRIVILEGES,
 
 Java Code to get the connection
 ===
 protected Connection getCardDatabaseConnection(String ConnectionType)
 throws NamingException, SQLException {
 Connection connection = null;
 DataSource dataSource;
 InitialContext initialContext;
 
 initialContext = new InitialContext();
 dataSource = (DataSource) initialContext.lookup(java:comp/env/ +
 jdbc/my_admin);
 connection = dataSource.getConnection();
 
 return connection;
 }
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: File leak in 7.0.23?

2011-12-31 Thread Pid *
On 31 Dec 2011, at 18:19, Mike Wertheim m...@hyperreal.org wrote:

 I'm not sure how useful this comment is, but...  I also recently
 posted about an app that runs fine on Tomcat 7.0.21 and dies a slow
 horrible death on Tomcat 7.0.23.  It would seem that a bug was
 introduced in either 7.0.22 or 7.0.23.

There are now 3 threads with non-obvious issues referencing 7.0.23. I
don't yet see any common ground.

Following them all and comparing notes isn't unreasonable.


p


 On Sat, Dec 31, 2011 at 6:48 AM, André Warnier a...@ice-sa.com wrote:
 Janne Jalkanen wrote:

 When did the problem start occurring and what else has changed?


 Exactly at the time when I upgraded to 7.0.23.  I don't recall making any
 other modifications (I would've suspected them first ;-)

 I will try to downgrade to 7.0.22 and lower to try and see if there's a
 difference between Tomcat versions.

 Can you stop monitoring with Munin and see if the problem goes away?
 If it does, I would consider that Munin may not be properly closing the
 connections it makes.


 I did, and the problem did not go away. Open file count still increasing.

 What if you remove the command-line switch
 -Dcom.sun.management.jmxremote.port=redacted
 ?

 (just trying to figure out what these sockets are..)

 Also, what does
 netstat -pan | grep tomcat pid
 have to say ?


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


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


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



Re: File leak in 7.0.23?

2011-12-31 Thread Pid *
On 31 Dec 2011, at 20:03, Mike Wertheim m...@hyperreal.org wrote:

 Janne's latest email says that 7.0.22 is leaky as well.  So the
 regression most likely happened between 7.0.21 and 7.0.22.

 I'm not familiar with the Tomcat code base.  But I wonder how
 difficult it would be for someone to review all of the code changes
 that were checked in between 7.0.21 and 7.0.22, keeping an eye out for
 anything that could be causing a file leak.

Right now  for me: hard, because I'm using an iPhone.

Tomorrow easier: but having a minimal test case for reproducing the
error will make things easier.


p


(p.s. please don't top-post)

 On Sat, Dec 31, 2011 at 11:17 AM, Pid * p...@pidster.com wrote:
 On 31 Dec 2011, at 18:19, Mike Wertheim m...@hyperreal.org wrote:

 I'm not sure how useful this comment is, but...  I also recently
 posted about an app that runs fine on Tomcat 7.0.21 and dies a slow
 horrible death on Tomcat 7.0.23.  It would seem that a bug was
 introduced in either 7.0.22 or 7.0.23.

 There are now 3 threads with non-obvious issues referencing 7.0.23. I
 don't yet see any common ground.

 Following them all and comparing notes isn't unreasonable.


 p


 On Sat, Dec 31, 2011 at 6:48 AM, André Warnier a...@ice-sa.com wrote:
 Janne Jalkanen wrote:

 When did the problem start occurring and what else has changed?


 Exactly at the time when I upgraded to 7.0.23.  I don't recall making any
 other modifications (I would've suspected them first ;-)

 I will try to downgrade to 7.0.22 and lower to try and see if there's a
 difference between Tomcat versions.

 Can you stop monitoring with Munin and see if the problem goes away?
 If it does, I would consider that Munin may not be properly closing the
 connections it makes.


 I did, and the problem did not go away. Open file count still increasing.

 What if you remove the command-line switch
 -Dcom.sun.management.jmxremote.port=redacted
 ?

 (just trying to figure out what these sockets are..)

 Also, what does
 netstat -pan | grep tomcat pid
 have to say ?


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


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


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


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


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



Re: File leak in 7.0.23?

2011-12-31 Thread Pid *
On 31 Dec 2011, at 20:05, Janne Jalkanen janne.jalka...@ecyrd.com wrote:

 What if you remove the command-line switch
 -Dcom.sun.management.jmxremote.port=redacted
 ?

 No effect.

 Also, what does
 netstat -pan | grep tomcat pid
 have to say ?

 Nothing unusual (i.e. stuff I wouldn't expect) or different from the other 
 instances: Database connections, listening on 8080, etc.

 It looks like 7.0.2021 have constantly a couple of FDs open that are in the 
 can't identify protocol -domain; with .22 the number increases slowly, and 
 with .23 it increases a bit more rapidly.  The rate of change apparently 
 seems to correlate to the number of requests served by Tomcat.

If you take heap dumps can you see an Increase in the number of sockets?


p


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


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



Re: help analyzing thread dump for Tomcat 7.0.23 issue

2011-12-31 Thread Pid *
On 31 Dec 2011, at 16:14, Mike Wertheim m...@hyperreal.org wrote:

 I'm using the APR Connector.

 Here's my server.xml:

 ?xml version='1.0' encoding='utf-8'?
 Server port=8005 shutdown=SHUTDOWN

  Listener className=org.apache.catalina.core.AprLifecycleListener
 SSLEngine=on /
  Listener className=org.apache.catalina.core.JasperListener /
  Listener 
 className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
 /

No memory leak prevention listeners?


 GlobalNamingResources
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
  factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /
Resource name=mail/Session auth=Container
  type=javax.mail.Session
  mail.smtp.host=localhost/
  /GlobalNamingResources

  Service name=Catalina
Connector port=8080 protocol=HTTP/1.1 URIEncoding=utf-8
maxKeepAliveRequests=3 keepAliveTimeout=3000
redirectPort=8443 /

Connector port=8443 URIEncoding=utf-8
maxKeepAliveRequests=3 keepAliveTimeout=3000
scheme=https secure=true SSLEnabled=true
SSLCertificateFile=/home/user/ssl/2010.www.surfcanyon.com.crt
SSLCertificateKeyFile=/home/user/ssl/www.surfcanyon.com.key
SSLCertificateChainFile=/home/user/ssl/intermediateCA.cer
clientAuth=false sslProtocol=TLS/

Can you configure an Executor?


p

Engine name=Catalina defaultHost=localhost
  Realm className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase/
  Host name=localhost  appBase=webapps unpackWARs=true
 autoDeploy=true
Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs prefix=localhost_access_log. suffix=.txt
 pattern=%I %t %U %T resolveHosts=false/
  /Host
/Engine
  /Service
 /Server


 On Sat, Dec 31, 2011 at 5:39 AM, Pid p...@pidster.com wrote:
 On 30/12/2011 02:01, Mike Wertheim wrote:
 I have an app that runs on Tomcat 7.0.21 and APR 1.4.7 just fine.  The
 app serves both SSL and non-SSL traffic.  SSL traffic makes up roughly
 1% of the overall traffic.  The Connectors for SSL and non-SSL both
 use the default value (200) for maxThreads.

 When I try to run the app on Tomcat 7.0.23 (with the same server.xml,
 context.xml and web.xml) and APR 1.4.7, the app slowly grinds to a
 halt after running on a live production server for about a day.

 I took heap dumps of the app on both 7.0.21 and 7.0.23 and don't see
 any significant difference in memory usage.  Memory seems to be fine.

 I did a stack dump on 7.0.23 when it was in its messed up state.  No
 threads are blocked on critical sections of my app.

 For the port 8080 connector, there are 196 threads in waiting on
 condition and 4 threads in runnable.

 For the port 8443 connector, there are 81 threads in waiting on
 condition and 119 threads in runnable.

 I don't know how to interpret this data, since I'm not really clear on
 what the difference is between runnable and waiting on condition.
 Do these numbers seem normal, or are they perhaps giving a clue as to
 what the underlying problem might be?

 Which Connector are you using?

 Can you please remove the XML comments and obscure username/password/ip
 addresses if applicable in your server.xml and then post it inline here?


 p

 --

 [key:62590808]


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


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



Re: Odd NIO connector behavior

2011-12-29 Thread Pid
On 29/12/2011 17:27, Matthew Tyson wrote:
 On Wed, Dec 28, 2011 at 6:22 PM, Matthew Tyson
 matthewcarlty...@gmail.comwrote:
 
 On Wed, Dec 28, 2011 at 8:58 AM, Stefan Mayr ste...@mayr-stefan.dewrote:

 Am 28.12.2011 10:04, schrieb ma...@apache.org:

  Matthew Tysonmatthewcarltyson@gmail.**com matthewcarlty...@gmail.com
  wrote:

  That's right, there is an f5 load balancer.  The valve is used to keep
 track of whether the request was via HTTPS or not.


 What happens if you go direct to Tomcat and bypass the F5?

  tcpdump seems to confirm the same.  What are you thinking?


 Probably, like me, that the F5 isn't handling the Comet requests
 correctly.


 This is what I would guess. We have a loadbalancing device that handles n
 client-lb connections with m lb-server connections in its HTTP mode. There
 we have to switch to TCP proxy mode to keep 1:1 relations.

 Your F5 is where to do start crosschecking with tcpdump: client - F5 vs
 F5 - server

  Stefan


 You think its possible that multiplexing or some load-balancer config
 would cause the two observed issues:

 1) When the custom valve is in use, zombie service() executions continue
 with no actual inbound requests
 2) Inbound requests are being replied to with blank 200s, without ever
 executing the service method.

 Thanks,

 Matt Tyson


 I think maybe I wasn't clear before.  I am running ngrep on the server,
 inside the f5.
 
 F5 - ngrep - tomcat
 
 So the behavior I am seeing is inbound traffic from the F5 to Tomcat, then
 outbound traffic from Tomcat (empty 200s that don't execute the servlet
 service) back to the F5.  It seems very unlikely that F5 configuration is
 the cause there.

Can you post the CometdServlet code?


p



-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Breadcrumbs Tomcat 7.0.11

2011-12-28 Thread Pid *
On 28 Dec 2011, at 03:50, Kiran Badi ki...@poonam.org wrote:

 Hi ,

 Just wanted to check if Tomcat has any packages that can be used for building 
 Breadcrumbs.

No, it's an app server not a set of libraries.


 I think some j2ee servers provide some inbuilt packages which can be used for 
 building breadcrumbs.

Never heard of that.


 I would be helpful if someone can give some suggestions here.I am working on 
 plain JSP/Servlets and having hard time implementing breadcrumbs.

Search google for JSTL.


p


 - Kiran

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


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



Re: [OT] ClassFormatException: Invalid constant pool reference

2011-12-28 Thread Pid *
On 28 Dec 2011, at 10:25, Denis Ivanov denis.iva...@live.com wrote:


 Date: Tue, 27 Dec 2011 16:56:41 -0500
 From: ch...@christopherschultz.net
 To: users@tomcat.apache.org
 Subject: Re: [OT] ClassFormatException: Invalid constant pool reference

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Denis,

 On 12/27/11 7:53 AM, Denis Ivanov wrote:
 Hey, I have an Amazon Enterprise Linux (EC2) version
 2.6.35.11-83.9.amzn1.i686 (architecture i386) with Java JM version
 1.6.0_20-b20 (Vendor Sun Microsystems Inc.) and Apache Tomcat
 version 7.0.19 with Catalina.

 I'm trying to deploy GlobziWebApplication.war and it was working a
 few days ago but now it gives me error 404 when I try to access
 the web service and logs/catalina.out says

Do you have any Tomcat JARs in your application?


p

 Error deploying web application archive GlobziWebApplication.war
 org.apache.tomcat.util/.bcel.classfile.ClassFormatException:Invalid


 constant pool reference: 12034. Constant pool size is: 1486

 I wouldn't expect a ClassFormatException to return a 404. Are you sure
 that the two are related?
 Well if it can't deploy the web application then it can't serve it, thus the 
 404.

 Also, the above has a / in the package name which is illegal. Are
 you sure you copy/pasted that properly?
 Oops, the / is a mistake.

 And then it lists a bunch of instances where this occurs, like at
 org.apache.tomcat.util.bcel.classfile.ConstantPool.getConstant(ConstantPool.java:184).

 This

 is called a stack trace, and isn't a bunch of instances where it
 occurs: it's a specific call trace that describes what the thread was
 doing at the time the exception was thrown.

 Can you post the full stack trace?
 Dec 27, 2011 8:50:26 AM org.apache.catalina.startup.HostConfig checkResources
 INFO: Undeploying context [/GlobziWebApplication]
 Dec 27, 2011 8:50:26 AM org.apache.catalina.startup.HostConfig deployWAR
 INFO: Deploying web application archive GlobziWebApplication.war
 Dec 27, 2011 8:50:26 AM org.apache.catalina.startup.HostConfig deployWAR
 SEVERE: Error deploying web application archive GlobziWebApplication.war
 org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid constant 
 pool reference: 12034. Constant pool size is: 1486
at 
 org.apache.tomcat.util.bcel.classfile.ConstantPool.getConstant(ConstantPool.java:184)
at 
 org.apache.tomcat.util.bcel.classfile.ConstantPool.getConstant(ConstantPool.java:203)
at 
 org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:109)
at org.apache.tomcat.util.bcel.classfile.Code.init(Code.java:86)
at 
 org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:140)
at 
 org.apache.tomcat.util.bcel.classfile.FieldOrMethod.init(FieldOrMethod.java:58)
at org.apache.tomcat.util.bcel.classfile.Method.init(Method.java:72)
at 
 org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:268)
at 
 org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:128)
at 
 org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:1967)
at 
 org.apache.catalina.startup.ContextConfig.processAnnotationsJndi(ContextConfig.java:1914)
at 
 org.apache.catalina.startup.ContextConfig.processAnnotationsJndi(ContextConfig.java:1905)
at 
 org.apache.catalina.startup.ContextConfig.processAnnotationsJndi(ContextConfig.java:1905)
at 
 org.apache.catalina.startup.ContextConfig.processAnnotationsJndi(ContextConfig.java:1905)
at 
 org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1828)
at 
 org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1295)
at 
 org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:896)
at 
 org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:322)
at 
 org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at 
 org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
at 
 org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5103)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at 
 org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:932)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:723)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1363)
at 
 org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:294)
at 
 org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at 
 

Re: MBean InitialContext() Tomcat query- pls help

2011-12-27 Thread Pid *
On 27 Dec 2011, at 11:16, S B sbl...@gmail.com wrote:

 On Tue, Dec 27, 2011 at 4:06 PM, Pid * p...@pidster.com wrote:

 On 27 Dec 2011, at 01:33, S B sbl...@gmail.com wrote:

 On Mon, Dec 26, 2011 at 3:28 PM, Pid * p...@pidster.com wrote:

 On 26 Dec 2011, at 09:50, S B sbl...@gmail.com wrote:

 On Sat, Dec 24, 2011 at 6:29 PM, Pid p...@pidster.com wrote:

 On 23/12/2011 04:57, S B wrote:
 On Thu, Dec 22, 2011 at 8:49 PM, Pid p...@pidster.com wrote:

 On 22/12/2011 10:34, Konstantin Kolinko wrote:
 2011/12/20 S B sbl...@gmail.com:
 Hi,

 I created and deployed an MBean in my tomcat. It uses datasource
 to
 connect
 to DB.

 My questions is:

 When I create InitialContext() inside MBean's constructor and pass
 the
 envContext to DBManager class to lookup datasource it works fine.
 However
 when I create InitialContext() in DBManager  class, it fails.

 IIRC what InitialContext() sees as its environment highly depends
 on
 what classloader is active. That is TCCL =
 Thread.getContextClassLoader().

 So while it is run from within web application your TCCL = your
 webapp's classloader.

 When it is invoked from jconsole it might be a separate Thread, not
 related to your web application.


 Like he ^^^ said.  :)


 p


 --

 [key:62590808]


 Hi Pid/Konstantin,

 yes you are right. I just verified it. When it is invoked from
 jconsole,
 the classloader is: sun.misc.Launcher$AppClassLoader@61e63e3d
 and when it is run within a web application the clasloader is
 WebAppClassloader.

 So, how can I force it to use webapp classloader during new
 InitialContext() while invoking from jconsole
 One possible way is to reuse the initialContext created during server
 startup. (pass it as param during invocation from jconsole).

 Is there a smarter way ??

 I am a bit concerned about how you are registering the bean inside the
 bean's own constructor.  I am not clear on how you are subsequently
 unregistering that bean, before the reloading operation - and I am not
 at all clear what the purpose of reloading is anyway.

 Is there a reason that the MBean itself needs to be recreated?

 Bear in mind that you are attempting to re-initialise the MBean, while
 you are still using it.  This does not seem like a good idea to me.

 I would suggest that you either have a separate Manager MBean that
 does
 the reloading, or just have the reload method call the actual code on
 the DB, without re-initialising the bean.


 p


 --

 [key:62590808]


 Hi,

 un-registering of mbean doesn't happen until servlet's destroy method
 is
 called.
 Actually, registration of bean happen only once, ie during server
 startup.
 This time mbean's constructor is called and it is registered with MBean
 server.
 (I was wrong earlier when I said, constructor is called on each
 invocation
 of reload() method from jconsole. sorry about that. i was lill
 confused.)

 MBean is never re-created. It is created only once and registered only
 once.

 actual flow is:

 click reload() on jconsole gui.
 *it causes constructor of MBeanImpl to run. (verified from logs.)*  --
 *Wrong.
 pls disregard this statement.*
 calls reload() defined in MBeanImpl.
 calls DBManager.reload()
 inside DBManager.reload() it fails at InitialContext initContext = new
 InitialContext();
 the exception is  -  javax.naming.NoInitialContextException: Cannot
 instantiate class: org.apache.naming.java.javaURLContextFactory [Root
 exception is java.lang.ClassNotFoundException:
 org.apache.naming.java.javaURLContextFactory]

 OK, but what is the purpose of DBManager.reload()?


 p

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



 Hi Pid, Marry Christmas !!!
 Purpose of DBManager.reload() is to load some application specific data
 from DB. Pls don't consider reload() as reload of MBean.
 reload() can better be renamed as loadData().

 when I invoke reload() from jconsole my application is suppose to make a
 db
 connection and load app specific data from database.

 OK, so why not retain a reference to the DataSource that you're
 getting the connection from?


 p

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


 yes. thats one possible workaround. I followed similar approach and
 retailed reference of Context (which i used to get datasource during
 invocation from jconsole).
 This approach works.
 And as Konstantin earlier said it is because of different class loaders
 that I can't do new InitialContext() during invocation from jconsole.
 *My question is:  how can I force it to use webapp classloader during new
 InitialContext() while invoking from jconsole.*

 is there a way to do something like
 InitialContext.useClassLoader(webaappClassLoader)
 ?
 During server startup InitialContext() used

Re: Security Constraints With URL Rewrite filter

2011-12-27 Thread Pid *
On 26 Dec 2011, at 22:27, Jerry Malcolm 2ndgenfi...@gmail.com wrote:

 Half of the site is protected, and the other half is not, and some pages
 have moved from unprotected to protected at the whim of the client.

How on earth are you supposed to meet all of these requirements?

If you want to have a sane security scheme then you will have to make
it clear to your client that all things are not possible at the same
time and they will have to choose from a list of compromises.

Right now you are up against limitations that you are imposing on
yourself. We can't fix that.

If you can't simplify the requirement then you will need a more
complex security layer. You can either write this yourself, or use an
existing component like Spring Security*.

It is not too hard to write a Filter based controller/router with
integrated security. If you were to embark on this, I would recommend
you take a thorough look at what you have already and consider what
you can reuse and what you can't - you are effectively working to a
whole new requirement.


p

* Disclaimer: I work for SpringSource.



 The
 client has simply stated clean URLs.  I have argued that point, and
 lost.  So independent of valid substantiation for the requirement, it is
 what it is, and I'm not getting paid for arguing that point.

 I know I could protect all of the inbound URL aliases.  But first of all,
 it defeats the whole modularity design for my system.  Roles are webapp
 specific and definitions are contained in the web.xml file, and are folder
 based.  If I protect the inbound urls, I now have to have an entry for
 every page in every web context all listed in the router filter web app
 that sits at / instead of contained with the webapp web.xml.  This is a
 maintenance nightmare and a recipe for disaster when one page is
 accidentally omitted from protection.

 I know there are solutions. But every one ends up being baling wire and
 duct tape.  All I want to do is take URL-A and change it to URL-B and have
 it look to all of Tomcat like it came in as URL-B from the user.  I know
 that is basically httpd mod_rewrite.  But as I stated earlier, I have some
 dynamic database-related mappings.  I know little about mod_rewrite.  Is
 there any way to do Apache mod_rewrite with a java application?

 Thanks.

 Jerry

 On Mon, Dec 26, 2011 at 3:16 PM, Terence M. Bandoian tere...@tmbsw.comwrote:

 On 1:59 PM, Pid * wrote:

 On 25 Dec 2011, at 22:03, Jerry Malcolm2ndgenfi...@gmail.com wrote:

 Thanks for the input.  This has turned into something really ugly.  Let
 me
 go back and summarize the situation:

 I have an established large application made up of about 10 separate
 webapps (contexts) to keep it modular.  Within each context there are 3-5
 user roles with varying authority.  I organize the jsps in each webapp
 based on roles and then set the security constraint to be, for example,

   -- for webapp ABC
  -- 'ABCadmin' role for /jsp/admin/*.jsp,
  --'ABCoperator' role for /jsp/operator/*.jsp in the ABC webapp.

 Likewise, for webapp XYZ
  -- 'XYZadmin' role for /jsp/admin/*.jsp in the XYZ webapp,
  -- etc, etc

 This has worked fine for years and I have sold this to the client as
 being
 highly secure.  No problems.

 Now, the client's SEO advisor has told them that they have to get rid of
 the 'geeky stuff' like /ABC/jsp/guest/aa.jsp in the URLs and replace
 them with SEO-friendly 1-word URLs.

 Argh. 99% of SEO types = snake oil salesmen.

 Next they'll be organising back link swaps with entirely unrelated
 other websites (who happen to be their clients).


 So that requirement has officially
 flowed downstream to me

 May I inquire as to why public, indexable URLs are also protected with
 various types of admin access?

 If they need a login to access them, no search engine will be able to
 index them anyway...


 p


 So... I wrote a filter (implements javax.servlet.Filter) that takes
 SEO-friendly words in the URL and map them to a particular context and
 path
 to the appropriate JSP and uses a RequestDispatcher to forward the
 request.  I have the filter installed in a special webapp that is mapped
 to
 / and therefore will receive all requests to the host.  In the filter I
 look up the mappings and then use cross-context functionality to route to
 the appropriate context/path.  No problems with the filter routing as far
 as getting the request to the intended target.

 Example:  /showPlasmaTVs  =
 /webAppContext1/jsp/user/**products.jsp?productSearch=**plasma

 I understand from this discussion that I now have zero security role
 protection.  I understand why.  But that doesn't solve the problem.

 It appears that I have no really good options now:

 1) make SEO happy and discard security
 2) make security happy and discard SEO requirements
 3) make everything a redirect which probably is the same as #2 since
 URLs are now exposed
 4) write code myself to basically re-implement the entire

Re: MBean InitialContext() Tomcat query- pls help

2011-12-27 Thread Pid *
On 27 Dec 2011, at 01:33, S B sbl...@gmail.com wrote:

 On Mon, Dec 26, 2011 at 3:28 PM, Pid * p...@pidster.com wrote:

 On 26 Dec 2011, at 09:50, S B sbl...@gmail.com wrote:

 On Sat, Dec 24, 2011 at 6:29 PM, Pid p...@pidster.com wrote:

 On 23/12/2011 04:57, S B wrote:
 On Thu, Dec 22, 2011 at 8:49 PM, Pid p...@pidster.com wrote:

 On 22/12/2011 10:34, Konstantin Kolinko wrote:
 2011/12/20 S B sbl...@gmail.com:
 Hi,

 I created and deployed an MBean in my tomcat. It uses datasource to
 connect
 to DB.

 My questions is:

 When I create InitialContext() inside MBean's constructor and pass
 the
 envContext to DBManager class to lookup datasource it works fine.
 However
 when I create InitialContext() in DBManager  class, it fails.

 IIRC what InitialContext() sees as its environment highly depends on
 what classloader is active. That is TCCL =
 Thread.getContextClassLoader().

 So while it is run from within web application your TCCL = your
 webapp's classloader.

 When it is invoked from jconsole it might be a separate Thread, not
 related to your web application.


 Like he ^^^ said.  :)


 p


 --

 [key:62590808]


 Hi Pid/Konstantin,

 yes you are right. I just verified it. When it is invoked from
 jconsole,
 the classloader is: sun.misc.Launcher$AppClassLoader@61e63e3d
 and when it is run within a web application the clasloader is
 WebAppClassloader.

 So, how can I force it to use webapp classloader during new
 InitialContext() while invoking from jconsole
 One possible way is to reuse the initialContext created during server
 startup. (pass it as param during invocation from jconsole).

 Is there a smarter way ??

 I am a bit concerned about how you are registering the bean inside the
 bean's own constructor.  I am not clear on how you are subsequently
 unregistering that bean, before the reloading operation - and I am not
 at all clear what the purpose of reloading is anyway.

 Is there a reason that the MBean itself needs to be recreated?

 Bear in mind that you are attempting to re-initialise the MBean, while
 you are still using it.  This does not seem like a good idea to me.

 I would suggest that you either have a separate Manager MBean that does
 the reloading, or just have the reload method call the actual code on
 the DB, without re-initialising the bean.


 p


 --

 [key:62590808]


 Hi,

 un-registering of mbean doesn't happen until servlet's destroy method is
 called.
 Actually, registration of bean happen only once, ie during server
 startup.
 This time mbean's constructor is called and it is registered with MBean
 server.
 (I was wrong earlier when I said, constructor is called on each
 invocation
 of reload() method from jconsole. sorry about that. i was lill confused.)

 MBean is never re-created. It is created only once and registered only
 once.

 actual flow is:

 click reload() on jconsole gui.
 *it causes constructor of MBeanImpl to run. (verified from logs.)*  --
 *Wrong.
 pls disregard this statement.*
 calls reload() defined in MBeanImpl.
 calls DBManager.reload()
 inside DBManager.reload() it fails at InitialContext initContext = new
 InitialContext();
 the exception is  -  javax.naming.NoInitialContextException: Cannot
 instantiate class: org.apache.naming.java.javaURLContextFactory [Root
 exception is java.lang.ClassNotFoundException:
 org.apache.naming.java.javaURLContextFactory]

 OK, but what is the purpose of DBManager.reload()?


 p

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



 Hi Pid, Marry Christmas !!!
 Purpose of DBManager.reload() is to load some application specific data
 from DB. Pls don't consider reload() as reload of MBean.
 reload() can better be renamed as loadData().

 when I invoke reload() from jconsole my application is suppose to make a db
 connection and load app specific data from database.

OK, so why not retain a reference to the DataSource that you're
getting the connection from?


p

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



Re: ClassFormatException: Invalid constant pool reference

2011-12-27 Thread Pid *
On 27 Dec 2011, at 12:53, Denis Ivanov denis.iva...@live.com wrote:


 Hey, I have an Amazon Enterprise Linux (EC2) version 
 2.6.35.11-83.9.amzn1.i686 (architecture i386) with Java JM version 
 1.6.0_20-b20 (Vendor Sun Microsystems Inc.) and Apache Tomcat version 7.0.19 
 with Catalina.
 I'm trying to deploy GlobziWebApplication.war and it was working a few days 
 ago but now it gives me error 404 when I try to access the web service and 
 logs/catalina.out says
 Error deploying web application archive GlobziWebApplication.war 
 org.apache.tomcat.util/.bcel.classfile.ClassFormatException:Invalid constant 
 pool reference: 12034. Constant pool size is: 1486
 And then it lists a bunch of instances where this occurs, like at 
 org.apache.tomcat.util.bcel.classfile.ConstantPool.getConstant(ConstantPool.java:184).
 What is Invalid constant pool reference?
 GlobziWebApplication.war was compiled using NetBeans 7.0.1.
 Help me fix this.

Please.

 Thanks.

Are you compiling in netbeans against a different version of Tomcat?

Can you use the latest version?


p

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



Re: Tomcat 6.0.35 : Cluster and new node

2011-12-27 Thread Pid *
On 26 Dec 2011, at 14:33, Cédric SAMSON cedric.sam...@adeuxi.com wrote:

 Hi all,


 Context :
  I have a cluster with 2 nodes (both on linux).

  * The master node is configured as below : *

 Engine name=Catalina defaultHost=localhost jvmRoute=Tomcat-1
 Realm className=org.apache.catalina.realm.UserDatabaseRealm 
 resourceName=UserDatabase/

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

 Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster 
 channelSendOptions=8

 Manager className=org.apache.catalina.ha.session.DeltaManager
   expireSessionsOnShutdown=false
   notifyContainerListenersOnReplication=true
   notifySessionListenersOnReplication=true
   notifyListenersOnReplication=true/

 Channel className=org.apache.catalina.tribes.group.GroupChannel

 Membership className=org.apache.catalina.tribes.membership.McastService
address=228.0.0.3
port=45566
frequency=500
dropTime=3000/
 Receiver className=org.apache.catalina.tribes.transport.nio.NioReceiver
  address=192.168.30.51
  port=3100
  autoBind=100
  selectorTimeout=5000
  maxThreads=6/

 Sender 
 className=org.apache.catalina.tribes.transport.ReplicationTransmitter
 Transport 
 className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/
 /Sender
 Interceptor 
 className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector/
 Interceptor 
 className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor/
 Interceptor 
 className=org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor/
 /Channel
 Valve className=org.apache.catalina.ha.tcp.ReplicationValve filter= 
 statistics=true/
 Valve className=org.apache.catalina.ha.session.JvmRouteBinderValve/

 Deployer className=org.apache.catalina.ha.deploy.FarmWarDeployer
tempDir=/usr/local/tomcat/webapps/tempdir
deployDir=/usr/local/tomcat/webapps/
watchDir=/usr/local/tomcat/watchdir/
watchEnabled=true/

 ClusterListener 
 className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener/
 ClusterListener 
 className=org.apache.catalina.ha.session.ClusterSessionListener/

 /Cluster

 /Host
 /Engine

  * The slave node is configured as below : *

The term 'slave' is an odd one to use here.


 Engine name=Catalina defaultHost=localhost jvmRoute=Tomcat-1
 Realm className=org.apache.catalina.realm.UserDatabaseRealm 
 resourceName=UserDatabase/

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

 Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster 
 channelSendOptions=8

 Manager className=org.apache.catalina.ha.session.DeltaManager
   expireSessionsOnShutdown=false
   notifyContainerListenersOnReplication=true
   notifySessionListenersOnReplication=true
   notifyListenersOnReplication=true/

 Channel className=org.apache.catalina.tribes.group.GroupChannel

 Membership className=org.apache.catalina.tribes.membership.McastService
address=228.0.0.3
port=45566
frequency=500
dropTime=3000/
 Receiver className=org.apache.catalina.tribes.transport.nio.NioReceiver
  address=192.168.30.54
  port=3100
  autoBind=100
  selectorTimeout=5000
  maxThreads=6/

 Sender 
 className=org.apache.catalina.tribes.transport.ReplicationTransmitter
 Transport 
 className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/
 /Sender
 Interceptor 
 className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector/
 Interceptor 
 className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor/
 Interceptor 
 className=org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor/
 /Channel
 Valve className=org.apache.catalina.ha.tcp.ReplicationValve filter= 
 statistics=true/
 Valve className=org.apache.catalina.ha.session.JvmRouteBinderValve/

 Deployer className=org.apache.catalina.ha.deploy.FarmWarDeployer
tempDir=/usr/local/tomcat/webapps/tempdir
deployDir=/usr/local/tomcat/webapps/
watchDir=/usr/local/tomcat/watchdir/
watchEnabled=false/

 ClusterListener 
 className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener/
 ClusterListener 
 className=org.apache.catalina.ha.session.ClusterSessionListener/

 /Cluster

 /Host
 /Engine

 All works fine.

 I try 

Re: Multiple contexts within a single host not being loaded correctly upon Tomcat restart.?

2011-12-27 Thread Pid *
On 27 Dec 2011, at 13:19, Konstantin Kolinko knst.koli...@gmail.com wrote:

 2011/12/27 Edwards, Dominic dominic.edwa...@logica.com:


 Platform Details:
 -
 Tomcat 5.5.28

 Old..
 And 5.5.x branch as a whole is EOL in less than a year.

 Operating System: RedHat Enterprise 5


 Problem
 ---

 Tomcat appears to be mismanaging my web contexts after a restart. It happens 
 only sometimes and not others.

 I have the following context records in my server.xml:

 Host name=mysite.com appBase=/home/myaccount/public_html/mysite.com

This appBase path, above...


 unpackWARs=true autoDeploy=true xmlValidation=false 
 xmlNamespaceAware=false

 deployOnStartup=true
 Aliaswww.mysite.com/Alias

 Context path= reloadable=true 
 docBase=/home/myaccount/public_html/mysite.com crossContext=true

... is the same as the docBase path, above and...



 Context elements in server.xml are explicitly discouraged. The
 recommended practice is to place them into separate XML files.

 context-param
  param-nameSharedSessiondataContext/param-name
  param-value/cms/param-value
/context-param
/Context

 Context path=/cms reloadable=true 
 docBase=/home/myaccount/public_html/mysite.com crossContext=true

... Is the same as this docBase path here too.

Is this exactly as you have it, or is it a typo?

If it is accurate it is a thoroughly broken configuration and will
mean that every directory in there is deployed as an application.


p


 If you configure a docBase explicitly, it MUST be outside of appBase.
 Your configuration is broken because of it.

 context-param
  param-nameSharedSessiondataContext/param-name
  param-value/cms/param-value
/context-param
/Context
 /Host

 This represents my website and a CMS for the website, the cms being in a 
 subdirectory of the main website's root directory. Before you ask the 
 configuration was originally

 designed to enable the sharing of session object data between the two 
 contexts.

 The problem is that sometimes when Tomcat is restarted these contexts are 
 confused. At other times the restart does not encounter the problem which is 
 why the cause remains a

 mystery to me that I hope someone can help with.



 Symptoms
 

 If I visit the CMS URL

 http://www.mysite.com/cms/ (web page is /www/mysite.com/cms/index.jsp)

 I see the webpage I would expect to see when I visit

 http://www.mysite.com/ (web page is /www/mysite.com/index.jsp)

 If I visit the main URL

 http://www.mysite.com/ (web page is /www/mysite.com/index.jsp)

 I see the main site just as I would expect so it appears sometimes both 
 contexts are pointing to the same URL.




 Has anyone ever experienced this kind of irregular behaviour or know what 
 might be the cause? As I say this happens from time to time - sometimes and 
 not others even though

 Tomcat starts up with the same configuration.


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


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



Re: Tomcat HTTPS Connector Stops working after an hour

2011-12-27 Thread Pid *
On 27 Dec 2011, at 10:48, Saravanan L saravan...@te-soft.com wrote:

 3. A 504 response code is a gateway timeout. Tomcat does not issue this
 on its own. Either you have a proxy in front of Tomcat or your
 application is returning this value.

 A. Yes the proxy relayed this message,  it seems the tomcat did not respond 
 with any message at all.

 looks like 200 idle threads to me.

 In comet idle threads are fine rights.

Idle threads do not inherently represent a problem with any of the
Connectors. It just means they have no work to do.


 Thats how comet/nio works right. Please correct me on this.

I don't know what you mean by this.

When you stop getting responses are you still connecting via a proxy
or directly to Tomcat?

Is the previous thread dump taken shortly after Tomcat stopped
responding, or before?


p


 On 12/27/2011 4:03 PM, Mark Thomas wrote:
 On 27/12/2011 08:55, Saravanan L wrote:
 Tried netstat. 443 is listening, but I cannot connect to it.
 I assume it shows no open connections either.

 Secondly Thread dump - I could not find any signs of problem or anything
 relative to the current issue in the threaddump [Please find the
 threaddump in my previous post].
 Yep, that looks like 200 idle threads to me.


 Looking back through this thread I see a number of most likely unrelated
 issues being treated as the same problem.

 Reviewing the thread:

 1. acceptCount=1 is a crazily high number. That you see odd effects
 with this does not surprise me. acceptCount is only for handling
 infrequent, short, very high spikes in load.

 2. maxThreads=5000 is very high. Given that you handled ~10k requests in
 2 hours it appears that maxThreads should be reduced by several orders
 of magnitude.

 3. A 504 response code is a gateway timeout. Tomcat does not issue this
 on its own. Either you have a proxy in front of Tomcat or your
 application is returning this value.

 4. There are settings in your server.xml that were dropped a couple of
 versions ago.


 I suggest the following:
 - restore the threadpool and acceptcount defaults
 - remove the old settings


 Run your tests and then diagnose the fault that appears. If you need
 pointers, ask here.


 Mark

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




 --
 Regards
 *Saravanan.L*

 This message and any attachment(s) contained here are information that is 
 confidential, proprietary to TE Software Services and its customers. Contents 
 may be privileged or otherwise protected by law. The information is solely 
 intended for the individual or the entity it is addressed to. If you are not 
 the intended recipient of this message, you are not authorized to read, 
 forward, print, retain, copy or disseminate this message or any part of it. 
 If you have received this e-mail in error, please notify the sender 
 immediately by return e-mail and delete it from your computer.

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



Re: Tomcat 6.0.35 : Cluster and new node

2011-12-27 Thread Pid *
On 27 Dec 2011, at 12:07, Cédric SAMSON cedric.sam...@adeuxi.com wrote:

 Yes I tried and it works fine, but I just want all is automatic.

FarmWarDeployer doesn't do that.
It is a push mechanism rather than a repository of applications queued
for deployment.


p


 I mean, a machine crash, we have to change it.
 The new machine has :

 1. the same IP
 2. the same name
 3. the same tomcat configuration (but without the war files already
   deployed)

 as the previous machine (in order to not restart the load balancer and
 not interrupt the service).

 The best for me is that all the war in the watchdir of the master node
 (the one with watchEnabled=true ) are deployed in this new machine
 because the contexts don't yet exist on this node.
 It's only for machine replacement purpose.

 For a real new node, we are force to reboot the cluster after
 declaring the new node in the balancer.

 Thanks for helping

 Le 27/12/2011 12:09, Pid * a écrit :
 On 26 Dec 2011, at 14:33, Cédric SAMSONcedric.sam...@adeuxi.com  wrote:

 Hi all,


 Context :
  I have a cluster with 2 nodes (both on linux).

  * The master node is configured as below : *

 Engine name=Catalina defaultHost=localhost jvmRoute=Tomcat-1
 Realm className=org.apache.catalina.realm.UserDatabaseRealm 
 resourceName=UserDatabase/

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

 Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster 
 channelSendOptions=8

 Manager className=org.apache.catalina.ha.session.DeltaManager
   expireSessionsOnShutdown=false
   notifyContainerListenersOnReplication=true
   notifySessionListenersOnReplication=true
   notifyListenersOnReplication=true/

 Channel className=org.apache.catalina.tribes.group.GroupChannel

 Membership className=org.apache.catalina.tribes.membership.McastService
address=228.0.0.3
port=45566
frequency=500
dropTime=3000/
 Receiver className=org.apache.catalina.tribes.transport.nio.NioReceiver
  address=192.168.30.51
  port=3100
  autoBind=100
  selectorTimeout=5000
  maxThreads=6/

 Sender 
 className=org.apache.catalina.tribes.transport.ReplicationTransmitter
 Transport 
 className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/
 /Sender
 Interceptor 
 className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector/
 Interceptor 
 className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor/
 Interceptor 
 className=org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor/
 /Channel
 Valve className=org.apache.catalina.ha.tcp.ReplicationValve filter= 
 statistics=true/
 Valve className=org.apache.catalina.ha.session.JvmRouteBinderValve/

 Deployer className=org.apache.catalina.ha.deploy.FarmWarDeployer
tempDir=/usr/local/tomcat/webapps/tempdir
deployDir=/usr/local/tomcat/webapps/
watchDir=/usr/local/tomcat/watchdir/
watchEnabled=true/

 ClusterListener 
 className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener/
 ClusterListener 
 className=org.apache.catalina.ha.session.ClusterSessionListener/

 /Cluster

 /Host
 /Engine

  * The slave node is configured as below : *
 The term 'slave' is an odd one to use here.


 Engine name=Catalina defaultHost=localhost jvmRoute=Tomcat-1
 Realm className=org.apache.catalina.realm.UserDatabaseRealm 
 resourceName=UserDatabase/

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

 Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster 
 channelSendOptions=8

 Manager className=org.apache.catalina.ha.session.DeltaManager
   expireSessionsOnShutdown=false
   notifyContainerListenersOnReplication=true
   notifySessionListenersOnReplication=true
   notifyListenersOnReplication=true/

 Channel className=org.apache.catalina.tribes.group.GroupChannel

 Membership className=org.apache.catalina.tribes.membership.McastService
address=228.0.0.3
port=45566
frequency=500
dropTime=3000/
 Receiver className=org.apache.catalina.tribes.transport.nio.NioReceiver
  address=192.168.30.54
  port=3100
  autoBind=100
  selectorTimeout=5000
  maxThreads=6/

 Sender 
 className=org.apache.catalina.tribes.transport.ReplicationTransmitter
 Transport 
 className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/
 /Sender

Re: 404 Errors for all apps in Tomcat 7.0.23

2011-12-27 Thread Pid *
On 27 Dec 2011, at 15:43, David Hoffer dhoff...@gmail.com wrote:

 I just installed Tomcat 7.0.23 using Windows 64 bit installer and
 deployed a couple apps via the manager application, however when I run
 them I get HTTP Status 404 errors.  However I see that I get the same
 error for the standard default apps, docs, examples, etc.  The only
 URL that works is http://IP:8080/manager/html.

 In the log I see:
 Dec 27, 2011 3:28:29 PM org.apache.catalina.core.StandardHostValve custom
 SEVERE: Exception Processing ErrorPage[errorCode=404,
 location=/WEB-INF/jsp/404.jsp]
 java.lang.NullPointerException

What about before that during startup?


p



at 
 org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:455)
at 
 org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:324)
at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:193)
at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at 
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at 
 org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at 
 org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
at 
 org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

 What do I have to do to enable the apps?

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


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



Re: ClassFormatException: Invalid constant pool reference

2011-12-27 Thread Pid *
On 27 Dec 2011, at 14:15, Denis Ivanov denis.iva...@live.com wrote:


 It was working fine before (Tomcat 7.0.23 on my laptop and 7.0.19 on the 
 server).
 Is there some way to upgrade while preserving the web app configuration?

 From: p...@pidster.com
 Date: Tue, 27 Dec 2011 13:49:39 +
 Subject: Re: ClassFormatException: Invalid constant pool reference
 To: users@tomcat.apache.org

 On 27 Dec 2011, at 12:53, Denis Ivanov denis.iva...@live.com wrote:


 Hey, I have an Amazon Enterprise Linux (EC2) version 
 2.6.35.11-83.9.amzn1.i686 (architecture i386) with Java JM version 
 1.6.0_20-b20 (Vendor Sun Microsystems Inc.) and Apache Tomcat version 
 7.0.19 with Catalina.
 I'm trying to deploy GlobziWebApplication.war and it was working a few days 
 ago but now it gives me error 404 when I try to access the web service and 
 logs/catalina.out says
 Error deploying web application archive GlobziWebApplication.war 
 org.apache.tomcat.util/.bcel.classfile.ClassFormatException:Invalid 
 constant pool reference: 12034. Constant pool size is: 1486
 And then it lists a bunch of instances where this occurs, like at 
 org.apache.tomcat.util.bcel.classfile.ConstantPool.getConstant(ConstantPool.java:184).
 What is Invalid constant pool reference?
 GlobziWebApplication.war was compiled using NetBeans 7.0.1.
 Help me fix this.

 Please.

 Thanks.

 Are you compiling in netbeans against a different version of Tomcat?

 Can you use the latest version?

Please post your answers below the questions to maintain the order of
the conversation.

It was working fine before what?

Are you compiling the JSPs?


p





 p

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



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



Re: Security Constraints With URL Rewrite filter

2011-12-26 Thread Pid *
On 25 Dec 2011, at 22:03, Jerry Malcolm 2ndgenfi...@gmail.com wrote:

 Thanks for the input.  This has turned into something really ugly.  Let me
 go back and summarize the situation:

 I have an established large application made up of about 10 separate
 webapps (contexts) to keep it modular.  Within each context there are 3-5
 user roles with varying authority.  I organize the jsps in each webapp
 based on roles and then set the security constraint to be, for example,

-- for webapp ABC
   -- 'ABCadmin' role for /jsp/admin/*.jsp,
   --'ABCoperator' role for /jsp/operator/*.jsp in the ABC webapp.

 Likewise, for webapp XYZ
   -- 'XYZadmin' role for /jsp/admin/*.jsp in the XYZ webapp,
   -- etc, etc

 This has worked fine for years and I have sold this to the client as being
 highly secure.  No problems.

 Now, the client's SEO advisor has told them that they have to get rid of
 the 'geeky stuff' like /ABC/jsp/guest/aa.jsp in the URLs and replace
 them with SEO-friendly 1-word URLs.

Argh. 99% of SEO types = snake oil salesmen.

Next they'll be organising back link swaps with entirely unrelated
other websites (who happen to be their clients).


 So that requirement has officially
 flowed downstream to me

May I inquire as to why public, indexable URLs are also protected with
various types of admin access?

If they need a login to access them, no search engine will be able to
index them anyway...


p


 So... I wrote a filter (implements javax.servlet.Filter) that takes
 SEO-friendly words in the URL and map them to a particular context and path
 to the appropriate JSP and uses a RequestDispatcher to forward the
 request.  I have the filter installed in a special webapp that is mapped to
 / and therefore will receive all requests to the host.  In the filter I
 look up the mappings and then use cross-context functionality to route to
 the appropriate context/path.  No problems with the filter routing as far
 as getting the request to the intended target.

 Example:  /showPlasmaTVs  =
 /webAppContext1/jsp/user/products.jsp?productSearch=plasma

 I understand from this discussion that I now have zero security role
 protection.  I understand why.  But that doesn't solve the problem.

 It appears that I have no really good options now:

 1) make SEO happy and discard security
 2) make security happy and discard SEO requirements
 3) make everything a redirect which probably is the same as #2 since
 URLs are now exposed
 4) write code myself to basically re-implement the entire functionality of
 Tomcat's security system

 Let's start back from the top maybe I'm approaching the problem
 completely incorrectly.  I have a hard time believing I'm the first Tomcat
 user ever that wants to completely hide ugly URLs and still utilize the
 existing context security role structure.

 I'll start over with the question

 --- I want the user to see the URL:  /showPlasmaTVs

 --  I want it to map internally to:
 /webAppContext1/jsp/user/products.jsp?productSearch=plasma

 -- I would like for it to utilize the existing defined (and tested/proven)
 security mappings that are based on the context/paths of the webapps.

 -- or if I have to write code to modify security handling, I don't want a
 3-month development project writing/testing a security module.

 How should I implement it?

 SURELY other Tomcat users have had this requirement...(?)

 Thx.

 Jerry



 On Thu, Dec 22, 2011 at 4:15 PM, Christopher Schultz 
 ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Jerry,

 On 12/21/11 3:55 PM, Jerry Malcolm wrote:
 The rewrite filter is correctly rewriting the URLs and forwarding
 the requests.

 Any option to redirect? That would solve everything.

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
 Comment: GPGTools - http://gpgtools.org
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAk7zq/UACgkQ9CaO5/Lv0PAd/wCfX2zAQ0PMQqCeogRzEs7WBEmB
 3LcAniZ2m3TWCY7OczBa2zCDv85MzOdc
 =j2sU
 -END PGP SIGNATURE-

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



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



Re: MBean InitialContext() Tomcat query- pls help

2011-12-26 Thread Pid *
On 26 Dec 2011, at 09:50, S B sbl...@gmail.com wrote:

 On Sat, Dec 24, 2011 at 6:29 PM, Pid p...@pidster.com wrote:

 On 23/12/2011 04:57, S B wrote:
 On Thu, Dec 22, 2011 at 8:49 PM, Pid p...@pidster.com wrote:

 On 22/12/2011 10:34, Konstantin Kolinko wrote:
 2011/12/20 S B sbl...@gmail.com:
 Hi,

 I created and deployed an MBean in my tomcat. It uses datasource to
 connect
 to DB.

 My questions is:

 When I create InitialContext() inside MBean's constructor and pass the
 envContext to DBManager class to lookup datasource it works fine.
 However
 when I create InitialContext() in DBManager  class, it fails.

 IIRC what InitialContext() sees as its environment highly depends on
 what classloader is active. That is TCCL =
 Thread.getContextClassLoader().

 So while it is run from within web application your TCCL = your
 webapp's classloader.

 When it is invoked from jconsole it might be a separate Thread, not
 related to your web application.


 Like he ^^^ said.  :)


 p


 --

 [key:62590808]


 Hi Pid/Konstantin,

 yes you are right. I just verified it. When it is invoked from jconsole,
 the classloader is: sun.misc.Launcher$AppClassLoader@61e63e3d
 and when it is run within a web application the clasloader is
 WebAppClassloader.

 So, how can I force it to use webapp classloader during new
 InitialContext() while invoking from jconsole
 One possible way is to reuse the initialContext created during server
 startup. (pass it as param during invocation from jconsole).

 Is there a smarter way ??

 I am a bit concerned about how you are registering the bean inside the
 bean's own constructor.  I am not clear on how you are subsequently
 unregistering that bean, before the reloading operation - and I am not
 at all clear what the purpose of reloading is anyway.

 Is there a reason that the MBean itself needs to be recreated?

 Bear in mind that you are attempting to re-initialise the MBean, while
 you are still using it.  This does not seem like a good idea to me.

 I would suggest that you either have a separate Manager MBean that does
 the reloading, or just have the reload method call the actual code on
 the DB, without re-initialising the bean.


 p


 --

 [key:62590808]


 Hi,

 un-registering of mbean doesn't happen until servlet's destroy method is
 called.
 Actually, registration of bean happen only once, ie during server startup.
 This time mbean's constructor is called and it is registered with MBean
 server.
 (I was wrong earlier when I said, constructor is called on each invocation
 of reload() method from jconsole. sorry about that. i was lill confused.)

 MBean is never re-created. It is created only once and registered only once.

 actual flow is:

 click reload() on jconsole gui.
 *it causes constructor of MBeanImpl to run. (verified from logs.)*  -- *Wrong.
 pls disregard this statement.*
 calls reload() defined in MBeanImpl.
 calls DBManager.reload()
 inside DBManager.reload() it fails at InitialContext initContext = new
 InitialContext();
 the exception is  -  javax.naming.NoInitialContextException: Cannot
 instantiate class: org.apache.naming.java.javaURLContextFactory [Root
 exception is java.lang.ClassNotFoundException:
 org.apache.naming.java.javaURLContextFactory]

OK, but what is the purpose of DBManager.reload()?


p

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



Re: Creating CSR for Purchasing SSL Certificate from VeriSign

2011-12-24 Thread Pid
On 23/12/2011 22:42, Mark Eggers wrote:
 - Original Message -
 
 From: Christopher Schultz ch...@christopherschultz.net
 To: Tomcat Users List users@tomcat.apache.org
 Cc: 
 Sent: Friday, December 23, 2011 2:08 PM
 Subject: Re: Creating CSR for Purchasing SSL Certificate from VeriSign

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Conway,

 On 12/23/11 4:13 PM, Conway Liu wrote:
  Also, if we later add another Tomcat site (with a different domain
  name) on the same Windows 2008 R2 server,  do we have to generate
  another CSR to purchase another SSL certificate?

 Apache httpd and non-APR Tomcat use different certificate storage
 formats: httpd uses a fairly simple PEM file format where you can have
 one or more certs concatenated together in a single file (or
 separately). When using APR with Tomcat, it uses the same format as httpd.

 If you aren't using APR, then the underlying Java environment is
 providing crypto services through a KeyStore which is stored in a
 completely different format.

 The certificates themselves are a standardized format, and you can
 export from one format and import to the other format whenever you
 want. You just need to figure out the right incantations of keytool
 and openssl to make that happen.

 So, have no fear of making a decision now that cannot be undone.

 - -chris
 
 
 One of the things you can do is get a SAN (subject alternate name) 
 certificate with lots of different host names. If you are running everything 
 from one IP address / port (named virtual hosts), this is pretty nice.
 
 Apache HTTPD complains a little about using named virtual hosts for 
 configuration, but it works in practice. It seems that the configuration 
 parsing engine doesn't like this on start up, but it works once running. 
 There's actually a patch in queue to solve that problem.
 
 I suspect that Tomcat using the APR libraries will behave the same. It looks 
 like Java since 1.5 has supported SAN certificates as well, but I've not 
 tried this.
 
 You could experiment a little before purchasing a SAN certificate. I have 
 some links on how to create your own root authority and signed SAN 
 certificates if people are interested.

A note: SSL protects the transport.  In the case of HTTP, this means
that the SSL handshake occurs before the receiving party can see which
host header is in use, because the TCP connection process doesn't
include the DNS name, that is resolved away to IP + port beforehand.

In the case of virtual hosts, this used to mean that an SSL protected
virtual host had to run on its own IP address.

SAN cert support, wildcard certs now provide an alternative, but both
are dependent on their support in browsers (which is improving).


p




-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat HTTPS Connector Stops working after an hour

2011-12-24 Thread Pid
On 23/12/2011 10:52, Saravanan L wrote:
 Please find the dump below.
 
 One more interesting thing I found out, was when I remove
 acceptCount=1 My tomcat 7 works fine.

Note the 'acceptCount' definition:

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

This attribute specifies the size of the queue of requests that are
waiting to be processed, rather than the number of requests that can be
processed.  1 is rather large and may be impacted by the OS own
ability to handle that number of inbound connection requests.

The default is 100.  So your experiment may have just deferred the
occurrence of the same error.


p

 But I had  the same property in tomcat 6 and it worked fine on that.
 
 I believe this property is causing the problem .
 
 Also found out that when it reaches 900 connections with my existing
 connector [See below] the tomcat https [Http works fine] stops
 responding and the browser says 'Connection reset by peer'.
 
 But when acceptCount is removed it works fine.
 
 ---DUMP-
 Full thread dump Java HotSpot(TM) 64-Bit Server VM (14.2-b01 mixed mode):
 
 http-apr-80-exec-10 daemon prio=10 tid=0x7fc5a625d800 nid=0x6a2f
 waiting on condition [0x53e8e000]
java.lang.Thread.State: WAITING (parking)
 at sun.misc.Unsafe.park(Native Method)
 - parking to wait for 0x7fc5bd489cf0 (a
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
 
 http-apr-80-exec-9 daemon prio=10 tid=0x408ca000 nid=0x6a2c
 waiting on condition [0x54b9b000]
java.lang.Thread.State: WAITING (parking)
 at sun.misc.Unsafe.park(Native Method)
 - parking to wait for 0x7fc5bd489cf0 (a
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
 
 http-apr-80-exec-8 daemon prio=10 tid=0x7fc5ac9b9800 nid=0x6a2b
 waiting on condition [0x53c8c000]
java.lang.Thread.State: WAITING (parking)
 at sun.misc.Unsafe.park(Native Method)
 - parking to wait for 0x7fc5bd489cf0 (a
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
 
 http-apr-80-exec-7 daemon prio=10 tid=0x7fc5a63cf800 nid=0x6a1b
 waiting on condition [0x552a2000]
java.lang.Thread.State: WAITING (parking)
 at sun.misc.Unsafe.park(Native Method)
 - parking to wait for 0x7fc5bd489cf0 (a
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
 at
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
 
 at
 java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:358)
 at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:104)
 at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:32)
 at
 java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
 
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
 
 at java.lang.Thread.run(Thread.java:619)
 
 http-apr-80-exec-6 daemon prio=10 tid=0x7fc5a63ce800 nid=0x6a1a
 waiting on condition [0x41984000]
java.lang.Thread.State: WAITING (parking)
 at sun.misc.Unsafe.park(Native Method)
 - parking to wait for 0x7fc5bd489cf0 (a
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
 
 http-apr-80-exec-5 daemon prio=10 tid=0x4039c800 nid=0x6a17
 waiting on condition [0x54696000]
java.lang.Thread.State: WAITING (parking)
 at sun.misc.Unsafe.park(Native Method)
 - parking to wait for 0x7fc5bd489cf0 (a
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
 at
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
 
 at
 java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:358)
 at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:104)
 at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:32)
 at
 java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
 
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
 
 at java.lang.Thread.run(Thread.java:619)
 
 http-apr-80-exec-4 daemon prio=10 tid=0x405c6800 nid=0x69e8
 waiting on condition [0x41883000]
java.lang.Thread.State: WAITING (parking)
 at sun.misc.Unsafe.park(Native Method)
 - parking to wait for 0x7fc5bd489cf0 (a
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
 
 http-apr-443-exec-282 daemon prio=10 tid=0x7fc5b1063000 nid=0x69c1
 waiting on condition [0x54f9f000]
java.lang.Thread.State: TIMED_WAITING (parking)
 at sun.misc.Unsafe.park(Native Method)
 - parking to wait for 0x7fc5bd344e98 (a
 

Re: Tomcat HTTPS Connector Stops working after an hour

2011-12-24 Thread Pid
On 23/12/2011 14:47, Christopher Schultz wrote:
 Saravanan,
 
 On 12/23/11 7:03 AM, Saravanan L wrote:
 Please find the latest thread dump attached with mail.
 
 Tomcat 7 still crashes without acceptCount.  I am wrong on this
 assumption.
 
 The response code is 504. It takes about 2 hours for this occur.
 
 The last status in http-apr-443 (In Server status ) is : 

 Max threads: 5000 

Seems high, as Chris says.

 Current thread count: 249

Can you post your full server.xml please, inline and with all XML
comments/usernames/passwords removed.

 Current thread busy: 2 

Low.

 Keeped alive sockets count: 40 

Hmm?  Where does that come from?

 Max processing time: 300477 ms
 Processing time: 8788.765 s 

Seems low for 2 hours of operation.  Where does that number come from?

 Request count: 9223
 Error count: 783

That's about 10%.  What are those errors, exactly?

 Bytes received: 0.22 MB
 Bytes sent: 5.43 MB

Both of those seem low for 2 hours of operation.

What is your application/server doing?


p


 What happens if you configure your HTTPS connector with fewer max
 threads, say, 50? Does the connector lock-up more quickly? What does
 your load profile look like? Is this observable in a testing
 environment or only in production? If you could set up a simple jmeter
 test against a test webapp, that would be ideal for trying to debug
 this issue.
 
 If you switch to NIO or BIO connector, does Tomcat become more stable,
 or do you experience the same phenomenon?
 
 -chris
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Hosted environment

2011-12-24 Thread Pid
On 23/12/2011 18:46, Mark Eggers wrote:
 - Original Message -
 
 From: Pid * p...@pidster.com
 To: Tomcat Users List users@tomcat.apache.org
 Cc: 
 Sent: Friday, December 23, 2011 9:42 AM
 Subject: Re: Hosted environment

 On 22 Dec 2011, at 18:29, Mark Eggers its_toas...@yahoo.com wrote:

  - Original Message -

  From: r.sriram sri...@rstech.net
  To: Tomcat Users List users@tomcat.apache.org
  Cc:
  Sent: Wednesday, December 21, 2011 5:27 PM
  Subject: Re: Hosted environment

 snip

  Hmm, it certainly does work. I currently have about 100 virtual hosts, 8 
 CATALINA_BASE implementations, and SSL with a SAN Cert. I just finished 
 setting 
 up another instance (took about 15 minutes) to do some application testing.

 The problem is that the OP is using Plesk, which has it's own ideas
 about config file layout.

 In my experience* the related config files are includes in a config
 dir under the same part of the virtual host tree as the httpdocs dir.

 Plesk regenerates some of these every time you update any of the
 configured virtual hosts.

 So we have to get the OP to edit files that won't be overwritten.


 p

 * not particularly recent, but sufficiently painful to be memorable.

  
 
 
 snip
 
 I haven't had (sounds fortunately) any experience with Plesk.
 
 So the OP will have to track down where these include files are and add the 
 appropriate mod_jk directives. It also sounds like he'll have to put the 
 general mod_jk directives directly in the main httpd.conf file.
 
 I guess you could put workers.properties anywhere, as long as it's located 
 properly in the main httpd.conf file.
 
 Ah ha - a little bit of searching does wonders:
 
 
 http://www.vlad-yatsenko.eu/2011/04/plesk-apache-mod_jk-tomcat-good-relationship/
 
 
 With a little bit of correction (and adding the Tomcat virtual hosts), the 
 above link should work.


Yeah, I think vhost.conf is a file that gets regenerated if you use the
Plesk GUI to change vhost settings.


p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


<    1   2   3   4   5   6   7   8   9   10   >