Re: Tomcat 7 + exception while adding cookies

2011-11-30 Thread Debraj Mallick
hi Christopher,

my tomcat version is : 7.0.14
working on Window7 with JDK 1.6

On Thu, Dec 1, 2011 at 4:45 AM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Debraj,
>
> On 11/30/11 1:16 PM, Debraj Mallick wrote:
> > i have set maxHttpHeaderSize=81920 but still i am getting
> > exception *Stack trace:* 30 Nov, 2011 11:38:48 PM
> > org.apache.catalina.connector.CoyoteAdapter service SEVERE: An
> > exception or error occurred in the container during the request
> > processing java.lang.ArrayIndexOutOfBoundsException: 8192 at
> >
> org.apache.coyote.http11.AbstractOutputBuffer.write(AbstractOutputBuffer.java:522)
>
> What
> >
> is the exact Tomcat version? 7.0.what?
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk7WuSUACgkQ9CaO5/Lv0PA/2QCcDp5xTeWSRbH237kS/hnvymEw
> mCkAnix/CYtwTv2reVljqHJfo0ka7RG8
> =VDsQ
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
Thanks & Regards,
Debraj Mallick
9674247281


Do any of the Tomcat LDAP-type realms support "no password" authentication?

2011-11-30 Thread ohaya
Hi,

I'm new here, and hope that someone can help.

I was wondering if any of the LDAP-type realms (e.g., JNDIRealm, etc.) support 
an authentication mode where no password or credentials are required?  In other 
words, where just a userID/username is presented, and if that userID/username 
is present in the LDAP, then the user gets authenticated?

Thanks,
Jim

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



Re: Tomcat 7 + exception while adding cookies

2011-11-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Debraj,

On 11/30/11 1:16 PM, Debraj Mallick wrote:
> i have set maxHttpHeaderSize=81920 but still i am getting
> exception *Stack trace:* 30 Nov, 2011 11:38:48 PM
> org.apache.catalina.connector.CoyoteAdapter service SEVERE: An
> exception or error occurred in the container during the request 
> processing java.lang.ArrayIndexOutOfBoundsException: 8192 at 
> org.apache.coyote.http11.AbstractOutputBuffer.write(AbstractOutputBuffer.java:522)

What
> 
is the exact Tomcat version? 7.0.what?

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

iEYEARECAAYFAk7WuSUACgkQ9CaO5/Lv0PA/2QCcDp5xTeWSRbH237kS/hnvymEw
mCkAnix/CYtwTv2reVljqHJfo0ka7RG8
=VDsQ
-END PGP SIGNATURE-

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



Re: Logging

2011-11-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thom,

On 11/30/11 1:04 PM, Thom Hehl wrote:
> I'm using VI to reading the log file. I running a Windows RDP.

Are you using 'vi' in a way that allows it to get updates from the
file? I'm no 'vi' expert, but I'm sure it reads the entire file at
startup and thinks that it doesn't change.

Try using:

> tail -f stdout.log

If you have a POSIX environment handy (like Cygwin, or gnuutils or
whatever).

- -chris

PS: vi on Windows? That's doing things the hard way. ;)
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7WuOIACgkQ9CaO5/Lv0PA8hQCfbPXtlASPD28Nr1R7xayvAhZM
OWgAoJtmfQ9IHfVNVip7nqSX0vjqonLg
=lvdm
-END PGP SIGNATURE-

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



Re: [OT] Re: Maximum memory that can be assigned to Tomcat on windows platform

2011-11-30 Thread Francis GALIEGUE
On Wed, Nov 30, 2011 at 22:38, André Warnier  wrote:
[...]
>
> I am not knowledgeable at all in such questions, and while you are at it let
> me ask a question :
> Does the fact of having a system with a 64-bit CPU (and OS) necessarily (or
> usually) imply that data transfers between CPU and RAM happen also 64-bit in
> parallel ?
>

No, this depends on the bus width, not the address space. And bus
widths nowadays are rather in the range of 256/512 bits.

> For example, let' suppose that I have an application which handles a very
> large table of integers (the integers themselves being < 2exp31), and that
> periodically all elements of this table have to be updated.
> My understanding is that under a 32-bit platform, each integer will occupy
> 32 bit, while on a 64-bit platform each will occupy 64 bit (the source
> program remaining the same).
>
> If there is not a corresponding 64-bit parallel transfer between CPU and
> memory, then using a 64-bit CPU would be detrimental, no ?
> Or is this a non-sensical case nowadays ?
>

This depends on the alignment the JVM uses. If it aligns to 8 bytes,
then yes, any integer will take up 8 bytes, but so will any byte. In
general, the alignment is 4 bytes, except for long values of course.

With a 4 byte alignment, this means you can store two ints in a
register, and it's then only a matter of logical ands/shifting to
obtain the value you want. And these operations are ultra fast ;)

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
f...@one2team.com
40 avenue Raymond Poincaré
75116 Paris

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



RE: [OT] Re: Maximum memory that can be assigned to Tomcat on windows platform

2011-11-30 Thread Ilya Kazakevich
>>Does the fact of having a system with a 64-bit CPU (and OS) necessarily
(or usually) imply 
>>that data transfers between CPU and RAM happen also 64-bit in parallel ?
That depends on front bus width. Modern PCs has 64-bit bus AFAIK.

In "64-bit CPU" 64 is register size and nothing else (although 86x64 mode
has some differences with IA32)

>>My understanding is that under a 32-bit platform, each integer will occupy
32 bit, while 
>>on a 64-bit platform each will occupy 64 bit (the source program remaining
the same).
Java integers are always 32bit, are not they?

C int may vary from 16 (in BCC 3.1 for DOS) to 64. 

64-bit processor mode gives you ability to:
1) address more memory (2^64 bytes theoretically).
2) store more data in register so CPU could now operate 64bit numbers and
you need one operation to do something with two 64bit objects opposite to
two operations on 32bit.
3) v86 mode is disabled so you can't run 16bit apps :)
4) use new registers, new SSE instructions and so on:
http://en.wikipedia.org/wiki/X86-64#Architectural_features



-
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] Re: Maximum memory that can be assigned to Tomcat on windows platform

2011-11-30 Thread André Warnier

Francis GALIEGUE wrote:

On Wed, Nov 30, 2011 at 18:51, Christopher Schultz
 wrote:
[...]

Running a machine with more than 4GiB in 32-bit mode isn't stupid at
all IMO. If you have relatively small processes, there's no need for
the overhead of 64-bit even if you have 16GiB or more.



This is quite the opposite: a 32bit OS has _more_ overhead than a
64bit OS when running on a 64bit CPU.

Just consider filesystem calls such as read(), write(), seek(): their
arguments are 64bits, not 32, and have been so before 64bit was even
common (2+ GB files are common place today). With a 32bit OS on a
64bit CPU, you eat up two registers whereas a 64bit OS will take only
one.

And of course, this is without considering wasted TLB space or the
sheer time to address just one memory page.



I am not knowledgeable at all in such questions, and while you are at it let me ask a 
question :
Does the fact of having a system with a 64-bit CPU (and OS) necessarily (or usually) imply 
that data transfers between CPU and RAM happen also 64-bit in parallel ?


For example, let' suppose that I have an application which handles a very large table of 
integers (the integers themselves being < 2exp31), and that periodically all elements of 
this table have to be updated.
My understanding is that under a 32-bit platform, each integer will occupy 32 bit, while 
on a 64-bit platform each will occupy 64 bit (the source program remaining the same).
If there is not a corresponding 64-bit parallel transfer between CPU and memory, then 
using a 64-bit CPU would be detrimental, no ?

Or is this a non-sensical case nowadays ?



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



Re: Maximum memory that can be assigned to Tomcat on windows platform

2011-11-30 Thread Stefan Mayr

Am 30.11.2011 12:08, schrieb j...@gniffelnieuws.net:

On Wed, 30 Nov 2011 16:14:45 +0530, Choudhury wrote

Hello ,
 The question is not why I would use 32 bit JVM , the
question is whether there is any maximum limit on memory for Tomcat
and if yes why ? Regards,


The limit is the JVM, not Tomcat itself


It depends on the windows version used actually. From what I remember this is
limited to maximum 2GB for user processes. The easiest way to test is, is with
a small app that shows some memory information like:
public class MaxMemory {
 public static void main(String[] args) {
 Runtime rt = Runtime.getRuntime();
 long totalMem = rt.totalMemory();
 long maxMem = rt.maxMemory();
 long freeMem = rt.freeMemory();
 double megs = 1048576.0;

 System.out.println ("Total Memory: " + totalMem + " (" +
(totalMem/megs) + " MiB)");
 System.out.println ("Max Memory:   " + maxMem + " (" + (maxMem/megs) +
" MiB)");
 System.out.println ("Free Memory:  " + freeMem + " (" + (freeMem/megs)
+ " MiB)");
 }
}

Try to run it with different options for the heap. I would be surprised if you
would get over 1600MB.


This is what we experienced: up to 1GB Heap (Xmx) was stable on all servers.
Heaps larger were very prone to crashes. We've seen a maximum of 1.2GB 
Heap on Windows with 32bit JVMs


That's why we have switched to 64bit JVMs on all machines. No need to 
swap JVM editions when applications require more memory - just increase 
Xmx as long as RAM is available.


  Stefan

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



Connection has been abanded

2011-11-30 Thread János Löbb
Hi,

IT  is  Mac OSX 10.6.8  
java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode)
tomcat is 7.0.21
database is Sybase ASE 15.0.3

We are getting this error in about every half hour or so:

java.lang.NullPointerException
Nov 30, 2011 3:21:28 PM org.apache.tomcat.jdbc.pool.ConnectionPool abandon
WARNING: Connection has been abandoned 
PooledConnection[net.sourceforge.jtds.jdbc.ConnectionJDBC3@40c65cd4]:java.lang.E\
xception
   at 
org.apache.tomcat.jdbc.pool.ConnectionPool.getThreadDump(ConnectionPool.java:973)
   at 
org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:727)
   at 
org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:585)
   at 
org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:174)
   at 
org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:124)
   at 
pathology.connection.CopathDbInterface.getConnectionFromPull(CopathDbInterface.java:119)
   at 
pathology.connection.CopathDbInterface.getConnection(CopathDbInterface.java:85)
   at 
pathology.connection.CopathDbInterface.getConnection(CopathDbInterface.java:68)
   at 
pathology.histology.server.DashboardServiceImpl.getBlockDashboardStatsMap(DashboardServiceImpl.java:923)
   at 
pathology.histology.server.DashboardServiceImpl.getBlockDashboardStats(DashboardServiceImpl.java:513)
   at 
pathology.histology.server.DashboardServiceImpl.getDashboardStats(DashboardServiceImpl.java:62)
   at sun.reflect.GeneratedMethodAccessor597.invoke(Unknown Source)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at 
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
   at 
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
   at 
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
   at 
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   at org.apach


Any good idea where to start troubleshooting ?

Thanks ahead,

János



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



[OT] Re: Maximum memory that can be assigned to Tomcat on windows platform

2011-11-30 Thread Francis GALIEGUE
On Wed, Nov 30, 2011 at 18:51, Christopher Schultz
 wrote:
[...]
>
> Running a machine with more than 4GiB in 32-bit mode isn't stupid at
> all IMO. If you have relatively small processes, there's no need for
> the overhead of 64-bit even if you have 16GiB or more.
>

This is quite the opposite: a 32bit OS has _more_ overhead than a
64bit OS when running on a 64bit CPU.

Just consider filesystem calls such as read(), write(), seek(): their
arguments are 64bits, not 32, and have been so before 64bit was even
common (2+ GB files are common place today). With a 32bit OS on a
64bit CPU, you eat up two registers whereas a 64bit OS will take only
one.

And of course, this is without considering wasted TLB space or the
sheer time to address just one memory page.

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
f...@one2team.com
40 avenue Raymond Poincaré
75116 Paris

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



Problems with forwaring HTTP to HTTPS

2011-11-30 Thread Gregor S.
Hi list,

I'm a bit puzzled.

I want to forward all incoming HTTP-traffic to HTTPS.

Within my $catalina.home/conf/server.xml I've specified the following
connectors:





Then I specified in $catalina.home/conf/web.xml the following
transport-guarantee:



Protected Context
/*


CONFIDENTIAL



In my webapp, additionally I also specified some additional
security-constraints as follows:



Protected Area
/*


someuser



However, when I call the webapp using http://mywebapp.something, it is
not redirected to HTTPS but the HTTP-scheme is used.

However, when I remove the security-constraints from
$catalina.base/conf/web.xml and change the webapp's
deployment-descriptor to



Protected Area
/*


CONFIDENTIAL



domuser



it's working.

My understanding was, that in the global web.xml
($catalina.home/conf/web.xml) the defaults are specified and promoted
to all webapps. But it seems as the webapp doesn't inherit the element
 from the global web.xml if it specifies it's
own  - my expectation was, that it inherits
those elements not specified inside the webapp's
deployment-descriptor.

Is is such, that if I specify  in my local
webapp, the global setting in $catalina.home/conf/web.xml are always
overwritten? If not - where does the inheritiance start and where does
it end?

My business-case is, that I do have a whole bunch of webapps which
have to be re-directed to HTTPS, each of them having their own
 since you'll have to login to access them, and
additionally multiple domains, so that changing each
deployment-descriptor is giving me a major headache.

I couldn't find anything in the documentation  - or let me re-phrase
it: I understood it that way that each element is inherited from the
global deployment-descriptor if not specified in the webapp's own
deployment-descriptor.

If somebody could shed some light here or point me to to right docs,
that would be great.

My configuration:

Using CATALINA_BASE:   /home/tomcat/local/apache-tomcat-6.0.33
Using CATALINA_HOME:   /home/tomcat/local/apache-tomcat-6.0.33
Using CATALINA_TMPDIR: /home/tomcat/local/apache-tomcat-6.0.33/temp
Using JRE_HOME:/usr/lib/jvm/java-6-sun
Using CLASSPATH:   /home/tomcat/local/apache-tomcat-6.0.33/bin/bootstrap.jar
Server version: Apache Tomcat/6.0.33
Server built:   Aug 16 2011 02:16:34
Server number:  6.0.33.0
OS Name:Linux
OS Version: 2.6.26-2-686
Architecture:   i386
JVM Version:1.6.0_26-b03
JVM Vendor: Sun Microsystems Inc.

I'm also using the APR, thus using OpenSSL as SSL-implementation.

TIA

Gregor
-- 
just because you're paranoid, don't mean they're not after you...
gpgp-fp: 3DB13F197F8A0360814885D1F1F1E2EFAD509AFD
skype:rc46fi
gplus.to/gregor
twitter.com/#/2smart4u

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



RE: block direct tomcat

2011-11-30 Thread Ilya Kazakevich
Just disable HTTP connector (comment it in server.xml).
You can use firewall to protect AJP port from remote clients too.


Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
"Develop with pleasure!"

-Original Message-
From: cpanon [mailto:cpa...@yahoo.com] 
Sent: Wednesday, November 30, 2011 10:05 PM
To: Tomcat
Subject: block direct tomcat

Hello
I have an Apache-ajp-Tomcat config that works, but I would like to block any
access to tomcat directly, either on localhost (except for 8009) or from a
client?  What/is there a tomcat config to achieve that?


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



RE: Maximum memory that can be assigned to Tomcat on windows platform

2011-11-30 Thread Ilya Kazakevich
>> That is just stupid since 32bit cannot address more
>> than 4GB of memory no matter what you do. Any sysadmin should know
>> that right?

>That's per process. All reasonably recent 32-bit OSs can address way
>more than 4GiB internally.

Yes, but one region in memory is reserved for IO. Drivers use high memory
addreses (>3Gb) to speak with their devices.
To support more than 3Gb on Win/32bit PAE could be used so IO would reside
higher than 4Gb. 
But in this situation drivers need to deal with 64bit pointers. 
Microsoft believes it would lead to driver fails and BSODs, so it denied it
for desktop versions of OSes. But it works in server versions.
Idea was: "4Gb is rarely needed on desktop and desktop has cheap hardware
and poorly-written drivers.  And on server they have good hardware and good
drivers and often require more than 4Gb."

You could use +4Gb on Win2008/32bit but you _can't_ use more than about
3.5Gb on Win7@32bit. 


BTW process could access more than 4Gb too (see AWE:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa366527(v=vs.85).as
px) but AFAIK Sun JVM does not use it

>If you have relatively small processes, there's no need for
>the overhead of 64-bit even if you have 16GiB or more.

You can run 32bit apps on 64bit windows (that's called WoW64). Processor and
Windows support it and it works pretty well.

Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
"Develop with pleasure!"


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



Re: Tomcat 7 + exception while adding cookies

2011-11-30 Thread Debraj Mallick
Hi Martin,

i have set maxHttpHeaderSize=81920 but still i am getting exception
*Stack trace:*
30 Nov, 2011 11:38:48 PM org.apache.catalina.connector.CoyoteAdapter service
SEVERE: An exception or error occurred in the container during the request
processing
java.lang.ArrayIndexOutOfBoundsException: 8192
at
org.apache.coyote.http11.AbstractOutputBuffer.write(AbstractOutputBuffer.java:522)
at
org.apache.coyote.http11.AbstractOutputBuffer.write(AbstractOutputBuffer.java:429)
at
org.apache.coyote.http11.AbstractOutputBuffer.sendHeader(AbstractOutputBuffer.java:395)
at
org.apache.coyote.http11.AbstractHttp11Processor.prepareResponse(AbstractHttp11Processor.java:965)
at
org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:739)
at org.apache.coyote.Response.action(Response.java:170)
at org.apache.coyote.Response.sendHeaders(Response.java:350)
at
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:315)
at
org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:275)
at
org.apache.catalina.connector.Response.finishResponse(Response.java:501)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:426)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:317)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
30 Nov, 2011 11:38:48 PM org.apache.coyote.http11.AbstractHttp11Processor
endRequest
SEVERE: Error finishing response
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at
org.apache.coyote.http11.AbstractOutputBuffer.write(AbstractOutputBuffer.java:491)
at
org.apache.coyote.http11.AbstractOutputBuffer.sendStatus(AbstractOutputBuffer.java:331)
at
org.apache.coyote.http11.AbstractHttp11Processor.prepareResponse(AbstractHttp11Processor.java:952)
at
org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:739)
at org.apache.coyote.Response.action(Response.java:168)
at
org.apache.coyote.http11.AbstractOutputBuffer.endRequest(AbstractOutputBuffer.java:308)
at
org.apache.coyote.http11.InternalOutputBuffer.endRequest(InternalOutputBuffer.java:160)
at
org.apache.coyote.http11.AbstractHttp11Processor.endRequest(AbstractHttp11Processor.java:990)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:350)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
30 Nov, 2011 11:38:48 PM org.apache.catalina.connector.CoyoteAdapter service
SEVERE: An exception or error occurred in the container during the request
processing
java.lang.ArrayIndexOutOfBoundsException
30 Nov, 2011 11:38:48 PM org.apache.coyote.http11.AbstractHttp11Processor
endRequest
SEVERE: Error finishing response
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at
org.apache.coyote.http11.AbstractOutputBuffer.write(AbstractOutputBuffer.java:491)
at
org.apache.coyote.http11.AbstractOutputBuffer.sendStatus(AbstractOutputBuffer.java:331)
at
org.apache.coyote.http11.AbstractHttp11Processor.prepareResponse(AbstractHttp11Processor.java:952)
at
org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:739)
at org.apache.coyote.Response.action(Response.java:168)
at
org.apache.coyote.http11.AbstractOutputBuffer.endRequest(AbstractOutputBuffer.java:308)
at
org.apache.coyote.http11.InternalOutputBuffer.endRequest(InternalOutputBuffer.java:160)
at
org.apache.coyote.http11.AbstractHttp11Processor.endRequest(AbstractHttp11Processor.java:990)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:350)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
30 Nov, 2011 11:38:48 PM org.apache.catalina.connector.CoyoteAdapter service
SEVERE: An exception or error occurred in the container during the request
processing
java.lang.ArrayI

block direct tomcat

2011-11-30 Thread cpanon
Hello
I have an Apache-ajp-Tomcat config that works, but I would like to block any 
access to tomcat directly, either on localhost (except for 8009) or from a 
client?  What/is there a tomcat config to achieve that?


RE: Logging

2011-11-30 Thread Thom Hehl
I'm using VI to reading the log file. I running a Windows RDP.

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Wednesday, November 30, 2011 1:03 PM
To: Tomcat Users List
Subject: Re: Logging

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thom,

On 11/30/11 10:01 AM, Thom Hehl wrote:
> When running Tomcat 7.0.20 as a daemon, it doesn't appear to be
> writing the logs to the file until tomcat is stopped. Is there some
> way I can make tomcat dump the logs it's holding onto?

What tool are you using to read the log file? Anything else we should
know? Remote file share/NFS?

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

iEYEARECAAYFAk7Wb9oACgkQ9CaO5/Lv0PAjCACfdkWGJ/O+Bv+jPKUxv+bzdL+6
hA0AoIuQpNdivsS6tIB6I06uVl/Xa5ZZ
=9PE+
-END PGP SIGNATURE-

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



Re: Logging

2011-11-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thom,

On 11/30/11 10:01 AM, Thom Hehl wrote:
> When running Tomcat 7.0.20 as a daemon, it doesn't appear to be
> writing the logs to the file until tomcat is stopped. Is there some
> way I can make tomcat dump the logs it's holding onto?

What tool are you using to read the log file? Anything else we should
know? Remote file share/NFS?

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

iEYEARECAAYFAk7Wb9oACgkQ9CaO5/Lv0PAjCACfdkWGJ/O+Bv+jPKUxv+bzdL+6
hA0AoIuQpNdivsS6tIB6I06uVl/Xa5ZZ
=9PE+
-END PGP SIGNATURE-

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



Re: Maximum memory that can be assigned to Tomcat on windows platform

2011-11-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Casper,

On 11/30/11 3:37 AM, Casper Wandahl Schmidt wrote:
> Another question to ask is, why do you have 8GB memory when
> running 32bit? That is just stupid since 32bit cannot address more
> than 4GB of memory no matter what you do. Any sysadmin should know
> that right?

That's per process. All reasonably recent 32-bit OSs can address way
more than 4GiB internally.

For example:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa366778%28v=vs.85%29.aspx#memory_limits

This is generally done through PAE
(http://en.wikipedia.org/wiki/Physical_Address_Extension) which allows
32-bit OSs to access more than 4GiB at the kernel level, though each
process is still limited to 4GiB.

Running a machine with more than 4GiB in 32-bit mode isn't stupid at
all IMO. If you have relatively small processes, there's no need for
the overhead of 64-bit even if you have 16GiB or more.

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

iEYEARECAAYFAk7WbQYACgkQ9CaO5/Lv0PBsWwCgnifhHtqrLUBi7K4PeDjp4hnC
JMkAn0gilsNy2hv3zu3nzUkrmrzxoYWF
=AZpI
-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 + exception while adding cookies

2011-11-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Martin,

On 11/30/11 12:11 PM, Martin Kuen wrote:
> Try setting"maxHttpHeaderSize" for the   in your 
> server.xml. Its default value is 8192 bytes. I guess you're
> exceeding this limit.

+1

If you have a lot of cookies or if you are sending SSL certification
chains which tend to get long, you may run into this problem.

Honestly, Tomcat should probably be doing bounds-checking and emitting
a better error message in this case.

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

iEYEARECAAYFAk7WarcACgkQ9CaO5/Lv0PDYqgCdEDThHZnVWixafAzaBsBK2nj2
kKEAnigmNp+6k5xM1LlIucMAl5vM2rUh
=JFez
-END PGP SIGNATURE-

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



RE: Logging

2011-11-30 Thread Thom Hehl
I am using the out of the box configuration for logging. I did a search of my 
logging.properties and didn't find buffersize. Here 'tis.

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

handlers = 1catalina.org.apache.juli.FileHandler, 
2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 
4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

.handlers = 1catalina.org.apache.juli.FileHandler, 
java.util.logging.ConsoleHandler


# Handler specific properties.
# Describes specific configuration info for Handlers.


1catalina.org.apache.juli.FileHandler.level = FINE
1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.FileHandler.prefix = catalina.

2localhost.org.apache.juli.FileHandler.level = FINE
2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
2localhost.org.apache.juli.FileHandler.prefix = localhost.

3manager.org.apache.juli.FileHandler.level = FINE
3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
3manager.org.apache.juli.FileHandler.prefix = manager.

4host-manager.org.apache.juli.FileHandler.level = FINE
4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
4host-manager.org.apache.juli.FileHandler.prefix = host-manager.

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter



# Facility specific properties.
# Provides extra control for each logger.


org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 
2localhost.org.apache.juli.FileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level 
= INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers
 = 3manager.org.apache.juli.FileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level
 = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers
 = 4host-manager.org.apache.juli.FileHandler

# For example, set the org.apache.catalina.util.LifecycleBase logger to log
# each component that extends LifecycleBase changing state:
#org.apache.catalina.util.LifecycleBase.level = FINE

# To see debug messages in TldLocationsCache, uncomment the following line:
#org.apache.jasper.compiler.TldLocationsCache.level = FINE

Note that I'm not unhappy with the logging setting, but sometimes, I need the 
logs now to debug a problem. I'd just like to be able to tell it to dump the 
buffer to file. It sounds like there's no way to do that with the default 
logger.

-Original Message-
From: Daniel Mikusa [mailto:dmik...@vmware.com] 
Sent: Wednesday, November 30, 2011 11:46 AM
To: Tomcat Users List
Subject: Re: Logging

On Wed, 2011-11-30 at 07:01 -0800, Thom Hehl wrote:
> When running Tomcat 7.0.20 as a daemon, it doesn't appear to be writing
> the logs to the file until tomcat is stopped. Is there some way I can
> make tomcat dump the logs it's holding onto?
> 

Just a guess, but it sounds like it could be buffering.

"org.apache.juli.FileHandler supports buffering of the logs. The
buffering is not enabled by default. To configure it, use the bufferSize
property of a handler. The value of 0 uses system default buffering
(typically an 8K buffer will be used). A value of <0 forces a writer
flush upon each log write. A value >0 uses a BufferedOutputStream with
the defined value but note that the system default buffering will also
be applied."

https://tomcat.apache.org/tomcat-7.0-doc/logging.html


It's hard to tell exactly though, without seeing your logging
configuration.  Please try including your logging.properties (assuming
you are using the Java logging), so that we can all see it.

Dan


Re: Maximum memory that can be assigned to Tomcat on windows platform

2011-11-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Subhrajyoti,

On 11/30/11 1:28 AM, choudh...@labware.com wrote:
> Is there any cap on maximum memory that can be assigned to tomcat 
> on 32 bit Windows machines?

See this week's thread called "Server crash for memory limit" for some
information about that.

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

iEYEARECAAYFAk7Wak0ACgkQ9CaO5/Lv0PAOzACgoFatvhsCE8sMoDnWFAKOFqpp
5IsAn2MvLYj5kszAFXfaZstjdQaQ/8sU
=hvCT
-END PGP SIGNATURE-

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



Re: Maximum memory that can be assigned to Tomcat on windows platform

2011-11-30 Thread Pid *
On 30 Nov 2011, at 10:45, "choudh...@labware.com"  wrote:

> Hello ,
>The question is not why I would use 32 bit JVM , the question is
> whether there is any maximum limit on memory for Tomcat and if yes why

No. Tomcat has no knowledge of the memory capacity of the JVM.


p


> ?
> Regards,
>
> Subhrajyoti
> Mobile: +919830079545
> Mail: choudh...@labware.com
> Web: www.labware.com
>
> LabWare LIMS Solutions - Results Count
>
>
>
> From:   Francis GALIEGUE 
> To: Tomcat Users List 
> Date:   11/30/2011 01:51 PM
> Subject:Re: Maximum memory that can be assigned to Tomcat on
> windows platform
>
>
>
> On Wed, Nov 30, 2011 at 07:28,   wrote:
>> Hi ,
>>Is there any cap on maximum memory that can be assigned to
> tomcat
>> on 32 bit Windows machines ? I have found out that even if we have 8GB
>> memory in the server , can not assign more 1.4/1.5 GB to Tomcat . I also
>> found this thread which reinforces what I have been seeing ? We are
> using
>> Tomcat 7.0.19 .
>>
>> www.theserverside.com/discussions/thread.tss?thread_id=48793
>>
>
> In any event, a 32bit JVM (1.6, I don't know for lower VMs) cannot
> allocate more than 3 GB heap space.
>
> "With so much RAM, why do you still use a 32bit OS and JVM" is the
> question here.
>
> --
> Francis Galiegue
> ONE2TEAM
> Ingénieur système
> Mob : +33 (0) 683 877 875
> Tel : +33 (0) 178 945 552
> f...@one2team.com
> 40 avenue Raymond Poincaré
> 75116 Paris
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

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



Re: Tomcat 7 + exception while adding cookies

2011-11-30 Thread Martin Kuen
Hi Mallick,

Try setting"maxHttpHeaderSize" for the   in your
server.xml. Its default value is 8192 bytes. I guess you're exceeding this
limit.

i.e.


More details/exact info:
http://tomcat.apache.org/tomcat-7.0-doc/config/http.html#Standard_Implementation


Best Regards,

Martin


Re: Tomcat 7 + exception while adding cookies

2011-11-30 Thread Debraj Mallick
Thankyou Dan for your quick response my *server.xml*:





  
  
  
  
  
  
  
  
  

  
  


  

  
  





















  
  

  
  


  

  







  

  







On Wed, Nov 30, 2011 at 10:22 PM, Daniel Mikusa  wrote:

> On Wed, 2011-11-30 at 08:31 -0800, Debraj Mallick wrote:
> > hi all,
> >
> > i am getting exception while adding cookies in response
> >
> > *Stack trace*:
> > org.apache.catalina.connector.CoyoteAdapter service
> > SEVERE: An exception or error occurred in the container during the
> request
> > processing
> > java.lang.ArrayIndexOutOfBoundsException: 8192
> > at
> >
> org.apache.coyote.http11.AbstractOutputBuffer.write(AbstractOutputBuffer.java:522)
> > at
> >
> org.apache.coyote.http11.AbstractOutputBuffer.write(AbstractOutputBuffer.java:429)
> > at
> >
> org.apache.coyote.http11.AbstractOutputBuffer.sendHeader(AbstractOutputBuffer.java:395)
> > at
> >
> org.apache.coyote.http11.AbstractHttp11Processor.prepareResponse(AbstractHttp11Processor.java:965)
> > at
> >
> org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:739)
> > at org.apache.coyote.Response.action(Response.java:170)
> > at org.apache.coyote.Response.sendHeaders(Response.java:350)
> > at
> org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:315)
> > at
> org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:275)
> > at
> org.apache.catalina.connector.Response.finishResponse(Response.java:501)
> > at
> >
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:426)
> > at
> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:317)
> > at
> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204)
> > at
> >
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> > at java.lang.Thread.run(Thread.java:662)
> > org.apache.coyote.http11.AbstractHttp11Processor endRequest
> > SEVERE: Error finishing response
> > java.lang.ArrayIndexOutOfBoundsException
> > at java.lang.System.arraycopy(Native Method)
> > at
> >
> org.apache.coyote.http11.AbstractOutputBuffer.write(AbstractOutputBuffer.java:491)
> > at
> >
> org.apache.coyote.http11.AbstractOutputBuffer.sendStatus(AbstractOutputBuffer.java:331)
> > at
> >
> org.apache.coyote.http11.AbstractHttp11Processor.prepareResponse(AbstractHttp11Processor.java:952)
> > at
> >
> org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:739)
> > at org.apache.coyote.Response.action(Response.java:168)
> > at
> >
> org.apache.coyote.http11.AbstractOutputBuffer.endRequest(AbstractOutputBuffer.java:308)
> > at
> >
> org.apache.coyote.http11.InternalOutputBuffer.endRequest(InternalOutputBuffer.java:160)
> > at
> >
> org.apache.coyote.http11.AbstractHttp11Processor.endRequest(AbstractHttp11Processor.java:990)
> > at
> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:350)
> > at
> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204)
> > at
> >
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> > at java.lang.Thread.run(Thread.java:662)
> > org.apache.catalina.connector.CoyoteAdapter service
> > SEVERE: An exception or error occurred in the container during the
> request
> > processing
> > java.lang.ArrayIndexOutOfBoundsException
> > org.apache.coyote.http11.AbstractHttp11Processor endRequest
> > SEVERE: Error finishing response
> > java.lang.ArrayIndexOutOfBoundsException
> > at java.lang.System.arraycopy(Native Method)
> > at
> >
> org.apache.coyote.http11.AbstractOutputBuffer.write(AbstractOutputBuffer.java:491)
> > at
> >
> org.apache.coyote.http11.AbstractOutputBuffer.sendStatus(AbstractOutputBuffer.java:331)
> > at
> >
> org.apache.coyote.http11.AbstractHttp11Processor.prepareResponse(AbstractHttp11Processor.java:952)
> > at
> >
> org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:739)
> > at org.apache.coyote.Response.action(Response.java:168)
> > at
> >
> org.apache.coyote.http11.AbstractOutputBuffer.endRequest(AbstractOutputBuffer.java:308)
> > at
> >
> org.apache.coyote.http11.InternalOutputBuffer.endRequest(InternalOutputBuffer.java:160)
> > at
> >
> org.apache.coyote.http11.AbstractHttp11Processor.endRequest(AbstractHttp11Processor.java:990)
> > at
> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:350)
> > at
> >
> 

Re: Tomcat 7 + exception while adding cookies

2011-11-30 Thread Daniel Mikusa
On Wed, 2011-11-30 at 08:31 -0800, Debraj Mallick wrote:
> hi all,
> 
> i am getting exception while adding cookies in response
> 
> *Stack trace*:
> org.apache.catalina.connector.CoyoteAdapter service
> SEVERE: An exception or error occurred in the container during the request
> processing
> java.lang.ArrayIndexOutOfBoundsException: 8192
> at
> org.apache.coyote.http11.AbstractOutputBuffer.write(AbstractOutputBuffer.java:522)
> at
> org.apache.coyote.http11.AbstractOutputBuffer.write(AbstractOutputBuffer.java:429)
> at
> org.apache.coyote.http11.AbstractOutputBuffer.sendHeader(AbstractOutputBuffer.java:395)
> at
> org.apache.coyote.http11.AbstractHttp11Processor.prepareResponse(AbstractHttp11Processor.java:965)
> at
> org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:739)
> at org.apache.coyote.Response.action(Response.java:170)
> at org.apache.coyote.Response.sendHeaders(Response.java:350)
> at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:315)
> at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:275)
> at org.apache.catalina.connector.Response.finishResponse(Response.java:501)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:426)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:317)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204)
> at
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
> org.apache.coyote.http11.AbstractHttp11Processor endRequest
> SEVERE: Error finishing response
> java.lang.ArrayIndexOutOfBoundsException
> at java.lang.System.arraycopy(Native Method)
> at
> org.apache.coyote.http11.AbstractOutputBuffer.write(AbstractOutputBuffer.java:491)
> at
> org.apache.coyote.http11.AbstractOutputBuffer.sendStatus(AbstractOutputBuffer.java:331)
> at
> org.apache.coyote.http11.AbstractHttp11Processor.prepareResponse(AbstractHttp11Processor.java:952)
> at
> org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:739)
> at org.apache.coyote.Response.action(Response.java:168)
> at
> org.apache.coyote.http11.AbstractOutputBuffer.endRequest(AbstractOutputBuffer.java:308)
> at
> org.apache.coyote.http11.InternalOutputBuffer.endRequest(InternalOutputBuffer.java:160)
> at
> org.apache.coyote.http11.AbstractHttp11Processor.endRequest(AbstractHttp11Processor.java:990)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:350)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204)
> at
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
> org.apache.catalina.connector.CoyoteAdapter service
> SEVERE: An exception or error occurred in the container during the request
> processing
> java.lang.ArrayIndexOutOfBoundsException
> org.apache.coyote.http11.AbstractHttp11Processor endRequest
> SEVERE: Error finishing response
> java.lang.ArrayIndexOutOfBoundsException
> at java.lang.System.arraycopy(Native Method)
> at
> org.apache.coyote.http11.AbstractOutputBuffer.write(AbstractOutputBuffer.java:491)
> at
> org.apache.coyote.http11.AbstractOutputBuffer.sendStatus(AbstractOutputBuffer.java:331)
> at
> org.apache.coyote.http11.AbstractHttp11Processor.prepareResponse(AbstractHttp11Processor.java:952)
> at
> org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:739)
> at org.apache.coyote.Response.action(Response.java:168)
> at
> org.apache.coyote.http11.AbstractOutputBuffer.endRequest(AbstractOutputBuffer.java:308)
> at
> org.apache.coyote.http11.InternalOutputBuffer.endRequest(InternalOutputBuffer.java:160)
> at
> org.apache.coyote.http11.AbstractHttp11Processor.endRequest(AbstractHttp11Processor.java:990)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:350)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:182)
> at
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
> 
> i am using Tomcat 7, Struts2.2.3.1, JDK 1.6 and STS IDE
> 
> 
> Thanks & Regards,
> Debraj Mallick

It would be h

Re: Logging

2011-11-30 Thread Daniel Mikusa
On Wed, 2011-11-30 at 07:01 -0800, Thom Hehl wrote:
> When running Tomcat 7.0.20 as a daemon, it doesn't appear to be writing
> the logs to the file until tomcat is stopped. Is there some way I can
> make tomcat dump the logs it's holding onto?
> 

Just a guess, but it sounds like it could be buffering.

"org.apache.juli.FileHandler supports buffering of the logs. The
buffering is not enabled by default. To configure it, use the bufferSize
property of a handler. The value of 0 uses system default buffering
(typically an 8K buffer will be used). A value of <0 forces a writer
flush upon each log write. A value >0 uses a BufferedOutputStream with
the defined value but note that the system default buffering will also
be applied."

https://tomcat.apache.org/tomcat-7.0-doc/logging.html


It's hard to tell exactly though, without seeing your logging
configuration.  Please try including your logging.properties (assuming
you are using the Java logging), so that we can all see it.

Dan


Tomcat 7 + exception while adding cookies

2011-11-30 Thread Debraj Mallick
hi all,

i am getting exception while adding cookies in response

*Stack trace*:
org.apache.catalina.connector.CoyoteAdapter service
SEVERE: An exception or error occurred in the container during the request
processing
java.lang.ArrayIndexOutOfBoundsException: 8192
at
org.apache.coyote.http11.AbstractOutputBuffer.write(AbstractOutputBuffer.java:522)
at
org.apache.coyote.http11.AbstractOutputBuffer.write(AbstractOutputBuffer.java:429)
at
org.apache.coyote.http11.AbstractOutputBuffer.sendHeader(AbstractOutputBuffer.java:395)
at
org.apache.coyote.http11.AbstractHttp11Processor.prepareResponse(AbstractHttp11Processor.java:965)
at
org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:739)
at org.apache.coyote.Response.action(Response.java:170)
at org.apache.coyote.Response.sendHeaders(Response.java:350)
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:315)
at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:275)
at org.apache.catalina.connector.Response.finishResponse(Response.java:501)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:426)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:317)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
org.apache.coyote.http11.AbstractHttp11Processor endRequest
SEVERE: Error finishing response
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at
org.apache.coyote.http11.AbstractOutputBuffer.write(AbstractOutputBuffer.java:491)
at
org.apache.coyote.http11.AbstractOutputBuffer.sendStatus(AbstractOutputBuffer.java:331)
at
org.apache.coyote.http11.AbstractHttp11Processor.prepareResponse(AbstractHttp11Processor.java:952)
at
org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:739)
at org.apache.coyote.Response.action(Response.java:168)
at
org.apache.coyote.http11.AbstractOutputBuffer.endRequest(AbstractOutputBuffer.java:308)
at
org.apache.coyote.http11.InternalOutputBuffer.endRequest(InternalOutputBuffer.java:160)
at
org.apache.coyote.http11.AbstractHttp11Processor.endRequest(AbstractHttp11Processor.java:990)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:350)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
org.apache.catalina.connector.CoyoteAdapter service
SEVERE: An exception or error occurred in the container during the request
processing
java.lang.ArrayIndexOutOfBoundsException
org.apache.coyote.http11.AbstractHttp11Processor endRequest
SEVERE: Error finishing response
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at
org.apache.coyote.http11.AbstractOutputBuffer.write(AbstractOutputBuffer.java:491)
at
org.apache.coyote.http11.AbstractOutputBuffer.sendStatus(AbstractOutputBuffer.java:331)
at
org.apache.coyote.http11.AbstractHttp11Processor.prepareResponse(AbstractHttp11Processor.java:952)
at
org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:739)
at org.apache.coyote.Response.action(Response.java:168)
at
org.apache.coyote.http11.AbstractOutputBuffer.endRequest(AbstractOutputBuffer.java:308)
at
org.apache.coyote.http11.InternalOutputBuffer.endRequest(InternalOutputBuffer.java:160)
at
org.apache.coyote.http11.AbstractHttp11Processor.endRequest(AbstractHttp11Processor.java:990)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:350)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:182)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

i am using Tomcat 7, Struts2.2.3.1, JDK 1.6 and STS IDE


Thanks & Regards,
Debraj Mallick


Logging

2011-11-30 Thread Thom Hehl
When running Tomcat 7.0.20 as a daemon, it doesn't appear to be writing
the logs to the file until tomcat is stopped. Is there some way I can
make tomcat dump the logs it's holding onto?

 

 



Re: Tomcat 7 - New attribut aliases in the context configuration item

2011-11-30 Thread Sylvain Goulmy
>
> So the effect is that multiple physical directories must be searched for
> a given resource?


Correct.

The alias maps a given path to an external directory.


Ok, that's what i had understood.

 Can you give an example of how you would like it to work?


Here is the description of the EDR (Extended Document Root) mecanism in
Websphere :

Let's assume i have the following application :

- Webapps/
  - MyApplication/
  - images/
  - css/
  - META-INF/
  - WEB-INF/
  - index.html

I can define an EDR directory in the configuration of my application so
that the ressource i access are first retrieved from my application and
then in the EDR directory if they don't exist in my application.

- /.../.../.../.../EDR/
   - images/
   - index.html

These directories are defined as "extension" of my application and another
important thing is that i can also extend files which are at the root of my
application (as index.html).

After a few more test with Tomcat i understand that :

- You cannot "extend" directory, if you define an external location which
math an existing directory of your application, the ressources of your
application become unreachable.

- As the documentation say "Using '/' as an aliasPath is not allowed.", you
cannot extend any ressource which is at the root of your application.

Things seems clear for me now, please tell if i have missed something.

Thank you in advance for your support.


On Wed, Nov 30, 2011 at 11:53 AM, Pid  wrote:

> On 29/11/2011 17:47, Sylvain Goulmy wrote:
> > Hi all,
> >
> > I'd like to know it is possible to have equivalent functionality to the
> > "extended document root" provided by the WebSphere product. This feature
> > allows you to define a location outside the webapp to make contribution
> > without having to redeploy the application. This mechanism first checks
> if
> > the resource is present in the application and if not will look for it in
> > the directory extension.
>
> So the effect is that multiple physical directories must be searched for
> a given resource?
>
>
> > I thought that the functionality provided by the new attribute aliases
> for
> > the configuration item  would have a similar behavior, but I see
> > another operation. First of all it is not possible to set an alias on the
> > context '/', making it necessary to declare all the directories in which
> > you want to make the contribution. Also when I set an alias for a
> directory
> > present in my webapp, it becomes a priority and files in my webapp are no
> > longer available.
> >
> > Do I understand correctly how this new attribute aliases has to be used ?
>
> The alias maps a given path to an external directory.
>
>
> > Is it possible with Tomcat 7 to set up a mechanism similar to the
> extended
> > document root of Websphere?
>
> Can you give an example of how you would like it to work?
>
>
> p
>
>
>
>
> --
>
> [key:62590808]
>
>


Re: Changing session timeout for a webapp via JMX or internal Tomcat API?

2011-11-30 Thread Ellecer Valencia
Thanks Igor. I made a mistake though.  I actually meant  "modifying web.xml
and restarting the webapp."

We want to find a way to change session timeouts - even for existing
sessions - without doing a restart of the webapp.

I know there's also a server-level session timeout in tomcat's
/conf/web.xml but that would 1.affect all webapps (we only want to affect
the older version - foo##001) and 2.it requires tomcat restart (we are
trying to reduce downtime for users)

Ellecer

On Wednesday, November 30, 2011, Igor Cicimov  wrote:
>>
>>
>>
> On Wed, Nov 30, 2011 at 4:11 PM, Ellecer Valencia 
wrote:
>
>> Is there a way to change session timeouts in tomcat via JMX? I've only
>> seen the operation called "expireSession", but not one that can change
>> the session timeout period.
>>
>> The only way I've found so far to modify session timeouts is by
>> modifying web.xml and restarting Tomcat.
>>
>> However, in our intended usage, we don't want to restart Tomcat and
>> kick out users.
>>
>> We're looking at using parallel deployment in Tomcat 7, and so we'll
>> have a situation with
>>
>> foo##001 -- old version
>> foo##002 -- new version
>>
>> What we want to do is decrease timeouts in foo##001, so that users
>> move to foo##002 sooner and allow us to get rid of the old version.
>>
>> I've had a look at the Manager MBean and there's operations to get the
>> existing session IDs and to expire individual sessions, but not to
>> change their timeouts (unless I've gone blind and there was something
>> there staring me in the face!).
>>
>> Is there any way - either another MBean in Tomcat or by accessing
>> Tomcat API - to change the session timeouts for a webapp? Someone told
>> me that Weblogic has this feature, so maybe it's not impossible to do
>> it in Tomcat (just speculating)
>>
>>
>> Ellecer
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
> Can't you just restart the application you are changing the timeout for?
> Why do you need to restart the whole server?
>


Re: Maximum memory that can be assigned to Tomcat on windows platform

2011-11-30 Thread john
On Wed, 30 Nov 2011 16:14:45 +0530, Choudhury wrote
> Hello , 
> The question is not why I would use 32 bit JVM , the 
> question is whether there is any maximum limit on memory for Tomcat 
> and if yes why ? Regards,
>
It depends on the windows version used actually. From what I remember this is
limited to maximum 2GB for user processes. The easiest way to test is, is with
a small app that shows some memory information like:
public class MaxMemory {
public static void main(String[] args) {
Runtime rt = Runtime.getRuntime();
long totalMem = rt.totalMemory();
long maxMem = rt.maxMemory();
long freeMem = rt.freeMemory();
double megs = 1048576.0;

System.out.println ("Total Memory: " + totalMem + " (" +
(totalMem/megs) + " MiB)");
System.out.println ("Max Memory:   " + maxMem + " (" + (maxMem/megs) +
" MiB)");
System.out.println ("Free Memory:  " + freeMem + " (" + (freeMem/megs)
+ " MiB)");
}
}

Try to run it with different options for the heap. I would be surprised if you
would get over 1600MB.  
 
--
/(bb|[^b]{2})/


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



Re: Maximum memory that can be assigned to Tomcat on windows platform

2011-11-30 Thread Francis GALIEGUE
On Wed, Nov 30, 2011 at 11:44,   wrote:
> Hello ,
>        The question is not why I would use 32 bit JVM , the question is
> whether there is any maximum limit on memory for Tomcat and if yes why ?


The question _is_ why you use a 32bit OS and JVM with 8 GB RAM. Tomcat
is not limited in memory usage by itself, it is the JVM which limits
what it can consume.

In the best of cases (32bit Linux and 32bit Sun 1.6 JVM), you are
limited to a 3 GB heap size.

Use a 64bit OS and JVM.

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
f...@one2team.com
40 avenue Raymond Poincaré
75116 Paris

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



Re: Tomcat 7 - New attribut aliases in the context configuration item

2011-11-30 Thread Pid
On 29/11/2011 17:47, Sylvain Goulmy wrote:
> Hi all,
> 
> I'd like to know it is possible to have equivalent functionality to the
> "extended document root" provided by the WebSphere product. This feature
> allows you to define a location outside the webapp to make contribution
> without having to redeploy the application. This mechanism first checks if
> the resource is present in the application and if not will look for it in
> the directory extension.

So the effect is that multiple physical directories must be searched for
a given resource?


> I thought that the functionality provided by the new attribute aliases for
> the configuration item  would have a similar behavior, but I see
> another operation. First of all it is not possible to set an alias on the
> context '/', making it necessary to declare all the directories in which
> you want to make the contribution. Also when I set an alias for a directory
> present in my webapp, it becomes a priority and files in my webapp are no
> longer available.
>
> Do I understand correctly how this new attribute aliases has to be used ?

The alias maps a given path to an external directory.


> Is it possible with Tomcat 7 to set up a mechanism similar to the extended
> document root of Websphere?

Can you give an example of how you would like it to work?


p




-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Maximum memory that can be assigned to Tomcat on windows platform

2011-11-30 Thread Choudhury
Hello , 
The question is not why I would use 32 bit JVM , the question is 
whether there is any maximum limit on memory for Tomcat and if yes why ?
Regards,

Subhrajyoti 
Mobile: +919830079545
Mail: choudh...@labware.com
Web: www.labware.com

LabWare LIMS Solutions - Results Count



From:   Francis GALIEGUE 
To: Tomcat Users List 
Date:   11/30/2011 01:51 PM
Subject:Re: Maximum memory that can be assigned to Tomcat on 
windows platform



On Wed, Nov 30, 2011 at 07:28,   wrote:
> Hi ,
> Is there any cap on maximum memory that can be assigned to 
tomcat
> on 32 bit Windows machines ? I have found out that even if we have 8GB
> memory in the server , can not assign more 1.4/1.5 GB to Tomcat . I also
> found this thread which reinforces what I have been seeing ? We are 
using
> Tomcat 7.0.19 .
>
> www.theserverside.com/discussions/thread.tss?thread_id=48793
>

In any event, a 32bit JVM (1.6, I don't know for lower VMs) cannot
allocate more than 3 GB heap space.

"With so much RAM, why do you still use a 32bit OS and JVM" is the
question here.

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
f...@one2team.com
40 avenue Raymond Poincaré
75116 Paris

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




Re: Maximum memory that can be assigned to Tomcat on windows platform

2011-11-30 Thread Francis GALIEGUE
On Wed, Nov 30, 2011 at 09:37, Casper Wandahl Schmidt
 wrote:
>
[...]
>>
> Another question to ask is, why do you have 8GB memory when running 32bit?
> That is just stupid since 32bit cannot address more than 4GB of memory no
> matter what you do. Any sysadmin should know that right?
>
> disclaimer: I'm not a sysadmin, if I'm wrong please teach me :)
>

With PAE[1] you actually can address up to 2^36 RAM (therefore 64 GB).
But not all OSes support that, and anyway the addressable memory at
one time (and therefore max memory theoretically accessible to one
process at any given moment) is still 2^32.

[1] Physical Address Extension

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
f...@one2team.com
40 avenue Raymond Poincaré
75116 Paris

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



Re: Maximum memory that can be assigned to Tomcat on windows platform

2011-11-30 Thread Casper Wandahl Schmidt



Den 30-11-2011 09:21, Francis GALIEGUE skrev:

On Wed, Nov 30, 2011 at 07:28,  wrote:

Hi ,
 Is there any cap on maximum memory that can be assigned to tomcat
on 32 bit Windows machines ? I have found out that even if we have 8GB
memory in the server , can not assign more 1.4/1.5 GB to Tomcat . I also
found this thread which reinforces what I have been seeing ? We are using
Tomcat 7.0.19 .

www.theserverside.com/discussions/thread.tss?thread_id=48793


In any event, a 32bit JVM (1.6, I don't know for lower VMs) cannot
allocate more than 3 GB heap space.

"With so much RAM, why do you still use a 32bit OS and JVM" is the
question here.

Another question to ask is, why do you have 8GB memory when running 
32bit? That is just stupid since 32bit cannot address more than 4GB of 
memory no matter what you do. Any sysadmin should know that right?


disclaimer: I'm not a sysadmin, if I'm wrong please teach me :)

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



Re: Maximum memory that can be assigned to Tomcat on windows platform

2011-11-30 Thread Francis GALIEGUE
On Wed, Nov 30, 2011 at 07:28,   wrote:
> Hi ,
>         Is there any cap on maximum memory that can be assigned to tomcat
> on 32 bit Windows machines ? I have found out that even if we have 8GB
> memory in the server , can not assign more 1.4/1.5 GB to Tomcat . I also
> found this thread which reinforces what I have been seeing ? We are using
> Tomcat 7.0.19 .
>
> www.theserverside.com/discussions/thread.tss?thread_id=48793
>

In any event, a 32bit JVM (1.6, I don't know for lower VMs) cannot
allocate more than 3 GB heap space.

"With so much RAM, why do you still use a 32bit OS and JVM" is the
question here.

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
f...@one2team.com
40 avenue Raymond Poincaré
75116 Paris

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