RE: Typical setting for Host name=???? /

2011-03-15 Thread Jason Pringle

 From: Mark Thomas [mailto:ma...@apache.org]
 Sent: Friday, March 11, 2011 10:14 AM
 To: Tomcat Users List
 Subject: Re: Typical setting for Host name= /


 You can call it DefaultHost if you like. The only requirement is that
 the defaultHost specified in the Engine must be the name of a Host
 element contained by that Engine.

snip

 Tomcat matches the Host header in the HTTP request to the host name.
 Any that don't match get sent to the default host.

Ah, that makes things crystal clear.  I was confused by trying to read the docs 
for the name attribute of the Host element too literally:

Network name of this virtual host, as registered in your Domain Name Service 
server. Regardless of the case used to specify the hostname, Tomcat will 
convert it to lower case internally. One of the Hosts nested within an Engine 
MUST have a name that matches the defaultHost setting for that Engine. See Host 
Name Aliases for information on how to assign more than one network name to the 
same virtual host.

And the introduction for the element as well:

The Host element represents a virtual host, which is an association of a 
network name for a server (such as www.mycompany.com with the particular 
server on which Catalina is running. In order to be effective, this name must 
be registered in the Domain Name Service (DNS) server that manages the Internet 
domain you belong to - contact your Network Administrator for more information.

Clearly what is there is correct, since it takes some extra effort to embed a 
Host header into the HTTP request if you don't have a DNS entry (messing with 
/etc/hosts would be one way).  But that last bit of info for how Tomcat 
actually makes use of the header would be handy in the docs (I know - patches 
welcome :))

Is there any measurable performance optimization of using the name of the host 
that is expected to be in the request?  I would guess not, even for a very high 
volume site, but haven't looked at the code.

--Jason
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,
you may review at http://www.amdocs.com/email_disclaimer.asp


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



Re: Tomcat 7 Per Instance Memory Footprint in Hello World App.

2011-03-15 Thread Thomas Freitag
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Noah,

On 03/15/2011 06:25 AM, Noah Cutler wrote:
 can find nothing on the net re: this apparently basic question.
 
 Given a simple hello world app, what is the @memory footprint per
 instance in Tomcat 7?
 
 Just trying to assess options visa vi single instance + multiple virtual
 hosts vs. multiple instance single host (preferred option as each client
 app is isolated from the other).

There is a simple answer from the Java Heap point of view, a stock
Apache Tomcat 7.0.11 (running in Oracle JVM 1.6.0_24) around 3.5MB in
Heap, 11MB in Permanent Generation after startup (see garbage collection
log):

Heap after GC invocations=5 (full 2):
 PSYoungGen  total 18752K, used 0K [0x9ea5, 0x9ff3, 0xb38f)
  eden space 16128K, 0% used [0x9ea5,0x9ea5,0x9fa1)
  from space 2624K, 0% used [0x9fa1,0x9fa1,0x9fca)
  to   space 2624K, 0% used [0x9fca,0x9fca,0x9ff3)
 PSOldGentotal 42880K, used 3417K [0x74cf, 0x776d,
0x9ea5)
  object space 42880K, 7% used [0x74cf,0x75046520,0x776d)
 PSPermGen   total 18176K, used 10916K [0x70cf, 0x71eb,
0x74cf)
  object space 18176K, 60% used [0x70cf,0x71799068,0x71eb)

- From the system (32bit Linux in my test case) point of view, my test
with pmap gave me a total of 1191428K (~ 1.1GB). This includes shared
libraries, Heap, Perm, code cache and other native memory (stacks,
buffers etc), thus some of this can be used by other JVM instances...

To cut it short: Tomcats memory footprint is very small, that shouldn't
be a problem for you. The JVM memory footprint depends on JVM version,
operating system and might be a problem if you run many JVM instances.
Test it in your system...

Regards,
- -- 
Thomas Freitag
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk1/CqkACgkQGE5pHr3PKuWldQCfag8Uy0K445QX6uMhyJLjRtzL
Et8AnjSva8LzilB3gp7Zobc1TdRr0J/S
=/Zul
-END PGP SIGNATURE-

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



Re: Tomcat 7 Per Instance Memory Footprint in Hello World App.

2011-03-15 Thread Noah Cutler
Thomas, excellent, informative.

So, given that a running 32-bit JVM on Linux will require at least 1GB
RAM, total memory usage will not be JVM footprint * num instances, but
rather, JVM footprint + num instances?

The use case is transferring 20 client sites from LAMP stack to JVM +
Tomcat 7 + MySQL + a Groovy.lang web framework I developed.

Ideally I would separate client sites into tomcat instances, so as to
isolate them from each other (i.e. redeploy/restart without affecting
other instances), but that hinges entirely on the memory footprint.

I have 16GB RAM available but was only planning on allocating 4-6GB RAM
for this project. Only a couple of the sites in question do significant
load (read: have been running on LAMP stack with 2GB RAM for several
years without issue)
-- 
--Noah

Noah Cutler
Web/Mobile Applications
New Mind Development
ad...@newminddevelopment.com
http:://newminddevelopment.com


On Tue, 2011-03-15 at 07:43 +0100, Thomas Freitag wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Hi Noah,
 
 On 03/15/2011 06:25 AM, Noah Cutler wrote:
  can find nothing on the net re: this apparently basic question.
  
  Given a simple hello world app, what is the @memory footprint per
  instance in Tomcat 7?
  
  Just trying to assess options visa vi single instance + multiple virtual
  hosts vs. multiple instance single host (preferred option as each client
  app is isolated from the other).
 
 There is a simple answer from the Java Heap point of view, a stock
 Apache Tomcat 7.0.11 (running in Oracle JVM 1.6.0_24) around 3.5MB in
 Heap, 11MB in Permanent Generation after startup (see garbage collection
 log):
 
 Heap after GC invocations=5 (full 2):
  PSYoungGen  total 18752K, used 0K [0x9ea5, 0x9ff3, 0xb38f)
   eden space 16128K, 0% used [0x9ea5,0x9ea5,0x9fa1)
   from space 2624K, 0% used [0x9fa1,0x9fa1,0x9fca)
   to   space 2624K, 0% used [0x9fca,0x9fca,0x9ff3)
  PSOldGentotal 42880K, used 3417K [0x74cf, 0x776d,
 0x9ea5)
   object space 42880K, 7% used [0x74cf,0x75046520,0x776d)
  PSPermGen   total 18176K, used 10916K [0x70cf, 0x71eb,
 0x74cf)
   object space 18176K, 60% used [0x70cf,0x71799068,0x71eb)
 
 - From the system (32bit Linux in my test case) point of view, my test
 with pmap gave me a total of 1191428K (~ 1.1GB). This includes shared
 libraries, Heap, Perm, code cache and other native memory (stacks,
 buffers etc), thus some of this can be used by other JVM instances...
 
 To cut it short: Tomcats memory footprint is very small, that shouldn't
 be a problem for you. The JVM memory footprint depends on JVM version,
 operating system and might be a problem if you run many JVM instances.
 Test it in your system...
 
 Regards,
 - -- 
 Thomas Freitag
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iEYEARECAAYFAk1/CqkACgkQGE5pHr3PKuWldQCfag8Uy0K445QX6uMhyJLjRtzL
 Et8AnjSva8LzilB3gp7Zobc1TdRr0J/S
 =/Zul
 -END PGP SIGNATURE-
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


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



Re: [OT] Followup on 32-bit versus 64-bit performance discussion(s)

2011-03-15 Thread Leon Rosenberg
On Tue, Mar 15, 2011 at 4:20 AM, Caldarale, Charles R
chuck.caldar...@unisys.com wrote:
 From: Leon Rosenberg [mailto:rosenberg.l...@gmail.com]
 Subject: Re: [OT] Followup on 32-bit versus 64-bit performance discussion(s)

 I'm sorry, I probably missed something, but why should 64 bit app on
 64 bit os on 64 bit cpu be slower as 32 bit analog?

 Because all the data items are bigger, or have unused slack space associated 
 with them, in a 64-bit JVM.  Consequently, the number of actually useful bits 
 transferred between the CPU scheduler, the operand caches, and main memory is 
 less per cycle.

So a 64bit cpu has a 32bit mode, or how would a 32bit OS shrink the
transmit size? I mean the registers stay the same?
Leon


  - Chuck


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


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



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



[SECURITY] CVE-2011-1088 Apache Tomcat security constraint bypass

2011-03-15 Thread Mark Thomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

CVE-2011-1088 Apache Tomcat security constraint bypass

Severity: Important

Vendor: The Apache Software Foundation

Versions Affected:
- - Tomcat 7.0.0 to 7.0.10
- - Earlier versions are not affected

Description:
When a web application was started, @ServletSecurity annotations were
ignored. This meant that some areas of the application may not have been
protected as expected.

Mitigation:
Users of affected versions should apply one of the following mitigations:
- - Upgrade to a Tomcat version where this issue is fixed
- - Define security constraints via an alternative mechanism such as web.xml

Credit:
This issue was reported publicly on the Tomcat users mailing list.
The Apache Tomcat security requests that security vulnerability reports
are made privately to secur...@tomcat.apache.org in the first instance.

References:
http://tomcat.apache.org/security.html
http://tomcat.apache.org/security-7.html
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJNfycmAAoJEBDAHFovYFnn3jgP/0aecIt4uUYHWbmzUPA0FNan
tzjVfPskwPYrSuNbHjHuxPknmxUPSFiCdO3V1LLtnCX2y5+cNancWRjLX7lDbt8H
sL+9AaoI8HDShG1wgYsnh/3fIKczhE28pTtyo0GtG4HpQVLcT/OH2Qhb6+mG3jwo
SCia1eSTJuhj5HM3n2fb5X33n/UEkX/cCALDrt1DRfKV69MaZbMiZh7XfpyVDpdN
LePYIeuOoxg9CVjkDYCVIaK5Bi0uzPD8yCc73dOU3YobgbDDaLSN7Awd1/RhO5TR
fpWVbl0gbmMlPnMy52B9qZL+H9HwcNnYPqbtpquE2a6ik29QT4LMTNo0mr25XxmP
K3Jb7VTcVb/P1pxFOsTyMWy25IFubMEBW4c3kafBZGUI3Q25QmNizBXZ5wvn1vex
kBzDZrnKmkzvhnCy6RnTKk9BYGRWEw9ImTqLOaLxmtXJw9bnWgoeusnje1k/24QI
3+pw/g5OjwG7hqtStrscFeo8tc/snXBojn1d21txsnLggQ0E6+9+vUVym5tBD16I
MfzN7FSd620AFSmVUo5mEfEpDe+RTkA8y/7BnYHoguBQ7WLlxejCgRpaf91vBns6
ZEQGntzx7EW7M+P2GNHy1mrVGTQ7Glk/5tnAFyqgMOHzYyN11Y3OWO1XBv+1um8q
kadENSXz4mY0vKtvaeuT
=i/HJ
-END PGP SIGNATURE-

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



Re: Tomcat 7 Per Instance Memory Footprint in Hello World App.

2011-03-15 Thread Thomas Freitag
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Noah,

On 14.03.11 um 21:27, Noah Cutler wrote:
 So, given that a running 32-bit JVM on Linux will require at least 1GB
 RAM, total memory usage will not be JVM footprint * num instances, but
 rather, JVM footprint + num instances?

Actually, the 1GB are virtual memory usage, not everything is
allocated in the physical memory. I'd say it is roughly: num instances * (JVM
not shareable + JVM heapperm) + JVM shareable. JVM not shareable
could be around 200-300MB. What heap sizes do you expect?

The figures I gave for Tomcat were taken directly after
startup. Because Tomcat starts additional threads for the connector
thread pools these could increase (maybe 50MB instead of 5MB), and
request processing needs some memory.
 
 The use case is transferring 20 client sites from LAMP stack to JVM +
 Tomcat 7 + MySQL + a Groovy.lang web framework I developed.
 
 Ideally I would separate client sites into tomcat instances, so as to
 isolate them from each other (i.e. redeploy/restart without affecting
 other instances), but that hinges entirely on the memory footprint.

You have to include the memory footprint of your applications into the
calculation. If you configure small heap sizes the risk of getting
OutOfMemoryErrors increases. If you deploy more than one application
in your tomcat instances, average usage of heap memory, threads and
database connections could be better.
 
 I have 16GB RAM available but was only planning on allocating 4-6GB RAM
 for this project. Only a couple of the sites in question do significant
 load (read: have been running on LAMP stack with 2GB RAM for several
 years without issue)

I'd try a mixed approach: Run some tomcat instances with more than one
application. Some restarts can be avoided by using hot deployments.
The MemoryLeakPreventionListener [1] helps to check if your applications
trigger some known memory leaks. That may fit your needs. 

I'm afraid it is very hard (or impossible) to start with an optimal
configuration. You will have to make an educated guess (usually
configure more ressources than necessary), monitor the resource usage, 
and adapt the configuration to your needs.

[1] http://tomcat.apache.org/tomcat-7.0-doc/config/listeners.html

Regards,
- -- 
Thomas Freitag
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk1/LNAACgkQGE5pHr3PKuVkTwCeJLZkrBKq9yVkEmenQUV+ItkO
OcUAn3sznmYn/GTpbLospwQ30Kp7Ly/g
=+pCj
-END PGP SIGNATURE-

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



Re: Read JSR 045 SMAP Files Produced by Jasper

2011-03-15 Thread Mark Thomas
On 14/03/2011 20:53, Eric Sheridan wrote:
 SmapParser parser = new SmapParser(inputStream);
 Smap smap = parser.parse();
 int jspLineNumber = smap.getJspLineNumber(javaLineNumber);
 
 Does any such code exist? If so, would you mind pointing me to
 it? If not, any alternative solutions to looking up the original JSP
 line number given that I am working with Apache Jasper?

Not that I can think of, but that could be a valuable feature for Jasper
if you were interested in writing a patch. See [1] for more background.
There would be several benefits to being able parse SMAP info.

Mark


[1] https://issues.apache.org/bugzilla/show_bug.cgi?id=49176

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



Re: Populating Oracle v$session.program from Tomcat Context.xml

2011-03-15 Thread chris derham
   We have some working tomcat 6 instances that we'd like to identify



   As David said, this does work with the thin driver, but I need the
   service/load balancing functionality from OCI. Any more suggestions
   are welcome!


You didn't say what connection pool you are using, but if you setup DBCP,
you could use the connectionInitSqls property to execute some proprietary
set_context call in Oracle e.g.

dbms_session.set_context('vpd_new','loc_code', pLocCode)

This might allow you to set a flag on a per connection pool basis for all
connections coming from that instance.

I've never done it personally, but sounds like what you are after

Chris


Re: Typical setting for Host name=???? /

2011-03-15 Thread Mark Thomas
On 15/03/2011 06:06, Jason Pringle wrote:
 Clearly what is there is correct, since it takes some extra effort to embed a 
 Host header into the HTTP request if you don't have a DNS entry (messing with 
 /etc/hosts would be one way).  But that last bit of info for how Tomcat 
 actually makes use of the header would be handy in the docs (I know - patches 
 welcome :))

I took a stab at improving the docs. You can read the results here.
http://ci.apache.org/projects/tomcat/tomcat7/docs/config/host.html
And yes, patches/suggested changes welcome.

 Is there any measurable performance optimization of using the name of the 
 host that is expected to be in the request?  I would guess not, even for a 
 very high volume site, but haven't looked at the code.

There is a very, very small gain. I doubt it it measurable.

Mark

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



Re: [OT] Followup on 32-bit versus 64-bit performance discussion(s)

2011-03-15 Thread Peter Crowther
On 15 March 2011 07:36, Leon Rosenberg rosenberg.l...@gmail.com wrote:

 So a 64bit cpu has a 32bit mode, or how would a 32bit OS shrink the
 transmit size? I mean the registers stay the same?


Frequently, the bottleneck with realistic loads is access to main memory
(or, not quite equivalently, on-die cache size).  Assuming you have some
locality of reference (adjacent instructions tend to be executed together,
adjacent data items tend to be used together) then transferring 128 bits
from main memory to cache is somewhat more likely to get you more useful
bits of data in 4x32 bit items than in 2x64 bit items.

- Peter


Experiences on ISAPI redirecct fails with Dotnet 4 - can anyone confirm

2011-03-15 Thread Thomas Strauß
Hi,

 

we have received a customer report, that the ISAPI redirect filter failed on
an Windows 2003, IIS6.0 x64 when dotnet 4.0 is installed on the same site.

 

The redirector was not able to catch the request prior to dotnet 4 and no
pages were served (Server returned status 404)

 

Switching the ASP framework version to 2.0 in the settings of IIS for the
site solved the issue for the customer. 

 

Has anyone else seen this behavior? 

 

We cannot access the server so I cannot send more details on hardware or
other modules. Additionally the .net4 will try to receive some
“descriptor.aspx” from the application. This failed with an 404 as soon as
the redirector worked because Tomcat does not know about this file. 

 

Mit freundlichen Grüßen

Thomas Strauß
Geschäftsführer Entwicklung

SRS PaperDynamix® 
DIGITAL SCHON AUF DEM PAPIER

 

SRS-Management GmbH 
Berliner Ring 93

64625 Bensheim 
T +49 6251 85 424 - 20 
F +49 6251 85 424 - 14
M +49 174 2110912

 

 http://www.srs-management.de www.srs-management.de

 http://www.srs-paperdynamix.de www.srs-paperdynamix.de

 

HRB 25262 AG Darmstadt
Geschäftsführer: Detlev Homilius, Thomas Strauß

 

 



smime.p7s
Description: S/MIME cryptographic signature


RE: [OT] Followup on 32-bit versus 64-bit performance discussion(s)

2011-03-15 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
 Subject: Re: [OT] Followup on 32-bit versus 64-bit performance discussion(s)

 A 32-bit process, using 32-bit pointers, will enjoy a 2x speedup for
 those types of data.

Also, a Java int, when allocated on the stack, must take up the same number of 
bits as a pointer.  Consequently, in a 64-bit JVM the stack slots are bigger 
for primitive values, and have unused bits in them for everything except 
pointers.  (Allocations on the heap do not include the unused bits, at least in 
current JVM versions.)

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



Re: [OT] Followup on 32-bit versus 64-bit performance discussion(s)

2011-03-15 Thread Peter Crowther
On 15 March 2011 13:02, Caldarale, Charles R chuck.caldar...@unisys.comwrote:

 Also, a Java int, when allocated on the stack, must take up the same number
 of bits as a pointer.

 That's an interesting space/time trade-off (I presume it's to prevent
excess arithmetic on stack value accesses).  I wonder whether it's still a
good trade-off on (say) a modern Intel architecture?

- Peter


RE: [OT] Followup on 32-bit versus 64-bit performance discussion(s)

2011-03-15 Thread Caldarale, Charles R
 From: peter.crowth...@googlemail.com [mailto:peter.crowth...@googlemail.com] 
 On Behalf Of Peter Crowther
 Subject: Re: [OT] Followup on 32-bit versus 64-bit performance discussion(s)

  Also, a Java int, when allocated on the stack, must take up the same number
  of bits as a pointer.

 That's an interesting space/time trade-off (I presume it's 
 to prevent excess arithmetic on stack value accesses).

It's a requirement of the JVM (not language) spec so that the various stack 
manipulation byte codes can be independent of the type of data on the stack.  A 
pointer, int, or float must take one stack slot, while a long or double must 
take two - regardless of the size of a slot.  A modern JIT is certainly aware 
of the type of data in each stack slot, but interpreters aren't, so it's likely 
to stay that way.

 - Chuck
 

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


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



Re: [OT] Followup on 32-bit versus 64-bit performance discussion(s)

2011-03-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 3/15/2011 9:02 AM, Caldarale, Charles R wrote:
 From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
 Subject: Re: [OT] Followup on 32-bit versus 64-bit performance discussion(s)
 
 A 32-bit process, using 32-bit pointers, will enjoy a 2x speedup for
 those types of data.
 
 Also, a Java int, when allocated on the stack, must take up the same
 number of bits as a pointer.  Consequently, in a 64-bit JVM the stack
 slots are bigger for primitive values, and have unused bits in them
 for everything except pointers.  (Allocations on the heap do not
 include the unused bits, at least in current JVM versions.)

A Java int is defined to be 32-bits. Why would it have to be word-length
on the stack? Is that documented anywhere, or does it just end up being
the reality of the JVM implementations?

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

iEYEARECAAYFAk1/fE8ACgkQ9CaO5/Lv0PCkyQCfUsPTmc/UwTGPv/rREr2XJqrv
2ooAoIkGAsLrAFpHilwvGzm1FgjGvvpD
=ovb8
-END PGP SIGNATURE-

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



Re: [OT] Followup on 32-bit versus 64-bit performance discussion(s)

2011-03-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 3/14/2011 11:20 PM, Caldarale, Charles R wrote:
 From: Leon Rosenberg [mailto:rosenberg.l...@gmail.com] 
 Subject: Re: [OT] Followup on 32-bit versus 64-bit performance discussion(s)
 
 I'm sorry, I probably missed something, but why should 64 bit app on
 64 bit os on 64 bit cpu be slower as 32 bit analog?
 
 Because all the data items are bigger, or have unused slack space
 associated with them, in a 64-bit JVM. Consequently, the number of
 actually useful bits transferred between the CPU scheduler, the operand
 caches, and main memory is less per cycle.

So, back to the original question: will a 32-bit JVM on a 64-bit OS give
me a bigger heap potential than a 32-bit JVM on a 32-bit OS?

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

iEYEARECAAYFAk1/fL4ACgkQ9CaO5/Lv0PBnZACfUf5zX6ekYrHMi8euKtEQy9S9
GDAAn06nv9iAr33LLeUs380J8Fd8/At9
=O1xj
-END PGP SIGNATURE-

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



Re: Typical setting for Host name=???? /

2011-03-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mark,

On 3/15/2011 6:02 AM, Mark Thomas wrote:
 On 15/03/2011 06:06, Jason Pringle wrote:
 Clearly what is there is correct, since it takes some extra effort to embed 
 a Host header into the HTTP request if you don't have a DNS entry (messing 
 with /etc/hosts would be one way).  But that last bit of info for how Tomcat 
 actually makes use of the header would be handy in the docs (I know - 
 patches welcome :))
 
 I took a stab at improving the docs. You can read the results here.
 http://ci.apache.org/projects/tomcat/tomcat7/docs/config/host.html
 And yes, patches/suggested changes welcome.
 
 Is there any measurable performance optimization of using the name of the 
 host that is expected to be in the request?  I would guess not, even for a 
 very high volume site, but haven't looked at the code.
 
 There is a very, very small gain. I doubt it it measurable.

I haven't looked in-deptch at the mapper, but I was thinking that there
could be some performance optimizations for certain cases. I'm not sure
such optimizations would be measurable but they are fortunately easy to
test.

For instance, I guess the hostnames are stored in a Map keyed on
lowercase hostname, and each request does a lookup in that Map to
determine the host that will handle the request. If the result is null,
you choose the defaulHost.

If, on startup, we used a pluggable host mapper, we would optimize for
certain cases:

* Only one host, which is the default
  - no case-normalization or lookup required: the one host is always
the right host
* Only 2 or 3 (or whatever) hosts
  - use if/then to test a small number of host names directly instead
of hashing, etc. (similar to using commons-collections Flat3Map)
* All other cases: use existing strategy

There are a couple of potential problems with this:

1. Added code complexity... have to determine how much performance gain
   (if any) this complexity adds
2. Interferes with dynamic host add/remove code, though that could be
   handled as well
3. Problems often come in 3s :)

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

iEYEARECAAYFAk1/f08ACgkQ9CaO5/Lv0PABcQCffRKyaBwFPpMunEiWga6AHnEL
Xb0AoK5saev3ySVzobnnwQHBs9ibcsHZ
=6orN
-END PGP SIGNATURE-

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



Re: Typical setting for Host name=???? /

2011-03-15 Thread Mark Thomas
On 15/03/2011 15:01, Christopher Schultz wrote:
 For instance, I guess the hostnames are stored in a Map keyed on
 lowercase hostname, and each request does a lookup in that Map to
 determine the host that will handle the request. If the result is null,
 you choose the defaulHost.

Nope. It isn't implemented at all like that. Time for you to look at the
source code.

Mark

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



Not able to get webapp context to work in Tomcat6

2011-03-15 Thread Dharamshila Khandelwal
Hi,

I have my webapps's context define in
$CATALINA_HOME/conf/Catalina/localhost.
The application is not reading the datasource, I get the following error in
catalina logs:

Unhandled SQL Exception:
org.apache.tomcat.dbcp.dbcp.SQLNestedException: *Cannot
create JDBC driver of class '' for connect URL 'null'
*
The connect URL is defined in the xml file.

Is there any setting that I need to do specific to Tomcat 6 so that it reads
the xml file correctly?

My context file looks like this (osm_svr.xml)
---
?xml version='1.0' encoding='utf-8'?
Context displayName=Order Summary Message Application docBase=osm_svr
path=/osm_svr
  Resource name=jdbc/db01 type=javax.sql.DataSource/
  Resource name=jdbc/db95 type=javax.sql.DataSource/
  Resource name=jdbc/db96 type=javax.sql.DataSource/
  Resource name=jdbc/db93 type=javax.sql.DataSource/
  Resource name=jdbc/db94 type=javax.sql.DataSource/
  Resource name=jdbc/main type=javax.sql.DataSource/
  ResourceParams name=jdbc/db01
parameter
  nameurl/name
  valuejdbc:oracle:thin:@spduwm01.hsn.net:1521:wmsdug01/value
/parameter
parameter
  namepassword/name
  valuemovebatch/value
/parameter
parameter
  namemaxActive/name
  value20/value
/parameter
parameter
  namemaxWait/name
  value1/value
/parameter
parameter
  namedriverClassName/name
  valueoracle.jdbc.driver.OracleDriver/value
/parameter
parameter
  nameusername/name
  valuemovebatch/value
/parameter
parameter
  namemaxIdle/name
  value8/value
/parameter
parameter
 nameremoveAbandoned/name
 valuetrue/value
/parameter
parameter
 nameremoveAbandonedTimeout/name
 value60/value
/parameter
  /ResourceParams
*  ResourceParams name=jdbc/main
parameter
  nameurl/name
  valuejdbc:oracle:thin:@spduwm01.hsn.net:1521:wmsdug01/value
/parameter
parameter
  namepassword/name
  valuemovebatch/value
/parameter
parameter
  namemaxActive/name
  value20/value
/parameter
parameter
  namemaxWait/name
  value1/value
/parameter
parameter
  namedriverClassName/name
  valueoracle.jdbc.driver.OracleDriver/value
/parameter
parameter
  nameusername/name
  valuemovebatch/value
/parameter
parameter
  namemaxIdle/name
  value8/value
/parameter
parameter
 nameremoveAbandoned/name
 valuetrue/value
/parameter
parameter
 nameremoveAbandonedTimeout/name
 value60/value
/parameter
  /ResourceParams*
  ResourceParams name=jdbc/db95
parameter
  nameurl/name
  valuejdbc:oracle:thin:@wmsha95.hsn.net:2305:wmsprd95/value
/parameter
parameter
  namepassword/name
  valuesummer03/value
/parameter
parameter
  namemaxActive/name
  value20/value
/parameter
parameter
  namemaxWait/name
  value1/value
/parameter
parameter
  namedriverClassName/name
  valueoracle.jdbc.driver.OracleDriver/value
/parameter
parameter
  nameusername/name
  valueosmreport/value
/parameter
parameter
  namemaxIdle/name
  value8/value
/parameter
parameter
 nameremoveAbandoned/name
 valuetrue/value
/parameter
parameter
 nameremoveAbandonedTimeout/name
 value60/value
/parameter
  /ResourceParams
  ResourceParams name=jdbc/db96
parameter
  nameurl/name
  valuedbc:oracle:thin:@roap07.hsn.net:2308:wmsprd96/value
/parameter
parameter
  namepassword/name
  valuesummer03/value
/parameter
parameter
  namemaxActive/name
  value20/value
/parameter
parameter
  namemaxWait/name
  value1/value
/parameter
parameter
  namedriverClassName/name
  valueoracle.jdbc.driver.OracleDriver/value
/parameter
parameter
  nameusername/name
  valueosmreport/value
/parameter
parameter
  namemaxIdle/name
  value8/value
/parameter
parameter
 nameremoveAbandoned/name
 valuetrue/value
/parameter
parameter
 nameremoveAbandonedTimeout/name
 value60/value
/parameter
  /ResourceParams
  ResourceParams name=jdbc/db93
parameter
  nameurl/name
  valuejdbc:oracle:thin:@wmsha93.hsn.net:2054:wmsprd93/value
/parameter
parameter
  namepassword/name
  valuesummer03/value
/parameter
parameter
  namemaxActive/name
  value20/value
/parameter
parameter
  namemaxWait/name
  value1/value
/parameter
parameter
  namedriverClassName/name
  valueoracle.jdbc.driver.OracleDriver/value
/parameter
parameter
  nameusername/name
  valueosmreport/value
/parameter
parameter
  namemaxIdle/name
  value8/value
/parameter
parameter
 nameremoveAbandoned/name
 valuetrue/value

Re: Not able to get webapp context to work in Tomcat6

2011-03-15 Thread Mark Thomas
On 15/03/2011 15:10, Dharamshila Khandelwal wrote:
 Hi,
 
 I have my webapps's context define in
 $CATALINA_HOME/conf/Catalina/localhost.
 The application is not reading the datasource, I get the following error in
 catalina logs:

That'll be because you are trying to use Tomcat 5.0.x syntax with Tomcat
6.0.x which won't work. Read the docs, fix the broken Resource
definition and try again.

Mark

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



Re: Not able to get webapp context to work in Tomcat6

2011-03-15 Thread Thomas Freitag
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Dharamshila,

On 15.03.11 um 11:10, Dharamshila Khandelwal wrote:
 I have my webapps's context define in
 $CATALINA_HOME/conf/Catalina/localhost.
 The application is not reading the datasource, I get the following error in
 catalina logs:
 
 Unhandled SQL Exception:
 org.apache.tomcat.dbcp.dbcp.SQLNestedException: *Cannot
 create JDBC driver of class '' for connect URL 'null'
 *
 The connect URL is defined in the xml file.
 
 Is there any setting that I need to do specific to Tomcat 6 so that it reads
 the xml file correctly?

Yes, you should use a correct Ressource definition syntax, see:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Resource_Definitions.
Yours looks like an ancient Tomcat 4.1 configuration. You should
remove the path attribute, check the docBase attribute, and change
your DB passwords.
 
Regards,
- -- 
Thomas Freitag
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk1/g+kACgkQGE5pHr3PKuU+yQCgiTAtg/q7O6E/jEQLssIyOmuG
PD8An2KNK49g78o9xqDeJJAEYQhzXkjL
=Aipy
-END PGP SIGNATURE-

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



RE: [OT] Followup on 32-bit versus 64-bit performance discussion(s)

2011-03-15 Thread Caldarale, Charles R
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Subject: Re: [OT] Followup on 32-bit versus 64-bit performance discussion(s)

So, back to the original question: will a 32-bit JVM on a 64-bit OS give
me a bigger heap potential than a 32-bit JVM on a 32-bit OS?

Depends entirely on the how the OS chooses to handle the 32-bit process virtual 
space.  If the OS continues to maintain the 2 or 3 GiB boundary, your maximum 
heap isn't going to improve.  If the OS allows all 4 GiB to be used by the 
process, then the heap could be larger.  I haven't experimented to find out.

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



RE: [OT] Followup on 32-bit versus 64-bit performance discussion(s)

2011-03-15 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
 Subject: Re: [OT] Followup on 32-bit versus 64-bit performance discussion(s)

 A Java int is defined to be 32-bits. Why would it have to be word-length
 on the stack? Is that documented anywhere, or does it just end up being
 the reality of the JVM implementations?

It's in the JVM spec, as I stated:

http://marc.info/?l=tomcat-userm=130019552201152w=2

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



--Jvm option trouble with Windows service

2011-03-15 Thread Olivier Lefevre

My Tomcat service (since 7.0.8) would die with Commons Daemon
procrun stdout initializedError occurred during initialization
of VM Unable to load native library when I tried to start it.
I finally traced got fed up with starting it from the command
line and traced it down to this option that is used by the
installer (according to service-install.log) in the //IS call:

  --Jvm C:\Programme\Java\jre6\bin\server\jvm.dll

If instead --Jvm is set to auto all works well. Why? The DLL
exists, is readable/executable by all and I am doing this under
an account with admin privileges (on XP) anyhow.

While we are on this topic I have a few more questions:

1) If --StartPath is omitted Tomcat attempts to start in the
   local directory, which of course fails; this is very puzzling,
   as one would expect it to start under the install directory
   by default (and yes --Install was supplied)
2) Where is it safe to use env. vars so as to shorten the
   invocation a bit? According to the windows services HOWTO
   apparently only in the --Jvm option. Is it so?
3) Since you target Java 5 and above maybe you could start using
   the star syntax in the classpath to shorten things a bit further
4) Is there still a dependency on tools.jar, e.g., for servlets?

Thanks,

-- O.L.



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



Re: Read JSR 045 SMAP Files Produced by Jasper

2011-03-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mark and Eric,

On 3/15/2011 5:14 AM, Mark Thomas wrote:
 On 14/03/2011 20:53, Eric Sheridan wrote:
 SmapParser parser = new SmapParser(inputStream);
 Smap smap = parser.parse();
 int jspLineNumber = smap.getJspLineNumber(javaLineNumber);

 Does any such code exist? If so, would you mind pointing me to
 it? If not, any alternative solutions to looking up the original JSP
 line number given that I am working with Apache Jasper?
 
 Not that I can think of, but that could be a valuable feature for Jasper
 if you were interested in writing a patch. See [1] for more background.
 There would be several benefits to being able parse SMAP info.

This sounds like something that could be done with a bit of hacking. I
didn't find anything Googling around, either. I did find something
called jclasslib that can be used for inspecting Java .class files but
it's most built as a bytecode browser and decompiler: much more that we
really need.

This information is evidently available via JVMDI, so the JVM must be
loading it somehow. Maybe poking around in OpenJDK would yield some
fruitful results.

The syntax for the Source Maps is pretty simple: the tough part will be
reading it from a Class file because of all the cruft you have to sift
through just to get to the part you want.

I could pretty easily write some code to extract the SMAP extension from
the .class file. It's not hard to ignore a lot of the .class content.

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

iEYEARECAAYFAk1/jMwACgkQ9CaO5/Lv0PCqcACgiMO65f4Aikj9BtUKkb3TZKIW
EJwAoJBQ7gsGuLYv6Y50YW45dBv4YnQ+
=7HCt
-END PGP SIGNATURE-

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



RE: --Jvm option trouble with Windows service

2011-03-15 Thread Caldarale, Charles R
 From: Olivier Lefevre [mailto:lefev...@yahoo.com] 
 Subject: --Jvm option trouble with Windows service

 --Jvm C:\Programme\Java\jre6\bin\server\jvm.dll

 If instead --Jvm is set to auto all works well. Why? The DLL
 exists, is readable/executable by all and I am doing this under
 an account with admin privileges (on XP) anyhow.

You have a *server* JVM installed on Windows XP?  Want to verify that?

 If --StartPath is omitted Tomcat attempts to start in the
 local directory, which of course fails; this is very puzzling,
 as one would expect it to start under the install directory
 by default (and yes --Install was supplied)

Why would you expect that?  This is a service, not a user logon environment.

 Where is it safe to use env. vars so as to shorten the
 invocation a bit?

Never; again, this is a service, so there are no environment variables.

 Since you target Java 5 and above maybe you could start using
 the star syntax in the classpath to shorten things a bit further

Please give a specific example of how this might be useful.

 Is there still a dependency on tools.jar, e.g., for servlets?

There has never been such a dependency.  Several years ago, there was a 
requirement to have tools.jar accessible in order to compile JSPs, but that is 
long gone.

 - Chuck


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


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



Re: Not able to get webapp context to work in Tomcat6

2011-03-15 Thread Dharamshila Khandelwal
Thank you Mark and Thomas! I was able to get that to work. I didn't realize
the syntax as I am upgrading from Tomcat 5 to Tomcat 6.

On Tue, Mar 15, 2011 at 11:21 AM, Thomas Freitag tho...@freit.ag wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi Dharamshila,

 On 15.03.11 um 11:10, Dharamshila Khandelwal wrote:
  I have my webapps's context define in
  $CATALINA_HOME/conf/Catalina/localhost.
  The application is not reading the datasource, I get the following error
 in
  catalina logs:
 
  Unhandled SQL Exception:
  org.apache.tomcat.dbcp.dbcp.SQLNestedException: *Cannot
  create JDBC driver of class '' for connect URL 'null'
  *
  The connect URL is defined in the xml file.
 
  Is there any setting that I need to do specific to Tomcat 6 so that it
 reads
  the xml file correctly?

 Yes, you should use a correct Ressource definition syntax, see:
 
 http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Resource_Definitions
 .
 Yours looks like an ancient Tomcat 4.1 configuration. You should
 remove the path attribute, check the docBase attribute, and change
 your DB passwords.

 Regards,
 - --
 Thomas Freitag
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (GNU/Linux)

 iEYEARECAAYFAk1/g+kACgkQGE5pHr3PKuU+yQCgiTAtg/q7O6E/jEQLssIyOmuG
 PD8An2KNK49g78o9xqDeJJAEYQhzXkjL
 =Aipy
 -END PGP SIGNATURE-

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




Re: --Jvm option trouble with Windows service

2011-03-15 Thread Olivier Lefevre

On 3/15/2011 4:56 PM, Caldarale, Charles R wrote:

You have a *server* JVM installed on Windows XP?  Want to verify that?


Like I said, $JAVA_HOME/bin/server/jvm.dll is there. I did nothing
special: I just ran the installer.


If --StartPath is omitted Tomcat attempts to start in the
local directory, which of course fails; this is very puzzling,
as one would expect it to start under the install directory
by default (and yes --Install was supplied)


Why would you expect that?  This is a service, not a user logon environment.


Service or not it is apparently looking for a number of its files
under the start dir because if it is not set I get

$ $CATALINA_HOME/bin/tomcat7 //TS//Tomcat7 --LogLevel=DEBUG
Mar 15, 2011 5:48:59 PM org.apache.catalina.startup.ClassLoaderFactory 
validateFile
WARNING: Problem with directory [C:\work\tomcat\lib], exists: [false], 
isDirectory: [false], canRead: [false]
Mar 15, 2011 5:48:59 PM org.apache.catalina.startup.ClassLoaderFactory 
validateFile
WARNING: Problem with directory [C:\work\tomcat\lib], exists: [false], 
isDirectory: [false], canRead: [false]
java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:217)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:406)

So I don't see how this could succeed with StartPath set to anything
but the installation directory.

In addition, this ClassNotFoundException even though the classpath was
correctly set is bizarre, too: it should be looking for its jars under
the classpath, not under the start path.


Where is it safe to use env. vars so as to shorten the
invocation a bit?


Never; again, this is a service, so there are no environment variables.


But the HOWTO explicitly says it is safe to use them in the --Jvm option:
You can use the environment variable expansion here.


Since you target Java 5 and above maybe you could start using
the star syntax in the classpath to shorten things a bit further


Please give a specific example of how this might be useful.


Just in the interest of brevity, i.e., --Classpath C:\Java\tomcat-7.0.11\bin\*
instead of --Classpath 
C:\Java\tomcat-7.0.11\bin\bootstrap.jar;C:\Java\tomcat-7.0.11\bin\tomcat-juli.jar
It works fine; I tried it.

-- O.L.


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



Re: Tomcat 7 Per Instance Memory Footprint in Hello World App.

2011-03-15 Thread Noah Cutler
Thomas, perfect, hours of searching Stackoverflow et al resolved in a
single mailing list thread ;--)

I will play around with various configs (per instance and multi-host per
instance) in my local devel to get an idea of no-load resource usage;
then, as you say, give some % more to avoid OOMEs in production.

Obviously per instance is a memory hungry solution, albeit highly
convenient. Placing all sites in a single instance is a possibility as
well (and the most resource friendly), but I would need to implement
some form of load balancing for the mid-business-day client A emergency
restart (since all sites would be affected by the restart). Of course, I
should have load balancing for the per instance solution as well to
ensure application uptime even on restart.

Hope the next version of Java addresses some of the issues with memory
leaks beyond what Tomcat 7 is already doing.  As a n00b to java land,
this one issue invokes the most doubt, clearly java roots are not in the
web per request model (i.e. request completes and everything, but
session data flushed).

Thanks for clarifying matters, Thomas, really helps to have an idea of
what you are getting into prior to working on an implementation.
-- 
--Noah

Noah Cutler
Web/Mobile Applications
New Mind Development
ad...@newminddevelopment.com
http:://newminddevelopment.com


On Tue, 2011-03-15 at 10:09 +0100, Thomas Freitag wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Hi Noah,
 
 On 14.03.11 um 21:27, Noah Cutler wrote:
  So, given that a running 32-bit JVM on Linux will require at least 1GB
  RAM, total memory usage will not be JVM footprint * num instances, but
  rather, JVM footprint + num instances?
 
 Actually, the 1GB are virtual memory usage, not everything is
 allocated in the physical memory. I'd say it is roughly: num instances * (JVM
 not shareable + JVM heapperm) + JVM shareable. JVM not shareable
 could be around 200-300MB. What heap sizes do you expect?
 
 The figures I gave for Tomcat were taken directly after
 startup. Because Tomcat starts additional threads for the connector
 thread pools these could increase (maybe 50MB instead of 5MB), and
 request processing needs some memory.
  
  The use case is transferring 20 client sites from LAMP stack to JVM +
  Tomcat 7 + MySQL + a Groovy.lang web framework I developed.
  
  Ideally I would separate client sites into tomcat instances, so as to
  isolate them from each other (i.e. redeploy/restart without affecting
  other instances), but that hinges entirely on the memory footprint.
 
 You have to include the memory footprint of your applications into the
 calculation. If you configure small heap sizes the risk of getting
 OutOfMemoryErrors increases. If you deploy more than one application
 in your tomcat instances, average usage of heap memory, threads and
 database connections could be better.
  
  I have 16GB RAM available but was only planning on allocating 4-6GB RAM
  for this project. Only a couple of the sites in question do significant
  load (read: have been running on LAMP stack with 2GB RAM for several
  years without issue)
 
 I'd try a mixed approach: Run some tomcat instances with more than one
 application. Some restarts can be avoided by using hot deployments.
 The MemoryLeakPreventionListener [1] helps to check if your applications
 trigger some known memory leaks. That may fit your needs. 
 
 I'm afraid it is very hard (or impossible) to start with an optimal
 configuration. You will have to make an educated guess (usually
 configure more ressources than necessary), monitor the resource usage, 
 and adapt the configuration to your needs.
 
 [1] http://tomcat.apache.org/tomcat-7.0-doc/config/listeners.html
 
 Regards,
 - -- 
 Thomas Freitag
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iEYEARECAAYFAk1/LNAACgkQGE5pHr3PKuVkTwCeJLZkrBKq9yVkEmenQUV+ItkO
 OcUAn3sznmYn/GTpbLospwQ30Kp7Ly/g
 =+pCj
 -END PGP SIGNATURE-
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


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



RE: Typical setting for Host name=???? /

2011-03-15 Thread Jason Pringle
 -Original Message-
 From: Mark Thomas [mailto:ma...@apache.org]
 Sent: Tuesday, March 15, 2011 3:02 AM
 To: Tomcat Users List
 Subject: Re: Typical setting for Host name= /

 On 15/03/2011 06:06, Jason Pringle wrote:
  Clearly what is there is correct, since it takes some extra effort to
 embed a Host header into the HTTP request if you don't have a DNS entry
 (messing with /etc/hosts would be one way).  But that last bit of info
 for how Tomcat actually makes use of the header would be handy in the
 docs (I know - patches welcome :))

 I took a stab at improving the docs. You can read the results here.
 http://ci.apache.org/projects/tomcat/tomcat7/docs/config/host.html
 And yes, patches/suggested changes welcome.


Nice job, thanks for the quick update


--Jason
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,
you may review at http://www.amdocs.com/email_disclaimer.asp


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



Re: --Jvm option trouble with Windows service

2011-03-15 Thread Konstantin Kolinko
2011/3/15 Olivier Lefevre lefev...@yahoo.com:
 On 3/15/2011 4:56 PM, Caldarale, Charles R wrote:

 You have a *server* JVM installed on Windows XP?  Want to verify that?

 Like I said, $JAVA_HOME/bin/server/jvm.dll is there. I did nothing
 special: I just ran the installer.

 --Jvm C:\Programme\Java\jre6\bin\server\jvm.dll

JAVA_HOME should point to a JDK, not to a JRE.

Windows versions of JDK do have server JVM, while JREs do not.

 Service or not it is apparently looking for a number of its files
 under the start dir because if it is not set I get

 $ $CATALINA_HOME/bin/tomcat7 //TS//Tomcat7 --LogLevel=DEBUG
 Mar 15, 2011 5:48:59 PM org.apache.catalina.startup.ClassLoaderFactory
 validateFile
 WARNING: Problem with directory [C:\work\tomcat\lib], exists: [false],
 isDirectory: [false], canRead: [false]
 Mar 15, 2011 5:48:59 PM org.apache.catalina.startup.ClassLoaderFactory
 validateFile
 WARNING: Problem with directory [C:\work\tomcat\lib], exists: [false],
 isDirectory: [false], canRead: [false]

You failed to define catalina.home and catalina.base  JVM system properties.
That has nothing to do with --StartPath. Though when those are not
set, Tomcat tries to guess their values.

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



Re: --Jvm option trouble with Windows service

2011-03-15 Thread Olivier Lefevre

On 3/15/2011 7:44 PM, Konstantin Kolinko wrote:

Windows versions of JDK do have server JVM, while JREs do not.


Saying it does not make so. I assure you that both the JRE and the
JDK include the bin/server/jvm.dll.

In any case this is a red herring because repointing --Jvm to the
JDK sever jvm.dll makes no difference: I still get the Unable to
load native library. What could be causing that?


You failed to define catalina.home and catalina.base JVM system

 properties. That has nothing to do with --StartPath.

But when I define --StartPath it does work perfectly, even without
defining catalina.home and catalina.base under --JvmOptions.

You should state more clearly in the Windows service HOW-TO that
these properties are required: not a word is said about it there.

-- O.L.



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



Problem with keystore location on Unix

2011-03-15 Thread Olivier Lefevre

In the HTTPS Connector element of my server.xml I have
keystoreFile=/tomcat.jks. This works fine on Windows
but fails on Linux with java.io.FileNotFoundException:
/tomcat.jks (No such file or directory). Of course
$CATALINA_HOME/tomcat.jks exists and is readable. Any
idea? Tomcat was started as a daemon with

/usr/bin/jsvc -cp ./bin/bootstrap.jar:./bin/tomcat-juli.jar \
-outfile ./logs/catalina.out -errfile ./logs/catalina.err \
-jvm server org.apache.catalina.startup.Bootstrap -user tomcat \
-Dcatalina.home=/java/apache-tomcat-7.0.11

i.e., catalina.home is set.

Thanks,

-- O.L.


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



Re: --Jvm option trouble with Windows service

2011-03-15 Thread Konstantin Kolinko
2011/3/15 Olivier Lefevre lefev...@yahoo.com:
 On 3/15/2011 7:44 PM, Konstantin Kolinko wrote:

 Windows versions of JDK do have server JVM, while JREs do not.

 Saying it does not make so. I assure you that both the JRE and the
 JDK include the bin/server/jvm.dll.


On Linux yes. On Windows no. Have you looked there? Or you have a 64-bit JRE?


 In any case this is a red herring because repointing --Jvm to the
 JDK sever jvm.dll makes no difference: I still get the Unable to
 load native library. What could be causing that?

 You failed to define catalina.home and catalina.base JVM system

 properties. That has nothing to do with --StartPath.

 But when I define --StartPath it does work perfectly, even without
 defining catalina.home and catalina.base under --JvmOptions.

 You should state more clearly in the Windows service HOW-TO that
 these properties are required: not a word is said about it there.

The preferred way to install the service (unless using the exe
installer) is to use service.bat.

Have you seen the service.bat file? It is mentioned in that document.

(The exe installer distribution does not include service.bat. You will
need one of those *-windows-*.zip ones).

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



Re: Problem with keystore location on Unix

2011-03-15 Thread Konstantin Kolinko
2011/3/15 Olivier Lefevre lefev...@yahoo.com:
 In the HTTPS Connector element of my server.xml I have
 keystoreFile=/tomcat.jks. This works fine on Windows
 but fails on Linux with java.io.FileNotFoundException:
 /tomcat.jks (No such file or directory).

/tomcat.jks is a relative path on Windows, but absolute one on Linux.

Try with
${catalina.home}/tomcat.jks


 Of course
 $CATALINA_HOME/tomcat.jks exists and is readable. Any
 idea? Tomcat was started as a daemon with

 /usr/bin/jsvc -cp ./bin/bootstrap.jar:./bin/tomcat-juli.jar \
 -outfile ./logs/catalina.out -errfile ./logs/catalina.err \
 -jvm server org.apache.catalina.startup.Bootstrap -user tomcat \
 -Dcatalina.home=/java/apache-tomcat-7.0.11

 i.e., catalina.home is set.


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



Re: --Jvm option trouble with Windows service

2011-03-15 Thread Olivier Lefevre

On 3/15/2011 8:28 PM, Konstantin Kolinko wrote:

Saying it does not make so. I assure you that both the JRE and the
JDK include the bin/server/jvm.dll.


On Linux yes. On Windows no. Have you looked there? Or you have a 64-bit JRE?


Of course I have looked there! And no I don't have a 64bit JRE.


The preferred way to install the service (unless using the exe
installer) is to use service.bat.


I *was* using the installer. I only starting monkeying with the
service by hand because the installer failed to produce a usable
service. And service.bat is not much better:

  C:\work\tomcatc:\Java\tomcat-7.0.11\bin\service.bat
  The tomcat.exe was not found...
  The CATALINA_HOME environment variable is not defined correctly.
  This environment variable is needed to run this program

But CATALINA_HOME is most definitely defined:

  C:\work\tomcatecho %CATALINA_HOME%
  C:\Java\tomcat-7.0.11

catalina.bat has no problem, incidentally, so this looks like a
bug in service.bat

-- O.L.



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



Re: Problem with keystore location on Unix

2011-03-15 Thread Olivier Lefevre

On 3/15/2011 8:34 PM, Konstantin Kolinko wrote:

/tomcat.jks is a relative path on Windows, but absolute one on Linux.


OK. I thought Tomcat would always interpret it as a relative path.


Try with ${catalina.home}/tomcat.jks


Yes, that works on both systems, so it is the safe option.

Thanks,

-- O.L.


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



Re: Tomcat 7 Per Instance Memory Footprint in Hello World App.

2011-03-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Noah,

On 3/15/2011 3:27 AM, Noah Cutler wrote:
 So, given that a running 32-bit JVM on Linux will require at least 1GB
 RAM, total memory usage will not be JVM footprint * num instances, but
 rather, JVM footprint + num instances?

Not necessarily. We also run under 32-bit Linux (happens to be Tomcat
6.0.32 but it's not that different) and have JVMs that run under 128MiB
of RAM when configured in a certain way.

Obviously, your -Xmx settings have a lot to do with how much memory will
be used, as well as the number of threads that are managed by the JVM, etc.

 The use case is transferring 20 client sites from LAMP stack to JVM +
 Tomcat 7 + MySQL + a Groovy.lang web framework I developed.
 
 Ideally I would separate client sites into tomcat instances, so as to
 isolate them from each other (i.e. redeploy/restart without affecting
 other instances), but that hinges entirely on the memory footprint.

Ideally, you should be able to deploy/redeploy individual webapps
without interfering with each other. If you have specific concerns, let
us know and we might be able to comment.

Running under a SecurityManager can certainly help protect webapps from
each other -- things like prohibiting System.exit, etc.

 I have 16GB RAM available but was only planning on allocating 4-6GB RAM
 for this project. Only a couple of the sites in question do significant
 load (read: have been running on LAMP stack with 2GB RAM for several
 years without issue)

We run each of our webapps in a separate JVM/Tomcat process to isolate
them from resource conflicts -- we don't want one app to OOME and bring
down the others, for instance.

If you have some webapps that are particularly memory heavy or you are
worried about, you can separate them and run the others together.
Certainly running everything together in a single VM will be more memory
efficient but they might interfere in various ways.

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

iEYEARECAAYFAk1/yWQACgkQ9CaO5/Lv0PBI0gCgq+wYJic2sWUoQsmM8aB9qHap
QL8AoLwI0cphsgZDRR+T5cr6pcpGxDfz
=L/Ot
-END PGP SIGNATURE-

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



Re: Tomcat 7 Per Instance Memory Footprint in Hello World App.

2011-03-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Noah,

On 3/15/2011 2:05 PM, Noah Cutler wrote:
 Obviously per instance is a memory hungry solution, albeit highly
 convenient. Placing all sites in a single instance is a possibility as
 well (and the most resource friendly), but I would need to implement
 some form of load balancing for the mid-business-day client A emergency
 restart (since all sites would be affected by the restart). Of course, I
 should have load balancing for the per instance solution as well to
 ensure application uptime even on restart.

Something else to consider is that your configuration becomes more
complicated when you decide to go to more than 1 JVM: you'll have to use
a fronting web server to determine which backend JVM to contact.

If you have a single JVM, you can use it directly as your web server
with no other moving parts.

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

iEYEARECAAYFAk1/y2IACgkQ9CaO5/Lv0PD4MQCgkWFA858UtCfSUmR+vlmnKI1l
kwAAniGvFqVvLI4jfTJKzPEqXfyh4y05
=zT2G
-END PGP SIGNATURE-

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



Re: What is the right way to redirect http to https with tomcat 7 ?

2011-03-15 Thread János Löbb
Filip,

Works like charm.

Thanks a lot,

János

On Mar 14, 2011, at 7:29 PM, Filip Hanik - Dev Lists wrote:

 On 3/14/2011 3:46 PM, János Löbb wrote:
 Hi,
 
 I set up ssl using the JAVA_HOME/bin/keytool on OSX 10.6.6 - JSSE type 
 configuration with a self-signed certificate.  Modified server.xml to 
 include a connector:
 
 Connector port=8443 
 protocol=org.apache.coyote.http11.Http11Protocol SSLEnabled=true
maxThreads=150 scheme=https secure=true
  keystoreFile=/Users/administrator/.keystore 
 keystorePass=*
clientAuth=false sslProtocol=TLS /
 
 anything else is the default, out of box.
 
 Where should I configure and how that when I hit
 
 http://localhost:8080
 
 it should redirect to
 
 https://localhost:8443
 
 make sure your connector 8080 has redirectPort=8443 in it, then in 
 tomcat.home/conf/web.xml define a constraint, transport/confidential
 
 security-constraint
 web-resource-collection
 web-resource-nameEverything is https/web-resource-name
 url-pattern/*/url-pattern
 /web-resource-collection
 
 user-data-constraint
 transport-guaranteeCONFIDENTIAL/transport-guarantee
 /user-data-constraint
 /security-constraint
 
 
 
 ??
 
 That is I do not want it to be web app specific, I want to have this 
 behavior by default.   I am not using httpd or mod_jk at this time and do 
 not want to use if I can avoid them.
 
 Should I also add SSLEngine=on ??
 
 
 Thanks ahead,
 
 János
 P.S.  I looked the list from 2008 and see nothing in this regard.
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org


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



Hard time finding a but on Tomcat 7 (doesn't happen on 6.)

2011-03-15 Thread Peter P. Lupo
I'm trying to add mail.jar (Java Mail) to my app's lib (the problem also
happens with tomcat's lib). It is quite simple. If I do it, I start getting
Exception in thread http-bio-8080 error and it keeps printing it like in a
loop. The problem starts as soon as I make a request to a servlet or to a
jsf page. Everything goes fine on latest Tomcat 6 but it gives me this error
on versions 7.0.8 and 7.0.11 (only tried on those).

My environment is Windows 7 64-bit, JDK 7 64-bit 1.7.0-ea-b125.
Just to be clear: I don't have to try sending an e-mail. Just adding the jar
and making a request Unleashes the messages.

These are the messages:
Exception in thread http-bio-8080-exec-8 Exception in thread
http-bio-8080-exec-9 ...

And the numbers (exec-8, exec-9) keep growing, sometimes it skips one or two
and after a few minutes I can get 4 or 5 of them even though I have made
only one request.

I am not getting stack traces anywhere. Maybe you can help me finding the
cause of it. I'm kinda lost. Google is not helping me on this.

Regards,

Peter P. Lupo
http://craftnicely.blogspot.com - http://sites.google.com/site/pplupo
 http://sites.google.com/site/pplupoMPS.BR Authorized Implementation
Practitionerhttp://www.softex.br/mpsbr/_profissionais/MPS.BR_certificados_de_arovacao_prova_P2-MPS.BR.pdf-
Certified
ScrumMaster http://www.scrumalliance.org/pages/certified_scrummaster
 http://www.scrumalliance.org/pages/certified_scrummasterOracle Certified
Associate, Java SE 5/SE
6http://in.sun.com/training/certification/java/scja.xml -
Java Black Belt http://www.blackbeltfactory.com/ui#!User/pplupo
 http://www.blackbeltfactory.com/ui#!User/pplupo+55 (021) 81742487


Re: Tomcat 7 Per Instance Memory Footprint in Hello World App.

2011-03-15 Thread Noah Cutler
Chris, thanks for the excellent feedback; thus far this list exceeds
Stackoverflow by orders of magnitude ;--)

Re: ease of implementation, yes, a single instance with multiple virtual
hosts is the way to go (similar setup to apache virtual hosts).

However, some of the LAMP stack apps will have legacy/archived
functionality that I have zero interest/time in porting over to
JVM/Groovy framework. So, the plan is to mod_rewrite archived requests
to php, along with static files (css,jss,html,etc.), and use Tomcat to
serve up non-legacy dynamic content, connecting via AJP or mod_proxy.

Amazed that you have been able to tweak JVM memory usage down to as
little as 128mb, incredible.  The OOME issue is a real one given my lack
of experience in Java -- have @5 months Groovy under my belt and am
enjoying it far too much to return to php -- so important client sites
will have their own dedicated Tomcat instance; the rest, I'll virtual
host in a single instance.

Am interested in Tomcat 7's new DBCP model as well.  Coupled with Groovy
per request singleton (unlike per instance/application lifetime), I
should be able create a db connection handle on request start and
thereafter have all queries in the request run against this cached
connection (could also do a true singleton, the most efficient, but as I
understand, singletons are specific to the entire instance, and
therefore will not work for a virtual hosts setup).

Lots to learn clearly, but am loving the potential here, sky is the
limit performance-wise...
-- 
--Noah

Noah Cutler
Web/Mobile Applications
New Mind Development
ad...@newminddevelopment.com
http:://newminddevelopment.com


On Tue, 2011-03-15 at 16:26 -0400, Christopher Schultz wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Noah,
 
 On 3/15/2011 2:05 PM, Noah Cutler wrote:
  Obviously per instance is a memory hungry solution, albeit highly
  convenient. Placing all sites in a single instance is a possibility as
  well (and the most resource friendly), but I would need to implement
  some form of load balancing for the mid-business-day client A emergency
  restart (since all sites would be affected by the restart). Of course, I
  should have load balancing for the per instance solution as well to
  ensure application uptime even on restart.
 
 Something else to consider is that your configuration becomes more
 complicated when you decide to go to more than 1 JVM: you'll have to use
 a fronting web server to determine which backend JVM to contact.
 
 If you have a single JVM, you can use it directly as your web server
 with no other moving parts.
 
 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
 iEYEARECAAYFAk1/y2IACgkQ9CaO5/Lv0PD4MQCgkWFA858UtCfSUmR+vlmnKI1l
 kwAAniGvFqVvLI4jfTJKzPEqXfyh4y05
 =zT2G
 -END PGP SIGNATURE-
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


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



Re: Hard time finding a but on Tomcat 7 (doesn't happen on 6.)

2011-03-15 Thread Mark Thomas
On 15/03/2011 22:57, Peter P. Lupo wrote:
 I'm trying to add mail.jar (Java Mail) to my app's lib (the problem also
 happens with tomcat's lib). It is quite simple. If I do it, I start getting
 Exception in thread http-bio-8080 error and it keeps printing it like in a
 loop. The problem starts as soon as I make a request to a servlet or to a
 jsf page. Everything goes fine on latest Tomcat 6 but it gives me this error
 on versions 7.0.8 and 7.0.11 (only tried on those).

Does this happen with a clean Tomcat install or just with your application?

Mark

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



RE: Hard time finding a but on Tomcat 7 (doesn't happen on 6.)

2011-03-15 Thread Caldarale, Charles R
 From: Peter P. Lupo [mailto:ppl...@gmail.com] 
 Subject: Hard time finding a but on Tomcat 7 (doesn't happen on 6.)

 I'm trying to add mail.jar (Java Mail) to my app's lib (the problem 
 also happens with tomcat's lib).

As asked earlier:

1) Where did you get this mail.jar?

2) What's in it?

It's possible (but unlikely) that your particular copy of mail.jar might 
contain classes that conflict with ones provided by Tomcat.

 - Chuck


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


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



Re: Hard time finding a but on Tomcat 7 (doesn't happen on 6.)

2011-03-15 Thread Peter P. Lupo
Hmm... sorry guys, I expected to find other ppl here... lol... this mail.jar
is the official from Oracle. I got it there and I also tried the version
before the actual one.

It does not happen on the examples. I don't know what triggers it but
something has changed from tomcat 6 to tomcat 7 that prevents my application
to run.

Everything goes fine on Tomcat 6 so either it's a bug on tomcat 7 or at most
a change that should be documented somewhere or that ppl should be aware of
because it prevents the server to be upgraded since some applications won't
run and there is no known fix.

I'm trying to run some tests to isolate what in my app is causing the
problem but so far nothing with the configuration I suppose.

I'll get back to you.

Peter P. Lupo
http://craftnicely.blogspot.com - http://sites.google.com/site/pplupo
 http://sites.google.com/site/pplupoMPS.BR Authorized Implementation
Practitionerhttp://www.softex.br/mpsbr/_profissionais/MPS.BR_certificados_de_arovacao_prova_P2-MPS.BR.pdf-
Certified
ScrumMaster http://www.scrumalliance.org/pages/certified_scrummaster
 http://www.scrumalliance.org/pages/certified_scrummasterOracle Certified
Associate, Java SE 5/SE
6http://in.sun.com/training/certification/java/scja.xml -
Java Black Belt http://www.blackbeltfactory.com/ui#!User/pplupo
 http://www.blackbeltfactory.com/ui#!User/pplupo+55 (021) 81742487



On Tue, Mar 15, 2011 at 8:20 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Peter P. Lupo [mailto:ppl...@gmail.com]
  Subject: Hard time finding a but on Tomcat 7 (doesn't happen on 6.)

  I'm trying to add mail.jar (Java Mail) to my app's lib (the problem
  also happens with tomcat's lib).

 As asked earlier:

 1) Where did you get this mail.jar?

 2) What's in it?

 It's possible (but unlikely) that your particular copy of mail.jar might
 contain classes that conflict with ones provided by Tomcat.

  - Chuck


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


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




Re: [OT] Migrated from 6.0.29 to 7.0.10, Now I get INFO: TLD skipped. URI: http://struts.apache.org/tags-bean is already defined

2011-03-15 Thread Brian Braun
I don't know yet which project are you talking about, but why haven't you
decided to migrate to JSF 2.0 or Spring MVC, instead of staying with Struts?

My needs are mostly to create apps faster, specially in the GUI. The forms,
the validation, the old basic HTML... I spend too much time doing that, and
I remember how fast was using a RAD as Powerbuilder. It must be a better way
to program than Using the 2004 Struts version. So what I'm most interested
in, is the presentation. I did my research on JSF and I think it is the
substitution of Struts, I mean if you have to create start a new project
from scratch, there is no point in choosing Struts if JSF already exists. I
was just about to migrate, but then Spring appeared and I postponed the
issue, not deciding which way to follow (JSF or Spring MVC).
I would also get a lot of benefits from the other Spring modules, such as
the transactions, the DBMS access, etc. I know I'm spending time reinventing
the weel, creating my own objects while Spring has a lot of functionality
ready to use.

I would like to know what Mark Thomas thinks about this, being a person
involved with Spring Source.



On Mon, Mar 14, 2011 at 12:49 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Brian,

 On 3/12/2011 6:46 PM, Brian Braun wrote:
  Well, first of all, I'm using the 2004 Struts version. Why didn't I
 upgraded
  that over all these years? Because in the first years I thought I was
 going
  to migrate to JSF, and recetly I'm thinking that maybe I should go with
  Spring. For that reason, I didn't want to invest time upgrading to the
 most
  recent versions of Struts, and I got stuck on time. I usually adopt new
  version early (as I have done with Struts 7.0.11), but with Struts...
 that
  happened.

 I know the feeling. We are still using Struts 1.3... making the upgrade
 to 2.x is ... non-trivial.

  I Still haven't decided between JSF and Spring. I know they are not the
 same
  thing, that Spring brings more that a presentation and controller, but in
  the presentation area I don't know if I should go with JSF (which is the
 new
  standard, right?), or with Spring's MVC. But certainly I'm obsolete using
  2004's Struts.

 I'm sure you will get a lot of opinions on all that. :)

 Struts 1.3 is still fine if it's meeting your needs. S2 is just s
 much better for so many things, it's painful not have have switched yet.

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

 iEYEARECAAYFAk1+VRIACgkQ9CaO5/Lv0PCQ8ACgt5slDYZzdslZeNM0d+kpW1XD
 O00AoLhYBzEqgJdk6pt1WIOCAI9k4d4N
 =al4T
  -END PGP SIGNATURE-

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




Re: Hard time finding a but on Tomcat 7 (doesn't happen on 6.)

2011-03-15 Thread Konstantin Kolinko
2011/3/16 Peter P. Lupo ppl...@gmail.com:
 Hmm... sorry guys, I expected to find other ppl here... lol... this mail.jar
 is the official from Oracle. I got it there and I also tried the version
 before the actual one.

lol. Clairvoyants? There are several versions of JavaMail
specifications out there, and a number of implementations as well.
What is the size of the file, and what is in its META-INF/MANIFEST.MF
? A download link might be a bonus.

 It does not happen on the examples. I don't know what triggers it but
 something has changed from tomcat 6 to tomcat 7 that prevents my application
 to run.

Try to simplify things. Remove parts of web.xml while the issue is
still reproducible.

Try that with a different servlet.

 My environment is Windows 7 64-bit, JDK 7 64-bit 1.7.0-ea-b125.

Does the issue happen with Java 6,  or it is only observed with this
early access build of JDK 7?

 Just to be clear: I don't have to try sending an e-mail. Just adding the jar
 and making a request Unleashes the messages.

 These are the messages:
 Exception in thread http-bio-8080-exec-8 Exception in thread
 http-bio-8080-exec-9 ...

 And the numbers (exec-8, exec-9) keep growing, sometimes it skips one or two
 and after a few minutes I can get 4 or 5 of them even though I have made
 only one request.

Where those messages are printed? Are they in the log files?

Best regards,
Konstantin Kolinko

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



Re: Hard time finding a but on Tomcat 7 (doesn't happen on 6.)

2011-03-15 Thread Peter P. Lupo
I'm sorry, I was in a hurry because I had to leave, you guys were very
responsive and I thought I could give you the info I had at hand. I'm
talking about this Java Mail:
http://www.oracle.com/technetwork/java/javamail/index.html

The messages are being printed on the console. It just prints something like
Exception in thread http-bio-8080-exec-8

and the following similar messages appear on the same line...
Exception in thread http-bio-8080-exec-8 Exception in thread
http-bio-8080-exec-9

@Konstantin I'm trying to do something similar...
 http://www.oracle.com/technetwork/java/javamail/index.html
Peter P. Lupo
http://craftnicely.blogspot.com - http://sites.google.com/site/pplupo
 http://sites.google.com/site/pplupoMPS.BR Authorized Implementation
Practitionerhttp://www.softex.br/mpsbr/_profissionais/MPS.BR_certificados_de_arovacao_prova_P2-MPS.BR.pdf-
Certified
ScrumMaster http://www.scrumalliance.org/pages/certified_scrummaster
 http://www.scrumalliance.org/pages/certified_scrummasterOracle Certified
Associate, Java SE 5/SE
6http://in.sun.com/training/certification/java/scja.xml -
Java Black Belt http://www.blackbeltfactory.com/ui#!User/pplupo
 http://www.blackbeltfactory.com/ui#!User/pplupo+55 (021) 81742487



On Tue, Mar 15, 2011 at 9:12 PM, Konstantin Kolinko
knst.koli...@gmail.comwrote:

 2011/3/16 Peter P. Lupo ppl...@gmail.com:
  Hmm... sorry guys, I expected to find other ppl here... lol... this
 mail.jar
  is the official from Oracle. I got it there and I also tried the version
  before the actual one.

 lol. Clairvoyants? There are several versions of JavaMail
 specifications out there, and a number of implementations as well.
 What is the size of the file, and what is in its META-INF/MANIFEST.MF
 ? A download link might be a bonus.

  It does not happen on the examples. I don't know what triggers it but
  something has changed from tomcat 6 to tomcat 7 that prevents my
 application
  to run.

 Try to simplify things. Remove parts of web.xml while the issue is
 still reproducible.

 Try that with a different servlet.

  My environment is Windows 7 64-bit, JDK 7 64-bit 1.7.0-ea-b125.

 Does the issue happen with Java 6,  or it is only observed with this
 early access build of JDK 7?

  Just to be clear: I don't have to try sending an e-mail. Just adding the
 jar
  and making a request Unleashes the messages.
 
  These are the messages:
  Exception in thread http-bio-8080-exec-8 Exception in thread
  http-bio-8080-exec-9 ...
 
  And the numbers (exec-8, exec-9) keep growing, sometimes it skips one or
 two
  and after a few minutes I can get 4 or 5 of them even though I have made
  only one request.

 Where those messages are printed? Are they in the log files?

 Best regards,
 Konstantin Kolinko

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




Re: Populating Oracle v$session.program from Tomcat Context.xml

2011-03-15 Thread Jorge Medina
What is the problem that you are trying to solve?

On Mon, Mar 14, 2011 at 4:25 PM, Dan random.da...@gmail.com wrote:
 On Mon, Mar 14, 2011 at 11:25 AM, Dan random.da...@gmail.com wrote:
 On Mon, Mar 14, 2011 at 10:57 AM, chris derham ch...@derham.me.uk wrote:
 We have some working tomcat 6 instances that we'd like to identify


 Can you use the combination of machine and schema name to identify the
 instance? You didn't detail your environment, but if you have a cluster,
 then the machine name would uniquely identify the instance. If you have
 multiple different instances on the same machine, then surely the schema
 name would allow you to identify which user it is? This covers all
 possibilities unless you have different apps on the same machine in
 different tomcat instances talking to the same schema.

 Chris


 We are running all of our web-applications from two machines, and they
 all use the same schema/username, so unfortunately I need the program,
 client_info, module, etc field to identify them.

 We are running a RAC, and I'm querying gv$session which should get me
 all cluster member connections.

 As David said, this does work with the thin driver, but I need the
 service/load balancing functionality from OCI. Any more suggestions
 are welcome!


 Does anyone else have any additional thoughts on this? I'd sure
 appreciate more input.

 TIA,

 Dan

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



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



Re: --Jvm option trouble with Windows service

2011-03-15 Thread Konstantin Kolinko
2011/3/15 Olivier Lefevre lefev...@yahoo.com:
 On 3/15/2011 8:28 PM, Konstantin Kolinko wrote:

 Saying it does not make so. I assure you that both the JRE and the
 JDK include the bin/server/jvm.dll.

 On Linux yes. On Windows no. Have you looked there? Or you have a 64-bit
 JRE?

 Of course I have looked there! And no I don't have a 64bit JRE.


What version of JRE are you using? The latest 6u24 one does not have the file.

Maybe that server/jvm.dll was copied there from a different version,
and does not match the rest of JRE files there?

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



RE: Hard time finding a but on Tomcat 7 (doesn't happen on 6.)

2011-03-15 Thread Caldarale, Charles R
 From: Peter P. Lupo [mailto:ppl...@gmail.com] 
 Subject: Re: Hard time finding a but on Tomcat 7 (doesn't happen on 6.)

 I'm talking about this Java Mail:
 http://www.oracle.com/technetwork/java/javamail/index.html

You really, really need to be specific.  There are several versions of JavaMail 
referenced on that page; which one are you using?

 The messages are being printed on the console. It just prints 
 something like
 Exception in thread http-bio-8080-exec-8

So what's the *exact* message, and what's in the Tomcat logs?  (Look in _all_ 
of them.)

Running with the 1.4.4 mail.jar doesn't generate any problems in my rather 
simple webapps.  Perhaps there's a conflict with classes or configuration in 
your particular webapp's WEB-INF/lib or WEB-INF/classes directories; for 
example, the 1.4.4 mail.jar shouldn't have jCIFS deployed with it.

 - Chuck


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


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



Re: Hard time finding a but on Tomcat 7 (doesn't happen on 6.)

2011-03-15 Thread Peter P. Lupo
 I told you, the latest one. So it's 1.44.
The exact message is:
Exception in thread http-bio-8080-exec-8
but the number at the end (8) varies and the number of messages like those
varies also. Each new message comes with a higher ending number. So far I
was unable to find out any correspondence between the number of the messages
and anything else. The ending number seems to be related to the time between
the last message and the new one. If it comes right away, the ending number
is the next one. If the new message takes longer to show up it may skip 1 or
2 units.

At first I thought it was related to java mail because I first had this
problem when I added that jar and it seems I got rid of the problem when I
removed the jar. Now, doing more extensive testing it seems the problem
happens everytime I submit a request before I get the response from the last
one which is odd because it works just fine with tomcat 6.

So far I was only able to do it with with my application so I have created
an empty web application and so far I have tested that with servlets, jsps
and jsfs. Now I'm moving to test some frameworks until I can find out what
exactly causes the issue with tomcat 7 and works properly on tomcat 6. Then
we can figure out if it is a problem with the framework or tomcat.

As soon as I have it isolated I will host the source somewhere so you can
download.

I advise you to not spend time on that since it seems that I am the only one
having the issue.

Thank you all for the willingness to help.

Regards,

Peter P. Lupo
http://craftnicely.blogspot.com - http://sites.google.com/site/pplupo
 http://sites.google.com/site/pplupoMPS.BR Authorized Implementation
Practitionerhttp://www.softex.br/mpsbr/_profissionais/MPS.BR_certificados_de_arovacao_prova_P2-MPS.BR.pdf-
Certified
ScrumMaster http://www.scrumalliance.org/pages/certified_scrummaster
 http://www.scrumalliance.org/pages/certified_scrummasterOracle Certified
Associate, Java SE 5/SE
6http://in.sun.com/training/certification/java/scja.xml -
Java Black Belt http://www.blackbeltfactory.com/ui#!User/pplupo
 http://www.blackbeltfactory.com/ui#!User/pplupo+55 (021) 81742487



On Tue, Mar 15, 2011 at 10:56 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Peter P. Lupo [mailto:ppl...@gmail.com]
  Subject: Re: Hard time finding a but on Tomcat 7 (doesn't happen on 6.)

  I'm talking about this Java Mail:
  http://www.oracle.com/technetwork/java/javamail/index.html

 You really, really need to be specific.  There are several versions of
 JavaMail referenced on that page; which one are you using?

  The messages are being printed on the console. It just prints
  something like
  Exception in thread http-bio-8080-exec-8

 So what's the *exact* message, and what's in the Tomcat logs?  (Look in
 _all_ of them.)

 Running with the 1.4.4 mail.jar doesn't generate any problems in my rather
 simple webapps.  Perhaps there's a conflict with classes or configuration in
 your particular webapp's WEB-INF/lib or WEB-INF/classes directories; for
 example, the 1.4.4 mail.jar shouldn't have jCIFS deployed with it.

  - Chuck


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


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




RE: Hard time finding a but on Tomcat 7 (doesn't happen on 6.)

2011-03-15 Thread Caldarale, Charles R
 From: Peter P. Lupo [mailto:ppl...@gmail.com] 
 Subject: Re: Hard time finding a but on Tomcat 7 (doesn't happen on 6.)

 I told you, the latest one. So it's 1.44.

The problem is that different people have different views of what is latest.  
We've had at least one user claiming to have the latest Tomcat installed, 
only to discover some days later that it was close to a year old - always best 
to provide the specifics.

 The exact message is:
 Exception in thread http-bio-8080-exec-8

That's the name of a thread used by the Connector for port 8080 to service 
requests; the number on the end is simply incremented by one each time a new 
thread is started, up to the maximum configured for that Connector. The bio 
part indicates you're using the blocking I/O handler (which is the default).  
It's unlikely the message is being displayed by Tomcat itself, since Tomcat is 
pretty good at providing more comprehensive information, including a call stack.

 Each new message comes with a higher ending number.

Indicating the threads are getting stuck somewhere, and thus not available for 
reuse.  Taking a thread dump might shed some light on the situation; you could 
also use JConsole or VisualVM to examine the presumably stuck threads and see 
where they're stuck and how they got there.

Again, the logs may have some information pertinent to the problem.

 - Chuck


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


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



Re: Hard time finding a but on Tomcat 7 (doesn't happen on 6.)

2011-03-15 Thread Peter P. Lupo
Oh, yeah, I forgot to mention the logs. They don't show any sign of error.
It's getting quite late here and I have to wake up early tomorrow so I will
just give it a break and keep testing tomorrow.
Thank you for the tips. I'll keep you posted.

Regards,

Peter P. Lupo
http://craftnicely.blogspot.com - http://sites.google.com/site/pplupo
 http://sites.google.com/site/pplupoMPS.BR Authorized Implementation
Practitionerhttp://www.softex.br/mpsbr/_profissionais/MPS.BR_certificados_de_arovacao_prova_P2-MPS.BR.pdf-
Certified
ScrumMaster http://www.scrumalliance.org/pages/certified_scrummaster
 http://www.scrumalliance.org/pages/certified_scrummasterOracle Certified
Associate, Java SE 5/SE
6http://in.sun.com/training/certification/java/scja.xml -
Java Black Belt http://www.blackbeltfactory.com/ui#!User/pplupo
 http://www.blackbeltfactory.com/ui#!User/pplupo+55 (021) 81742487



On Tue, Mar 15, 2011 at 11:55 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Peter P. Lupo [mailto:ppl...@gmail.com]
  Subject: Re: Hard time finding a but on Tomcat 7 (doesn't happen on 6.)

  I told you, the latest one. So it's 1.44.

 The problem is that different people have different views of what is
 latest.  We've had at least one user claiming to have the latest Tomcat
 installed, only to discover some days later that it was close to a year old
 - always best to provide the specifics.

  The exact message is:
  Exception in thread http-bio-8080-exec-8

 That's the name of a thread used by the Connector for port 8080 to
 service requests; the number on the end is simply incremented by one each
 time a new thread is started, up to the maximum configured for that
 Connector. The bio part indicates you're using the blocking I/O handler
 (which is the default).  It's unlikely the message is being displayed by
 Tomcat itself, since Tomcat is pretty good at providing more comprehensive
 information, including a call stack.

  Each new message comes with a higher ending number.

 Indicating the threads are getting stuck somewhere, and thus not available
 for reuse.  Taking a thread dump might shed some light on the situation; you
 could also use JConsole or VisualVM to examine the presumably stuck threads
 and see where they're stuck and how they got there.

 Again, the logs may have some information pertinent to the problem.

  - Chuck


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


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




Re: Hard time finding a but on Tomcat 7 (doesn't happen on 6.)

2011-03-15 Thread Peter P. Lupo
I'm still up. lol

I'm using spring security, weld, primefaces and JPA (hibernate as provider).
So far I have already tested regular JSPs, servlets, JSF (pure and getting
values from managed bean), primefaces, weld, spring security and JPA one by
one, isolated. I didn't get even 2 of these set up at the same time (not
even the jars on lib). I followed the exact same configuration I did on my
application. So far I was not able to reproduce the error.

Tomorrow I may try combining them and/or try using VisualVM to analyze the
error.

Peter P. Lupo
http://craftnicely.blogspot.com - http://sites.google.com/site/pplupo
 http://sites.google.com/site/pplupoMPS.BR Authorized Implementation
Practitionerhttp://www.softex.br/mpsbr/_profissionais/MPS.BR_certificados_de_arovacao_prova_P2-MPS.BR.pdf-
Certified
ScrumMaster http://www.scrumalliance.org/pages/certified_scrummaster
 http://www.scrumalliance.org/pages/certified_scrummasterOracle Certified
Associate, Java SE 5/SE
6http://in.sun.com/training/certification/java/scja.xml -
Java Black Belt http://www.blackbeltfactory.com/ui#!User/pplupo
 http://www.blackbeltfactory.com/ui#!User/pplupo+55 (021) 81742487



On Wed, Mar 16, 2011 at 12:21 AM, Peter P. Lupo ppl...@gmail.com wrote:

 Oh, yeah, I forgot to mention the logs. They don't show any sign of error.
 It's getting quite late here and I have to wake up early tomorrow so I will
 just give it a break and keep testing tomorrow.
 Thank you for the tips. I'll keep you posted.

 Regards,

 Peter P. Lupo
 http://craftnicely.blogspot.com - http://sites.google.com/site/pplupo
  http://sites.google.com/site/pplupoMPS.BR Authorized Implementation
 Practitionerhttp://www.softex.br/mpsbr/_profissionais/MPS.BR_certificados_de_arovacao_prova_P2-MPS.BR.pdf-
  Certified
 ScrumMaster http://www.scrumalliance.org/pages/certified_scrummaster
  http://www.scrumalliance.org/pages/certified_scrummasterOracle
 Certified Associate, Java SE 5/SE 
 6http://in.sun.com/training/certification/java/scja.xml -
 Java Black Belt http://www.blackbeltfactory.com/ui#!User/pplupo
  http://www.blackbeltfactory.com/ui#!User/pplupo+55 (021) 81742487



 On Tue, Mar 15, 2011 at 11:55 PM, Caldarale, Charles R 
 chuck.caldar...@unisys.com wrote:

  From: Peter P. Lupo [mailto:ppl...@gmail.com]
  Subject: Re: Hard time finding a but on Tomcat 7 (doesn't happen on 6.)

  I told you, the latest one. So it's 1.44.

 The problem is that different people have different views of what is
 latest.  We've had at least one user claiming to have the latest Tomcat
 installed, only to discover some days later that it was close to a year old
 - always best to provide the specifics.

  The exact message is:
  Exception in thread http-bio-8080-exec-8

 That's the name of a thread used by the Connector for port 8080 to
 service requests; the number on the end is simply incremented by one each
 time a new thread is started, up to the maximum configured for that
 Connector. The bio part indicates you're using the blocking I/O handler
 (which is the default).  It's unlikely the message is being displayed by
 Tomcat itself, since Tomcat is pretty good at providing more comprehensive
 information, including a call stack.

  Each new message comes with a higher ending number.

 Indicating the threads are getting stuck somewhere, and thus not available
 for reuse.  Taking a thread dump might shed some light on the situation; you
 could also use JConsole or VisualVM to examine the presumably stuck threads
 and see where they're stuck and how they got there.

 Again, the logs may have some information pertinent to the problem.

  - Chuck


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


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





Re: --Jvm option trouble with Windows service

2011-03-15 Thread Olivier Lefevre

On 3/16/2011 2:50 AM, Konstantin Kolinko wrote:

What version of JRE are you using? The latest 6u24 one does not have the file.


It is 6u24. I did not copy anything.

In addition, I already told you that I get the same error if I use the server
JVM from the JDK.

-- O.L.



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



Re: --Jvm option trouble with Windows service

2011-03-15 Thread Olivier Lefevre

To be absolutely sure I uninstalled both JRE and JDK, manually
removing anything left behind, and reinstalled. This time the
JRE did not have a server JVM indeed, so maybe another program
had copied it. However the JDK has one and if I use it for the
Tomcat server and later try to start it (with debugging enabled)
I get this:

[2011-03-16 06:12:23] [info]  Commons Daemon procrun (1.0.5.0 32-bit) started
[2011-03-16 06:12:23] [info]  Service Tomcat7 name Apache Tomcat 7
[2011-03-16 06:12:23] [info]  Service 'Tomcat7' installed
[2011-03-16 06:12:23] [info]  Commons Daemon procrun finished
[2011-03-16 06:12:39] [debug] ( prunsrv.c:1494) Commons Daemon procrun log 
initialized
[2011-03-16 06:12:39] [info]  (  :0   ) Commons Daemon procrun (1.0.5.0 
32-bit) started
[2011-03-16 06:12:39] [info]  (  :0   ) Debugging 'Tomcat7' Service...
[2011-03-16 06:12:39] [debug] ( prunsrv.c:1246) Inside ServiceMain...
[2011-03-16 06:12:39] [info]  (  :0   ) Starting service...
[2011-03-16 06:12:39] [debug] ( javajni.c:195 ) Invalid RuntimeLib 
'C:\Java\j2sdk1.6.0\bin\server\jvm.dll'
[2011-03-16 06:12:39] [debug] ( javajni.c:197 ) Using Jre JavaHome 
'C:\Programme\Java\jre6'
[2011-03-16 06:12:39] [debug] ( javajni.c:206 ) loading jvm 
'C:\Programme\Java\jre6\bin\server\jvm.dll'
[2011-03-16 06:12:39] [debug] ( javajni.c:251 ) Setting DLL search path to 
'C:\Programme\Java\jre6\bin\server'
[2011-03-16 06:12:39] [debug] ( javajni.c:251 ) Setting DLL search path to 
'C:\Programme\Java\jre6\bin'
[2011-03-16 06:12:39] [error] ( javajni.c:264 ) Das angegebene Modul wurde 
nicht gefunden.
[2011-03-16 06:12:39] [error] ( prunsrv.c:1037) Failed creating java 
C:\Java\j2sdk1.6.0\bin\server\jvm.dll
[2011-03-16 06:12:39] [error] ( prunsrv.c:1037) Das angegebene Modul wurde 
nicht gefunden.
[2011-03-16 06:12:39] [error] ( prunsrv.c:1377) ServiceStart returned 1
[2011-03-16 06:12:39] [error] ( prunsrv.c:1377) Das angegebene Modul wurde 
nicht gefunden.
[2011-03-16 06:12:39] [info]  (  :0   ) Debug service finished.
[2011-03-16 06:12:39] [info]  (  :0   ) Commons Daemon procrun finished

So it just plain doesn't work with the server VM. It works with
the client VM, though.

-- O.L.


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



Re: Tomcat 7 Per Instance Memory Footprint in Hello World App.

2011-03-15 Thread Thomas Freitag
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Noah,

On 03/15/2011 07:05 PM, Noah Cutler wrote:
 Obviously per instance is a memory hungry solution, albeit highly
 convenient. Placing all sites in a single instance is a possibility as
 well (and the most resource friendly), but I would need to implement
 some form of load balancing for the mid-business-day client A emergency
 restart (since all sites would be affected by the restart). Of course, I
 should have load balancing for the per instance solution as well to
 ensure application uptime even on restart.

That could be done with a combination of Apache httpd and mod_jk (my
preffered way), mod_proxy_ajp or mod_proxy_http. For mod_jk there is a
very good documented, almost ready to start configuration in the source
download.

Regards,
- -- 
Thomas Freitag
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk2ASbsACgkQGE5pHr3PKuXf3ACeL35NqbxT912UJmQcsLsRqeJz
8pQAn3sEYamqbBAceNpejbX0cJ/olWYR
=4lmj
-END PGP SIGNATURE-

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



Re: JMX Connection leak

2011-03-15 Thread Maimon Oded
Thanks

On Sun, Mar 13, 2011 at 11:56 AM, Mark Thomas ma...@apache.org wrote:

 On 13/03/2011 08:33, Maimon Oded wrote:
  Hi,
  I'm using tomcat 6 and HypericHQ for monitoring via JMX.
  I don't know if this is an hyperic issue or not, but i wonder if there is
 an
  option to fix it via tomcat/java configuration. the reason that i don't
 know
  if this is an hyperic or a tomcat/java configuration issue is because
 that
  when we use hyperic on other standard java daemon it doesn't have the
 same
  connection leak issue.

 That looks like an Hyperic issue to me.

  the issue is the following:
  hyperic, overtime, opens hundreds of jmx connection and never closes
 them..
  after few hours our tomcat server is using 100% cpu without doing
 anything.
  once i stop hyperic agent, tomcat will go back to 0-1% cpu..
 
  here is what we are seeing virtual vm:
 
 http://forums.hyperic.com/jiveforums/servlet/JiveServlet/download/1-11619-37096-2616/Capture.PNG
 
  is there any thing that we can do to fix this via java configuration?

 Not that I am aware of.

  (forcing it to close a connection that is open for more than X seconds?)
 
  One more thing, in tomcat we see (from time to time) the following
 message
  (while hyperic is running):
  Mar 7, 2011 11:30:00 AM ServerCommunicatorAdmin reqIncoming
  WARNING: The server has decided to close this client connection.

 No idea. That is not a Tomcat class.

 Mark

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




-- 


Oded.