Java Mailing List Archive

http://www.junlu.com/

Home » users-digest.tomcat »

users Digest 3 Jul 2009 10:35:05 -0000 Issue 8949

users-digest-help

2009-07-03


Author LoginPost Reply

users Digest 3 Jul 2009 10:35:05 -0000 Issue 8949

Topics (messages 198795 through 198824):

Re: locked JAR files on undeploy - one possible cause
 198795 by: Mark Thomas

Re: tomcat session is not releasing
 198796 by: Caldarale, Charles R
 198802 by: Christopher Schultz

Re: Cannot find any information on property 'x' in a bean of type 'bfs.beans.BFSInfo'
 198797 by: Caldarale, Charles R
 198798 by: David kerber
 198800 by: Konstantin Kolinko
 198801 by: Caldarale, Charles R
 198804 by: Jim Anderson
 198805 by: Jim Anderson

Re: DBCP and Firewall timeouts
 198799 by: Christopher Schultz

Re: FIXED: Re: No cookies using proxypass* from apache 2]
 198803 by: Rainer Jung

Tomcat
 198806 by: Logan, James S
 198807 by: Caldarale, Charles R
 198808 by: Pid

POST request hangs hup
 198809 by: Ivan Longhi
 198810 by: Daniel Henrique Alves Lima
 198811 by: Daniel Henrique Alves Lima
 198812 by: Caldarale, Charles R
 198814 by: Christopher Schultz

Re: log4j w/apache
 198813 by: Christopher Schultz

Re: Question concerning application paths
 198815 by: Christopher Schultz

Re: Tomcat 5.5, getting exception while creating database driver instance
 198816 by: Christopher Schultz

Re: NoClassDefFoundError
 198817 by: Christopher Schultz

Where can i get the specification of web.xml?
 198818 by: chenjh
 198819 by: Achal Patel
 198820 by: chenjh
 198821 by: Achal Patel
 198822 by: chenjh
 198823 by: Konstantin Kolinko

NotSerializableException MemoryUser?
 198824 by: Ronald Klop

Administrivia:

---------------------------------------------------------------------
To post to the list, e-mail: users@(protected)
To unsubscribe, e-mail: users-digest-unsubscribe@(protected)
For additional commands, e-mail: users-digest-help@(protected)

----------------------------------------------------------------------


Attachment: users_198795.ezm (zipped)
André Warnier wrote:
> Mark Thomas wrote:
>> André Warnier wrote:
>>> Mark Thomas wrote:
>>>> As locked JARs on undeploy is a popular topic, I thought I would
>>>> share a
>>>> recent discovery. If you read your log4j configuration file from a JAR,
>>>> the JAR will end up locked, preventing a clean undeploy.
>>>>
>>>> Full details are here:
>>>> https://issues.apache.org/bugzilla/show_bug.cgi?id=47465
>>>>
>>> Mark,
>>> is this specifically a log4j-linked problem, or does this affect any
>>> other properties/configuration files loaded from JARs ?
>>
>> It will affect any file loaded from a JAR via a URL where there isn't a
>> call to URLConnection.setUseCaches(false).
>>
> To this self-confessed dummy, this sounds as if, even though files
> loaded from JARs may not be so frequent, but given the thousands of
> Tomcat's out there, it ought to affect quite a few installations.

Yep. Hence my e-mail. For the record, I found it looking into an Grails
issue [1].

> Might it also be a reason why some Tomcats do not seem able to shutdown
> properly when told ?

It will only cause an undeploy to fail. It won't interfere with a full
shutdown.

Mark

[1] http://jira.codehaus.org/browse/GRAILS-2544



Attachment: users_198796.ezm (zipped)
> From: jayesh.m@(protected)]
> Subject: RE: tomcat session is not releasing
>
> 2) During the Deployment we need to stop and start the TOMCAT server
> lots of times.

Why? You should be able to simply restart the webapp being changed, not the entire container.

> 3) Now if we kill the session

What are you doing to "kill the session"? For that matter, exactly what do you mean by "session"? If it's the DB connection you're referring to, don't you have a timeout configured for it on the DB end?

> 4) Now this is our problem that sessions were not released
> automatically after shutdown the TOMCAT web sever. Each time
> we need to kill all session manually.

How are you shutting down Tomcat? What software is managing the connections? If you're not using Tomcat's DB connection pooling, then your webapp code is responsible for closing the connections. You may also have a badly configured DB, since it doesn't appear to be dropping stale connections.

- Chuck

P.S. Just reply to the list, not individually to anyone that responds to you.


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.



Attachment: users_198802.ezm (zipped)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Pid,

On 7/2/2009 5:44 AM, Pid wrote:
> On 2/7/09 06:50, jayesh.m@(protected):
>> 2) During the Deployment we need to stop and start the TOMCAT server
>> lots of times. Afte
>> r successful deployment when we monitor our database we found that
>> hundreds of J
>> DBC sessions are connected with oracle with different log-on time.
>
> So you don't mean Tomcat user sessions, do you mean JDBC Connections?
>
> Are you properly closing the connection each time you use one? It
> sounds like you aren't.

+1

Depending on the database, statements and cursors might not be released,
even after client termination.

Try reading http://blog.christopherschultz.net/?p=68 for some hints for
coding against a database connection pool (or really any JDBC
programming, really). You'd be surprised at how big an impact a missing
Statement.close() can have on your RDBMS.

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

iEYEARECAAYFAkpMxg0ACgkQ9CaO5/Lv0PAlugCeK7zZgwJ1cYEXlNrM9d+pHzCm
9VIAniVbfh0UL+6sEcxeMtBMCnY9UQez
=P1Lf
-----END PGP SIGNATURE-----


Attachment: users_198797.ezm (zipped)
> From: Pid [mailto:p@(protected)]
> Subject: Re: Cannot find any information on property 'x' in a bean of
> type 'bfs.beans.BFSInfo'
>
> > 25 public String getMidContent() {
> > 26 return(midContent);
> > 27 }
>
> wow. old school.

Don't you love it when people think "return" is a method call? Can't ever have too many parentheses...

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



Attachment: users_198798.ezm (zipped)
Caldarale, Charles R wrote:
>> From: Pid [mailto:p@(protected)]
>> Subject: Re: Cannot find any information on property 'x' in a bean of
>> type 'bfs.beans.BFSInfo'
>>
>>  
>>> 25 public String getMidContent() {
>>> 26 return(midContent);
>>> 27 }
>>>    
>> wow. old school.
>>  
>
> Don't you love it when people think "return" is a method call? Can't ever have too many parentheses...
>  
Heh. I was surprised to find that the parentheses were even allowed,
when one of our programmers used it everywhere.

D




Attachment: users_198800.ezm (zipped)
2009/7/2 Caldarale, Charles R <Chuck.Caldarale@(protected)>:
>> From: Pid [mailto:p@(protected)]
>> Subject: Re: Cannot find any information on property 'x' in a bean of
>> type 'bfs.beans.BFSInfo'
>>
>> > 25 public String getMidContent() {
>> > 26 return(midContent);
>> > 27 }
>>
>> wow. old school.
>
> Don't you love it when people think "return" is a method call?  Can't ever have too many parentheses...
>

    if(attr!=null)
       return(attr);
- in o.a.c.connector.Request

Search for "return(" and you will find some other references. ;]


Best regards,
Konstantin Kolinko


Attachment: users_198801.ezm (zipped)
> From: Konstantin Kolinko [mailto:knst.kolinko@(protected)]
> Subject: Re: Cannot find any information on property 'x' in a bean of
> type 'bfs.beans.BFSInfo'
>
> Search for "return(" and you will find some other references. ;]

Yes, I know; Tomcat (and pretty much all open-source code) is full of bad programming styles. It was one of the discussion topics when pid, Mark, and I had dinner in London in April - just how much cleanup can you get away with when developing a patch?

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



Attachment: users_198804.ezm (zipped)
Pid wrote:
> On 2/7/09 04:25, Jim Anderson wrote:
>> Hi,
>>
>> I'm running tomcat 6.0.18 on Linux and I'm having a problem running
>> a javabean. I created a bean and was able to call setProperty and
>> getProperty
>> for the property 'startPage' in the bean. When I added a 2nd property
>> to the bean, I got the following message:
>>
>> org.apache.jasper.JasperException: Cannot find any information on
>> property 'midContent' in a bean of type 'bfs.beans.BFSInfo'
>>
>> The setter and getter methods were copied and pasted from 'startPage' so
>> they
>> should have worked. I checked the spelling of the new property
>> 'midContent' VERY
>> carefully and I'm sure there was not a spelling error.
>>
>> I experimented and found that no matter what name I gave the new
>> property, it
>> would not work with the getter and setter methods. In the jsp code, my
>> getter
>> and setter methods for 'startPage' continued to work. I decided to
>> rename
>> the property to 'sPage'. I did this, recompiled the source, rebuilt the
>> jar file
>> and placed it the web library. I ran the jsp page again and found that
>> getProperty
>
> Which "web library" and where did you put the compiled class and "web
> library" that contains it?

In WEB-INF/lib. I compiled the java file in a separate directory and
then copied created the jar file and copied the jar file to WEB-INF/lib
>
> Are you using a tool like Eclipse or Netbeans?

No. I use a makefile based system.
>
>> on 'sPage' failed, but if I changed 'sPage' back to 'startPage', the jsp
>> page
>> worked.
>>
>> It looks like tomcat is still is finding an old jar file or has cached a
>> reference
>> to the old library.
>>
>> Does anyone have an suggestions on how to resolve my problem?
>
>> 25 public String getMidContent() {
>> 26 return(midContent);
>> 27 }
>
> wow. old school.
> Not reading a really old tutorial from somewhere are you?
I'm working out of Java Server Pages, 3rd edition.
>
> p
>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@(protected)
>> For additional commands, e-mail: users-help@(protected)
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>
>



Attachment: users_198805.ezm (zipped)

Konstantin,

Thank you. That did the trick. I kind of guessed it was that sort of
problem, but could not find it in documentation of the book that I'm using.

Jim

Konstantin Kolinko wrote:
> 2009/7/2 Jim Anderson <ezjab@(protected)>:
>  
>> Hi,
>>
>> I'm running tomcat 6.0.18 on Linux and I'm having a problem running
>> a javabean. I created a bean and was able to call setProperty and
>> getProperty
>> for the property 'startPage' in the bean. When I added a 2nd property
>> to the bean, I got the following message:
>>
>> org.apache.jasper.JasperException: Cannot find any information on property
>> 'midContent' in a bean of type 'bfs.beans.BFSInfo'
>>
>> The setter and getter methods were copied and pasted from 'startPage' so
>> they
>> should have worked. I checked the spelling of the new property 'midContent'
>> VERY
>> carefully and I'm sure there was not a spelling error.
>>
>> I experimented and found that no matter what name I gave the new property,
>> it
>> would not work with the getter and setter methods. In the jsp code, my
>> getter
>> and setter methods for 'startPage' continued to work. I decided to rename
>> the property to 'sPage'. I did this, recompiled the source, rebuilt the jar
>> file
>> and placed it the web library. I ran the jsp page again and found that
>> getProperty
>> on 'sPage' failed, but if I changed 'sPage' back to 'startPage', the jsp
>> page
>> worked.
>>
>> It looks like tomcat is still is finding an old jar file or has cached a
>> reference
>> to the old library.
>>
>>  
>
> It looks like you have not restarted (reloaded) your web application.
>
> One of the ways to do so in development mode is to touch your
> WEB-INF/web.xml (or any other WatchedResource if those are configured).
>
> Another way is to use the Tomcat Manager web application.
> http://tomcat.apache.org/tomcat-6.0-doc/html-manager-howto.html
> http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html
>
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>
>
>  



Attachment: users_198799.ezm (zipped)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David,

On 7/1/2009 5:01 PM, David Smith wrote:
> Christopher Schultz wrote:
>> David,
>>
>> On 7/1/2009 10:49 AM, David Smith wrote:
>>> It would and the performance hit is minimal if you use the ping syntax
>>> in your validation query. I believe it looks like this:
>>> validationQuery="/* ping */ SELECT 1"
>> Note that both the PING is only applicable for MySQL when using
>> Connector/J, and "SELECT 1" may only be applicable on certain databases
>> (MySQL being one of them).
>>
> Right and I double checked the original post that started this thread.
> AD described the environment as having MySQL 5.1

Apologies... the thread was broken somewhere along the way and the
original message wasn't grouped with the others in my mail reader. The
OP definitely said they were using MySQL 5.1.

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

iEYEARECAAYFAkpMuHIACgkQ9CaO5/Lv0PADewCfVnBaTKaGS/bnDm7DZiWkTj8x
7JgAoMOO3vwM7gzLQXz8fWpGutVBclDR
=mPNr
-----END PGP SIGNATURE-----


Attachment: users_198803.ezm (zipped)
Subject: FIXED: Re: No cookies using proxypass* from apache 2
Date: Thu, 2 Jul 2009 07:30:48 -0500
From: Robert Schmid <rschmid@(protected)>
To: Rainer Jung <rainer.jung@(protected)>

For reasons I can't explain, all my mail back to the list is being
rejected as spam. Could you forward this to list so it is archived.
It might help someone else.
===================================


OK, I figured out everything. The inside/outside virtual host
solution was described in an earlier e-mail.

The final part of my problem was this - this does not work;

 ProxyPassReverse /eoservice ajp://ajax.newdom.com:8011/EOService
 ProxyPass /EOService ajp://ajax.newdom.com:8011/EOService
 ProxyPassReverseCookiePath /eoservice /EOService

This does;

 ProxyPassReverse /EOService ajp://ajax.erikorganic.com:8011/EOService
 ProxyPass /EOService ajp://ajax.erikorganic.com:8011/EOService
 ProxyPassReverseCookiePath /EOService /EOService

I realized that the client was not sending cookies because the cookie
had a path of 'EOService' but the calling URL had 'eoservice'. I
thought maybe I had ProxyPassReverseCookiePath backward so I tried;

ProxyPassReverseCookiePath /EOService /eoservice

Thinking it would solve my problem but it didn't.

So I am presently simply using case-consistent paths. However this
leads me to believe I will have problems with

ProxyPassReverseCookiePath /abc /def

Can you enlighten me on what I am missing?



Attachment: users_198806.ezm (zipped)
We have been involved with load testing several sites that deploy a Tomcat server. When running a Load session, for some reason, each HTTP request will generate a login, when monitoring the server. The server is being monitored using the Tomcat monitoring tool, and each request to the server will display a sessionid associated with the login id of the virtual client. However, when I login in manually I only see one sessionid associated with a login id as I navigate the site and request a page, and once I fire up another browser, and do the same navigation, I see the second sessionid. Have you folks seen this type of behavior on a Tomcat site, where virtual client login generate multiple sessionids ?

James


Attachment: users_198807.ezm (zipped)
> From: Logan, James S [mailto:james.logan@(protected)]
> Subject: Tomcat
>
> Have you folks seen this type of behavior on a Tomcat site,
> where virtual client login generate multiple sessionids ?

Sessions are normally tracked with cookies; your client may just be ignoring them, rather than sending the cookies back with subsequent requests. Use Wireshark or equivalent to compare traffic from manual vs automated browsing.

- Chuck (GaTech '71)


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.


Attachment: users_198808.ezm (zipped)
On 2/7/09 20:32, Logan, James S wrote:
> We have been involved with load testing several sites that deploy a Tomcat server. When running a Load session, for some reason, each HTTP request will generate a login, when monitoring the server. The server is being monitored using the Tomcat monitoring tool, and each request to the server will display a sessionid associated with the login id of the virtual client. However, when I login in manually I only see one sessionid associated with a login id as I navigate the site and request a page, and once I fire up another browser, and do the same navigation, I see the second sessionid. Have you folks seen this type of behavior on a Tomcat site, where virtual client login generate multiple sessionids ?

OS/version?
Tomcat/version?

Which Tomcat monitoring tool?

Your description of the behaviour isn't very clear.

It seems that you're saying that your test clients are logging in and
getting a unique session id. This is normal.

When you login with a web browser you get a unique session id for each
different browser. This is also normal.

Can you be clearer about what you expect to happen and what, if
anything, is different to your expectation?

p



> James
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>
>



Attachment: users_198809.ezm (zipped)
Hi,
I'm running tomcat 6.0.18 with java 1.6.0_13 on a linux box.
The only webapp deployed is Sun OpenSSO (http://www.opensso.org) built from
source (20090930).
Sometimes a tomcat thread hangs hup while serving a POST request
(/UI/Login): monitoring tomcat
status I see the processing time grows and the thread never ends. When this
happens I am not able to shutdown
tomcat with shutdown.sh and I need to kill -9 the java process.
I think it is not a problem of memory exausted because if I run "top" the
memory usage by java process
is ok (a few hundreds MB despite CATALINA_OPTS="-Xmx6048M") but the cpu
usage is 100%.
Is there a way to kill a single thread in tomcat whitout restarting it?
Is there a way to limit the max execution time for a single thread/request?

thanks,
ivan

--
ciao,
ivan

Attachment: users_198810.ezm (zipped)

On Thu, 2009-07-02 at 23:40 +0200, Ivan Longhi wrote:
> Hi,

 Hi, Ivan.

> I'm running tomcat 6.0.18 with java 1.6.0_13 on a linux box.
> The only webapp deployed is Sun OpenSSO (http://www.opensso.org) built from
> source (20090930).
> Sometimes a tomcat thread hangs hup while serving a POST request
> (/UI/Login): monitoring tomcat
> status I see the processing time grows and the thread never ends. When this
> happens I am not able to shutdown
> tomcat with shutdown.sh and I need to kill -9 the java process.
> I think it is not a problem of memory exausted because if I run "top" the
> memory usage by java process
> is ok (a few hundreds MB despite CATALINA_OPTS="-Xmx6048M") but the cpu
> usage is 100%.

 I think could be anything: An infinite loop in your app, a database (or
other resource) deadlock, any intensive db query (with a really long
transaction timeout).
 For instance, last month we've adopted a new Transaction Manager that
keeps some threads (non daemons) running and prevents Tomcat of doing a
"clean" stop. Now i'm "forcing" Tomcat to stop after 5 minutes waiting.

 My (little) experience tells me that in cases like this, your app is
more guilt than your Application Server/Web Container. But it is just my
2 cents.


 []'s


>
--
"If there must be trouble, let it be in my day,
that my child may have peace."

Thomas Paine



Attachment: users_198811.ezm (zipped)
is "probably" more guilt :-)


On Thu, 2009-07-02 at 19:20 -0300, Daniel Henrique Alves Lima wrote:
> On Thu, 2009-07-02 at 23:40 +0200, Ivan Longhi wrote:
> > Hi,
>
>  Hi, Ivan.
>
> > I'm running tomcat 6.0.18 with java 1.6.0_13 on a linux box.
> > The only webapp deployed is Sun OpenSSO (http://www.opensso.org) built from
> > source (20090930).
> > Sometimes a tomcat thread hangs hup while serving a POST request
> > (/UI/Login): monitoring tomcat
> > status I see the processing time grows and the thread never ends. When this
> > happens I am not able to shutdown
> > tomcat with shutdown.sh and I need to kill -9 the java process.
> > I think it is not a problem of memory exausted because if I run "top" the
> > memory usage by java process
> > is ok (a few hundreds MB despite CATALINA_OPTS="-Xmx6048M") but the cpu
> > usage is 100%.
>
>  I think could be anything: An infinite loop in your app, a database (or
> other resource) deadlock, any intensive db query (with a really long
> transaction timeout).
>  For instance, last month we've adopted a new Transaction Manager that
> keeps some threads (non daemons) running and prevents Tomcat of doing a
> "clean" stop. Now i'm "forcing" Tomcat to stop after 5 minutes waiting.
>
>  My (little) experience tells me that in cases like this, your app is
> more guilt than your Application Server/Web Container. But it is just my
> 2 cents.
>
>
>  []'s
>
>
> >
--
"If there must be trouble, let it be in my day,
that my child may have peace."

Thomas Paine



Attachment: users_198812.ezm (zipped)
> From: Ivan Longhi [mailto:ivan.longhi@(protected)]
> Subject: POST request hangs hup
>
> Is there a way to kill a single thread in tomcat whitout
> restarting it?

No.

> Is there a way to limit the max execution time for a single
> thread/request?

No.

You need to fix your webapp, since it has a serious bug resulting in an infinite loop. Take some thread dumps a few seconds apart to find out where the thread is spending its time.

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



Attachment: users_198814.ezm (zipped)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Daniel,

On 7/2/2009 6:20 PM, Daniel Henrique Alves Lima wrote:
> I think could be anything: An infinite loop in your app, a database
> (or other resource) deadlock, any intensive db query (with a really
> long transaction timeout).

+1

Take a thread dump of your application to find out where the thread is
stuck (see
http://wiki.apache.org/tomcat/HowTo#head-a3243c1d640297a9f2aa9446cbed434efbd4d1d9
if you aren't sure how to take a thread dump). Several thread dumps a
few seconds apart is usually enough to give you a good picture of what's
happening.

Post them to the list if you are having a hard time determining what's
going on.

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

iEYEARECAAYFAkpNbt0ACgkQ9CaO5/Lv0PArpQCgqIKN+mkCc+W8QCtru1S0Kjag
HrEAoJmO1k3SlqnuXBOpmRZwt8xFEJz5
=W5UC
-----END PGP SIGNATURE-----


Attachment: users_198813.ezm (zipped)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris,

On 6/25/2009 8:54 AM, Christopher Piggott wrote:
> log4j.logger.org.apache.commons.digester.Digester=WARN, nowhere
> log4j.logger.org.apache.commons.digester.Digester.sax=WARN, nowhere

Strictly speaking, it doesn't matter what level (e.g. WARN) you choose
if you've going to send everything to the bit bucket.

> log4j.appender.nowhere=org.apache.log4j.varia.NullAppender
> log4j.additivity.nowhere=false

This is only required is you really don't want to see /anything/ from
Apache classes. I would recommend just setting the Apache-classes logger
to WARN like this:

log4j.logger.org.apache=WARN

...and leave it at that. You might actually want to see warnings from
these classes, but certainly TRACE-level detail from them is is way too
much to see.

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

iEYEARECAAYFAkpNbXsACgkQ9CaO5/Lv0PBcUQCgv1GzD+FlKUiTKSRJikVR3LTm
i5UAoI9ds2H9z7j0m6jBhZBeQwYZqtqi
=JAIq
-----END PGP SIGNATURE-----


Attachment: users_198815.ezm (zipped)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

To whom it may concern,

On 6/23/2009 3:02 AM, smonte@(protected):
> I have a an application where other people can deploy their own
> applications. I would like all the applications to use a common library.
> However, when I add some common JARs to a shared [library] I'm having
> some path trouble.

Where are you putting your JAR files? What version of Tomcat are you
running?

> In my XML file at "tomcat/webapps/appName/myXML.xml" I have the
> following path: "WEB-INF/dtd/someDTD.dtd".

Most paths in webapps are either absolute or relative to the webapp
itself. The above looks like it should be relative to the webapp, but
you're asking some code to load it without giving it a point of reference.

> I'm using XSLT to transform
> some XML files and Tomcat always tries to look this "someDTD.dtd" under
> "tomcat/bin/". Naturally the file is not there so I get an error.

What is the XSLT processor using for it's base path? Probably the cwd of
the Java process, which is almost never going to work. Does it try to
load .../tomcat/bin/someDTD.dtd even though you (sort of) told it to
load .../tomcat/bin/WEB-INF/dtd/someDTD.dtd? Or does it try to load that
second one?

> How could I make Tomcat to look for the files under
> "tomcat/webapp/appName/" , not under "tomcat/bin/"?

You could fully-specify the path of the DTD. Or, you could turn off XML
validation in the XSLT processor. You could also write your own DTD
resolver and plug it into the XML parser... but that will be problematic
because you'll need to sniff the current webapp's deployemnt directory
from the request, and then load the DTD relative to that. Good luck :)

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

iEYEARECAAYFAkpNcfAACgkQ9CaO5/Lv0PCengCgiuQVm+mLC7ZTBBDE2i4PYzi6
6mcAn3KH9Fwl4Wa85VkAcc3JLM/pB85H
=tZaZ
-----END PGP SIGNATURE-----


Attachment: users_198816.ezm (zipped)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kyle,

On 6/24/2009 7:23 PM, Kyle Bahr wrote:
> The exact exception is java.lang.reflect.InvocationTargetException, but
> sadly I don't have a stack trace available.

Hmm... that's going to make it pretty hard to debug. Any error message
along with the InvocationTargetException itself?

This kind of thing usually happens because of some tiny misconfiguration
of a JNDI DataSource, but it looks like you are probably registering the
driver yourself. Can you give us a bit larger code sample?

If you are able to modify the code, you could just put a try/catch block
around the Class.forName(...).newInstance() line and print any
InvocationTargetExceptions thrown to stdout:

try { Class.forName(...).newInstance(); }
catch (InvocationTargetException ite) { ite.printStackTrace();
    throw ite; }

WTF JAR file placement, make sure that your Connector/J JAR file is in
common/lib and /nowhere else/: check your webapp. Check shared/lib.
Check server/lib. Check for multiple versions of the same driver (like
mysql-connector-3.1.4.jar AND mysql-connector-3.1.5.jar).

Also, Connector/J 3.x is super old. Any chance of upgrading? They're on
5.1 these days...

> I'm getting that except
> back as the web service faultstring and the stack trace isn't being
> logged to the catalina.log. I've tried changing the log4j.properties to
> capture the error, but still nothing is getting logged.

If the error is happening on the server, then you'll have a hard time
getting a client to give you the full stack trace: you'll have to check
the server's logs.

> I don't know where to find the exact level of Tomcat.

Try this (output shown from my environment):

$ /usr/local/tomcat/bin/catalina.sh version
Using CATALINA_BASE:  /usr/local/tomcat
Using CATALINA_HOME:  /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:     /home/chris/.gentoo/java-config-2/current-user-vm
Server version: Apache Tomcat/5.5.26
Server built:  Jan 28 2008 01:35:23
Server number: 5.5.26.0
OS Name:     Linux
OS Version:   2.6.14-gentoo-r5
Architecture:  i386
JVM Version:   1.6.0_13-b03
JVM Vendor:   Sun Microsystems Inc.

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

iEYEARECAAYFAkpNdEsACgkQ9CaO5/Lv0PAX6gCdG+E4GFjNzCWQoSj3jFYug3fq
cTIAni6ViZg0E1koaPgI5XHjHckVDpyY
=fmX4
-----END PGP SIGNATURE-----


Attachment: users_198817.ezm (zipped)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

chenjh,

On 6/28/2009 11:48 PM, chenjh wrote:
> I often get the NoClassDefFoundError from my tomcat 5.5. I had placed
> jfreechart.jar and jcommon.jar into [tomcat]/common/lib, but after
> running for some time, the producing image page fail with
> NoClassDefFoundError. I had to restart the tomcat to fix it.

Sounds like you are missing a library required by jfreechart, but it is
only necessary for certain operations. Check JFreeChart's dependencies
for your version, and make sure you have all the JAR files it might need
installed in common/lib.

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

iEYEARECAAYFAkpNdOUACgkQ9CaO5/Lv0PBZEgCfSo0OuX2Fim4Ps+IGvm7UTOCg
otMAoIKGQ78KCwpVsTPZMdQTMzSkOKW5
=nZJ7
-----END PGP SIGNATURE-----


Attachment: users_198818.ezm (zipped)
Hi all,

Where can i find reference, or something like that, for tomcat's web.xml.

Regards

chenjh
2009-07-03




Attachment: users_198819.ezm (zipped)
Chenjh,

You can find the same at below location:

http://sunsite.berkeley.edu:8080/docs/config/index.html

Thanks,
Achal.

On Fri, Jul 3, 2009 at 12:19 PM, chenjh <chenjh@(protected):

> Hi all,
>
> Where can i find reference, or something like that, for tomcat's web.xml.
>
> Regards
>
> chenjh
> 2009-07-03
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>
>


--
Regards,
Achal Patel.

Attachment: users_198820.ezm (zipped)
Thanks Patel, but I need reference for web.xml.



Regards

chenjh
2009-07-03

---------Original Message----------
>Chenjh,
>
>You can find the same at below location:
>
>http://sunsite.berkeley.edu:8080/docs/config/index.html
>
>Thanks,
>Achal.
>
>On Fri, Jul 3, 2009 at 12:19 PM, chenjh <chenjh@(protected):
>
>> Hi all,
>>
>> Where can i find reference, or something like that, for tomcat's web.xml.
>>
>> Regards
>>
>> chenjh
>> 2009-07-03
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@(protected)
>> For additional commands, e-mail: users-help@(protected)
>>
>>
>
>
>--
>Regards,
>Achal Patel.
>



Attachment: users_198821.ezm (zipped)
http://tomcat-configure.blogspot.com/2009/01/tomcat-web-xml.html

On Fri, Jul 3, 2009 at 1:02 PM, chenjh <chenjh@(protected):

> Thanks Patel, but I need reference for web.xml.
>
>
>
> Regards
>
> chenjh
> 2009-07-03
>
> ---------Original Message----------
> >Chenjh,
> >
> >You can find the same at below location:
> >
> >http://sunsite.berkeley.edu:8080/docs/config/index.html
> >
> >Thanks,
> >Achal.
> >
> >On Fri, Jul 3, 2009 at 12:19 PM, chenjh <chenjh@(protected):
> >
> >> Hi all,
> >>
> >> Where can i find reference, or something like that, for tomcat's
> web.xml.
> >>
> >> Regards
> >>
> >> chenjh
> >> 2009-07-03
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@(protected)
> >> For additional commands, e-mail: users-help@(protected)
> >>
> >>
> >
> >
> >--
> >Regards,
> >Achal Patel.
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>
>


--
Regards,
Achal Patel.

Attachment: users_198822.ezm (zipped)
The page is not available.


Regards

chenjh
2009-07-03

---------Original Message----------
>http://tomcat-configure.blogspot.com/2009/01/tomcat-web-xml.html
>
>On Fri, Jul 3, 2009 at 1:02 PM, chenjh <chenjh@(protected):
>
>> Thanks Patel, but I need reference for web.xml.
>>
>>
>>
>> Regards
>>
>> chenjh
>> 2009-07-03
>>
>> ---------Original Message----------
>> >Chenjh,
>> >
>> >You can find the same at below location:
>> >
>> >http://sunsite.berkeley.edu:8080/docs/config/index.html
>> >
>> >Thanks,
>> >Achal.
>> >
>> >On Fri, Jul 3, 2009 at 12:19 PM, chenjh <chenjh@(protected):
>> >
>> >> Hi all,
>> >>
>> >> Where can i find reference, or something like that, for tomcat's
>> web.xml.
>> >>
>> >> Regards
>> >>
>> >> chenjh
>> >> 2009-07-03
>> >>
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@(protected)
>> >> For additional commands, e-mail: users-help@(protected)
>> >>
>> >>
>> >
>> >
>> >--
>> >Regards,
>> >Achal Patel.
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@(protected)
>> For additional commands, e-mail: users-help@(protected)
>>
>>
>
>
>--
>Regards,
>Achal Patel.
>



Attachment: users_198823.ezm (zipped)
2009/7/3 chenjh <chenjh@(protected)>:
> Hi all,
>
> Where can i find reference, or something like that, for tomcat's web.xml.
>
> Regards
>
> chenjh
> 2009-07-03
>

web.xml is defined by the Java Servlet Specification.
There is nothing Tomcat-specific in it.

It is Servlet 2.5 for Tomcat 6, Servlet 2.4 for Tomcat 5.x

Also, each web.xml has DTD or schema reference in its first lines,
that determine to which version of the spec the web app adheres.

See
http://java.sun.com/products/servlet/reference/api/index.html


Best regards,
Konstantin Kolinko


Attachment: users_198824.ezm (zipped)
Hi,

I'm running Tomcat 6.0.20 in a cluster on 3 nodes. If I restart one I get this exception:


Caused by: java.io.NotSerializableException: org.apache.catalina.users.MemoryUser
 at java.io.ObjectOutputStream.writeObject0 (ObjectOutputStream.java:1156)
 at java.io.ObjectOutputStream.writeObject (ObjectOutputStream.java:326)
 at java.util.LinkedList.writeObject (LinkedList.java:943)
 at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke (Method.java:597)
 at java.io.ObjectStreamClass.invokeWriteObject (ObjectStreamClass.java:945)
 at java.io.ObjectOutputStream.writeSerialData (ObjectOutputStream.java:1461)
 at java.io.ObjectOutputStream.writeOrdinaryObject (ObjectOutputStream.java:1392)
<Server port="8005" shutdown="SHUTDOWN">

<GlobalNamingResources>
 <!-- Used by Manager webapp -->
 <Resource name="UserDatabase" auth="Container"
        type="org.apache.catalina.UserDatabase"
   description="User database that can be updated and saved"
      factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
     pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>

<Service name="Catalina">
 <Connector port="8080" maxHttpHeaderSize="8192"
        maxThreads="300" minSpareThreads="25" maxSpareThreads="75"
        enableLookups="false" redirectPort="8443" acceptCount="1024"
        connectionTimeout="20000" disableUploadTimeout="true"
        compression="on"
        compressableMimeTypes="text/html,text/xml,text/plain,text/javascript,text/css"/>

 <Connector port="8443" debug="0" scheme="https" secure="true" SSLEnabled="true"
        clientAuth="false" sslProtocol="TLS"
        keystoreFile="/etc/tomcat6/STAR_example.com.p12"
        keystoreType="PKCS12"
        keystorePass="*****" />

 <Engine name="Catalina" defaultHost="www.example.com">
  <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
       resourceName="UserDatabase" />
         <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster">
              <Channel className="org.apache.catalina.tribes.group.GroupChannel">
                    <Membership className="org.apache.catalina.tribes.membership.McastService" port="45525" />
              </Channel>
         </Cluster>

    <!-- Zorg dat de appBase regel direct na de 'Host name' regel staat -->
    <Host name="www.example.com"
         appBase="/data/webapps/crm-VERSIE_2_5/deployed"
         unpackWARs="true" autoDeploy="false" reloadable="false"
         usePooling="false"
         xmlValidation="false" xmlNamespaceAware="true">
    <Alias>www2.example.com</Alias>
    </Host>
 </Engine>

</Service>
</Server>

What can I do to make the MemoryUser serializable and why is it trying to sync it with other nodes?

Ronald.

©2008 junlu.com - Jax Systems, LLC, U.S.A.