RE: How to Suppress Server Header in the HTTP Response

2007-10-17 Thread Peter Crowther
 From: Jatinder Kaur [mailto:[EMAIL PROTECTED] 
 I am looking for a way to suppress the server header in the 
 HTTP Response. I
 am using Tomcat version 559. Any help is appreciated.

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

See the server parameter - the comment unless you're paranoid, you
won't need this is a bit unfortunate.  While you can't suppress the
server header, you can change it.  How about setting server=Jatinder's
HTTP Server 0.1?

- Peter

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



RE: Connector Compression

2007-10-17 Thread Peter Crowther
 From: Mike Cronin [mailto:[EMAIL PROTECTED] 
 Is there any reason why you would not want to use compression on a
 Connector?

You're trading CPU cycles (running the compression algorithm) for
bandwidth.  I suspect you're also trading a certain amount of RAM (some
extra buffers), though I haven't checked or measured how much so I may
be talking out of my hat (as usual).  Finally, you may be increasing the
time to the first byte arriving back at the client, as you're increasing
the amount of output the client has to generate before the first segment
of the response is sent.  If your servers are CPU-bound, you may not
have the spare cycles; if you're tight on RAM, check whether the
compression increases the memory use.  If you have timing requirements,
check that a system with compression enabled still meets them.

All that said, a typical business application almost certainly has
spare CPU, some spare RAM and no tight timing constraints on the first
byte being returned - it's generally bandwidth out of the server and
querying the database that are the limiting factors.

- Peter

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



Catalina message

2007-10-17 Thread Pamarthi, Ramakrishna
 Hi All,

We are getting the following message in catalina.out file.

Oct 17, 2007 11:56:08 AM org.apache.struts.util.PropertyMessageResources
init
INFO: Initializing, config='org.apache.struts.taglib.html.LocalStrings',
returnNull=true

Any idea? Why?

Best Regards,
RK

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

Re: Catalina message

2007-10-17 Thread David Delbecq
This message does not come from Tomcat but from a thrid party library
(struts) you installed in one of your webapplications.
This is just part of struts startup messages. If you have any question
regarding struts, i suggest you contact the struts mailing list.



En l'instant précis du 17/10/07 09:42, Pamarthi, Ramakrishna s'exprimait
en ces termes:
  Hi All,

 We are getting the following message in catalina.out file.

 Oct 17, 2007 11:56:08 AM org.apache.struts.util.PropertyMessageResources
 init
 INFO: Initializing, config='org.apache.struts.taglib.html.LocalStrings',
 returnNull=true

 Any idea? Why?

 Best Regards,
 RK

   
 

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


-- 
http://www.devlog.be (a belgian developer's logs)



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



Connector http, ajp and Context availability

2007-10-17 Thread setecastronomy

I'm using Tomcat 6.0 with both http and ajp connectors.
They work fine and all the available contexts can be reached with those
connectors.
What I would like to do is to allow to access a limited number of contexts
only via ajp connector.
In the connector configuration I don't have anything to filter the incoming
requests considering the context they are directed.
Have I to use muliple Service elements ? Doing so I could put one and only
connector in a service element with an associated engine, host and a list of
context. Is this the right way ?
BTW: I have published applications putting files with the context elements
in the dir conf/Catalina/localhost. If I create a second service and a
second engine named Brush where do I put the file with the context ?

Thanks
Filippo
 
-- 
View this message in context: 
http://www.nabble.com/Connector-http%2C-ajp-and-Context-availability-tf4638852.html#a13249100
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: java.library.path / Unsatisfied Link Error problem with Linux Tomcat 5.5

2007-10-17 Thread Konstantin Kolinko
I understand that if the .so library fails to load, it will also be
UnsatisfiedLinkError. I do not know (haven't tested), whether the
error text will be the same.

If some required system libraries cannot be found, the library does
not load. Those system libraries are loaded from LD_LIBRARY_PATH.

If you are using JDK 1.5 or later, you may print your environment in
Java with System.getenv() / System.getenv(String). See
http://www.velocityreviews.com/forums/t259893-systemgetenv.html


To be sure: in case you misprinted the value for java.library.path,
or permissions problem, you may check if the file is actually
readable.

java.io.File f = new File(System.getProperty(java.library.path) +
File.separatorChar + libLibName.so);

f.isFile();
f.canRead();
f.canExecute();


2007/10/17, david marshall [EMAIL PROTECTED]:
 Its a single .so file so does that mean the  LD_LIBRARY_PATH stuff won't
 be relevant?


 Konstantin Kolinko wrote:
  Does the native library consist of a single .so file, or there are several 
  ones?
 
  See the second NOTE MEG here:
  http://wrapper.tanukisoftware.org/doc/english/prop-java-library-path-n.html
  It is about requirements for LD_LIBRARY_PATH if there are several libraries.
 
 
  Does your printenv mention the value of LD_LIBRARY_PATH? Is there any
  difference compared to when you are running Eclipse?
 
 
  2007/10/17, David Marshall [EMAIL PROTECTED]:
 
  The results of printing System.getProperty(java.library.path) in the
  jsp does show the correct path to my shared object
 
  Looking forward to your results with JSP.
 
 
  2007/10/17, David Marshall [EMAIL PROTECTED]:
 
 
  I'm not doing a System.loadLibrary.   The library is needed by a
  third-party jar that I am using.  SInce it works from within Eclipse I
  know that their jar and the shared object (.so file) work correctly
  together and that the shared object is indeed in the correct location on
  library path.   Its only when I deploy to the production version of
  Tomcat (on the same machine) that this stuff fails.  At that point I
  don't have Eclipse's VM parameter setting abilities available to me and
  the only place to put it is in JAVA_OPTS.  From the tomcat log file I
  can see that the java.library.path is set as intended.
 
  I'll try your JSP idea just to be 100% the path is set correctly.
 
  Filip Hanik - Dev Lists wrote:
 
 
  and that your library is valid, and that you are calling
  System.loadLibrary with the correct name
 
  Filip
 
  David Marshall wrote:
 
 
  Filip :
 
  Thanks.  I didn't literally mean X.   The library it won't load is
  called Netica.   I just changed it to X to be more general.   I hope
  I'm not just creating confusion for everyone.
 
  thanks
  dm
 
  Filip Hanik - Dev Lists wrote:
 
 
  I believe there is a
  -Djava.awt.headless=true
 
  or something like that, so that it doesn't try to load your X
  windows environment
 
  Filip
 
  David Marshall wrote:
 
 
  Using Tomcat 5.5 on Linux.
  I've set my environment variable with export
  JAVA_OPTS='-Djava.library.path=/path/to/my/sharedobjectfolder'
 
  After restarting tomcat and hitting my servlet (which depends on
  the .so file in the folder above) I get an UnsatisfiedLinkError no
  X found in java.library.path
 
  I've looked in catalina.out and see a message that says that The
  Apache Tomcat Native library cannot be found on java.library.path:
  /path/to/my/sharedobjectfolder.   So it appears that Tomcat is
  using the path at least when it starts up. I've seen other Linux
  Tomcat users raising this same problem and not getting any
  answers.   Within Eclipse I can run Tomcat and configure a VM
  parameter for java.library.path and my library is successfully
  found when the servlet runs so this issue only pertains to running
  tomcat directly from the startup scripts (e.g. /etc/init.d/tomcat
  start)
 
  What could be wrong?
 
 
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  --
  David Marshall
  Staff Software Engineer
  Center For Knowledge Communication
  Computer Science Dept.
  University of Massachusetts - Amherst
  www.cs.umass.edu/~marshall
 
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

All threads are currently busy

2007-10-17 Thread Peter Bauer
Hi all,

System:
Tomcat 4.1.30 on Debian sarge
java version 1.5.0_11
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)

in situations with high load, tomcat sometimes stops responding and is not able 
to recover from that status. In the catalina.out file, i get the following line:

SEVERE: All threads (75) are currently busy, waiting. Increase maxThreads (75) 
or check the servlet status

i searched some time in various forums and mailing list archives and found the 
following links:
http://mail-archives.apache.org/mod_mbox/tomcat-users/200408.mbox/[EMAIL 
PROTECTED]
http://marc.info/?l=tomcat-userm=113297294417902w=2
http://www.tek-tips.com/viewthread.cfm?qid=862552page=3
http://www.mail-archive.com/[EMAIL PROTECTED]/msg127833.html

Basically there seem to be 2 possible reasons for this behaviour
1. A bug (?) in Tomcat or the combination of JDK, glibc, whatever, which causes 
that tomcat does not
recover from situations with too much requests. I could not find any 
information in the release notes
of the Tomcat 4.1.x versions.
2. Some kind of deadlock or resource (database connections) availability 
problem which
   keeps the request handling threads from returning from the doPost/Get method.

So i made a Threaddump using jstack (attached file). Most of the threads are in

 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - java.lang.Object.wait() @bci=2, line=474 (Interpreted frame)
 - org.apache.catalina.core.StandardWrapper.allocate() @bci=223, line=704 
(Interpreted frame)

but 19 threads are blocked in the bci 0 of the same static synchronized method 
called removeActiveRoles
which is called from the doPost() method.

 - 
at.sonorys.dmc.utilities.ActiveRoleRemoval.removeActiveRoles(at.sonorys.dmc.utilities.DatabaseAccess,
 java.lang.String, java.lang.String, boolean) @bci=0 (Interpreted frame)
 - at.sonorys.dmc.CommDicora.CommHandleMessageSession.quitSession() @bci=23 
(Interpreted frame)
 - at.sonorys.dmc.CommDicora.CommHandleMessageSession.doHandleSessionMsg() 
@bci=131 (Interpreted frame)
 - at.sonorys.dmc.CommDicora.CommHandleMessageSession.evalMessage() @bci=1 
(Interpreted frame)
 - 
at.sonorys.dmc.CommDicora.CommDicoraServlet.doHandleMsg(javax.servlet.http.HttpServletResponse,
 javax.servlet.http.HttpServletRequest) @bci=103 (Interpreted frame)
 - 
at.sonorys.dmc.CommDicora.CommDicoraServlet.doPost(javax.servlet.http.HttpServletRequest,
 javax.servlet.http.HttpServletResponse) @bci=142 (Interpreted frame)


The servlet implements the SingleThreadModel (not my decision). As you can see 
from the threaddump, all 19 threads are waiting to
get into the same static synchronized method. I dont understand this because 
there must be one thread IN the method
which holds the lock of the method? Is it possible for a thread to leave a 
synchronized method without returning the
lock?

br,
Peter

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

Re: How to Suppress Server Header in the HTTP Response

2007-10-17 Thread David Smith

Take a look at http://tomcat.apache.org/tomcat-5.5-doc/config/http.html

Specifically your interested in the server attribute in the standard 
implementation section.


--David

Jatinder Kaur wrote:

Hi,

I am looking for a way to suppress the server header in the HTTP Response. I
am using Tomcat version 559. Any help is appreciated.

Thanks,
J

  



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



Re: UTF-8 Properties File

2007-10-17 Thread Tim Funk
There is no such thing as UTF-8 properties files. Tomcat follows the 
same rules as java when reading properties files.


Properties file must be ISO8859-1 and if you have characters outside of 
that character set - then you use native2ascii to encode those other 
characters.


-Tim

Billy Ng wrote:

Hi folks,

Besides using native2ascii, would someone please recommend me how to make 
tocmat to work with UTF-8 properties files, thanks!

Billy Ng



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



RE: More number of connections got created than maxActive

2007-10-17 Thread Bhaskar
I tried with dbcp1.2.2 today and found same issue. 

With maxActive=30, maxIdle=30 and minIdle=30, connecitons went upto 120. And
it didn't comeback after 3-4 hrs.

After changing minIdle=0, number of connections were stayed at 30.

Is it a issue related to common pool (I am using common pool 1.3)?

Bhaskar 

 -Original Message-
 From: Konstantin Kolinko [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, October 16, 2007 8:57 PM
 To: Tomcat Users List
 Subject: Re: More number of connections got created than maxActive
 
 Isn't it  http://issues.apache.org/jira/browse/DBCP-28 ? 
 Connection leak ...
 
 It was fixed in DBCP 1.2.2.
 
 You may want to read through the Release History of DBCP for 
 other bugs that have been already found and fixed, 
 http://commons.apache.org/dbcp/changes-report.html
 
 
 -
 2007/10/16, Bhaskar [EMAIL PROTECTED]:
  I found that issue is around minIdle settings.
 
  When I had following settings:
  maxActive = 50
  maxIdle = 30
  minIdle=30
  factory=org.apache.commons.dbcp.BasicDataSourceFactory
  maxWait=1
  timeBetweenEvictionRunsMillis=90
  numTestsPerEvictionRun=50
  minEvictableIdleTimeMillis=180
  testWhileIdle=true
  testOnBorrow = true
  validationQuery='select 1 from dual'
 
 
  Number of connections in the pool went upto 121.
 
  When I changed minIdle to 15 and did my load test 
 connecitons in the 
  pool went upto 66
 
  Looks like maxActive is getting bypassed with minIdle.
 
  When I changed minIdle to 10 and did my load test 
 connections in the 
  pool went upto 24
 
  Can someone please throw light on what is going on here? I am using 
  DBCP
  1.2.1
 
  Bhaskar
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org To 
 unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



Re: More number of connections got created than maxActive

2007-10-17 Thread David Smith
These questions may be better answered on a DBCP user list since they 
are very specific to DBCP and commons-pool.


--David

Bhaskar wrote:

I tried with dbcp1.2.2 today and found same issue. 


With maxActive=30, maxIdle=30 and minIdle=30, connecitons went upto 120. And
it didn't comeback after 3-4 hrs.

After changing minIdle=0, number of connections were stayed at 30.

Is it a issue related to common pool (I am using common pool 1.3)?

Bhaskar 

 


-Original Message-
From: Konstantin Kolinko [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 16, 2007 8:57 PM

To: Tomcat Users List
Subject: Re: More number of connections got created than maxActive

Isn't it  http://issues.apache.org/jira/browse/DBCP-28 ? 
Connection leak ...


It was fixed in DBCP 1.2.2.

You may want to read through the Release History of DBCP for 
other bugs that have been already found and fixed, 
http://commons.apache.org/dbcp/changes-report.html



-
2007/10/16, Bhaskar [EMAIL PROTECTED]:
   


I found that issue is around minIdle settings.

When I had following settings:
maxActive = 50
maxIdle = 30
minIdle=30
factory=org.apache.commons.dbcp.BasicDataSourceFactory
maxWait=1
timeBetweenEvictionRunsMillis=90
numTestsPerEvictionRun=50
minEvictableIdleTimeMillis=180
testWhileIdle=true
testOnBorrow = true
validationQuery='select 1 from dual'


Number of connections in the pool went upto 121.

When I changed minIdle to 15 and did my load test 
 

connecitons in the 
   


pool went upto 66

Looks like maxActive is getting bypassed with minIdle.

When I changed minIdle to 10 and did my load test 
 

connections in the 
   


pool went upto 24

Can someone please throw light on what is going on here? I am using 
DBCP

1.2.1

Bhaskar
 


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

For additional commands, e-mail: [EMAIL PROTECTED]


   




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

 




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



Tomcat 5.5 Cluster Without session replication

2007-10-17 Thread bajistaman

Is there a way to set up a Tomcat cluster without session replication? How
many Tomcat instances is recommended to define by cluster?

Thanks,

Johann
-- 
View this message in context: 
http://www.nabble.com/Tomcat-5.5-Cluster-Without-session-replication-tf4640120.html#a13252267
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Native Library Not found

2007-10-17 Thread Arun
I am replying once again, as I thought I need more help on these.

top - 15:49:32 up 2 days, 21:33,  1 user,  load average: 0.26, 0.28, 0.20
Tasks:  57 total,   2 running,  55 sleeping,   0 stopped,   0 zombie
Cpu(s):  4.5%us,  0.5%sy,  0.0%ni, 94.5%id,  0.0%wa,  0.0%hi,  0.5%si,
0.0%st
Mem:   2074972k total,  2019180k used,55792k free,   228732k buffers
Swap:  6072528k total,  108k used,  6072420k free,  1383868k cached

  PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
12496 root  18   0  971m 285m  12m S9 14.1 165:55.34 java
 4423 mysql 15   0  129m  28m 5404 S2  1.4  67:49.96 mysqld
1 root  18   0  2912 1848  524 S0  0.1   0:01.44 init
2 root  RT   0 000 S0  0.0   0:00.00 migration/0
This is my machines top. I am using tomcat 6 and it has eaten all my memory.
Only 56 Mb reamains. I have a 2GB memory. I have added a connection pool
using commons-dbcp and thought that will reduce the probs. What is your
suggestion. As I told there is a scheduler running on every minute. Looks
like I have some memory leak. Otherwise why does my machine uses this memory
this much. I have an autobuild script running everyday which checkouts from
sourceforge cvs , stops the servers, build it and redeploy and start tomcat.
Yet , today I looked at my machine , and Ah ! here we goes.
I have not used any tweaks in xml.Should I tune the server to production
mode. What is the soultion ? Why does not the objects get garbage
colllected.?



On 10/11/07, Juha Laiho [EMAIL PROTECTED] wrote:

 Arun wrote:
  That worked finally with the increase in PermGen space.

  I am a bit concerned about my server memory.
  See my top (not mine ofcourse)
 
  top - 09:38:18 up  9:16,  3 users,  load average: 0.27, 0.18, 0.10
PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
   9770 root  25   0  491m  93m  35m R  102  4.6   0:13.64 java
 
  top - 09:38:33 up  9:16,  3 users,  load average: 0.43, 0.22, 0.11
PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
   9770 root  25   0  504m 138m  35m R  100  6.8   0:28.66 java
 
  top - 09:38:42 up  9:16,  3 users,  load average: 0.52, 0.25, 0.12
PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
   9770 root  25   0  512m 166m  31m R  100  8.2   0:37.63 java
 
  top - 09:39:03 up  9:17,  3 users,  load average: 0.45, 0.25, 0.12
PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
   9770 root  25   0  529m 175m  31m S   96  8.7   0:41.00 java
 
  top - 09:39:21 up  9:17,  3 users,  load average: 0.42, 0.25, 0.13
PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
   9770 root  25   0  561m 192m  31m S9  9.5   0:47.93 java
 
 
  See Mem: line and see the second one . It rises so fast  . See at what
 rate.

 Well, look at the CPU consumption at the same period - so your Tomcat
 is working on something. Looking at the amount of CPU time consumed,
 it could even be still running the application startup (Tomcat by itself
 can take something like 20 seconds of pure CPU time, on some machine
 architectures at least -- and here the CPU time usage is running from
 13 to 48 seconds - so it's still too early to say whether the rise
 in memory usage will continue or not).

  What is this PermGen space. Why does not it get garbage collected.

 PermGen is the holding space for the program code in your currently
 active classes. So, looks like whatever you're using has quite a large
 active codebase.

  Is there anyway  I can tell tomcat to suggest the VM a garbage
 collection
  more often than the default garbage collection algorithm does. Is there
 any
  declerative way of doing, xml, .sh?

 Even PermGen is cleaned in current JVM versions -- but classes can only
 be unloaded when there's no reference to the class within the JVM.
 And garbage collection overall is done when needed: it is definitely
 done before JVM throws an out of memory error. There's quite a lot of
 tunables for the JVM (including garbage collection), but pretty much
 you should trust the defaults (unless you have experience to actually
 distrust the defaults because of some specific feature in your application
 or runtime environment).
 --
 ..Juha

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




-- 
Thanks
Arun George


RE: Isolation between multiple TC instances

2007-10-17 Thread Peter Crowther
 From: David kerber [mailto:[EMAIL PROTECTED] 
 Running TC 5.5.15 on Windows Server 2003, JRE 1.5.0_12.
 
 My understanding is that if I'm running the same (or 
 different, for that 
 matter) webapp on separate tomcat instances (different ports, context 
 roots, etc), they will each have their own copies of all 
 their internal 
 objects and data, and cannot communicate across instances without 
 special efforts being taken, even if they use many of the 
 same utility 
 libraries.
 
 Is that understanding correct?  I hope so, because I'm working on 
 simplifying some of my internal property storage, and need to be sure 
 that they won't interfere with each other if the different 
 apps use the same base classes to store their own data.

Each Tomcat instance runs in its own Java virtual machine.  Each JVM has
its own copy of each class, as they each run in their own address space.
So you're correct.

- Peter

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



tomcat/java process strangeness

2007-10-17 Thread thebugslayer
Hi,

This might be more of java/linux related question, but since it
happens with Tomcat server, and with a knowledgeable user list like
this one, I thought I might give a shot for a explanation.

I have a dedicated host server running:
$ uname -a
Linux batcomputer.com 2.6.9-023stab033.7-enterprise #1 SMP Wed Nov 15
14:58:00 MSK 2006 i686 i686 i386 GNU/Linux

First strange case:
I installed jdk6, but I must run with -Xmx options or else it fails.
$ java -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
$ java -Xms32m -Xmx64m -version
java version 1.6.0_03
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Server VM (build 1.6.0_03-b05, mixed mode)

Second strange case:
When I start tomcat using /opt/tomcat/bin/catalina.sh start, I get 21
processes that running the same command(different PIDs). And my tomcat
instance seems to run fine without problem. When I kill one of the
process, the rest will go down as well.

Here are 2 out of 21 process list I got...
thebugslayer  7346  0.0  1.9 255680 121612 ? SOct16   0:00
/opt/java/bin/java -client -Xms32m -Xmx64m
-Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath
:/opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/commons-logging-api.jar
-Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat
-Djava.io.tmpdir=/opt/tomcat/temp
org.apache.catalina.startup.Bootstrap start
thebugslayer  7347  0.0  1.9 255680 121612 ? SOct16   0:00
/opt/java/bin/java -client -Xms32m -Xmx64m
-Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath
:/opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/commons-logging-api.jar
-Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat
-Djava.io.tmpdir=/opt/tomcat/temp
org.apache.catalina.startup.Bootstrap start
...

Has anyone has this happen to them before?

-- 
theBUGslayer

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



Isolation between multiple TC instances

2007-10-17 Thread David kerber

Running TC 5.5.15 on Windows Server 2003, JRE 1.5.0_12.

My understanding is that if I'm running the same (or different, for that 
matter) webapp on separate tomcat instances (different ports, context 
roots, etc), they will each have their own copies of all their internal 
objects and data, and cannot communicate across instances without 
special efforts being taken, even if they use many of the same utility 
libraries.


Is that understanding correct?  I hope so, because I'm working on 
simplifying some of my internal property storage, and need to be sure 
that they won't interfere with each other if the different apps use the 
same base classes to store their own data.


D



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



custom web.xml digester call

2007-10-17 Thread Auke Noppe
Hi,

 

Is it possible to call the digester of the web.xml by hand?

Like you can override the createstartdigester method in catalina.java?

 

Regards,

 

Auke Noppe


No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.488 / Virus Database: 269.14.13/1074 - Release Date: 16-10-2007
14:14
 


Re: Isolation between multiple TC instances

2007-10-17 Thread David kerber

Peter Crowther wrote:
From: David kerber [mailto:[EMAIL PROTECTED] 
Running TC 5.5.15 on Windows Server 2003, JRE 1.5.0_12.


My understanding is that if I'm running the same (or 
different, for that 
matter) webapp on separate tomcat instances (different ports, context 
roots, etc), they will each have their own copies of all 
their internal 
objects and data, and cannot communicate across instances without 
special efforts being taken, even if they use many of the 
same utility 
libraries.


Is that understanding correct?  I hope so, because I'm working on 
simplifying some of my internal property storage, and need to be sure 
that they won't interfere with each other if the different 
apps use the same base classes to store their own data.



Each Tomcat instance runs in its own Java virtual machine.  Each JVM has
its own copy of each class, as they each run in their own address space.
So you're correct.
  

Thanks!



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



RE: tomcat/java process strangeness

2007-10-17 Thread Peter Crowther
 From: thebugslayer [mailto:[EMAIL PROTECTED] 
 When I start tomcat using /opt/tomcat/bin/catalina.sh start, I get 21
 processes that running the same command(different PIDs).

Tomcat uses Java threads.  Java threads are implemented as Linux threads
on Linux.  Each Linux thread appears to be a process as far as ps is
concerned.  What you're seeing is one Tomcat memory space with 21
threads.

- Peter

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



Re: tomcat/java process strangeness

2007-10-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

BS,

thebugslayer wrote:
 First strange case:
 I installed jdk6, but I must run with -Xmx options or else it fails.
 $ java -version
 Error occurred during initialization of VM
 Could not reserve enough space for object heap
 Could not create the Java virtual machine.
 $ java -Xms32m -Xmx64m -version
 java version 1.6.0_03
 Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
 Java HotSpot(TM) Server VM (build 1.6.0_03-b05, mixed mode)

How much physical memory does your machine have?

 Second strange case:
 When I start tomcat using /opt/tomcat/bin/catalina.sh start, I get 21
 processes that running the same command(different PIDs). And my tomcat
 instance seems to run fine without problem. When I kill one of the
 process, the rest will go down as well.

You are seeing each thread as a Linux process. This is perfectly fine
depending on the kernel version (can't remember which ones do what).
Linux uses processes to model threads, so it's nothing to worry about.

Oh, and don't go killing the threads randomly ;)

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

iD8DBQFHFhgY9CaO5/Lv0PARAq5lAKCOuXwWyFJaqHUYzSVsSx+s6nz3ggCfTpAb
MZnsfR9gb79S8FYuxTeTRAU=
=6hCN
-END PGP SIGNATURE-

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



Re: tomcat/java process strangeness

2007-10-17 Thread David Delbecq
For you xmx: i guess bad default values that are too small regarding to
heap size. This is probably due to your OS ocnfiguration at some point.
Did you install java using distribution provided packages or sun packages?

For you Processes, this comes from old kernel. At some point in the
past, in linux, Thread where just considered special cases of Processes
and tools didn't make the difference between them. So each thread had
it's own pid.  If that bother you, upgrade kernel version. 2.6.9 is
nearly 3 years olds.
En l'instant précis du 17/10/07 15:39, thebugslayer s'exprimait en ces
termes:
 Hi,

 This might be more of java/linux related question, but since it
 happens with Tomcat server, and with a knowledgeable user list like
 this one, I thought I might give a shot for a explanation.

 I have a dedicated host server running:
 $ uname -a
 Linux batcomputer.com 2.6.9-023stab033.7-enterprise #1 SMP Wed Nov 15
 14:58:00 MSK 2006 i686 i686 i386 GNU/Linux

 First strange case:
 I installed jdk6, but I must run with -Xmx options or else it fails.
 $ java -version
 Error occurred during initialization of VM
 Could not reserve enough space for object heap
 Could not create the Java virtual machine.
 $ java -Xms32m -Xmx64m -version
 java version 1.6.0_03
 Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
 Java HotSpot(TM) Server VM (build 1.6.0_03-b05, mixed mode)

 Second strange case:
 When I start tomcat using /opt/tomcat/bin/catalina.sh start, I get 21
 processes that running the same command(different PIDs). And my tomcat
 instance seems to run fine without problem. When I kill one of the
 process, the rest will go down as well.

 Here are 2 out of 21 process list I got...
 thebugslayer  7346  0.0  1.9 255680 121612 ? SOct16   0:00
 /opt/java/bin/java -client -Xms32m -Xmx64m
 -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath
 :/opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/commons-logging-api.jar
 -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat
 -Djava.io.tmpdir=/opt/tomcat/temp
 org.apache.catalina.startup.Bootstrap start
 thebugslayer  7347  0.0  1.9 255680 121612 ? SOct16   0:00
 /opt/java/bin/java -client -Xms32m -Xmx64m
 -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath
 :/opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/commons-logging-api.jar
 -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat
 -Djava.io.tmpdir=/opt/tomcat/temp
 org.apache.catalina.startup.Bootstrap start
 ..

 Has anyone has this happen to them before?

   


-- 
http://www.devlog.be (a belgian developer's logs)


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



Re: Native Library Not found

2007-10-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Arun,

Arun wrote:
 I am replying once again, as I thought I need more help on these.
 
 top - 15:49:32 up 2 days, 21:33,  1 user,  load average: 0.26, 0.28, 0.20
 Tasks:  57 total,   2 running,  55 sleeping,   0 stopped,   0 zombie
 Cpu(s):  4.5%us,  0.5%sy,  0.0%ni, 94.5%id,  0.0%wa,  0.0%hi,  0.5%si,
 0.0%st
 Mem:   2074972k total,  2019180k used,55792k free,   228732k buffers
 Swap:  6072528k total,  108k used,  6072420k free,  1383868k cached
 
   PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
 12496 root  18   0  971m 285m  12m S9 14.1 165:55.34 java
  4423 mysql 15   0  129m  28m 5404 S2  1.4  67:49.96 mysqld
 1 root  18   0  2912 1848  524 S0  0.1   0:01.44 init
 2 root  RT   0 000 S0  0.0   0:00.00 migration/0
 This is my machines top. I am using tomcat 6 and it has eaten all my memory.
 Only 56 Mb reamains.

Actually, the java process is only taking 285MB of physical memory. The
process has allocated just under 1GB of memory, but is not using it at
all (since virtual - resident cannot possibly fit into your 108k of used
swap, you can tell that nothing has been swapped-out).

Some other process has the rest of your 2GB physical memory tied up. top
even tells you that your java process is only taking up 14% of your
memory. What's the problem?

 I have a 2GB memory. I have added a connection pool
 using commons-dbcp and thought that will reduce the probs.

How many connections do you have configured? If you were using one
connection before, and now you're pooling connections, then you probably
are using /more/ memory than before.

 As I told there is a [Quartz] scheduler running on every minute.

 Looks
 like I have some memory leak.

Maybe, maybe not. Does your application eventually crash? If so, how? If
you turn off the scheduler, does the memory problem go away? What does
Java report as the free/total/ma heap values (hint: look at the
java.lang.Runtime class).

 Otherwise why does my machine uses this memory
 this much. I have an autobuild script running everyday which checkouts from
 sourceforge cvs , stops the servers, build it and redeploy and start tomcat.

So, you are experiencing an OOM before an entire day goes by? Wow. I've
never heard of rolling reboots on non-MS-Windows machines. ;)

 I have not used any tweaks in xml.Should I tune the server to production
 mode. What is the solution? Why does not the objects get garbage
 collected.?

You have received many, /many/ suggestions from other posters as well as
myself. You have followed none of them. We ask you to provide more
information and you do not. Instead, you notify us that you are trying
some other strategy (switching JVM version, etc.). Finally, you changed
your PermGen heap allocation and everything was working again.

Are you saying that now you are having problems again? Or, are you
simply worried about the amount of memory taken by your application?
Java applications simply take up a lot of memory. Complex applications
take up a lot of memory. Complex Java applications take even /more/
memory. Webapps count as complex applications. Maybe you just need a
bunch of RAM to run your application. Have you considered that?

- -chris

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

iD8DBQFHFhOP9CaO5/Lv0PARAtb9AJ9E6a+oOpSMWVDTdyMY2I7RYn5U1QCdHgVO
BUSCpyDFzkEBOitqqH2UQgo=
=pc4x
-END PGP SIGNATURE-

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



Re: Tomcat 5.5 Cluster Without session replication

2007-10-17 Thread Filip Hanik - Dev Lists
yes, that is the most common setup, just add as many Tomcat's as you 
need and front them with a load balancer with fail over capabilities

minimum amount of tomcat to form a cluster, is 2 :)

Filip

bajistaman wrote:

Is there a way to set up a Tomcat cluster without session replication? How
many Tomcat instances is recommended to define by cluster?

Thanks,

Johann
  



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



RE: Advice about Tomcat on x86_64 architecture..

2007-10-17 Thread Swapnil.Kale

Hi,
I'm not sure about my thoughts here. 
Please correct if my understanding is wrong.

I tried installing tomcat 32 bit on a 64 bit JVM but it didnt work.

I tried following on the mini how to install tomcat on 64 bit OS but didnt
succeed.

What i found on internet is we need 64 bit executable for tomcat to run to
64 bit jvm and 64 bit OS offcourse

Few Questions : 
1) Can i host 32 bit compiled war file on 64 bit Tomcat / JVM ? If my
tomcat installation succeeds
2) What if i recompile the war on 64 bit jvm and host it on 64 bit Tomcat?
I've read that the size of the primitive datatypes in 64 bit is different,
so if i use Java web start and launch the application from remote machine
32 bit using JNLP, will it work on that 32 bit machine? having 64 bit
machine compiled jars?

If I host the 32 bit compiled war on 64 bit Tomcat / 64 bit JVM,
What am i gonna miss/gain? except the lot of heap memory

The picture is still not clear, Can you throw some light on this?

help appreciated. 

Swapnil






Caldarale, Charles R wrote:
 
 From: prt [mailto:[EMAIL PROTECTED] 
 Subject: Re: Advice about Tomcat on x86_64 architecture..
 
 Are you sure about that is no need to compile the Tomcat on 64 Bit ?
 
 Definitely.
 
 What about the all application, 
 I can develop and compile on 32 bit and then transfer class 
 files to the server ?
 
 Correct.  One of the key attributes of Java is platform independence.
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete the e-mail
 and its attachments from all computers.
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Advice-about-Tomcat-on-x86_64-architecture..-tf4048957.html#a13254957
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: All threads are currently busy

2007-10-17 Thread Peter Bauer

Good afternoon Martin :-)

On Wednesday 18 October 2000 16:08:34 you wrote:
 Good Morning Peter

 I assume you have built glibc for debian following the specific build
 instructions for debian..following this example
 http://www.linux-m32r.org/eng/download.html#debpackage

I did not build the libc packages myself, currently
libc6 2.3.2.ds1-22
libc6-dev 2.3.2.ds1-22
are installed.

 This version of TC is quite old ..not sure if its supported anymore

Yes, i know about that. If there is a major bug in this version, i could argue 
to upgrade
(at least to the last 4.1.x version) but i would need some facts to be able to 
do so.

 Can we see the source for the removeActiveRole

here it is:

public static synchronized void removeActiveRoles(final DatabaseAccess dba, 
final String terminalid, final String sessionid, boolean isNam) {
//check parameters
if(terminalid == null || terminalid.length() == 0) {
LOG.error(ActiveRoleRemoval.removeActiveRoles(): Could not remove 
active roles of terminal, empty terminalid given.);
}
if(sessionid == null || sessionid.length() == 0) {
LOG.error(ActiveRoleRemoval.removeActiveRoles(): Could not remove 
active roles of terminal, empty sessionid given.);
}

//get active roles of failed terminal
ThreeValStructure failedRoles = new ThreeValStructure();
String sql = SELECT name, functionname, role_type FROM 
tableactiveuserroles WHERE  +
 terminalid = ' + terminalid + ' AND autologin  1;
if (!dba.executeQuery(sql)) {
/* database statement failed */
LOG.error(ActiveRoleRemoval, removeActiveRoles(), sql statement 
failed  + sql);
return;
} 
while (dba.checkNext()) {
failedRoles.add(dba.getValue(name), dba.getValue(functionname), 
dba.getValue(role_type));
}

//send faked logout message via HTTP POST to commDicora servlet for 
failed roles
if(!ActiveRoleRemoval.sendLogoutMessages(failedRoles, sessionid)) {
LOG.error(Sending logout messages for failed roles failed, 
continuing);
}

//activate failed roles on all terminals which have a role for which 
the failed role is the backup role
BackuproleActivator activator = new BackuproleActivator(dba);
for (int index = 0; index  failedRoles.size(); index++) {   
String nameFailedRole = failedRoles.getEl1(index);

//get all relevant terminalids
String sqlSelectTerminals = SELECT terminalid FROM 
tableactiveuserroles WHERE  +
terminalid  ' + terminalid + 
' AND typeOfTerminal   + 
ApusConstants.DICORA_M + 
AND backuprolename = ' + 
nameFailedRole + ';
if (!dba.executeQuery(sqlSelectTerminals)) {
LOG.error(ActiveRoleRemoval, removeActiveRoles(), sql 
statement failed  + sqlSelectTerminals);
return;
}
LinkedListString backupTerminalsIds = new LinkedListString();
while(dba.checkNext()) {
backupTerminalsIds.add(dba.getValue(terminalid));
}
if(backupTerminalsIds.size() == 0) {
LOG.debug(ActiveRoleRemoval, removeActiveRoles():  +
 No backup terminals for Role ' + nameFailedRole 
+ ' found!);
}

for (Iterator iter = backupTerminalsIds.iterator(); 
iter.hasNext();) {
String backupTerminalId = (String) iter.next();

activator.sendActivationMessage(backupTerminalId,
nameFailedRole,
failedRoles.getEl3(index),
failedRoles.getEl2(index),
isNam);
}
}
}

 specifically are there higher priority threads currently executing so
 perhaps yield to those threads may apply?
 http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Thread.html

There are no threads i am creating which have a non-default priority.

thanks,
Peter 

 HTH/
 Martin--

 - Original Message -
 From: Peter Bauer [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Sent: Wednesday, October 17, 2007 4:52 AM
 Subject: All threads are currently busy

  Hi all,
 
  System:
  Tomcat 4.1.30 on Debian sarge
  java version 1.5.0_11
  Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
  Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)
 
  in situations with high load, tomcat sometimes stops responding and is
  not

 able to recover from that status. In the catalina.out file, i get the

 following line:
  SEVERE: All threads (75) are currently busy, waiting. Increase maxThreads

 (75) 

LogConfigurationException headache

2007-10-17 Thread Thorsten Scherler
Hi all,

I am having major headaches lately with tomcat 5 and 6 regarding
logging.

It started when deploying some cocoon application to tomcat 5 and 6.

You can find an extended background summary (from me and others) here:
https://issues.apache.org/jira/browse/FOR-1049

The problem is that tomcats logging seems to seriously interfere with my
own one. I am using apache-tomcat-6.0.14 but have seen very similar
problems in 5.5.x.

I have to servlets one is based on cocoon the other one is a very simple
one.

The logging for the cocoon one is  
[EMAIL PROTECTED]:~/src/apache/tomcat6/webapps$ tree boja2/WEB-INF/lib/|
grep log
|-- avalon-logkit-2.1.jar
|-- commons-logging-1.1.jar
|-- commons-logging-adapters-1.1.jar
|-- commons-logging-api-1.1.jar
|-- excalibur-logger-2.1.jar
|-- log4j-1.2.13.jar
|-- logkit-1.2.2.jar

The logging for the simple servlet is:
tree searcher/WEB-INF/lib/|grep log
|-- commons-logging-1.1.jar
|-- log4j-1.2.14.jar

Now starting tomcat with only one application it is working fine as well
when I mv the other app into tomcat there is no problem but as soon as
I *restart* tomcat. BAAANGG!!

Oct 17, 2007 4:22:07 PM org.apache.catalina.core.StandardContext
loadOnStartup
SEVERE: Servlet /searcher threw load() exception
org.apache.commons.logging.LogConfigurationException: User-specified log
class 'org.apache.commons.logging.impl.LogKitLogger' cannot be found or
is not useable.
at
org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:798)
at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:601)
at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:333)
at
org.apache.commons.logging.LogFactory.getLog(LogFactory.java:664)
at
org.springframework.web.servlet.DispatcherServlet.clinit(DispatcherServlet.java:242)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at
java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1104)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4045)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4351)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at
org.apache.catalina.core.StandardService.start(StandardService.java:516)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

I actually do not understand this exception at all since I do not use
LogKitLogger in the searcher servlet. In my servlet I have something
like:

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * Simple wrapper class to easier debug/log.
 *
 */
public class LoggableSearcher {

  protected final Log log =
LogFactory.getLog(this.getClass().getCanonicalName());

  public LoggableSearcher() {
super();
  }

}

Which I then 

RE: Advice about Tomcat on x86_64 architecture..

2007-10-17 Thread Peter Crowther
 From: Swapnil.Kale [mailto:[EMAIL PROTECTED] 
 I tried installing tomcat 32 bit on a 64 bit JVM but it didnt work.

That is very unexpected.  *Tomcat* is pure Java.  I can do a file copy
of my entire Tomcat installation and my apps from my 32-bit development
box to my 64-bit staging box (and back again) and Tomcat starts and runs
without error.  Note that I'm using the zip download and starting it
from the batch file; I do *not* install a Windows service, and I do
*not* use any native libraries.

 1) Can i host 32 bit compiled war file on 64 bit Tomcat / JVM ? If my
 tomcat installation succeeds

Yes.  I do this regularly.  The bytecodes emitted by the compiler are
identical whether the compiler runs on a virtual machine on a 32-bit,
64-bit, 36-bit or any other physical hardware.

 2) What if i recompile the war on 64 bit jvm and host it on 
 64 bit Tomcat?

Yes.  I do this more rarely (my dev box is my usual compile
environment), but it works.  I repeat: the bytecodes emitted by the
compiler are identical whether the compiler runs on a virtual machine on
a 32-bit, 64-bit, 36-bit or any other physical hardware.

 I've read that the size of the primitive datatypes in 64 bit 
 is different,
Whoever wrote that is wrong.  Java is not C.  Java primitive sizes are
standard, regardless of the physical machine.

 so if i use Java web start and launch the application from 
 remote machine
 32 bit using JNLP, will it work on that 32 bit machine? 
 having 64 bit machine compiled jars?

Yes.

 If I host the 32 bit compiled war on 64 bit Tomcat / 64 bit JVM,
 What am i gonna miss/gain? except the lot of heap memory

Nothing.

 The picture is still not clear, Can you throw some light on this?

The correct Java virtual machine must be installed for the operating
system and hardware.

Java bytecode in .class, .jar and .war files is portable.  Tomcat is
portable.

Native code is not portable.  The code for installing Tomcat as a
Windows service is not portable.

If you have installed Tomcat from something other than the zip file (or
the .tar.gz file) on the Apache Tomcat site, you may have some native
code that you were not expecting.  Install from the zip file, start
Tomcat via startup.bat and see whether the problem is still there.

- Peter

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



Re: All threads are currently busy

2007-10-17 Thread Johnny Kewl


---
HARBOR: http://coolharbor.100free.com/index.htm
Now Tomcat is also a cool application server
---
- Original Message - 
From: Peter Bauer [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Wednesday, October 17, 2007 10:52 AM
Subject: All threads are currently busy



Hi all,

System:
Tomcat 4.1.30 on Debian sarge
java version 1.5.0_11
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)

in situations with high load, tomcat sometimes stops responding and is not 
able to recover from that status. In the catalina.out file, i get the 
following line:


SEVERE: All threads (75) are currently busy, waiting. Increase maxThreads 
(75) or check the servlet status


i searched some time in various forums and mailing list archives and found 
the following links:

http://mail-archives.apache.org/mod_mbox/tomcat-users/200408.mbox/[EMAIL 
PROTECTED]
http://marc.info/?l=tomcat-userm=113297294417902w=2
http://www.tek-tips.com/viewthread.cfm?qid=862552page=3
http://www.mail-archive.com/[EMAIL PROTECTED]/msg127833.html

Basically there seem to be 2 possible reasons for this behaviour
1. A bug (?) in Tomcat or the combination of JDK, glibc, whatever, which 
causes that tomcat does not
recover from situations with too much requests. I could not find any 
information in the release notes

of the Tomcat 4.1.x versions.
2. Some kind of deadlock or resource (database connections) availability 
problem which
  keeps the request handling threads from returning from the doPost/Get 
method.


So i made a Threaddump using jstack (attached file). Most of the threads 
are in


- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=474 (Interpreted frame)
- org.apache.catalina.core.StandardWrapper.allocate() @bci=223, line=704 
(Interpreted frame)


but 19 threads are blocked in the bci 0 of the same static synchronized 
method called removeActiveRoles

which is called from the doPost() method.

- 
at.sonorys.dmc.utilities.ActiveRoleRemoval.removeActiveRoles(at.sonorys.dmc.utilities.DatabaseAccess, 
java.lang.String, java.lang.String, boolean) @bci=0 (Interpreted frame)
- at.sonorys.dmc.CommDicora.CommHandleMessageSession.quitSession() @bci=23 
(Interpreted frame)
- at.sonorys.dmc.CommDicora.CommHandleMessageSession.doHandleSessionMsg() 
@bci=131 (Interpreted frame)
- at.sonorys.dmc.CommDicora.CommHandleMessageSession.evalMessage() @bci=1 
(Interpreted frame)
- 
at.sonorys.dmc.CommDicora.CommDicoraServlet.doHandleMsg(javax.servlet.http.HttpServletResponse, 
javax.servlet.http.HttpServletRequest) @bci=103 (Interpreted frame)
- 
at.sonorys.dmc.CommDicora.CommDicoraServlet.doPost(javax.servlet.http.HttpServletRequest, 
javax.servlet.http.HttpServletResponse) @bci=142 (Interpreted frame)



The servlet implements the SingleThreadModel (not my decision). As you can 
see from the threaddump, all 19 threads are waiting to
get into the same static synchronized method. I dont understand this 
because there must be one thread IN the method
which holds the lock of the method? Is it possible for a thread to leave a 
synchronized method without returning the

lock?


I'm guessing here, never used SingleThreadModel. but I think that what 
may be happening is the TC for efficiency reasons is creating multiple 
instances of the servlet otherwise imagine how slow things would be.


So its making (MAYBE) 19 instances of the servlet instance and giving each 
one its own thread so its *still* doing what it promised (1 thread per 
servlet)

BUT... unfortunately for you threads all JOIN again at a STATIC class
So if ONE thread gets stuck in ..
   static synchronized method called removeActiveRoles
they ALL do.

SingleThreadModel does not fix all threading issues.
Maybe time to just make the app thread safe and throw SingleThreadModel 
away


From the loooks of things, threads never come out of *removeActiveRoles* 

alive ;)



br,
Peter









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



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



Re: java.library.path / Unsatisfied Link Error problem with Linux Tomcat 5.5

2007-10-17 Thread David Marshall

Solved!

I found the source of the problem after following your links below.

Not only do you need to place the jar file in the tomcat/shared/lib 
folder,  you need to place the .so there and then adjust the 
java.library.path
on JAVA_OPTS to point there.   My .so was originally living in a 
directory under my user.   I also made sure that the .so is owned by the 
tomcat user and is set for execute privileges.  Not sure if all those 
things are strictly necessary, but certainly the placement of the .so in 
the shared/lib folder is.


Thanks very much to you all for continuing to generate ideas for me to 
try out!!!


Konstantin Kolinko wrote:

Is your third-party jar placed into the shared libraries folder as it should be?

See
http://wiki.apache.org/tomcat/HowTo#head-a4b7185ee95d0cf14a48f92c08d1eb66b561139d
http://forum.java.sun.com/thread.jspa?threadID=780109

See also
http://java.sun.com/docs/books/jni/html/design.html
chapters 11.2.3 and 11.2.4.

Is the script file /etc/init.d/tomcat editable for you? E.g., to
define the JAVA_OPTS there? Or you are defining them in a profile file
of the user that is su-ed to run the tomcat?

Looking forward to your results with JSP.


2007/10/17, David Marshall [EMAIL PROTECTED]:
  

I'm not doing a System.loadLibrary.   The library is needed by a
third-party jar that I am using.  SInce it works from within Eclipse I
know that their jar and the shared object (.so file) work correctly
together and that the shared object is indeed in the correct location on
library path.   Its only when I deploy to the production version of
Tomcat (on the same machine) that this stuff fails.  At that point I
don't have Eclipse's VM parameter setting abilities available to me and
the only place to put it is in JAVA_OPTS.  From the tomcat log file I
can see that the java.library.path is set as intended.

I'll try your JSP idea just to be 100% the path is set correctly.

Filip Hanik - Dev Lists wrote:


and that your library is valid, and that you are calling
System.loadLibrary with the correct name

Filip

David Marshall wrote:
  

Filip :

Thanks.  I didn't literally mean X.   The library it won't load is
called Netica.   I just changed it to X to be more general.   I hope
I'm not just creating confusion for everyone.

thanks
dm

Filip Hanik - Dev Lists wrote:


I believe there is a
-Djava.awt.headless=true

or something like that, so that it doesn't try to load your X
windows environment

Filip

David Marshall wrote:
  

Using Tomcat 5.5 on Linux.
I've set my environment variable with export
JAVA_OPTS='-Djava.library.path=/path/to/my/sharedobjectfolder'

After restarting tomcat and hitting my servlet (which depends on
the .so file in the folder above) I get an UnsatisfiedLinkError no
X found in java.library.path

I've looked in catalina.out and see a message that says that The
Apache Tomcat Native library cannot be found on java.library.path:
/path/to/my/sharedobjectfolder.   So it appears that Tomcat is
using the path at least when it starts up. I've seen other Linux
Tomcat users raising this same problem and not getting any
answers.   Within Eclipse I can run Tomcat and configure a VM
parameter for java.library.path and my library is successfully
found when the servlet runs so this issue only pertains to running
tomcat directly from the startup scripts (e.g. /etc/init.d/tomcat
start)

What could be wrong?




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

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

--
David Marshall
Staff Software Engineer
Center For Knowledge Communication
Computer Science Dept.
University of Massachusetts - Amherst
www.cs.umass.edu/~marshall



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





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


--
David Marshall
Staff Software Engineer
Center For Knowledge Communication 
Computer Science Dept.

University of Massachusetts - Amherst
www.cs.umass.edu/~marshall



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



Re: Problem: stasrtup Tomcat in Mac os X 10.4.2

2007-10-17 Thread Antonio Rodríguez Anaya

Yes, the problem was in the JAVA_HOME.

Thanks,

Toni.

El 15/10/2007, a las 19:26, Steve Ochani escribió:


Date sent:  Mon, 15 Oct 2007 18:46:30 +0200
From:   Antonio Rodríguez Anaya [EMAIL PROTECTED]
Subject:Problem: stasrtup Tomcat in Mac os X 10.4.2
To: users@tomcat.apache.org
Send reply to:  Tomcat Users List users@tomcat.apache.org


Hi!

I have problems to start up Tomcat 5.5 and 6.0. I have downloaded
core binary distributions and I have followed the instructions.

As a root I have unpacked and moved it to /user/local directory. I
have secified the CATALINA_HOME and JAVA_HOME variables. I have set
execute permisions to all *.sh files in $CATALINA_HOME/bin/ (chmod ug
+x *.sh). I have tried to start up Tomcat but it does not work. First
the message is: Using CATALINA_BASE:   /usr/local/tomcat-5 Using
CATALINA_HOME:   /usr/local/tomcat-5 Using CATALINA_TMPDIR:
/usr/local/tomcat-5/temp Using JRE_HOME:   /usr/bin/java

This is normal, I think, but Tomcat does not work. The catalina.log
file shows this error message: /usr/local/tomcat-5/bin/catalina.sh:
line 273: /usr/bin/java/bin/ java: Not a directory

The catalina.sh file line number 273 is:
  $_RUNJAVA $JAVA_OPTS $CATALINA_OPTS \

I understand the value of JAVA_OPTS or CATALINA_OPTS is /usr/bin/
java and /bin/java. I think something wrong happends, because I
had not set either JAVA_OPTS or CATALINA_OPTS. I have tried to set
these variables with the value -server -Xmx400m, but the situation
has not changed. The error message in catalina.log is the same.

I do not understand what happen. Is it possible the problem is for
the operation system? My os is Mac os X 10.4.2. Does someone know how
I can correct the problem?



The problem is this (from your mail)

/usr/bin/java/bin/ java: Not a directory

Since you set /usr/bin/java as the JAVA_HOME, when it really is the  
java executable.


You have to set JAVA_HOME var to the directory where the entire  
java installation is, for ex.

/usr/jdk1.5.0

I don't know where that could be on Mac os x but do some searching.




Thanks in advance,

Antonio.





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




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



Re: All threads are currently busy

2007-10-17 Thread Johnny Kewl


---
HARBOR: http://coolharbor.100free.com/index.htm
Now Tomcat is also a cool application server
---
- Original Message - 
From: Peter Bauer [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Wednesday, October 17, 2007 5:24 PM
Subject: Re: All threads are currently busy




Good afternoon Martin :-)

On Wednesday 18 October 2000 16:08:34 you wrote:

Good Morning Peter

I assume you have built glibc for debian following the specific build
instructions for debian..following this example
http://www.linux-m32r.org/eng/download.html#debpackage


I did not build the libc packages myself, currently
libc6 2.3.2.ds1-22
libc6-dev 2.3.2.ds1-22
are installed.


This version of TC is quite old ..not sure if its supported anymore


Yes, i know about that. If there is a major bug in this version, i could 
argue to upgrade
(at least to the last 4.1.x version) but i would need some facts to be 
able to do so.



Can we see the source for the removeActiveRole





I was hoping to see a thread WAIT or something like that... no such luck ;)
I'm wondering if DatabaseAccess is shared and another thread (in another 
servlet) wrecks the connection as this uses it maybe...
Maybe there is a subtle loop through the POST, its waiting for reply, 
which is in another thread, which is waiting for this thread...


OK... I'm finished guessing ;)



   public static synchronized void removeActiveRoles(final DatabaseAccess 
dba, final String terminalid, final String sessionid, boolean isNam) {

   //check parameters
   if(terminalid == null || terminalid.length() == 0) {
   LOG.error(ActiveRoleRemoval.removeActiveRoles(): Could not 
remove active roles of terminal, empty terminalid given.);

   }
   if(sessionid == null || sessionid.length() == 0) {
   LOG.error(ActiveRoleRemoval.removeActiveRoles(): Could not 
remove active roles of terminal, empty sessionid given.);

   }

   //get active roles of failed terminal
   ThreeValStructure failedRoles = new ThreeValStructure();
   String sql = SELECT name, functionname, role_type FROM 
tableactiveuserroles WHERE  +
terminalid = ' + terminalid + ' AND autologin  
1;

   if (!dba.executeQuery(sql)) {
   /* database statement failed */
   LOG.error(ActiveRoleRemoval, removeActiveRoles(), sql 
statement failed  + sql);

   return;
   }
   while (dba.checkNext()) {
   failedRoles.add(dba.getValue(name), 
dba.getValue(functionname), dba.getValue(role_type));

   }

   //send faked logout message via HTTP POST to commDicora servlet for 
failed roles

   if(!ActiveRoleRemoval.sendLogoutMessages(failedRoles, sessionid)) {
   LOG.error(Sending logout messages for failed roles failed, 
continuing);

   }

   //activate failed roles on all terminals which have a role for 
which the failed role is the backup role

   BackuproleActivator activator = new BackuproleActivator(dba);
   for (int index = 0; index  failedRoles.size(); index++) {
   String nameFailedRole = failedRoles.getEl1(index);

   //get all relevant terminalids
   String sqlSelectTerminals = SELECT terminalid FROM 
tableactiveuserroles WHERE  +

   terminalid  ' + terminalid +
   ' AND typeOfTerminal   + 
ApusConstants.DICORA_M +
   AND backuprolename = ' + 
nameFailedRole + ';

   if (!dba.executeQuery(sqlSelectTerminals)) {
   LOG.error(ActiveRoleRemoval, removeActiveRoles(), sql 
statement failed  + sqlSelectTerminals);

   return;
   }
   LinkedListString backupTerminalsIds = new 
LinkedListString();

   while(dba.checkNext()) {
   backupTerminalsIds.add(dba.getValue(terminalid));
   }
   if(backupTerminalsIds.size() == 0) {
   LOG.debug(ActiveRoleRemoval, removeActiveRoles():  +
No backup terminals for Role ' + 
nameFailedRole + ' found!);

   }

   for (Iterator iter = backupTerminalsIds.iterator(); 
iter.hasNext();) {

   String backupTerminalId = (String) iter.next();

   activator.sendActivationMessage(backupTerminalId,
   nameFailedRole,
   failedRoles.getEl3(index),
   failedRoles.getEl2(index),
   isNam);
   }
   }
   }


specifically are there higher priority threads currently executing so
perhaps yield to those threads may apply?
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Thread.html


There are no threads i am creating which have a 

RE: Advice about Tomcat on x86_64 architecture..

2007-10-17 Thread Swapnil.Kale

Thanks a ton Peter,
The picture is pretty clear now. 
Yes i did install the exe and not the zip file. which was creating a
problem.
Now i uninstalled it and using the zip file, startup.bat , the tomcat runs
smoothly.

One thing i'm still wondering is the uninstall did not clear the registry
entries under Wow6432Node where i had entered the JVM param/ options for Xms
Xmx.

So 
1) if i run the default startup script what is the heap size that is
allocated on 64 bit jvm/ OS?
2) How do I specify those sizes using the script?

Thanks again!

:) Swap.



Peter Crowther wrote:
 
 From: Swapnil.Kale [mailto:[EMAIL PROTECTED] 
 I tried installing tomcat 32 bit on a 64 bit JVM but it didnt work.
 
 That is very unexpected.  *Tomcat* is pure Java.  I can do a file copy
 of my entire Tomcat installation and my apps from my 32-bit development
 box to my 64-bit staging box (and back again) and Tomcat starts and runs
 without error.  Note that I'm using the zip download and starting it
 from the batch file; I do *not* install a Windows service, and I do
 *not* use any native libraries.
 
 1) Can i host 32 bit compiled war file on 64 bit Tomcat / JVM ? If my
 tomcat installation succeeds
 
 Yes.  I do this regularly.  The bytecodes emitted by the compiler are
 identical whether the compiler runs on a virtual machine on a 32-bit,
 64-bit, 36-bit or any other physical hardware.
 
 2) What if i recompile the war on 64 bit jvm and host it on 
 64 bit Tomcat?
 
 Yes.  I do this more rarely (my dev box is my usual compile
 environment), but it works.  I repeat: the bytecodes emitted by the
 compiler are identical whether the compiler runs on a virtual machine on
 a 32-bit, 64-bit, 36-bit or any other physical hardware.
 
 I've read that the size of the primitive datatypes in 64 bit 
 is different,
 Whoever wrote that is wrong.  Java is not C.  Java primitive sizes are
 standard, regardless of the physical machine.
 
 so if i use Java web start and launch the application from 
 remote machine
 32 bit using JNLP, will it work on that 32 bit machine? 
 having 64 bit machine compiled jars?
 
 Yes.
 
 If I host the 32 bit compiled war on 64 bit Tomcat / 64 bit JVM,
 What am i gonna miss/gain? except the lot of heap memory
 
 Nothing.
 
 The picture is still not clear, Can you throw some light on this?
 
 The correct Java virtual machine must be installed for the operating
 system and hardware.
 
 Java bytecode in .class, .jar and .war files is portable.  Tomcat is
 portable.
 
 Native code is not portable.  The code for installing Tomcat as a
 Windows service is not portable.
 
 If you have installed Tomcat from something other than the zip file (or
 the .tar.gz file) on the Apache Tomcat site, you may have some native
 code that you were not expecting.  Install from the zip file, start
 Tomcat via startup.bat and see whether the problem is still there.
 
   - Peter
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Advice-about-Tomcat-on-x86_64-architecture..-tf4048957.html#a13257088
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



PROBLEM POSTING LARGE DATA - TOMCAT6 SSL

2007-10-17 Thread Jyothishree Honnavalli
Hi,

We are having problems posting large chunks of data via tomcat ssl. We
are seeing that there is a limitation on how many characters can be
submitted depending where the request is coming from.  This is happening
only when Tomcat is accessed over HTTPS. Problem does not occur when
accessing Tomcat directly over HTTP (port 8080).

 

See testing results below... 

 

Testing within the server where tomcat is installed/

Total characters successful - 15k out of 15k - there is no limitation.
Any thing we post goes thru fine.

 

Testing directly to the server IP or DNS from out side the subnet (My
desktop)

Max post size successful - 9417 bytes any variable with length more than
that fails. All posted parameters show up as null.

 

Testing via F5 (load balanced set up)

Max characters successful - 6013 bytes from server and my desktop any
variable with length more than that fails. All posted parameters show up
as null.

 

Testing directly from server to server within the same subnet
(172.28.76.x)

Total characters successful - 12663 out of 15k (this one worked
partially when set to 15k but only 12663 made it through loosing 3k of
data.  This was a different result than the rest...in the sense that
this is the only scenario where things got posted partially.

 

As you can see something is limiting the amount of character data being
allowed as we test from different subnets.  SSL puts a load in the data
being transfer as well something else, we have adjusted during testing
to accommodate for the extra load in order to make work but we have not
identify what is limiting are adding additional data to the transfer
package. 

 

I have attached the server.xml 

 

Please help and advice us how to resolve this.

 

Thanks,

Jyothi

 

 

  

 

 

 

!-- Note:  A Server is not itself a Container, so you may not
 define subcomponents such as Valves at this level.
 Documentation at /docs/config/server.html
 --
Server port=8005 shutdown=SHUTDOWN

  !--APR library loader. Documentation at /docs/apr.html --
  Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=OFF /
  !--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html --
  Listener className=org.apache.catalina.core.JasperListener /
  !-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html --
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener /
  Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /

  !-- 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=SupportAnalyst

!-- 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=80 address=172.28.76.117 protocol=HTTP/1.1 
maxThreads=150 maxPostSize=-1 maxSavePostSize=32000
		connectionTimeout=2 redirectPort=443 /

	
!-- Define a SSL HTTP/1.1 Connector on port 443 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=443 address=172.28.76.117 protocol=org.apache.coyote.http11.Http11NioProtocol
 			SSLEnabled=true maxThreads=150 scheme=https secure=true
   clientAuth=false sslProtocol=TLS maxPostSize=-1 maxSavePostSize=32000
		   keystoreFile= E:\Java\jre1.6.0_02\lib\security\sacacerts keystorePass=changeit  / 
  
   
   !-- Connector protocol=org.apache.coyote.http11.Http11NioProtocol
   port=443 address=172.28.76.117 minSpareThreads=5 maxSpareThreads=75
   enableLookups=true disableUploadTimeout=true 
   acceptCount=100  maxThreads=200
   scheme=https secure=true SSLEnabled=true
   keystoreFile= E:\Java\jre1.6.0_02\lib\security\sacacerts keystorePass=changeit
   clientAuth=false sslProtocol=TLS /  --

   
 
!-- Define an AJP 1.3 Connector on port 8009 --

Re: UTF-8 Properties File

2007-10-17 Thread Greg Johnson

 Besides using native2ascii, would someone please recommend me how to make 
 tocmat to work with UTF-8 properties files, thanks!

After using native2ascii on your property files, put the following tag in your 
JSP files:

%@ page contentType=text/html;charset=UTF-8 language=java %



Re: All threads are currently busy

2007-10-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Peter,

Peter Bauer wrote:
 This version of TC is quite old ..not sure if its supported anymore
 
 Yes, i know about that. If there is a major bug in this version, i could 
 argue to upgrade
 (at least to the last 4.1.x version) but i would need some facts to be able 
 to do so.

One justification for upgrading is that your version is no longer
supported. That should get the attention of the decision makers ;)

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

iD8DBQFHFkKI9CaO5/Lv0PARAiFCAKCsniT0onOU+j36C+XA0U+Q7Hf/GwCgtWlw
zdwgDk9TopaUNi1aNl4IN2w=
=4/6H
-END PGP SIGNATURE-

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



Re: Tomcat 5.5 Cluster Without session replication

2007-10-17 Thread bajistaman


Filip Hanik - Dev Lists wrote:
 
 yes, that is the most common setup, just add as many Tomcat's as you 
 need and front them with a load balancer with fail over capabilities
 minimum amount of tomcat to form a cluster, is 2 :)
 
 Filip
 
:-), I'm trying to centrally manage resources and deployment and I thought
that I could get that using Tomcat's specific cluster configuration but
without session state replication, is that possible or do I have to apply
the DIY principle?.

Thanks,

Johann
-- 
View this message in context: 
http://www.nabble.com/Tomcat-5.5-Cluster-Without-session-replication-tf4640120.html#a13258810
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: How to increase Tomcat webserver speed?

2007-10-17 Thread Oliver Schoett

keglius wrote:

I performed tests on members area and found that in most cases all pages are
loaded within 4-10 seconds.
The slowest pages (e.g. reports to view longer period time data) sometimes
takes 20-180 seconds to load.

How can I increase this speed?
  


The obvious approach is to find out where this time is actually spent.  
The safest approach is to proceed naively from the outside in, as follows.


First measure the loading performance of your Web page with Firebug 
(Firefox Plugin).  I will show you which web requests are responsible 
for the slowdown.


Assuming that server response times are responsible for the slowdown (as 
opposed to the data transfer to the browser), do a real-time profile of 
the server to find out where the time is spent, e. g. with the Eclipse 
TPTP or the Netbeans Profiler.  Using real-time profiling, you can 
detect whether the culprits are computations on the server or back-end 
calls (e. g., to the data base).


If server computations are the problem, the profiler will tell you the 
cause of the problem.


If the problem is in the back-end calls, there are two possibilities:

(a) The back-end calls consume a lot of time on the back-end server.  In 
this case you must look at the back-end server.  If it is a data base 
server, data base / query optimization must be performed.


(b) The data base calls do not consume a lot of time on the back-end 
server, but their sheer number causes the delays.  This requires a 
redesign of the back-end queries, such that the data is fetched with 
fewer calls.  For example, I have reviewed an application that performed 
15.000 DB calls to construct the response to a common user request.  No 
matter how efficient the calls on the data base, the latency of the 
15.000 calls will cause a response time in the tens of seconds, at least.


Thus, you can find out which of the four most common performance 
problems is responsible for your delays:


(1) Web performance, i. e., too many HTTP requests from the browser (not 
likely the case here),


(2) app server performance, i. e., too many computations,

(3) back end performance, i. e., too much work on the back end (e. g., 
the data base),


(4) back end call latency, i. e., too many separate back end calls.

It would be premature to start optimizing one of these before having 
identified the main cause of the problem.


Regards,

Oliver Schoett


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



Re: Tomcat 5.5 Cluster Without session replication

2007-10-17 Thread Filip Hanik - Dev Lists

there are other tools that do that better, like www.hyperic.org

Filip

bajistaman wrote:

Filip Hanik - Dev Lists wrote:
  
yes, that is the most common setup, just add as many Tomcat's as you 
need and front them with a load balancer with fail over capabilities

minimum amount of tomcat to form a cluster, is 2 :)

Filip



:-), I'm trying to centrally manage resources and deployment and I thought
that I could get that using Tomcat's specific cluster configuration but
without session state replication, is that possible or do I have to apply
the DIY principle?.

Thanks,

Johann
  



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



Re: PROBLEM POSTING LARGE DATA - TOMCAT6 SSL

2007-10-17 Thread Filip Hanik - Dev Lists
there was a bug fix, that will come out in 6.0.15 to take care of this 
problem


Filip

Jyothishree Honnavalli wrote:


Hi,

We are having problems posting large chunks of data via tomcat ssl. We 
are seeing that there is a limitation on how many characters can be 
submitted depending where the request is coming from. This is 
happening only when Tomcat is accessed over HTTPS. Problem does not 
occur when accessing Tomcat directly over HTTP (port 8080).


See testing results below…

Testing within the server where tomcat is installed/

Total characters successful – 15k out of 15k – there is no limitation. 
Any thing we post goes thru fine.


Testing directly to the server IP or DNS from out side the subnet (My 
desktop)


Max post size successful – 9417 bytes any variable with length more 
than that fails. All posted parameters show up as null.


Testing via F5 (load balanced set up)

Max characters successful – 6013 bytes from server and my desktop any 
variable with length more than that fails. All posted parameters show 
up as null.


Testing directly from server to server within the same subnet 
(172.28.76.x)


Total characters successful – 12663 out of 15k (this one worked 
partially when set to 15k but only 12663 made it through loosing 3k of 
data. This was a different result than the rest…in the sense that this 
is the only scenario where things got posted partially.


As you can see something is limiting the amount of character data 
being allowed as we test from different subnets. SSL puts a load in 
the data being transfer as well something else, we have adjusted 
during testing to accommodate for the extra load in order to make work 
but we have not identify what is limiting are adding additional data 
to the transfer package.


I have attached the server.xml

Please help and advice us how to resolve this.

Thanks,

Jyothi



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


No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.488 / Virus Database: 269.14.13/1074 - Release Date: 10/16/2007 2:14 PM



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



Re: PROBLEM POSTING LARGE DATA - TOMCAT6 SSL

2007-10-17 Thread Filip Hanik - Dev Lists
The 6.0.x branch is very stable, ie, there are very few changes going in 
at the moment.

you can build it yourself, by doing:

Requirements:
a) JDK 1.5
b) ANT 1.6.5+

svn co http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk trunk
cd trunk
ant download
ant

The bug has been present in both  6.0.10 and 6.0.14, so I'd recommend 
just building yourself, or waiting for 6.0.15.
If you decide to wait for .15 release, then just use the blocking 
connector instead of the NIO connector as a temporary work around


Filip

Jyothishree Honnavalli wrote:

Thank you. Can you please recommend an version of tomcat that is also
very stable and does not have this issue?.


Thanks.
Jyothi
 

 



-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 17, 2007 1:46 PM

To: Tomcat Users List
Subject: Re: PROBLEM POSTING LARGE DATA - TOMCAT6 SSL

there was a bug fix, that will come out in 6.0.15 to take care of this 
problem


Filip

Jyothishree Honnavalli wrote:
  

Hi,

We are having problems posting large chunks of data via tomcat ssl. We



  
are seeing that there is a limitation on how many characters can be 
submitted depending where the request is coming from. This is 
happening only when Tomcat is accessed over HTTPS. Problem does not 
occur when accessing Tomcat directly over HTTP (port 8080).


See testing results below...

Testing within the server where tomcat is installed/

Total characters successful - 15k out of 15k - there is no limitation.



  

Any thing we post goes thru fine.

Testing directly to the server IP or DNS from out side the subnet (My 
desktop)


Max post size successful - 9417 bytes any variable with length more 
than that fails. All posted parameters show up as null.


Testing via F5 (load balanced set up)

Max characters successful - 6013 bytes from server and my desktop any 
variable with length more than that fails. All posted parameters show 
up as null.


Testing directly from server to server within the same subnet 
(172.28.76.x)


Total characters successful - 12663 out of 15k (this one worked 
partially when set to 15k but only 12663 made it through loosing 3k of



  

data. This was a different result than the rest...in the sense that

this 
  

is the only scenario where things got posted partially.

As you can see something is limiting the amount of character data 
being allowed as we test from different subnets. SSL puts a load in 
the data being transfer as well something else, we have adjusted 
during testing to accommodate for the extra load in order to make work



  
but we have not identify what is limiting are adding additional data 
to the transfer package.


I have attached the server.xml

Please help and advice us how to resolve this.

Thanks,

Jyothi





  

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




  

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.488 / Virus Database: 269.14.13/1074 - Release Date:


10/16/2007 2:14 PM


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


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



  



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



RE: PROBLEM POSTING LARGE DATA - TOMCAT6 SSL

2007-10-17 Thread Jyothishree Honnavalli
Thank you. Can you please recommend an version of tomcat that is also
very stable and does not have this issue?.


Thanks.
Jyothi
 

 


-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 17, 2007 1:46 PM
To: Tomcat Users List
Subject: Re: PROBLEM POSTING LARGE DATA - TOMCAT6 SSL

there was a bug fix, that will come out in 6.0.15 to take care of this 
problem

Filip

Jyothishree Honnavalli wrote:

 Hi,

 We are having problems posting large chunks of data via tomcat ssl. We

 are seeing that there is a limitation on how many characters can be 
 submitted depending where the request is coming from. This is 
 happening only when Tomcat is accessed over HTTPS. Problem does not 
 occur when accessing Tomcat directly over HTTP (port 8080).

 See testing results below...

 Testing within the server where tomcat is installed/

 Total characters successful - 15k out of 15k - there is no limitation.

 Any thing we post goes thru fine.

 Testing directly to the server IP or DNS from out side the subnet (My 
 desktop)

 Max post size successful - 9417 bytes any variable with length more 
 than that fails. All posted parameters show up as null.

 Testing via F5 (load balanced set up)

 Max characters successful - 6013 bytes from server and my desktop any 
 variable with length more than that fails. All posted parameters show 
 up as null.

 Testing directly from server to server within the same subnet 
 (172.28.76.x)

 Total characters successful - 12663 out of 15k (this one worked 
 partially when set to 15k but only 12663 made it through loosing 3k of

 data. This was a different result than the rest...in the sense that
this 
 is the only scenario where things got posted partially.

 As you can see something is limiting the amount of character data 
 being allowed as we test from different subnets. SSL puts a load in 
 the data being transfer as well something else, we have adjusted 
 during testing to accommodate for the extra load in order to make work

 but we have not identify what is limiting are adding additional data 
 to the transfer package.

 I have attached the server.xml

 Please help and advice us how to resolve this.

 Thanks,

 Jyothi




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



 No virus found in this incoming message.
 Checked by AVG Free Edition. 
 Version: 7.5.488 / Virus Database: 269.14.13/1074 - Release Date:
10/16/2007 2:14 PM


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


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



TOmcat Engine Issue with netscaler

2007-10-17 Thread Vivek Singh
Hi I have an issue with running netscaler with HTTP connetor on 8080.

Before the netscaler arrived, I had an apache setup with mod _jk to talk to
the two tomcat HOST below 10.7.0.62 and 10.7.0.63 using 8009 connector(
Listed is the server.xml of the tomcat box with 10.7.0.61 as primary
interface), the Engine defaulthost was 10.7.0.63, and all was working
smooth.

Now, I created two new Hosts on tomcat of the same two applications above
- 10.7.0.62 and 10.7.0.63 ( As I did not wanted to disturb the existing
flow, till I get the netscaler working)

The two new hosts below are 10.7.0.58 ( same application as 10.7.0.63) and
10.7.0.66 ( same applicatioin as 10.7.0.62), I also brought upto virtual
interfaces for them on eth0:1 and eth0:2 with ips 10.7.0.58 and 10.7.0.66. I
also changed the defaulthost in the engine to 10.7.0.66.

Now the connection between netscaler and tomcats works fine but both
applications follow the defaulthost listed under Engine defaulthost which is
10.7.0.66, if I change that to 10.7.0.58, they go to 10.7.0.58. In
otherwords, they follow whatever is in defaulthost.

Please tell me what I am doing wrong here.

!-- Define an Apache-Connector Service --



  Service name=Tomcat-Apache





   !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --

Connector className=org.apache.coyote.tomcat5.CoyoteConnector

   port=8009 minProcessors=5 maxProcessors=150

   enableLookups=true redirectPort=8443

   acceptCount=10 debug=0 connectionTimeout=0

   useURIValidationHack=false

   protocolHandlerClassName=
org.apache.jk.server.JkCoyoteHandler/



Connector port=8080

   maxThreads=150 minSpareThreads=25 maxSpareThreads=75

   enableLookups=true redirectPort=8443 acceptCount=100

   debug=0 connectionTimeout=2

   disableUploadTimeout=true /



   !-- Engine name=Tomcat-Apache
defaultHost=10.7.0.63http://10.7.0.66/
debug=0 --

Engine name=Tomcat-Apache defaultHost=10.7.0.66 debug=0



Logger className=org.apache.catalina.logger.FileLogger

  prefix=apache_log. suffix=.txt

  timestamp=true/

  !-- Access log processes all requests for this virtual host. --

  Valve className=org.apache.catalina.valves.AccessLogValve

 directory=logs  prefix=localhost_access_log.
suffix=.txt

 pattern=common resolveHosts=false/



 Host name=10.7.0.63 debug=0
appBase=/opt/jakarta-tomcat-5.0.18/webapps/RO
OT/xxholdings

Alias10.7.0.61/Alias

Context path= docBase= debug=1/

   Valve className=org.apache.catalina.valves.AccessLogValve
dire
ctory=logs  prefix=home_access_log. suffix=.txt pattern=common
resolveHo
sts=false/

/Host



Host name=10.7.0.62 debug=0
appBase=/opt/jakarta-tomcat-5.0.18/web

apps/ROOT/mycompany

Alias10.7.0.61/Alias

Context path= docBase= debug=1/

Valve className=org.apache.catalina.valves.AccessLogValve
dir
ectory=logs  prefix=home_access_log. suffix=.txt pattern=common
resolveH
osts=false/

/Host



Host name=10.7.0.64 debug=0
appBase=/opt/jakarta-tomcat-5.0.18/web
apps/ROOT/legal

Alias10.7.0.64/Alias

Context path= docBase= debug=1/

Valve className=org.apache.catalina.valves.AccessLogValve
dir
ectory=logs  prefix=home_access_log. suffix=.txt pattern=common
resolveH
osts=false/

/Host



Host name=10.7.0.58 debug=0
appBase=/opt/jakarta-tomcat-5.0.18/webapps
  /ROOT/xxholdings

Alias10.7.0.58/Alias

Context path= docBase= debug=1/

/Host



Host name=10.7.0.66 debug=0
appBase=/opt/jakarta-tomcat-5.0.18/web

 apps/ROOT/mycompany

Alias10.7.0.66/Alias

Context path= docBase= debug=1/

 /Host

  /Engine



  /Service



/Server


RE: Connector Compression

2007-10-17 Thread Mike Cronin
Great responses guys!

Thanks very much!

Mike

Fax.com
The New Way To Fax!
www.fax.com
 
Confidential: This electronic message and all contents contain information
from Fax.com, Inc. which may be privileged, confidential or otherwise
protected from disclosure. The information is intended to be for the
addressee(s) only.  If you are not an addressee, any disclosure, copy,
distribution or use of the contents of this message is prohibited.  If you
have received this electronic message in error, please notify the sender by
reply e-mail and destroy the original message and all copies. Thank you.

-Original Message-
From: Peter Crowther [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 16, 2007 11:11 PM
To: Tomcat Users List
Subject: RE: Connector Compression

 From: Mike Cronin [mailto:[EMAIL PROTECTED] 
 Is there any reason why you would not want to use compression on a
 Connector?

You're trading CPU cycles (running the compression algorithm) for
bandwidth.  I suspect you're also trading a certain amount of RAM (some
extra buffers), though I haven't checked or measured how much so I may
be talking out of my hat (as usual).  Finally, you may be increasing the
time to the first byte arriving back at the client, as you're increasing
the amount of output the client has to generate before the first segment
of the response is sent.  If your servers are CPU-bound, you may not
have the spare cycles; if you're tight on RAM, check whether the
compression increases the memory use.  If you have timing requirements,
check that a system with compression enabled still meets them.

All that said, a typical business application almost certainly has
spare CPU, some spare RAM and no tight timing constraints on the first
byte being returned - it's generally bandwidth out of the server and
querying the database that are the limiting factors.

- Peter

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


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



Please help with APR configuration

2007-10-17 Thread alla winter
I am trying to set up Tomcat 5.0.28 with APR 1.1.9 on the Windows 2000
workstation
I downloaded openssl.exe and tcnative-1.dll and put them in the tomcat's bin
directory
I put an existing signed certificate and the key that works in production
with APACHE web server into TOMCAT conf directory and updated my
server.xml( see bellow), but I am getting the following error message:
SEVERE: Error initializing endpoint
java.io.FileNotFoundException: C:\.keystore (The system cannot find the file
specified)
 at java.io.FileInputStream.open(Native Method)...

that seems to me that APR had not been installed and it is looking for
java's keystore.
I even put an explicit reference to this directory in catalina.bat (set
PATH=%PATH%;%CATALINA_HOME%\bin) , but it didn't make any diference.  What
am I doing wrong?

I would appreciate your help.  thanks


Server port=8005 shutdown=SHUTDOWN
  GlobalNamingResources
!-- Used by Manager webapp --
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
/Resource
ResourceParams name=UserDatabase
  parameter
namefactory/name
valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
  /parameter
  parameter
namepathname/name
valueconf/tomcat-users.xml/value
  /parameter
/ResourceParams
  /GlobalNamingResources

  Service name=Catalina
Connector port=80 redirectPort=443/
  !--  Define a SSL Coyote HTTP/1.1 Connector on port 443  --


   Connector port=443
   maxThreads=150 minSpareThreads=25 maxSpareThreads=75
   enableLookups=false disableUploadTimeout=true
   acceptCount=100 debug=0 scheme=https secure=true
   clientAuth=false sslProtocol=TLS
SSLEngine=on SSLCertificateFile=c:\jakarta-
tomcat-5.0.28\conf\mycobrasource.crt
SSLCertificateKeyFile=c:\jakarta-
tomcat-5.0.28\conf\mycobrasource.key

  /




!-- This is here for compatibility only, not required --
Connector port=8009 protocol=AJP/1.3 /

Engine name=Catalina defaultHost=localhost
  Logger className=org.apache.catalina.logger.FileLogger /

  Realm className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase /

  Host name=localhost appBase=webapps /
 Valve className=org.apache.catalina.valves.AccessLogValve
  directory=logs prefix=localhost_access_log.
 suffix=.txt pattern=common resolveHosts=false /

/Engine
  /Service
/Server


Re: Please help with APR configuration

2007-10-17 Thread Filip Hanik - Dev Lists

APR is not available on Tomcat 5.0

you need Tomcat 5.5 or 6.0

Filip

alla winter wrote:

I am trying to set up Tomcat 5.0.28 with APR 1.1.9 on the Windows 2000
workstation
I downloaded openssl.exe and tcnative-1.dll and put them in the tomcat's bin
directory
I put an existing signed certificate and the key that works in production
with APACHE web server into TOMCAT conf directory and updated my
server.xml( see bellow), but I am getting the following error message:
SEVERE: Error initializing endpoint
java.io.FileNotFoundException: C:\.keystore (The system cannot find the file
specified)
 at java.io.FileInputStream.open(Native Method)...

that seems to me that APR had not been installed and it is looking for
java's keystore.
I even put an explicit reference to this directory in catalina.bat (set
PATH=%PATH%;%CATALINA_HOME%\bin) , but it didn't make any diference.  What
am I doing wrong?

I would appreciate your help.  thanks


Server port=8005 shutdown=SHUTDOWN
  GlobalNamingResources
!-- Used by Manager webapp --
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
/Resource
ResourceParams name=UserDatabase
  parameter
namefactory/name
valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
  /parameter
  parameter
namepathname/name
valueconf/tomcat-users.xml/value
  /parameter
/ResourceParams
  /GlobalNamingResources

  Service name=Catalina
Connector port=80 redirectPort=443/
  !--  Define a SSL Coyote HTTP/1.1 Connector on port 443  --


   Connector port=443
   maxThreads=150 minSpareThreads=25 maxSpareThreads=75
   enableLookups=false disableUploadTimeout=true
   acceptCount=100 debug=0 scheme=https secure=true
   clientAuth=false sslProtocol=TLS
SSLEngine=on SSLCertificateFile=c:\jakarta-
tomcat-5.0.28\conf\mycobrasource.crt
SSLCertificateKeyFile=c:\jakarta-
tomcat-5.0.28\conf\mycobrasource.key

  /




!-- This is here for compatibility only, not required --
Connector port=8009 protocol=AJP/1.3 /

Engine name=Catalina defaultHost=localhost
  Logger className=org.apache.catalina.logger.FileLogger /

  Realm className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase /

  Host name=localhost appBase=webapps /
 Valve className=org.apache.catalina.valves.AccessLogValve
  directory=logs prefix=localhost_access_log.
 suffix=.txt pattern=common resolveHosts=false /

/Engine
  /Service
/Server

  



No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.488 / Virus Database: 269.14.13/1074 - Release Date: 10/16/2007 2:14 PM
  



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



RE: PROBLEM POSTING LARGE DATA - TOMCAT6 SSL

2007-10-17 Thread Jyothishree Honnavalli
We have decided to wait till .15 realease.  Another set of people want
to use the 5.5.x . Do you know if the 5.5.x has this issue?

Also, can you pls. let me the know if using this class for ssl connector
org.apache.coyote.http11.Http11Protocol will solve this.

Thanks.
Jyothi
 


-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 17, 2007 2:21 PM
To: Tomcat Users List
Subject: Re: PROBLEM POSTING LARGE DATA - TOMCAT6 SSL

The 6.0.x branch is very stable, ie, there are very few changes going in

at the moment.
you can build it yourself, by doing:

Requirements:
a) JDK 1.5
b) ANT 1.6.5+

svn co http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk trunk
cd trunk
ant download
ant

The bug has been present in both  6.0.10 and 6.0.14, so I'd recommend 
just building yourself, or waiting for 6.0.15.
If you decide to wait for .15 release, then just use the blocking 
connector instead of the NIO connector as a temporary work around

Filip

Jyothishree Honnavalli wrote:
 Thank you. Can you please recommend an version of tomcat that is also
 very stable and does not have this issue?.


 Thanks.
 Jyothi
  

  


 -Original Message-
 From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, October 17, 2007 1:46 PM
 To: Tomcat Users List
 Subject: Re: PROBLEM POSTING LARGE DATA - TOMCAT6 SSL

 there was a bug fix, that will come out in 6.0.15 to take care of this

 problem

 Filip

 Jyothishree Honnavalli wrote:
   
 Hi,

 We are having problems posting large chunks of data via tomcat ssl.
We
 

   
 are seeing that there is a limitation on how many characters can be 
 submitted depending where the request is coming from. This is 
 happening only when Tomcat is accessed over HTTPS. Problem does not 
 occur when accessing Tomcat directly over HTTP (port 8080).

 See testing results below...

 Testing within the server where tomcat is installed/

 Total characters successful - 15k out of 15k - there is no
limitation.
 

   
 Any thing we post goes thru fine.

 Testing directly to the server IP or DNS from out side the subnet (My

 desktop)

 Max post size successful - 9417 bytes any variable with length more 
 than that fails. All posted parameters show up as null.

 Testing via F5 (load balanced set up)

 Max characters successful - 6013 bytes from server and my desktop any

 variable with length more than that fails. All posted parameters show

 up as null.

 Testing directly from server to server within the same subnet 
 (172.28.76.x)

 Total characters successful - 12663 out of 15k (this one worked 
 partially when set to 15k but only 12663 made it through loosing 3k
of
 

   
 data. This was a different result than the rest...in the sense that
 
 this 
   
 is the only scenario where things got posted partially.

 As you can see something is limiting the amount of character data 
 being allowed as we test from different subnets. SSL puts a load in 
 the data being transfer as well something else, we have adjusted 
 during testing to accommodate for the extra load in order to make
work
 

   
 but we have not identify what is limiting are adding additional data 
 to the transfer package.

 I have attached the server.xml

 Please help and advice us how to resolve this.

 Thanks,

 Jyothi


 


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

 


   
 No virus found in this incoming message.
 Checked by AVG Free Edition. 
 Version: 7.5.488 / Virus Database: 269.14.13/1074 - Release Date:
 
 10/16/2007 2:14 PM


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


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



   


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


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



Re: PROBLEM POSTING LARGE DATA - TOMCAT6 SSL

2007-10-17 Thread Filip Hanik - Dev Lists

the issue is only present in the NIO connector, ie, Http11NioProtocol

Filip

Jyothishree Honnavalli wrote:

We have decided to wait till .15 realease.  Another set of people want
to use the 5.5.x . Do you know if the 5.5.x has this issue?
  
Also, can you pls. let me the know if using this class for ssl connector

org.apache.coyote.http11.Http11Protocol will solve this.

Thanks.
Jyothi
 



-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 17, 2007 2:21 PM

To: Tomcat Users List
Subject: Re: PROBLEM POSTING LARGE DATA - TOMCAT6 SSL

The 6.0.x branch is very stable, ie, there are very few changes going in

at the moment.
you can build it yourself, by doing:

Requirements:
a) JDK 1.5
b) ANT 1.6.5+

svn co http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk trunk
cd trunk
ant download
ant

The bug has been present in both  6.0.10 and 6.0.14, so I'd recommend 
just building yourself, or waiting for 6.0.15.
If you decide to wait for .15 release, then just use the blocking 
connector instead of the NIO connector as a temporary work around


Filip

Jyothishree Honnavalli wrote:
  

Thank you. Can you please recommend an version of tomcat that is also
very stable and does not have this issue?.


Thanks.
Jyothi
 

 



-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 17, 2007 1:46 PM

To: Tomcat Users List
Subject: Re: PROBLEM POSTING LARGE DATA - TOMCAT6 SSL

there was a bug fix, that will come out in 6.0.15 to take care of this



  

problem

Filip

Jyothishree Honnavalli wrote:
  


Hi,

We are having problems posting large chunks of data via tomcat ssl.
  

We
  

  
  

are seeing that there is a limitation on how many characters can be 
submitted depending where the request is coming from. This is 
happening only when Tomcat is accessed over HTTPS. Problem does not 
occur when accessing Tomcat directly over HTTP (port 8080).


See testing results below...

Testing within the server where tomcat is installed/

Total characters successful - 15k out of 15k - there is no
  

limitation.
  

  
  


Any thing we post goes thru fine.

Testing directly to the server IP or DNS from out side the subnet (My
  


  

desktop)

Max post size successful - 9417 bytes any variable with length more 
than that fails. All posted parameters show up as null.


Testing via F5 (load balanced set up)

Max characters successful - 6013 bytes from server and my desktop any
  


  

variable with length more than that fails. All posted parameters show
  


  

up as null.

Testing directly from server to server within the same subnet 
(172.28.76.x)


Total characters successful - 12663 out of 15k (this one worked 
partially when set to 15k but only 12663 made it through loosing 3k
  

of
  

  
  


data. This was a different result than the rest...in the sense that

  
this 
  


is the only scenario where things got posted partially.

As you can see something is limiting the amount of character data 
being allowed as we test from different subnets. SSL puts a load in 
the data being transfer as well something else, we have adjusted 
during testing to accommodate for the extra load in order to make
  

work
  

  
  

but we have not identify what is limiting are adding additional data 
to the transfer package.


I have attached the server.xml

Please help and advice us how to resolve this.

Thanks,

Jyothi



  


  
  


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


  


  
  


No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.488 / Virus Database: 269.14.13/1074 - Release Date:

  

10/16/2007 2:14 PM


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


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



  




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


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

Re: Please help with APR configuration

2007-10-17 Thread alla winter
thanks for your prompt response

On 10/17/07, alla winter [EMAIL PROTECTED] wrote:

 I am trying to set up Tomcat 5.0.28 with APR 1.1.9 on the Windows 2000
 workstation
 I downloaded openssl.exe and tcnative-1.dll and put them in the tomcat's
 bin directory
 I put an existing signed certificate and the key that works in production
 with APACHE web server into TOMCAT conf directory and updated my
 server.xml ( see bellow), but I am getting the following error message:
 SEVERE: Error initializing endpoint
 java.io.FileNotFoundException: C:\.keystore (The system cannot find the
 file specified)
  at java.io.FileInputStream.open(Native Method)...

 that seems to me that APR had not been installed and it is looking for
 java's keystore.
 I even put an explicit reference to this directory in catalina.bat (set
 PATH=%PATH%;%CATALINA_HOME%\bin) , but it didn't make any diference.  What
 am I doing wrong?

 I would appreciate your help.  thanks


 Server port=8005 shutdown=SHUTDOWN
   GlobalNamingResources
 !-- Used by Manager webapp --
 Resource name=UserDatabase auth=Container
   type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved
 /Resource
 ResourceParams name=UserDatabase
   parameter
 namefactory/name
 valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
   /parameter
   parameter
 namepathname/name
 valueconf/tomcat-users.xml/value
   /parameter
 /ResourceParams
   /GlobalNamingResources

   Service name=Catalina
 Connector port=80 redirectPort=443/
   !--  Define a SSL Coyote HTTP/1.1 Connector on port 443  --


Connector port=443
maxThreads=150 minSpareThreads=25 maxSpareThreads=75
enableLookups=false disableUploadTimeout=true
acceptCount=100 debug=0 scheme=https secure=true
clientAuth=false sslProtocol=TLS
 SSLEngine=on SSLCertificateFile=c:\jakarta-
 tomcat-5.0.28\conf\mycobrasource.crt
 SSLCertificateKeyFile=c:\jakarta-
 tomcat-5.0.28\conf\mycobrasource.key

   /




 !-- This is here for compatibility only, not required --
 Connector port=8009 protocol=AJP/1.3 /

 Engine name=Catalina defaultHost=localhost
   Logger className=org.apache.catalina.logger.FileLogger /

   Realm className=org.apache.catalina.realm.UserDatabaseRealm
  resourceName=UserDatabase /

   Host name=localhost appBase=webapps /
  Valve className=org.apache.catalina.valves.AccessLogValve
   directory=logs prefix=localhost_access_log.
  suffix=.txt pattern=common resolveHosts=false /

 /Engine
   /Service
 /Server








Re: Native Library Not found

2007-10-17 Thread Arun
Ok,
I have taken all the posts seriously. I have not ran into a solution. Let me
work on the suggestions you provided. I  resolved the OOME , but I am
worried about scaling users in my server, if  tomcat consumes this much
memory.  As you said since tomcat is not taking the memory  I will further
investigate as to why the memory gets used this much. Thanks again for all
the help provided. Sorry for me being so obtrusive.


On 10/17/07, Christopher Schultz [EMAIL PROTECTED] wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Arun,

 Arun wrote:
  I am replying once again, as I thought I need more help on these.
 
  top - 15:49:32 up 2 days, 21:33,  1 user,  load average: 0.26, 0.28,
 0.20
  Tasks:  57 total,   2 running,  55 sleeping,   0 stopped,   0 zombie
  Cpu(s):  4.5%us,  0.5%sy,  0.0%ni, 94.5%id,  0.0%wa,  0.0%hi,  0.5%si,
  0.0%st
  Mem:   2074972k total,  2019180k used,55792k free,   228732k buffers
  Swap:  6072528k total,  108k used,  6072420k free,  1383868k cached
 
PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
  12496 root  18   0  971m 285m  12m S9 14.1 165:55.34 java
   4423 mysql 15   0  129m  28m 5404 S2  1.4  67:49.96 mysqld
  1 root  18   0  2912 1848  524 S0  0.1   0:01.44 init
  2 root  RT   0 000 S0  0.0   0:00.00 migration/0
  This is my machines top. I am using tomcat 6 and it has eaten all my
 memory.
  Only 56 Mb reamains.

 Actually, the java process is only taking 285MB of physical memory. The
 process has allocated just under 1GB of memory, but is not using it at
 all (since virtual - resident cannot possibly fit into your 108k of used
 swap, you can tell that nothing has been swapped-out).

 Some other process has the rest of your 2GB physical memory tied up. top
 even tells you that your java process is only taking up 14% of your
 memory. What's the problem?

  I have a 2GB memory. I have added a connection pool
  using commons-dbcp and thought that will reduce the probs.

 How many connections do you have configured? If you were using one
 connection before, and now you're pooling connections, then you probably
 are using /more/ memory than before.

  As I told there is a [Quartz] scheduler running on every minute.
 
  Looks
  like I have some memory leak.

 Maybe, maybe not. Does your application eventually crash? If so, how? If
 you turn off the scheduler, does the memory problem go away? What does
 Java report as the free/total/ma heap values (hint: look at the
 java.lang.Runtime class).

  Otherwise why does my machine uses this memory
  this much. I have an autobuild script running everyday which checkouts
 from
  sourceforge cvs , stops the servers, build it and redeploy and start
 tomcat.

 So, you are experiencing an OOM before an entire day goes by? Wow. I've
 never heard of rolling reboots on non-MS-Windows machines. ;)

  I have not used any tweaks in xml.Should I tune the server to production
  mode. What is the solution? Why does not the objects get garbage
  collected.?

 You have received many, /many/ suggestions from other posters as well as
 myself. You have followed none of them. We ask you to provide more
 information and you do not. Instead, you notify us that you are trying
 some other strategy (switching JVM version, etc.). Finally, you changed
 your PermGen heap allocation and everything was working again.

 Are you saying that now you are having problems again? Or, are you
 simply worried about the amount of memory taken by your application?
 Java applications simply take up a lot of memory. Complex applications
 take up a lot of memory. Complex Java applications take even /more/
 memory. Webapps count as complex applications. Maybe you just need a
 bunch of RAM to run your application. Have you considered that?

 - -chris

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

 iD8DBQFHFhOP9CaO5/Lv0PARAtb9AJ9E6a+oOpSMWVDTdyMY2I7RYn5U1QCdHgVO
 BUSCpyDFzkEBOitqqH2UQgo=
 =pc4x
 -END PGP SIGNATURE-

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




-- 
Thanks
Arun George


Re: UTF-8 Properties File

2007-10-17 Thread Billy Ng
This is the major problem for the people to localize context.  \u 
unicode format is not readable to them.


The native2ascii will add the BOM to the beginning to fail ResourceBundle.

Billy Ng

- Original Message - 
From: Tim Funk [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Wednesday, October 17, 2007 3:40 AM
Subject: Re: UTF-8 Properties File


There is no such thing as UTF-8 properties files. Tomcat follows the same 
rules as java when reading properties files.


Properties file must be ISO8859-1 and if you have characters outside of 
that character set - then you use native2ascii to encode those other 
characters.


-Tim

Billy Ng wrote:

Hi folks,

Besides using native2ascii, would someone please recommend me how to make 
tocmat to work with UTF-8 properties files, thanks!


Billy Ng



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




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



RE: PROBLEM POSTING LARGE DATA - TOMCAT6 SSL

2007-10-17 Thread Jyothishree Honnavalli
Thanks! I changed the connector and it worked great. Thank you soo much.

Once .15 is ready, do you recommend I put back the Nio class?

Jyothi



-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 17, 2007 3:49 PM
To: Tomcat Users List
Subject: Re: PROBLEM POSTING LARGE DATA - TOMCAT6 SSL

the issue is only present in the NIO connector, ie, Http11NioProtocol

Filip

Jyothishree Honnavalli wrote:
 We have decided to wait till .15 realease.  Another set of people want
 to use the 5.5.x . Do you know if the 5.5.x has this issue?
   
 Also, can you pls. let me the know if using this class for ssl
connector
 org.apache.coyote.http11.Http11Protocol will solve this.

 Thanks.
 Jyothi
  


 -Original Message-
 From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, October 17, 2007 2:21 PM
 To: Tomcat Users List
 Subject: Re: PROBLEM POSTING LARGE DATA - TOMCAT6 SSL

 The 6.0.x branch is very stable, ie, there are very few changes going
in

 at the moment.
 you can build it yourself, by doing:

 Requirements:
 a) JDK 1.5
 b) ANT 1.6.5+

 svn co http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk trunk
 cd trunk
 ant download
 ant

 The bug has been present in both  6.0.10 and 6.0.14, so I'd recommend 
 just building yourself, or waiting for 6.0.15.
 If you decide to wait for .15 release, then just use the blocking 
 connector instead of the NIO connector as a temporary work around

 Filip

 Jyothishree Honnavalli wrote:
   
 Thank you. Can you please recommend an version of tomcat that is also
 very stable and does not have this issue?.


 Thanks.
 Jyothi
  

  


 -Original Message-
 From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, October 17, 2007 1:46 PM
 To: Tomcat Users List
 Subject: Re: PROBLEM POSTING LARGE DATA - TOMCAT6 SSL

 there was a bug fix, that will come out in 6.0.15 to take care of
this
 

   
 problem

 Filip

 Jyothishree Honnavalli wrote:
   
 
 Hi,

 We are having problems posting large chunks of data via tomcat ssl.
   
 We
   
 
   
   
 
 are seeing that there is a limitation on how many characters can be 
 submitted depending where the request is coming from. This is 
 happening only when Tomcat is accessed over HTTPS. Problem does not 
 occur when accessing Tomcat directly over HTTP (port 8080).

 See testing results below...

 Testing within the server where tomcat is installed/

 Total characters successful - 15k out of 15k - there is no
   
 limitation.
   
 
   
   
 
 Any thing we post goes thru fine.

 Testing directly to the server IP or DNS from out side the subnet
(My
   

   
 desktop)

 Max post size successful - 9417 bytes any variable with length more 
 than that fails. All posted parameters show up as null.

 Testing via F5 (load balanced set up)

 Max characters successful - 6013 bytes from server and my desktop
any
   

   
 variable with length more than that fails. All posted parameters
show
   

   
 up as null.

 Testing directly from server to server within the same subnet 
 (172.28.76.x)

 Total characters successful - 12663 out of 15k (this one worked 
 partially when set to 15k but only 12663 made it through loosing 3k
   
 of
   
 
   
   
 
 data. This was a different result than the rest...in the sense that
 
   
 this 
   
 
 is the only scenario where things got posted partially.

 As you can see something is limiting the amount of character data 
 being allowed as we test from different subnets. SSL puts a load in 
 the data being transfer as well something else, we have adjusted 
 during testing to accommodate for the extra load in order to make
   
 work
   
 
   
   
 
 but we have not identify what is limiting are adding additional data

 to the transfer package.

 I have attached the server.xml

 Please help and advice us how to resolve this.

 Thanks,

 Jyothi


 
   


   
   
 

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

 
   


   
   
 
 No virus found in this incoming message.
 Checked by AVG Free Edition. 
 Version: 7.5.488 / Virus Database: 269.14.13/1074 - Release Date:
 
   
 10/16/2007 2:14 PM


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


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

Re: UTF-8 Properties File

2007-10-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Billy,

Billy Ng wrote:
 This is the major problem for the people to localize context.  \u
 unicode format is not readable to them.

That's why most people use native2ascii as part of their deployment
procedure, and don't bother developers with that kind of detail.

 The native2ascii will add the BOM to the beginning to fail ResourceBundle.

It will? ISO-8859-1 shouldn't have a BOM. How are you running native2ascii?

- -chris

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

iD8DBQFHFm/Y9CaO5/Lv0PARAnjBAKCx260jasjJgS3mPCNRtMQVkljRiQCdHZlv
C5TFQ1zOqRwjLeJUoozen+4=
=XEC8
-END PGP SIGNATURE-

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



Re: UTF-8 Properties File

2007-10-17 Thread Konstantin Kolinko
You may try some tools to edit those files.

E.g., I am using this one as a plugin for Eclipse, but it may run separately:
http://propedit.sourceforge.jp/index_en.html


2007/10/17, Billy Ng [EMAIL PROTECTED]:
 This is the major problem for the people to localize context.  \u
 unicode format is not readable to them.

 The native2ascii will add the BOM to the beginning to fail ResourceBundle.

 Billy Ng

 - Original Message -
 From: Tim Funk [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Wednesday, October 17, 2007 3:40 AM
 Subject: Re: UTF-8 Properties File


  There is no such thing as UTF-8 properties files. Tomcat follows the same
  rules as java when reading properties files.
 
  Properties file must be ISO8859-1 and if you have characters outside of
  that character set - then you use native2ascii to encode those other
  characters.
 
  -Tim
 
  Billy Ng wrote:
  Hi folks,
 
  Besides using native2ascii, would someone please recommend me how to make
  tocmat to work with UTF-8 properties files, thanks!
 
  Billy Ng
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


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



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



Re: Advice about Tomcat on x86_64 architecture..

2007-10-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Swapnil,

Swapnil.Kale wrote:
 I tried installing tomcat 32 bit on a 64 bit JVM but it didnt work.

What OS? Sounds like Windows.

It's possible that you lack the 32-bit support libraries required by the
32-bit JVM. Is there a 32-bit support package that needs to be installed?

 I tried following on the mini how to install tomcat on 64 bit OS but didnt
 succeed.

Get the JVM working, first.

 What i found on internet is we need 64 bit executable for tomcat to run to
 64 bit jvm and 64 bit OS offcourse

If you are using tcnative, yes, you will need to match your
architecture. Tomcat itself is 100% Java, so if the JVM runs, Tomcat
will run. Other connectors and stuff may need tweaking, such as
tcnative, APR module, isapi redirector, or tomcat.exe -- the MS Windows
service binary. All of these are optional.

 Few Questions : 
 1) Can i host 32 bit compiled war file on 64 bit Tomcat / JVM ? If my
 tomcat installation succeeds

Absolutely. Your WAR is not architecture-specific. Remember write once,
run anywhere? This is what that means.

 2) What if i recompile the war on 64 bit jvm and host it on 64 bit Tomcat?

Again, the WAR is architecture-neutral, as is Tomcat. Only the OS and
JVM have 32-bit and 64-bit versions.

 I've read that the size of the primitive datatypes in 64 bit is different,

You have read incorrectly. Java's primitive types are defined to have
specific sizes, regardless of the architecture of the machine on which
it is running. The JVM may choose to use differently-sized data under
the covers, but your Java code will be unaware of any such issues.

Hope that clears a few things up,
- -chris

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

iD8DBQFHFnGX9CaO5/Lv0PARAvDgAJ4mYnQiC0tGUNYwSwBC9hvr0JkISACgsdKH
M8aJEnVv0AXVAaC7pSZei5s=
=ToKc
-END PGP SIGNATURE-

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



Re: Native Library Not found

2007-10-17 Thread Martin Gainty
+1 agree with chris
(I boosted to 4GB and I dont see any OOM's so getting more RAM always helps)

If you run JConsole you will see your java memory allocation over time (so
you can determine at what time which process is launched and consumes the
most memory)

M--


 Ok,
 I have taken all the posts seriously. I have not ran into a solution. Let
me
 work on the suggestions you provided. I  resolved the OOME , but I am
 worried about scaling users in my server, if  tomcat consumes this much
 memory.  As you said since tomcat is not taking the memory  I will further
 investigate as to why the memory gets used this much. Thanks again for all
 the help provided. Sorry for me being so obtrusive.


 On 10/17/07, Christopher Schultz [EMAIL PROTECTED] wrote:
 
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
  Arun,
 
  Arun wrote:
   I am replying once again, as I thought I need more help on these.
  
   top - 15:49:32 up 2 days, 21:33,  1 user,  load average: 0.26, 0.28,
  0.20
   Tasks:  57 total,   2 running,  55 sleeping,   0 stopped,   0 zombie
   Cpu(s):  4.5%us,  0.5%sy,  0.0%ni, 94.5%id,  0.0%wa,  0.0%hi,  0.5%si,
   0.0%st
   Mem:   2074972k total,  2019180k used,55792k free,   228732k
buffers
   Swap:  6072528k total,  108k used,  6072420k free,  1383868k
cached
  
 PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
   12496 root  18   0  971m 285m  12m S9 14.1 165:55.34 java
4423 mysql 15   0  129m  28m 5404 S2  1.4  67:49.96 mysqld
   1 root  18   0  2912 1848  524 S0  0.1   0:01.44 init
   2 root  RT   0 000 S0  0.0   0:00.00
migration/0
   This is my machines top. I am using tomcat 6 and it has eaten all my
  memory.
   Only 56 Mb reamains.
 
  Actually, the java process is only taking 285MB of physical memory. The
  process has allocated just under 1GB of memory, but is not using it at
  all (since virtual - resident cannot possibly fit into your 108k of used
  swap, you can tell that nothing has been swapped-out).
 
  Some other process has the rest of your 2GB physical memory tied up. top
  even tells you that your java process is only taking up 14% of your
  memory. What's the problem?
 
   I have a 2GB memory. I have added a connection pool
   using commons-dbcp and thought that will reduce the probs.
 
  How many connections do you have configured? If you were using one
  connection before, and now you're pooling connections, then you probably
  are using /more/ memory than before.
 
   As I told there is a [Quartz] scheduler running on every minute.
  
   Looks
   like I have some memory leak.
 
  Maybe, maybe not. Does your application eventually crash? If so, how? If
  you turn off the scheduler, does the memory problem go away? What does
  Java report as the free/total/ma heap values (hint: look at the
  java.lang.Runtime class).
 
   Otherwise why does my machine uses this memory
   this much. I have an autobuild script running everyday which checkouts
  from
   sourceforge cvs , stops the servers, build it and redeploy and start
  tomcat.
 
  So, you are experiencing an OOM before an entire day goes by? Wow. I've
  never heard of rolling reboots on non-MS-Windows machines. ;)
 
   I have not used any tweaks in xml.Should I tune the server to
production
   mode. What is the solution? Why does not the objects get garbage
   collected.?
 
  You have received many, /many/ suggestions from other posters as well as
  myself. You have followed none of them. We ask you to provide more
  information and you do not. Instead, you notify us that you are trying
  some other strategy (switching JVM version, etc.). Finally, you changed
  your PermGen heap allocation and everything was working again.
 
  Are you saying that now you are having problems again? Or, are you
  simply worried about the amount of memory taken by your application?
  Java applications simply take up a lot of memory. Complex applications
  take up a lot of memory. Complex Java applications take even /more/
  memory. Webapps count as complex applications. Maybe you just need a
  bunch of RAM to run your application. Have you considered that?
 
  - -chris
 
  -BEGIN PGP SIGNATURE-
  Version: GnuPG v1.4.7 (MingW32)
  Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
  iD8DBQFHFhOP9CaO5/Lv0PARAtb9AJ9E6a+oOpSMWVDTdyMY2I7RYn5U1QCdHgVO
  BUSCpyDFzkEBOitqqH2UQgo=
  =pc4x
  -END PGP SIGNATURE-
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Thanks
 Arun George



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



Re: jndi.properties in Tomcat 5.5.23 ??

2007-10-17 Thread Konstantin Kolinko
I do not have recent experience with JNDI, so the following are just
my guesses, trying to help.

May be someone will provide a better answer, or You will be able to
find it by yourself.

Thus said, it looks to me that what you are trying is not possible.

As seen from [1], Tomcat 5.5 already has some meaningful configuration
for new InitialContext(), thus your jndi.properties will
overwrite/conflict with that one.

[1]: http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html

Thus, you may want to explicitly specify the set of properties, using
new InitialContext(Hashtable?,? environment)
  Constructs an initial context using the supplied environment.

It should work.

It is a theory. It may be wrong somehow.

2007/10/16, Robert Upshall [EMAIL PROTECTED]:
 I have an existing application that accesses JBoss with the jndi info
 defined in the jndi.properties file.

 I want to make a web enabled version of that application.  I have copied
 the access code from my application into my servlet.  When I run the
 servlet I get :

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

 I know this is a jndi problem, where do I need to put my jndi.properties
 file in Tomcat 5.5.23 for my InitialContext to find it?

 Here is my jndi.properties file:

 -
 java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
 java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
 java.naming.provider.url=172.16.145.140
 --

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



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



Re: custom web.xml digester call

2007-10-17 Thread Konstantin Kolinko
 Is it possible to call the digester of the web.xml by hand?

Hmm, I can imagine a couple of ways how I am able to call it, thus it
is theoretically possible.

Why do you need it? Do you need to go that way?

See, that
1. You have not said about your reasons.

2. You have not said about your constraints, environment.

Thus said, to call internal Tomcat classes, you need either to be a
part of Tomcat, or to make them accessible to the webapp classloader.
You should know, how to achieve that.

But beware that:
1) that may conflict with the SecurityManager configuration, if you
are using it. You may need to adjust the policy.
2) your webapp will be Tomcat specific, or even bound to specific
Tomcat release / version.

These are internal classes, not a public API.


Best regards,


2007/10/17, Auke Noppe [EMAIL PROTECTED]:
 Hi,



 Is it possible to call the digester of the web.xml by hand?

 Like you can override the createstartdigester method in catalina.java?



 Regards,



 Auke Noppe


 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.5.488 / Virus Database: 269.14.13/1074 - Release Date: 16-10-2007
 14:14



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



Re: UTF-8 Properties File

2007-10-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

All,

Konstantin Kolinko wrote:
 You may try some tools to edit those files.

I am a native English speaker, and we use Attesoro
(http://attesoro.org/) to create localized properties files. It allows
you to use natural text, but saves to ISO-8859-1 transparently. It also
shows you which keys do/do not have values, which makes additional keys
(that is, keys added due to a new feature, etc.) much easier to manage.

- -chris

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

iD8DBQFHFora9CaO5/Lv0PARAnokAKCrUJxu2cLEKR0juRAmMZZPZByvoACfeNJk
9DoyvSn7GEUUSwf52ouweLk=
=kLTs
-END PGP SIGNATURE-

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



Re: custom web.xml digester call

2007-10-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Auke,

Auke Noppe wrote:
 Is it possible to call the digester of the web.xml by hand?
 
 Like you can override the createstartdigester method in catalina.java?

If you need information from web.xml, you could always parse it yourself
by hand or using commons-digester.

- -chris

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

iD8DBQFHFos09CaO5/Lv0PARAv0vAKCYjUAsAk8g7YZcAPgam/iIuDPLngCdGI5z
G1gtRR8xNanxbGhTVXTEyQU=
=DLsQ
-END PGP SIGNATURE-

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



Re: UTF-8 Properties File

2007-10-17 Thread Billy Ng
Don't know why  It happens to me.  If you google native2ascii BOM, you 
will see what other people were complaining.


Billy Ng

- Original Message - 
From: Christopher Schultz [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Wednesday, October 17, 2007 1:26 PM
Subject: Re: UTF-8 Properties File



-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Billy,

Billy Ng wrote:

This is the major problem for the people to localize context.  \u
unicode format is not readable to them.


That's why most people use native2ascii as part of their deployment
procedure, and don't bother developers with that kind of detail.

The native2ascii will add the BOM to the beginning to fail 
ResourceBundle.


It will? ISO-8859-1 shouldn't have a BOM. How are you running 
native2ascii?


- -chris

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

iD8DBQFHFm/Y9CaO5/Lv0PARAnjBAKCx260jasjJgS3mPCNRtMQVkljRiQCdHZlv
C5TFQ1zOqRwjLeJUoozen+4=
=XEC8
-END PGP SIGNATURE-

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




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



Re: UTF-8 Properties File

2007-10-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Billy,

(Note that this isn't a Tomcat problem; it's a Java problem.)

Billy Ng wrote:
 Don't know why?  It happens to me.  If you google native2ascii BOM,
 you will see what other people were complaining.

They are complaining that native2ascii is not removing the BOM mark from
their input files, not that the BOM is being added to the output files.

UTF-8-encoded files do not need a BOM, but it is not strictly
prohibited. In your case, you already have a BOM in your UTF-8 file.

While it's regrettable that Sun won't fix the bug (actually, they have,
and then they un-fixed it because it broke older code), you ought to be
able to work around it.

There are so many workarounds, I'm not sure where to start. Here are the
ones I can immediately think of, in increasing-PITA-order:

- - Use UTF-16 as your source encoding instead of UTF-8.

- - Add a comment or blank line at the top of your properties files.
  All my props files have a comment and CVS info at the top, which
  is why I've never noticed.

- - Do you use native2ascii in your deployment, or do you hand-transcode
  these files when necessary? I ask because it would be pretty easy to
  chop-off the BOM from the file before running it through native2ascii
  if you were doing it as part of an automated deployment.

- - Another strategy would be to write your own native2ascii, which
  shouldn't be too difficult to do; write it with the BOM-sensitivity in
  mind. You could even replace native2ascii on your system.

- -chris

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

iD8DBQFHFpQ+9CaO5/Lv0PARAl7cAJ9mL2WEIzw3z/Z7OewZEDjGfqrZ8wCeL5Ih
J9E2eGX/laAtic3ZuI56kE4=
=8ZdG
-END PGP SIGNATURE-

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



RE: UTF-8 Properties File

2007-10-17 Thread ehawkes
Hi, 

Are you sure that the original UTF-8 source file doesn't 
have a BOM in it?  native2ascii will not strip that BOM 
from the input file.  

Also, if you edit either file with an editor such as 
Notepad, it will include a BOM.  

Thanks, 

Eric 


-Original Message-
From: Billy Ng [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 17, 2007 3:26 PM
To: Tomcat Users List
Subject: Re: UTF-8 Properties File

Don't know why  It happens to me.  If you google native2ascii BOM,
you 
will see what other people were complaining.

Billy Ng

- Original Message - 
From: Christopher Schultz [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Wednesday, October 17, 2007 1:26 PM
Subject: Re: UTF-8 Properties File


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Billy,

 Billy Ng wrote:
 This is the major problem for the people to localize context.  \u
 unicode format is not readable to them.

 That's why most people use native2ascii as part of their deployment
 procedure, and don't bother developers with that kind of detail.

 The native2ascii will add the BOM to the beginning to fail 
 ResourceBundle.

 It will? ISO-8859-1 shouldn't have a BOM. How are you running 
 native2ascii?

 - -chris

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

 iD8DBQFHFm/Y9CaO5/Lv0PARAnjBAKCx260jasjJgS3mPCNRtMQVkljRiQCdHZlv
 C5TFQ1zOqRwjLeJUoozen+4=
 =XEC8
 -END PGP SIGNATURE-

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


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


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



Re: UTF-8 Properties File

2007-10-17 Thread Billy Ng
Ah, this is the problem.  How could you force the translators not to use 
notepad?


Billy Ng

- Original Message - 
From: [EMAIL PROTECTED]

To: users@tomcat.apache.org
Cc: [EMAIL PROTECTED]
Sent: Wednesday, October 17, 2007 4:03 PM
Subject: RE: UTF-8 Properties File


Hi,

Are you sure that the original UTF-8 source file doesn't
have a BOM in it?  native2ascii will not strip that BOM
from the input file.

Also, if you edit either file with an editor such as
Notepad, it will include a BOM.

Thanks,

Eric


-Original Message-
From: Billy Ng [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 17, 2007 3:26 PM
To: Tomcat Users List
Subject: Re: UTF-8 Properties File

Don't know why  It happens to me.  If you google native2ascii BOM,
you
will see what other people were complaining.

Billy Ng

- Original Message - 
From: Christopher Schultz [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Wednesday, October 17, 2007 1:26 PM
Subject: Re: UTF-8 Properties File



-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Billy,

Billy Ng wrote:

This is the major problem for the people to localize context.  \u
unicode format is not readable to them.


That's why most people use native2ascii as part of their deployment
procedure, and don't bother developers with that kind of detail.


The native2ascii will add the BOM to the beginning to fail
ResourceBundle.


It will? ISO-8859-1 shouldn't have a BOM. How are you running
native2ascii?

- -chris

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

iD8DBQFHFm/Y9CaO5/Lv0PARAnjBAKCx260jasjJgS3mPCNRtMQVkljRiQCdHZlv
C5TFQ1zOqRwjLeJUoozen+4=
=XEC8
-END PGP SIGNATURE-

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




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


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


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



AJP port - How to stop Tomcat from incrementing the AJP port number

2007-10-17 Thread Shaji Thomas
When Tomcat 6 finds that the specified AJP port is already in use, it 
increments the port number and try to bind to the next available port. When 
this happens, on the web server side apache is not able to connect to the AJP 
port on Tomcat side, because Tomcat is listening on a different AJP port. 

So is there a way to make Tomcat listen only on the specified AJP port? In the 
source I see there is a maxPort variable it is checking while incrementing the 
port number. Is there a way to control this from configuration files? 

I am using Tomcat 6 with mod_jk.  

Thank you very much 
Shaji


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



Re: AJP port - How to stop Tomcat from incrementing the AJP port number

2007-10-17 Thread Bill Barker
Well, it should be possible to do channelSocket.maxPort=0 on the 
Connector /.  However, if the port attribute gets processed after the 
maxPort, it will reset it back (yes, it's a bug :).  If you are using the 
default 8009 port, then it should be possible to omit the port option on the 
Connector / and it should work.

Shaji Thomas [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
When Tomcat 6 finds that the specified AJP port is already in use, it 
increments the port number and try to bind to the next available port. When 
this happens, on the web server side apache is not able to connect to the 
AJP port on Tomcat side, because Tomcat is listening on a different AJP 
port.

So is there a way to make Tomcat listen only on the specified AJP port? In 
the source I see there is a maxPort variable it is checking while 
incrementing the port number. Is there a way to control this from 
configuration files?

I am using Tomcat 6 with mod_jk.

Thank you very much
Shaji


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





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



Re: custom web.xml digester call

2007-10-17 Thread Bill Barker

Auke Noppe [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Hi,



 Is it possible to call the digester of the web.xml by hand?

 Like you can override the createstartdigester method in catalina.java?


As the other posters have said, it is difficult to see a use case for this. 
But that isn't a good enough reason to not give you enough rope to hang 
yourself with :).

On the Host / element in server.xml you can specify the attribute: 
configClass=com.myfirm.mypackage.MyContextConfig (if you are running 
Embedded, just call the setConfigClass(String) method on the Host object, or 
set the configClass attribute via JMX if you are using JMX embedding). 
For any context under that Host, Tomcat will use an instance of this class 
in place of it's normal ContextConfig class.  It only is required to 
implement LifecycleListener, but if you extend TC's ContextConfig class, 
then you would need to override the method:
  protected static Digester createWebDigester()




 Regards,



 Auke Noppe


 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.5.488 / Virus Database: 269.14.13/1074 - Release Date: 
 16-10-2007
 14:14

 




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



Re: custom web.xml digester call

2007-10-17 Thread Johnny Kewl


---
HARBOR: http://coolharbor.100free.com/index.htm
Now Tomcat is also a cool application server
---
- Original Message - 
From: Auke Noppe [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Wednesday, October 17, 2007 3:37 PM
Subject: custom web.xml digester call



Hi,



Is it possible to call the digester of the web.xml by hand?

Like you can override the createstartdigester method in catalina.java?
Regards,


It sounds like you doing embedded, and yes I thought very much the same way 
because all the examples call into the embedded routine, and that leaves one 
wondering how to do things like set up realms, SSL ... and all the good 
stuff that just happens from config files.


What you can do, its what I did and just forget about embedded and call 
Catalina from your own program based on bootstrap


Whats cool is that your embedded program then does exactly what TC does, and 
you test in TC and then just move the config files to the embedded program.


That works so I'm saying instead of trying to jam values in... move up 
even more and just use the same config files... makes life very easy.
Your embedded program will do exactly what TC does... log files are the only 
exception.






Auke Noppe


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.488 / Virus Database: 269.14.13/1074 - Release Date: 
16-10-2007

14:14





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