unpackWARs, and annotation exceptions

2015-01-17 Thread Sean Dawson
Hello,

I mentioned in an previous question that newer releases of tomcat7
(Windows) seems to be unpacking our war files to webapps when it wasn't
doing that previously.  We were running fine prior to this and have
encountered some issues replacing the war files with the corresponding
webapps dir not being updated properly (so we usually just delete them
prior to replacing the war).

I found unpackWARs in server.xml but according to the documentation: "WAR
files located outside of the Host's appBase will not be expanded." Which
doesn't seem to be the case for us (we're outside, but being expanded) -
unless I've misunderstood something.

So I changed that to false and started tomcat, but got errors along these
lines from our two wars...

SEVERE: Unable to process Jar entry
[com/google/gwt/thirdparty/guava/common/base
/Platform.class] from Jar [jar:jndi:/localhost/admin/WEB-INF/lib/gwt-servle
t-2.6.1.jar!/] for annotations
java.io.EOFException
at
org.apache.tomcat.util.bcel.classfile.FastDataInputStream.readInt(Fas
tDataInputStream.java:145)
at
org.apache.tomcat.util.bcel.classfile.ClassParser.readID(ClassParser.
java:200)


SEVERE: Unable to process Jar entry
[org/apache/james/mime4j/field/address/Mailb
ox.class] from Jar [jar:jndi:/localhost/admin/WEB-INF/lib/apache-mime4j-0.6
.jar!/] for annotations
java.io.EOFException
at
org.apache.tomcat.util.bcel.classfile.FastDataInputStream.readUnsigne
dShort(FastDataInputStream.java:120)
at
org.apache.tomcat.util.bcel.classfile.Utility.swallowFieldOrMethod(Ut
...

Jan 17, 2015 5:45:27 PM org.apache.catalina.startup.HostConfig
deployDescriptor
INFO: Deploying configuration descriptor C:\tomcat\conf\Catalina\loca
lhost\ROOT.xml
Jan 17, 2015 5:45:33 PM org.apache.catalina.startup.ContextConfig
processAnnotat
ionsJar
SEVERE: Unable to process Jar entry
[org/apache/james/mime4j/field/address/Mailb
ox.class] from Jar
[jar:jndi:/localhost/WEB-INF/lib/apache-mime4j-0.6.jar!/] for
 annotations
java.io.EOFException
at
org.apache.tomcat.util.bcel.classfile.FastDataInputStream.readUnsigne
dShort(FastDataInputStream.java:120)
...

SEVERE: Unable to process Jar entry
[com/google/gwt/thirdparty/guava/common/base
/Platform.class] from Jar
[jar:jndi:/localhost/WEB-INF/lib/gwt-servlet-2.6.1.jar
!/] for annotations
java.io.EOFException
at
org.apache.tomcat.util.bcel.classfile.FastDataInputStream.readInt(Fas
tDataInputStream.java:145)
at
org.apache.tomcat.util.bcel.classfile.ClassParser.readID(ClassParser.
java:200)
...

For now, we'll probably just leave unpackWARs to true, and delete the
webapps dirs - but if anyone has any insight...

Thanks.


Re: Where are my non-persistent sessions stored ?

2015-01-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Sreyan,

On 1/17/15 12:45 PM, sreya...@gmail.com wrote:
> I am new to Tomcat and interested in learning how to works 
> internally. I was reading the following thread on JavaRanch but it 
> did not give a concrete answer-:
> 
> http://www.coderanch.com/t/467039/Tomcat/sessions-stored

Tim Holloway answered this in the second response on "10/19/2009
5:48:56 AM".

> Does the container use an Array-List or a HashMap to store the 
> HTTPSessions?

The servlet specification does not mandate any particular storage
mechanism, so the container is free to decide what is best.

> What is the limit of the maximum sessions?

There is a very large theoretical maximum of (Integer.MAX_VALUE/2) *
Integer.MAX_VALUE because String values (session ids) are limited to
MAX_VALUE characters and characters are identified by integers. But
you'll run out of storage (or any kind) way before that.

> Are the sessions stored in RAM?

The servlet specification does not mandate any particular storage
mechanism, so the container is free to decide what is best.

In Tomcat, sessions are stored in memory (Java heap) by default. There
are other mechanisms that can persist session information to various
places. The standard manager will persist sessions to the disk during
webapp reloads, but otherwise the sessions reside exclusively in memory.

> I am aware that persistent sessions will need a
> data-store/database to the sessions. But how does it handle the non
> persistent ones ?

I encourage you to look at the source for StandardManager if you want
to really know what's going on.

> I have also consulted-: 
> http://tomcat.apache.org/tomcat-8.0-doc/config/manager.html
> 
> But this too failed to give the location of non-persistent
> sessions.

Java heap memory.

> Anyone who does Tomcat development and meddles around with the 
> source, there feedback will be highly appreciated.

Check the source code. Start with
org.apache.catalina.session.StandardManager

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUurDmAAoJEBzwKT+lPKRYXaAQALx2GJgHjYNaj24WymwvkOoX
sf1r4e7jQJyKvAMvlDqw5nyULlnCgP+ty2Eti/zEJSadQpvFvJwq+eImtYEWONsF
Ox0Mi8wVHZgoe8sOFowUY+Jh3QlNBf+fa0y/6zszMvxmO4oajXNOwVq/tqzPlTvb
ta2LiGhj+bqcuklS45sBNG29MRXYLV4bwXm0SOSBTUhpA2f3HGvcDFJ7jSlPbChC
4xb9jObhOzdrrFAK06Wytnfebv0jp9InibT6/UoHOkv4CI7nzcwIAULYL+lhjHUx
6qrKwkQBd00F+jdzwquhREEKIIhIoPrYuEI/PlXNz2km+INIVVbQP+VqbFh0YQn8
8N5Ik8qOBPxZfAbSSFYfLHWS/2BxNQJ4KpK7bdek9G+uOMppcd6R5c+d931r9xAm
HOMor8dl087tT56kDGt0gASNxAniIuguN5pU/69xSeWC7/545IcNwfcXZSmBuzd+
ypoa0rict6SiVRxtVxfg61LjhSfCnkfbxbSSuIJsipvPB/4WLYF3PMDrRT+frQWI
zlUr3Ithy2RAUyplC4jxuK8czV+a2Kl8iCdSJW0C1lL4BKeu/C5DSNA7ajd2dmoe
T27DzHBBWqJJ3Kmy4uyRL7T8XXgh5Ut//vwKPq+JmtYesqU397CR1MPB2H+DyXGv
Ubbs7yND+vMkpozn9M9+
=bsUx
-END PGP SIGNATURE-

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



Where are my non-persistent sessions stored ?

2015-01-17 Thread sreyan32
I am new to Tomcat and interested in learning how to works internally. I was 
reading the following thread on JavaRanch but it did not give a concrete 
answer-:


http://www.coderanch.com/t/467039/Tomcat/sessions-stored

Does the container use an Array-List or a HashMap to store the HTTPSessions ? 
What is the limit of the maximum sessions ? Are the sessions stored in RAM ?


I am aware that persistent sessions will need a data-store/database to the 
sessions. But how does it handle the non persistent ones ?


I have also consulted-: 
http://tomcat.apache.org/tomcat-8.0-doc/config/manager.html


But this too failed to give the location of non-persistent sessions.


Anyone who does Tomcat development and meddles around with the source, there 
feedback will be highly appreciated.






Regards
Sreyan Chakravarty

Re: Tomcat 8.0.15, EL Performance

2015-01-17 Thread Dirk Högemann
Hmmm. No performance loss with simple single jsp page. I will try to  track
it down some more.  The application has database functionality, many xsl
transformations, Solr search and so on. I will first reduce the
functionality and hopefully find the bottleneck.
Thanks so far.
Dirk
Am 17.01.2015 02:03 schrieb "Mark Thomas" :

> On 16/01/2015 16:01, Dirk Högemann wrote:
> > Hello,
> >
> > I am trying to upgrade a JSP-based application, which is usually hosted
> on
> > Tomcat (currently 7.0.57) to Version 8.0.15.
> >
> > Unfortunately I am facing a massive performance degradation - only 40% of
> > the performance of 7.0.56 is reached when running the exact same JMeter
> > Test with Tomcat8.
> >
> > Relevant value here is: 24 page impressions per second on Tomcat 8.0.15.
> > On Tomcat 7.0.56 it reaches up to 60 PI/s.
> >
> > A sampler captured with JVisual VM shows a hotspot on Class:
> >
> > org.apache.jasper.el.JasperELResolver.getValue -> 63,9 % of CPU self time
> >
> > Tomcat 7.0.57: 0,8 %
> >
> > Usage of Java8 or Java7 makes no difference.
> >
> > Any ideas to improve the performance?
>
> Not yet.
>
> > Or is anybody facing similar issues?
>
> Not that I recall.
>
> Can you simplify this to a single JSP (ideally as simple as possible)
> that is significantly slower on 8.0.x compared to 7.0.x? With that, we
> can take a look at what is going on.
>
> Mark
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>