RE: Migration to TOMCAT 5

2004-08-05 Thread Pradeep Chauhan
Can you tell us what all you have done for configuration and what Problem
(Error in STDout.log or prompt ) you are facing.

Regards,
Pradeep

- Original Message -
From: Bhaskar Jyoti Phukan
To: [EMAIL PROTECTED]
Sent: Wednesday, August 04, 2004 7:00 PM
Subject: Migration to TOMCAT 5


Hi!

We have an application which was installed in TOMCAT 3. The database is IBM
DB2. We want to migrate to TOMCAT 5. We have installed TOMCAT 5 but not able
to establish database connectivity.

Can you help?

Sincerely yours,

Bhaskar Jyoti Phukan


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



database information

2004-08-05 Thread Jignesh Patel
Hi,

I want to inform my tomcat server that the database server is shutting
down or restarting.

Can JDBC Realm will do the job?

-Jignesh




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



Re: Migration to TOMCAT 5

2004-08-05 Thread Bhaskar Jyoti Phukan
Hi!

It is showing null pointer exception in STDout.log file. I think this is
because there is no database connectivity. We are not able to configure the
server.xml file and web.xml file for our use. Can you help please

Thanks and regards

Bhaskar

- Original Message - 
From: Pradeep Chauhan [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, August 05, 2004 11:36 AM
Subject: RE: Migration to TOMCAT 5


 Can you tell us what all you have done for configuration and what Problem
 (Error in STDout.log or prompt ) you are facing.

 Regards,
 Pradeep

 - Original Message -
 From: Bhaskar Jyoti Phukan
 To: [EMAIL PROTECTED]
 Sent: Wednesday, August 04, 2004 7:00 PM
 Subject: Migration to TOMCAT 5


 Hi!

 We have an application which was installed in TOMCAT 3. The database is
IBM
 DB2. We want to migrate to TOMCAT 5. We have installed TOMCAT 5 but not
able
 to establish database connectivity.

 Can you help?

 Sincerely yours,

 Bhaskar Jyoti Phukan


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




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



tomcat-users.xml gets erased

2004-08-05 Thread David Voets
We are running a tomcat webapp which allows the remote administration of a
Solaris machine via a http interface.
Access control is managed using the default MemoryRealm implementation
(using tomcat-users.xml to store users and roles).
The webapp allows changing various settings on the machine (including
editing and saving of the tomcat-users.xml file)
We're having the following problem:

From time to time our tomcat-users.xml file is erased (it is replaced by a
file only containing the following:
tomcat-users
/tomcat-users
).

So far we have not been able to reproduce this behaviour (it has happened
both after a tomcat restart and while running normally).

I have a feeling this has to do with the behaviour of the
org.apache.catalina.users.MemoryUserDatabase class.
In our code, when a user logs in, we access this class to retrieve the user
roles assigned to this particular user, like so:

MemoryUserDatabase userDatabase = new MemoryUserDatabase();
userDatabase.open();
User user = userDatabase.findUser(USER_ID);
userDatabase.close();
...

If login is successful, the user object is stored in the user's session
context. For access control, a user's roles are retrieved using:

Iterator iter = user.getRoles();
while (iter.hasNext()) {
Role aRole = (Role) iter.next();
if (aRole.getName().equals(REQUIRED_ROLE_FOR_ACCESS)) {
return true;//allow access
}

What could be the cause of this problem? I have seen a similar post
(http://archives.real-time.com/pipermail/tomcat-users/2003-March/103924.html
) before, but I have not found an answer so far.

The system that we are using:
Tomcat 5(.0.27) with Struts 1.1 on a Solaris 9 Ultrasparc III machine - JVM
Sun 1.4.2_04



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



JMS with tocmat

2004-08-05 Thread Jignesh Patel
Is JMS supported by tomcat 5.0.19?

-Jignesh


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



RE: JMS with tocmat

2004-08-05 Thread Ralph Einfeldt

No, tomcat is 'just' 
- a servlet engine
- a jsp engine
- a webserver

To do other things like ejb or jms you have to integrate
additional solutions with tomcat:
- JBoss
- Geronimo
- Jonas
- OpenJMS 
  (if you just want jms this is the least complex solution)
  http://openjms.sourceforge.net
  http://www.onjava.com/pub/a/onjava/2001/12/12/openjms.html
  http://www.google.de/search?q=openjms+tomcat


 -Original Message-
 From: Jignesh Patel [mailto:[EMAIL PROTECTED]
 Sent: Thursday, August 05, 2004 6:50 PM
 To: [EMAIL PROTECTED]
 Subject: JMS with tocmat
 
 
 Is JMS supported by tomcat 5.0.19?
 
 -Jignesh
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

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



custom error pages

2004-08-05 Thread Maurice Marrink
Hi,

I,m using tomcat 5.0.27 and am trying to show custom error pages.
I added a couple of errorpage tags to my webapps web.xml and the
/conf/web.xml in the tomcat installation dir.
error-page
error-code500/error-code 
location/error/error.html/location 
/error-page
and after telling internet explorer not to use userfriendly errorpages it
shows the errorpages defined in my webapp when I try to access an
nonexisting url inside my webapps context (e.g.
/my_existing_webapp/does_not_exist.html) and shows the default errorpages
when I go to an url that does not exist at all (e.g.
/non_existing_webapp/whatever.html), that is after I copied my error files
into the ROOT context.
But I cant get it to work when my webapp is defined but not running. What I
did was this:
- start tomcat
- goto the manager webapp
- shutdown the webapp with custom errorpages
- enter a valid url for that webapp in the browser.

Now I get the standard tomcat errorpage.
So I did a little debugging and found that when tomcat stops a webapp, it
preserves the context it just strips it from all but the name (well almost).
So my custom defined errorpages are gone and because tomcat did find a
context it wont use the errorpages defined in the default web.xml (or root
context) but instead goes for the tomcat errorpage.

I thought I could outsmart tomcat, so I made a little lifecylelistener and
container listener so I would get notified of the removal of my errorpages
and then put them back in. Even though that works, tomcat still shows its
own errorpages because further down the line it tries to get a
requestdispatcher from the context (which was stripped) to forward the
request for the errorpages. And there it fails offcourse.

Now we get to the question(s) :)

- does anyone know what else needs to be preserved in the context in order
to deliver a valid requestdispatcher (there is a lot that gets removed, and
its probably quicker to get an answer from you guys then painstakingly use
trial and error)
- or perhaps a better question could you guys (developers) make the next
(nightly) release so that it tries to get errorpages from the default
web.xml (root context) before showing the tomcat errorpage. Because its more
then likely my little hack is going to break something if I get it to work.

If no one can or bothers to answer the first question I can live with that,
I've surrendered :) but I would like to see the 2nd request/ feature to
happen.

Thanks,

Maurice Marrink


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



RE: [SPAM_EMAIL] - Re: Migration to TOMCAT 5 - Found word(s) list error in the Text body.

2004-08-05 Thread Pradeep Chauhan
Hi ,

Here is the example  how to it.

Server.xml
GlobalNamingResources!--Define  Resource Name--
Resource name=jdbc/Test scope=Shareable type=javax.sql.DataSource/
ResourceParams name=jdbc/Test
  parameter
...
  /parameter
/ResourceParams
/GlobalNamingResources

Context
  ResourceLink global=jdbc/Test name=TEST/!--Give reference name to
ur Resource --
/context

In Web.xml ( present in root/webapps/Appicationfolder/web-inf/

resource-ref!--tell application which Reference name is to use --
descriptionOracle Datasource example/description
res-ref-nameTEST/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref



And if you are Defining ur Resource name in Context tag it self then i think
there is no need to do any modification in Web.xml


Regards,
Pradeep Chauhan

-Original Message-
From: Bhaskar Jyoti Phukan [mailto:[EMAIL PROTECTED]
Sent: 05.08.2004 12:10
To: Tomcat Users List
Subject: [SPAM_EMAIL] - Re: Migration to TOMCAT 5 - Found word(s) list error
in the Text body.


Hi!

It is showing null pointer exception in STDout.log file. I think this is
because there is no database connectivity. We are not able to configure the
server.xml file and web.xml file for our use. Can you help please

Thanks and regards

Bhaskar

- Original Message -
From: Pradeep Chauhan [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, August 05, 2004 11:36 AM
Subject: RE: Migration to TOMCAT 5


 Can you tell us what all you have done for configuration and what Problem
 (Error in STDout.log or prompt ) you are facing.

 Regards,
 Pradeep

 - Original Message -
 From: Bhaskar Jyoti Phukan
 To: [EMAIL PROTECTED]
 Sent: Wednesday, August 04, 2004 7:00 PM
 Subject: Migration to TOMCAT 5


 Hi!

 We have an application which was installed in TOMCAT 3. The database is
IBM
 DB2. We want to migrate to TOMCAT 5. We have installed TOMCAT 5 but not
able
 to establish database connectivity.

 Can you help?

 Sincerely yours,

 Bhaskar Jyoti Phukan


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




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


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



Tomcat Realm-- pasword encryption servlet location in a webApp

2004-08-05 Thread Ben Bookey
Dear list,

2 questions

1) I think I remember reading somewhere that there was a .bat batch file
which we could run
on production machines, so that passwords are encrypted. Can anyone
enlighten ?

2) Whats the best configuration mechanism for my servlets? I think its
better to add the
the servlets to my com.mycompany.myapp package (or?), BUT, is it a security
flaw when
I set in my app, the url-pattern begininning with /servlet/* (see below
example). I again have read that the
servlet url-pattern should not begin with /servlet

 servlet-mapping
servlet-nameservletName/servlet-name
url-pattern/servlet/servletName/url-pattern
  /servlet-mapping

regards.

Ben


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



Re: SSL problems with commercial X509 certificates and jks - solution

2004-08-05 Thread Christina Cunningham
Hi,

I have finally found a solution to the problem of
using commercial certificates and running tomcat in
https mode. As this seems to be a common issue for
people using tomcat and 3rd party certs, I have
provided the information below - might save someone
else some time!
(I have translated the solution found at
http://listes.cru.fr/www/arc/pki-fr/2003-04/msg4.html)

***
Prior to starting:
Ensure that there is a hostcert.pem and hostkey.pem
and that the hostcert.pem starts and ends with
--BEGIN CERTIFICATE - and -END CERTIFICATE
-. If it contains any other information then
create a copy of the .pem file, delete any other lines
and use this copy to carry out the steps below.

The following steps should be followed to configure
Tomcat for Https communication using 3rd party CA
certificates.

1.Follow ONLY the 'Edit the Tomcat Configuration File'
section in the Jakarta Project Tomcat SSL
Configuration HOW-TO located at
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/ssl-howto.html.


2.Import CA root certificate into Tomcat cacerts
store.
keytool -import -keystore
$JAVA_HOME/jre/lib/security/cacerts -file caRoot.pem.
This is the system wide CA certificates store and
contains entries for other CA such as Verisign and
Equifax.

3.Create the java keystore used by Tomcat. This is
located at $HOME/.keystore – if the file doesn't
already exist it will be created in the process.
The first step is to generate a certificate in pkcs12
format by combining the host's key and certificate.
openssl pkcs12 -export -inkey hostkey.pem -in
hostcert.pem -out host_name.pkcs12

The next step is to read the pkcs12 file into the
keystore. To do this a java class taken from Jetty is
used. Download Jetty (if required) and locate the
PKCS12Import.java file. This needs to be compiled and
then run using 
java -classpath org.mortbay.jetty-jdk1.2.jar
PKCS12Import host_name.pkcs12 $HOME/.keystore
( java classpath class file pkcs12 cert
keystore location )
When asked for the input keystore password – this is
the certificate password used in the step above. The
output keystore password is the password of the
.keystore, 'changeit'.

This puts the host certificate and key into the
keystore with an alias of 1. To rename the alias the
following steps are required:
keytool -keyclone -keystore .keystore -alias 1 -dest
host_name
Delete the alias 1 from the keystore using:
keytool -delete -keystore .keystore -alias 1 (These
steps are not obligatory)

Create the chain of certificates.
Concatenate the host certificate file with the CA root
file.
cat hostcert.pem caRoot.pem 
certchain-host_name.pem
Generate a pkcs7 file which contains this chain:
openssl crl2pkcs7 -nocrl -certfile
certchain-host_name.pem -outform DER 
-out certchain-host_name.pkcs7
Import this chain to the keystore
keytool -import -alias host_name -trustcacerts -file
certchain-host_name.pkcs7 -keystore .keystore

Check the content of your keystore
keytool -list -v -keystore .keystore
This should contain the entry of type keyEntry, which
is a chain of certificates.

If using jakarta-tomcat-4.1.27, a known bug exists
which results in tomcat throwing a fatal error after
two hits with https. This bug is documented and
discussed with the necessary information to fix this
issue at
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22701.

Restart tomcat and open https://host_name:8443/ in
your browser.

Hope this helps!

Christina

 --- Christina Cunningham
[EMAIL PROTECTED] wrote: 
 Hi
 
 I am trying to deploy tomcat securely using https
 and
 X509 certificates issued by a CA. I have followed
 the
 documentation on the tomcat webpage to insert my CA
 certificate into the cacerts store in Java as well
 as
 the server.ks and changed the server.xml file.
 
 When I try and run tomcat securely using my issued
 certificates (which are valid and have nothing
 before
 the BEGIN CERTIFICATE line) I get an error message
 from the browser that Mozilla and localhost cannot
 communicate securely because they have no common
 encryption algorithms.
 
 However, if I put a self generated and signed
 certificate into the java .keystore located in my
 $HOME directory, tomcat will run securely. If I
 replace this certificate with an issued certificate
 then I get the same error message detailed above.
 
 Can anyone shed some light on this problem?
 
 I am using tomcat 4.1.27, Red Hat Linix 9.0 and
 mozilla-1.6.1.
 
 Thanks,
 
 Christina
 
 
   
   
   

___ALL-NEW
 Yahoo! Messenger - all new features - even more fun!
  http://uk.messenger.yahoo.com
 

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





___ALL-NEW Yahoo! Messenger - 
all new features - even more fun!  

RE: Need to start Tomcat 4.1 twice

2004-08-05 Thread Jitesh Sinha
Any pointers for this?

-Original Message-
From: Jitesh Sinha [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 03, 2004 11:58 AM
To: Tomcat Users List
Subject: Need to start Tomcat 4.1 twice


Hello all,
I am facing a strange problem.I need to start my Tomcat server twice.After
first start when I try to access anything I get the error Requested Resource
not available.After second start everything works fine.Any ideas why that
will happen?

Thanks,
-Jitesh


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


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



Downloading an applet over https

2004-08-05 Thread Rowland Watkins
Hi,

I have a java applet that I use for signing files before they are posted
to my tomcat server. The applet is accessed through a simple JSP page.
Since the applet must have access to the client file system, it is
signed by my keystore. I can successfully sign files over http, however,
some problems occur when I migrated over to https, particulary when
using client authentication.

Strange things occur when the applet is accessed over https with client
authentication. The catalina.out logs write this message whenever the
page is accessed:

04-Aug-2004 19:05:05 org.apache.tomcat.util.net.TcpWorkerThread runIt
SEVERE: Remote Host /152.78.69.24 SocketException: Broken pipe
04-Aug-2004 19:05:05 org.apache.tomcat.util.net.TcpWorkerThread runIt
SEVERE: Remote Host /152.78.69.24 SocketException: Broken pipe

The java console on the client reports similar problems, but in a
verbose manner:

java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
com.sun.net.ssl.internal.ssl.OutputRecord.writeBuffer(OutputRecord.java:282)
at
com.sun.net.ssl.internal.ssl.OutputRecord.write(OutputRecord.java:271)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:663)

 the same exception repeats 17 times!


load: class SignFilesApplet not found.
java.lang.ClassNotFoundException: SignFilesApplet
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:164)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)

Caused by: java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
com.sun.net.ssl.internal.ssl.OutputRecord.writeBuffer(OutputRecord.java:282)
at
com.sun.net.ssl.internal.ssl.OutputRecord.write(OutputRecord.java:271)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:663)


I've heavily abbreviated these exceptions to ease the reading. I can
provide a full stack trace if required. 

I have no problems downloading the applet when only the server is
authenticated over https.

I am running jakarta-tomcat-5.0.25, with j2sdk1.4.2_04. The applet has
been tested using j2sdk1.4.2_04 and j2sdk1.5.0 with identical results.
Firefox 0.9.1 is used for the browser.

If anyone can provide some insight as to why the is causing the socket
exception, I would be most appreciative.

Best Regards,

Rowland Watkins





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



workers2.properties - uri mapping requests with ports to different tomcats

2004-08-05 Thread Allistair Crossley
Hi,

I have setup 2 Tomcat instances on the same server. JK2 ISAPI is installed on IIS and 
running fine routing all intratestgbr URIs to Tomcat 8009. I have setup anothe website 
on IIS with JK2 also, but running on port 84. I now want to map URIs that use port 84 
to Tomcat 8011.

The following entries in my workers2.properties file BOTH route to Tomcat 8009 (my 
first instance). I wonder if it is possible to use the fact that I have a port on the 
URL to route to different AJP tomcat ports???

Thanks!

 Tomcat Development Instance 1

[channel.socket:localhost:8009]
info=Ajp13 worker, connects to tomcat instance using AJP 1.3 protocol
tomcatId=localhost:8009

[ajp13:localhost:8009]
channel=channel.socket:localhost:8009

[uri:intratestgbr/*.do]
info=do
context=/
worker=ajp13:localhost:8009

[uri:intratestgbr/*.jsp]
info=jsp
context=/

 Tomcat Staging Instance

[channel.socket:localhost:8011]
info=Ajp13 worker, connects to tomcat instance using AJP 1.3 protocol
tomcatId=localhost:8011

[ajp13:localhost:8011]
channel=channel.socket:localhost:8011

[uri:intratestgbr:84/*.do]
info=do
context=/
worker=ajp13:localhost:8011

[uri:intratestgbr:84/*.jsp]
info=jsp
context=/


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



Re: ajp over ssl

2004-08-05 Thread Pete Stokes
Problem with IPSEC / ssh tunnels between two machines is that if someone 
compromises one machine, then you've made their life 500% easier getting 
to the next one. Good stuff to connect your home LAN to office LAN, but 
I wouldn't..

I had trouble with the same thing, and the easy solution I found was to 
ReverseProxy apache to Tomcat and in the proxy directive to simply say 
pass it on to https://, and configure Tomcat with it's keystore and hey 
presto. Deviation from connector scene I know, but it works perfectly.

Pete.

Michael Jürgens wrote:

Ruth, Brice wrote:
That's the best idea I can think of, too. With SSH tunnels using 
public key authentication, you can set it up so that the tunnel is 
setup from a system script, without user intervention.

But what if the tunnel breaks? How can I determine that automaticly?
regards,
Michael
David Smith wrote:
I'm not sure this can be done.  Admittedly I didn't look all that 
hard -- maybe someone who did development work on the connectors can 
anwer.

I can suggest what I did which is setup a tunnel (SSH tunnel in my 
case) between the two machines.  Then they (the servers) can talk 
all they want and it covers all services routed through the tunnel 
-- not just apache and tomcat.  Ipsec would work just as well I 
suspect.

Probably not what you wanted, but it's a suggestion still
--David
Michael Jürgens wrote:

Ruth, Brice wrote:
Michael Jürgens wrote:
Oh sorry I was a little bit tired in the morning.
I want to connect the Apache securesd over an unsecure medium 
(Internet)

An my question ist how to connect AJP 1.3 over SSL (not ssh) with 
jk or jk2.

regards,
Michael

Michael,
I believe you'll want to configure your Apache VirtualHost to 
serve your SSL requests, then use the mod_jk (or jk2) module to 
communicate with Tomcat. Is there any reason that your 
web-application (on Tomcat) needs to be aware of the SSL security? 
You can find documentation on securing Apache via SSL on the main 
Apache site (httpd.apache.org). And communicating betw. Apache and 
Tomcat via JK has abundant documentation as well.

Good luck!
No I want to connect an apache webserver over internet to a tomcat
server. So far I have no problem.
My problem is, how to secure the connection between apache and tomcat.
regards,
Michael

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

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


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


RE: JMS with tocmat

2004-08-05 Thread Shapira, Yoav

Hi,

Wow, I was actually just trying to figure out how to hook up a Tomcat
system to a remote jBoss JMS queue. Is there good documentation on how
to accomplish this on the OpenJMS site?

Why would the OpenJMS site have any JBoss documentation?  It has good
docs for how to connect and use an OpenJMS server.

The process would be the same for all such servers though:

- Download the JMS client jar for your JMS server and put it in your
webapp's WEB-INF/lib directory.
- Write your code to explicitly specify the connection factory in the
InitialContext environment.  This will be an implementation class
specific to your JMS server, e.g. weblogic.jndi.WLInitialContextFactory
for Weblogic, org.exolab.jms.jndi.InitialContextFactory for OpenJMS,
org.jnp.interfaces.NamingContextFactory for JBoss.
- Specify the server name and port also in the InitialContext
environment.

That's it, the rest is like any JMS tutorial: do a JNDI lookup for your
connection, then your queue/topic, get a session, etc.

Yoav



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Compile all JSPs on startup

2004-08-05 Thread Dan
OK, I've searched through the archives and didn't find anything that really 
settled this.

Is there a configuration setting for Tomcat to it recompile all JSP files 
at start up?

The only thing I saw was that one could create a startup servlet that would 
go through all directories searching for JSP pages then create a 
URLConnection and call the page with the querystring precompile=true

http://my-server.com/my-page.jsp?precompile=true
If this is the only way, how and where do you specify startup servlets in 
tomcat?  And what if I want to enable/disable this feature on startup 
--  what's best approach for setting the flag in tomcats config files?

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


Re: Problem with SSL configuration

2004-08-05 Thread QM
On Thu, Aug 05, 2004 at 09:26:55AM -0400, Shapira, Yoav wrote:
: You don't have to quote the whole stack trace ;)

I dunno.  I'd prefer people include the entire thing (up to the
RootCause, at least)... just not in-line.  ;)

It's like lab reports in the days before word processing was cheap:
please see chart/table X, appended to the end of this report.

(Admitted, this time the stack trace was superfluous, but usually...)
-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



java.lang.OutOfMemoryError

2004-08-05 Thread Matt He

Hi,

We upgraded our Tomcat server from 3.0 to 5.1.19 about two months ago (linux
machine). Since then it frequently crashed (twice a week). It seems like the
crash was caused a web crawler. This web crawler generate many threads and
quickly drained server memory. The log file showed
java.lang.OutOfMemoryError. When we use Tomcat 3, this crawler didn't cause
this problem.


Does anyone have any suggestion on how to solve this problem (we don't want
to block this crawler)?


Thanks.


Matt


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



RE: Compile all JSPs on startup

2004-08-05 Thread Shapira, Yoav

Hi,

Is there a configuration setting for Tomcat to it recompile all JSP
files
at start up?

No.

You can precompile your JSPs as noted at
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html#Web%20
Application%20Compilation and other locations.

If this is the only way, how and where do you specify startup servlets
in
tomcat?  And what if I want to enable/disable this feature on startup
--  what's best approach for setting the flag in tomcats config files?

You might want to read the Servlet Specification at some point.  You
specify startup servlets in Tomcat the way you do in all other servlet
containers: by adding load-on-startup[number]/load-on-startup to
their declaration in your web.xml file.  Since you would code this
servlet, you can handle enable/disable of this precompilation however
you want.  A likely choice would be a simple servlet init-parameter,
also in web.xml.  This is not specific to Tomcat and would not go in
Tomcat's configuration files.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: java.lang.OutOfMemoryError

2004-08-05 Thread Shapira, Yoav

Hi,
Give the server more memory maybe?  Or code your webapps to use less
memory (or rather, use memory better)?  With the information you gave,
more specific advice is impossible.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Matt He [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 05, 2004 10:43 AM
To: Tomcat Users List
Subject: java.lang.OutOfMemoryError


Hi,

We upgraded our Tomcat server from 3.0 to 5.1.19 about two months ago
(linux
machine). Since then it frequently crashed (twice a week). It seems
like
the
crash was caused a web crawler. This web crawler generate many threads
and
quickly drained server memory. The log file showed
java.lang.OutOfMemoryError. When we use Tomcat 3, this crawler didn't
cause
this problem.


Does anyone have any suggestion on how to solve this problem (we don't
want
to block this crawler)?


Thanks.


Matt


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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Problem with SSL configuration

2004-08-05 Thread Shapira, Yoav

Hi,
You don't have to quote the whole stack trace ;)  Can you post your
server.xml, as some attribute type is incorrect apparently? ;)

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 05, 2004 9:25 AM
To: [EMAIL PROTECTED]
Subject: Problem with SSL configuration

Hi,
   I have configured SSL with Tomcat, I get this error when starting
Tomcat

   04-Aug-2004 17:16:55 org.apache.commons.digester.Digester endElement
SEVERE: End event threw exception
java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
v
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
r
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:
2
52)
at
org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
at org.apache.commons.digester.Rule.end(Rule.java:276)
at
org.apache.commons.digester.Digester.endElement(Digester.java:1058)
at
org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.j
a
va:76)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknow
n
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(
U
nknown Source
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDi
s
patcher.dispa
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkn
o
wn Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.catalina.startup.Catalina.load(Catalina.java:489)
at org.apache.catalina.startup.Catalina.load(Catalina.java:528)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
v
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
r
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:247)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:421)
Catalina.start using conf/server.xml:
java.lang.IllegalArgumentException: argument type mismatch
java.lang.IllegalArgumentException: argument type mismatch
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:2
5
40)
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:2
5
66)
at
org.apache.commons.digester.Digester.endElement(Digester.java:1061)
at
org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.j
a
va:76)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknow
n
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(
U
nknown Source
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDi
s
patcher.dispa
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkn
o
wn Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.catalina.startup.Catalina.load(Catalina.java:489)
at org.apache.catalina.startup.Catalina.load(Catalina.java:528)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
v
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
r
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:247)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:421)
...
Can somebody help me please?







This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the 

RE: Need to start Tomcat 4.1 twice

2004-08-05 Thread Shapira, Yoav

Hi,
As you said yourself, it's strange.  I have no clue.  It just sounds
like a messed up installation or configuration ;)

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Jitesh Sinha [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 05, 2004 5:18 AM
To: Tomcat Users List
Subject: RE: Need to start Tomcat 4.1 twice

Any pointers for this?

-Original Message-
From: Jitesh Sinha [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 03, 2004 11:58 AM
To: Tomcat Users List
Subject: Need to start Tomcat 4.1 twice


Hello all,
I am facing a strange problem.I need to start my Tomcat server
twice.After
first start when I try to access anything I get the error Requested
Resource
not available.After second start everything works fine.Any ideas why
that
will happen?

Thanks,
-Jitesh


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


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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: refering to default content handler

2004-08-05 Thread Shapira, Yoav

Hi,
You might want to read up a bit on url-pattern.  The url-pattern
/images is not the same as /images/* for example.  Full details are
in the Servlet Specification.

You don't have to declare the default servlet again, only map it.  If
you have the servlet element for a servlet in your web.xml, the
servlet class must be available to the classloader.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Dmitry Koval [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 05, 2004 10:15 AM
To: Tomcat Users List
Subject: RE: refering to default content handler

On Thu, 2004-08-05 at 16:52, Shapira, Yoav wrote:

 See conf/web.xml for the DefaultServlet declaration.  Map it however
you
 want using however many servlet-mapping elements you want.

Thanks for response.
I have added to my web.xml:

servlet
servlet-namedefaultServlet/servlet-name

servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-
class
/servlet

servlet-mapping
servlet-namedefaultServlet/servlet-name
url-pattern/images/url-pattern
/servlet-mapping

But for handling /images still the servlet mapped as / is used.

Any pointers?



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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Session Pooling?

2004-08-05 Thread Michael Watson
Hi All,

This may have been answered elsewhere in the past but I'm struggling to find
it if it has - though please point me in the direction of past answers if
that's the case.

I'm trying to understand how a single instance of Tomcat manages sessions.
Is there any pooling/recycling of sesssion objects or are they
created/destroyed as required?
If they are pooled, is the size of this pool configurable?

Also where can I find some good documentation on managing sessions across a
cluster or load balanced instances?

Does anyone know of a practical limit for the number of concurrent
connections Tomcat can cope with on a reasonably out of the box Redhat
installation (obviously file descriptor limits aside)?

Any info you can supply would be much appreciated (I also need to find this
out with some urgency)

Thanks in advance

Mike



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.709 / Virus Database: 465 - Release Date: 22/06/2004


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



Re: JMS with tocmat

2004-08-05 Thread Dov Rosenberg
Use OpenJms (http://openjms.sourceforge.net). Runs independently of Tomcat.
Easy to configure.



On 8/5/04 12:49 PM, Jignesh Patel [EMAIL PROTECTED] wrote:

 Is JMS supported by tomcat 5.0.19?
 
 -Jignesh
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
Dov Rosenberg
Conviveon Corporation
http://www.conviveon.com


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



Re: java.lang.OutOfMemoryError

2004-08-05 Thread Michiel Toneman
In addition to Yoav's comment, you may also want to check on the number 
of sessions that get created. I know that JRun3 didn't create a session 
when it wasn't necessary to do so, Tomcat 5 (as per servlet spec.) 
always creates a session. Typically webcrawlers don't 'do' cookies, so a 
new session gets created for each request. This can of course have a 
significant effect on memory.

Regards,
Michiel

Matt He wrote:
Hi,
We upgraded our Tomcat server from 3.0 to 5.1.19 about two months ago (linux
machine). Since then it frequently crashed (twice a week). It seems like the
crash was caused a web crawler. This web crawler generate many threads and
quickly drained server memory. The log file showed
java.lang.OutOfMemoryError. When we use Tomcat 3, this crawler didn't cause
this problem.
Does anyone have any suggestion on how to solve this problem (we don't want
to block this crawler)?
Thanks.
Matt
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 


--
Michiel Toneman  Software Engineer   Bibit Global Payment Services
Regulierenring 10  3981 LB  Bunnik   [EMAIL PROTECTED]
Tel. +31-30-6595168  Fax +31-30-6564464  http://www.bibit.com/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: java.lang.OutOfMemoryError

2004-08-05 Thread Allistair Crossley
We had memory loss with 5.0.19. We profiled a 5.0.19 web app and found that memory was 
not being garbage collected too well. As soon as we upgraded this went away and was 
proven by th profiling. Start by trying out 5.0.27 and see how it goes. If it still 
happens then take Yoav's advice and profile you app using the (now freeware and 
excellent) JProbe (www.quest.com) and go from there.

ADC

 -Original Message-
 From: Matt He [mailto:[EMAIL PROTECTED]
 Sent: 05 August 2004 15:43
 To: Tomcat Users List
 Subject: java.lang.OutOfMemoryError
 
 
 
 Hi,
 
 We upgraded our Tomcat server from 3.0 to 5.1.19 about two 
 months ago (linux
 machine). Since then it frequently crashed (twice a week). It 
 seems like the
 crash was caused a web crawler. This web crawler generate 
 many threads and
 quickly drained server memory. The log file showed
 java.lang.OutOfMemoryError. When we use Tomcat 3, this 
 crawler didn't cause
 this problem.
 
 
 Does anyone have any suggestion on how to solve this problem 
 (we don't want
 to block this crawler)?
 
 
 Thanks.
 
 
 Matt
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Session Pooling?

2004-08-05 Thread Shapira, Yoav

Hola,

I'm trying to understand how a single instance of Tomcat manages
sessions.
Is there any pooling/recycling of sesssion objects or are they
created/destroyed as required?
If they are pooled, is the size of this pool configurable?

They are not pooled.  They are created and destroyed (and passivated,
activated) as needed.  You can configure how and where they're stored by
adjusting the properties of the Manager element:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/manager.html

You can also write a custom one of your own, which could pool sessions
as you need.

Also where can I find some good documentation on managing sessions
across a
cluster or load balanced instances?

In the Clustering How-To document:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html

Does anyone know of a practical limit for the number of concurrent
connections Tomcat can cope with on a reasonably out of the box Redhat
installation (obviously file descriptor limits aside)?

It's limited by your hardware and things like the file descriptor
limits.  We routinely have hundreds of sessions, and I know of sites
that are an order of magnitude higher.

Yoav



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: refering to default content handler

2004-08-05 Thread Dmitry Koval
On Thu, 2004-08-05 at 17:19, Shapira, Yoav wrote:

 You might want to read up a bit on url-pattern.  The url-pattern
 /images is not the same as /images/* for example.  Full details are
 in the Servlet Specification.
 
 You don't have to declare the default servlet again, only map it.  If
 you have the servlet element for a servlet in your web.xml, the
 servlet class must be available to the classloader.

Thank you very much.
Your post clarified a picture.
Now it's works as intended.



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



RE: Problem with SSL configuration

2004-08-05 Thread binoy.patrick
Hi,
  This is how my server.xml looks like

Connector port=8443 
   maxThreads=150 minSpareThreads=25
maxSpareThreads=75
   enableLookups=false disableUploadTimeout=true
   acceptCount=100 debug=0 scheme=https secure=true
Factory
 className=org.apache.coyote.tomcat5.CoyoteConnector
 clientAuth=false sslProtocol=TLS 
 keystorePass = binoy/
/Connector


Binoy


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: 05 August 2004 14:27
To: Tomcat Users List
Subject: RE: Problem with SSL configuration 


Hi,
You don't have to quote the whole stack trace ;)  Can you post your
server.xml, as some attribute type is incorrect apparently? ;)

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 05, 2004 9:25 AM
To: [EMAIL PROTECTED]
Subject: Problem with SSL configuration

Hi,
   I have configured SSL with Tomcat, I get this error when starting
Tomcat

   04-Aug-2004 17:16:55 org.apache.commons.digester.Digester endElement
SEVERE: End event threw exception
java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
v
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
r
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:
2
52)
at
org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
at org.apache.commons.digester.Rule.end(Rule.java:276)
at
org.apache.commons.digester.Digester.endElement(Digester.java:1058)
at
org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.j
a
va:76)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknow
n
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(
U
nknown Source
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDi
s
patcher.dispa
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkn
o
wn Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.catalina.startup.Catalina.load(Catalina.java:489)
at org.apache.catalina.startup.Catalina.load(Catalina.java:528)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
v
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
r
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:247)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:421)
Catalina.start using conf/server.xml:
java.lang.IllegalArgumentException: argument type mismatch
java.lang.IllegalArgumentException: argument type mismatch
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:2
5
40)
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:2
5
66)
at
org.apache.commons.digester.Digester.endElement(Digester.java:1061)
at
org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.j
a
va:76)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknow
n
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(
U
nknown Source
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDi
s
patcher.dispa
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkn
o
wn Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.catalina.startup.Catalina.load(Catalina.java:489)
at org.apache.catalina.startup.Catalina.load(Catalina.java:528)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at

Re: Session Pooling?

2004-08-05 Thread Michael Watson
Fantastic!

Thanks for the quick response!

Mike
- Original Message - 
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, August 05, 2004 4:01 PM
Subject: RE: Session Pooling?



Hola,

I'm trying to understand how a single instance of Tomcat manages
sessions.
Is there any pooling/recycling of sesssion objects or are they
created/destroyed as required?
If they are pooled, is the size of this pool configurable?

They are not pooled.  They are created and destroyed (and passivated,
activated) as needed.  You can configure how and where they're stored by
adjusting the properties of the Manager element:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/manager.html

You can also write a custom one of your own, which could pool sessions
as you need.

Also where can I find some good documentation on managing sessions
across a
cluster or load balanced instances?

In the Clustering How-To document:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html

Does anyone know of a practical limit for the number of concurrent
connections Tomcat can cope with on a reasonably out of the box Redhat
installation (obviously file descriptor limits aside)?

It's limited by your hardware and things like the file descriptor
limits.  We routinely have hundreds of sessions, and I know of sites
that are an order of magnitude higher.

Yoav



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


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




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.709 / Virus Database: 465 - Release Date: 22/06/2004


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



Re: java.lang.OutOfMemoryError

2004-08-05 Thread Michiel Toneman
True,  there is a definite memory leak when using a connector and a 
front-end webserver (e.g. mod_jk, mod_jk2)

You can try fixing this by putting:
# Fix memory leak bug in tomcat 5.0.19:
request.registerRequests=false
in $TOMCAT_HOME/conf/jk2.properties
Cheers,
Michiel
Allistair Crossley wrote:
We had memory loss with 5.0.19. We profiled a 5.0.19 web app and found that memory was 
not being garbage collected too well. As soon as we upgraded this went away and was 
proven by th profiling. Start by trying out 5.0.27 and see how it goes. If it still 
happens then take Yoav's advice and profile you app using the (now freeware and 
excellent) JProbe (www.quest.com) and go from there.
ADC
 

-Original Message-
From: Matt He [mailto:[EMAIL PROTECTED]
Sent: 05 August 2004 15:43
To: Tomcat Users List
Subject: java.lang.OutOfMemoryError

Hi,
We upgraded our Tomcat server from 3.0 to 5.1.19 about two 
months ago (linux
machine). Since then it frequently crashed (twice a week). It 
seems like the
crash was caused a web crawler. This web crawler generate 
many threads and
quickly drained server memory. The log file showed
java.lang.OutOfMemoryError. When we use Tomcat 3, this 
crawler didn't cause
this problem.

Does anyone have any suggestion on how to solve this problem 
(we don't want
to block this crawler)?

Thanks.
Matt
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT

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


--
Michiel Toneman  Software Engineer   Bibit Global Payment Services
Regulierenring 10  3981 LB  Bunnik   [EMAIL PROTECTED]
Tel. +31-30-6595168  Fax +31-30-6564464  http://www.bibit.com/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


classloader hangs

2004-08-05 Thread bgood
Hello,
I am writing a class to be deployed with the Tomcat SOAP web app (I'll
call this class A).  It uses a URLClassloader to load classes from a
directory (i call them modules).  I initialize my class loader with

URLClassLoader initialLoader = new URLClassLoader(urls,
   Thread.currentThread().getContextClassLoader());

   This worked fine for a while.  However, when I decided that
   my class A needed to have a package statement (I wanted to
   put it in a jar file along with some libraries for easy
   distribution), I was very much dismayed when the class
   loading did not work.  Yet the strange part is that it is not
   the usual NoClassDefFound exception, instead the entire
   program just seems to hang upon trying to load one of the
   modules.  I am very dismayed as what was once working code is
   now almost useless.  Chances are, I'm just making a stupid
   mistake, however if anyone could please help me I would be
   grateful.

   Thanks,
   Ben 

   P.S. This works fine when I don't run it under Tomcat, that
   was my reason for posting it here.

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



RE: ajp over ssl

2004-08-05 Thread Ralph Einfeldt

some other approaches:

- cryptcat
  http://farm9.org/Cryptcat/GetCryptcat.php
- openvpn
  http://openvpn.sourceforge.net/
- tinc
  http://www.tinc-vpn.org/
- CIPE
  http://sites.inka.de/sites/bigred/devel/cipe.html

 -Original Message-
 From: Michael Jürgens [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 03, 2004 8:29 AM
 To: Tomcat Users List
 Subject: ajp over ssl
 
 
 Hi,
 
 I want to connect an Apache Webserver over an unsecure 
 channel to tomcat.
 What is the preferred method?
 
 AJP over a permanent ssh tunnel?
 I think an AJP connection over SSH would be better.
 
 but I don´t know how to do that.
 
 a IPSec Conection is not possible, because of some firewall problems.
 
 regards,
 
 Michael
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

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



JTA tomcat

2004-08-05 Thread Guy Katz
hi;
threre are some thread regarding this but i did not find a definite answer.

does tomcat has a UserTransaction implementation ready to use out of the
box? or do i have to download JTOM or something similar in order to use a
JTA UserTransaction.
i use tomcat 5.0.25.   when i lookup  java:comp:UserTransaction i get an
exception below:
javax.naming.NamingException: Cannot create resource instance
at org.apache.naming.factory.TransactionFactory.getObjectInstance(Transa
ctionFactory.java:145)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:3
01)
at org.apache.naming.NamingContext.lookup(NamingContext.java:838)

so i guess that something is binded under this name in JNDI and flow goes to
the trasactionFactory so what the deal here?
any help is appreciated.
thanks in advance.


Guy Katz
Allot Communications
[EMAIL PROTECTED]
tel: +972 9 7619288
fax: +972 9 7443626


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



RE: classloader hangs

2004-08-05 Thread Shapira, Yoav

Hi,
If you get a thread dump of the JVM while it's hanging, what does it
show?

The URLClassLoader is intended for use within Tomcat.  It's nice that
you have a program using outside Tomcat, but it's not that meaningful
for comparison testing.  The ClassLoading scheme and hierarchy inside a
servlet container is significantly different from the one inside a
console Java application.

NoClassDefFound is not an exception, it's an Error.  It's different from
ClassNotFoundException.  And that difference (see the JavaDoc for both)
may be the root of your problem.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 05, 2004 11:17 AM
To: [EMAIL PROTECTED]
Subject: classloader hangs

Hello,
I am writing a class to be deployed with the Tomcat SOAP web app (I'll
call this class A).  It uses a URLClassloader to load classes from a
directory (i call them modules).  I initialize my class loader with

URLClassLoader initialLoader = new URLClassLoader(urls,
   Thread.currentThread().getContextClassLoader());

  This worked fine for a while.  However, when I decided that
  my class A needed to have a package statement (I wanted to
  put it in a jar file along with some libraries for easy
  distribution), I was very much dismayed when the class
  loading did not work.  Yet the strange part is that it is not
  the usual NoClassDefFound exception, instead the entire
  program just seems to hang upon trying to load one of the
  modules.  I am very dismayed as what was once working code is
  now almost useless.  Chances are, I'm just making a stupid
  mistake, however if anyone could please help me I would be
  grateful.

  Thanks,
  Ben

  P.S. This works fine when I don't run it under Tomcat, that
  was my reason for posting it here.

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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: JTA tomcat

2004-08-05 Thread Shapira, Yoav

Hola,
Version 5.0.26 (and better yet, 5.0.27 which is stable) fixes the
TransactionFactory bug you're seeing.  So update to 5.0.27 if you can.

You would probably need to download JOTM (not JTOM, unless JTOM just
happens to be a Java transaction provider project I don't know about ;))
or another similar component, but that depends on your needs: how do you
plan on using these transactions?  If you use a JDBC DataSource provider
that's XA-enabled, such as Tyrex, you can use its transactions and
leverage Tomcat's JNDI capabilities all in one: see the User
Transactions section of
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.htm
l.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Guy Katz [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 05, 2004 12:17 PM
To: '[EMAIL PROTECTED]'
Subject: JTA  tomcat

hi;
threre are some thread regarding this but i did not find a definite
answer.

does tomcat has a UserTransaction implementation ready to use out of
the
box? or do i have to download JTOM or something similar in order to use
a
JTA UserTransaction.
i use tomcat 5.0.25.   when i lookup  java:comp:UserTransaction i get
an
exception below:
javax.naming.NamingException: Cannot create resource instance
at
org.apache.naming.factory.TransactionFactory.getObjectInstance(Transa
ctionFactory.java:145)
at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:3
01)
at org.apache.naming.NamingContext.lookup(NamingContext.java:838)

so i guess that something is binded under this name in JNDI and flow
goes
to
the trasactionFactory so what the deal here?
any help is appreciated.
thanks in advance.


Guy Katz
Allot Communications
[EMAIL PROTECTED]
tel: +972 9 7619288
fax: +972 9 7443626


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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Urgent attention needed to solve mysterious SocketException error

2004-08-05 Thread Adrian G. Klingel
I'm running Tomcat 5.0.25 in our DMZ.  The server crashes every day.  I see
thousands and thousands of lines like this in Catalina.out:
 
Aug 5, 2004 10:50:31 AM org.apache.tomcat.util.net.TcpWorkerThread runIt
SEVERE: Remote Host /xx.xx.xx.1 SocketException: Invalid argument
 
That IP (obfuscated) is our gateway.  The application on this server is not
distributed, it does make some calls to an external database.
 
I can't find any documentation on this error.  I found one reference to
someone else who had the problem, but there were no solutions offered.
 
Any help is greatly appreciated.
 
Sincerely,
Adrian

 


Problem with SSL configuration

2004-08-05 Thread binoy.patrick
Hi,
   I have configured SSL with Tomcat, I get this error when starting
Tomcat 

   04-Aug-2004 17:16:55 org.apache.commons.digester.Digester endElement
SEVERE: End event threw exception
java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:2
52)
at
org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
at org.apache.commons.digester.Rule.end(Rule.java:276)
at
org.apache.commons.digester.Digester.endElement(Digester.java:1058)
at
org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.ja
va:76)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(U
nknown Source
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis
patcher.dispa
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
wn Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.catalina.startup.Catalina.load(Catalina.java:489)
at org.apache.catalina.startup.Catalina.load(Catalina.java:528)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:247)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:421)
Catalina.start using conf/server.xml:
java.lang.IllegalArgumentException: argument type mismatch
java.lang.IllegalArgumentException: argument type mismatch
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:25
40)
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:25
66)
at
org.apache.commons.digester.Digester.endElement(Digester.java:1061)
at
org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.ja
va:76)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(U
nknown Source
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis
patcher.dispa
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
wn Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.catalina.startup.Catalina.load(Catalina.java:489)
at org.apache.catalina.startup.Catalina.load(Catalina.java:528)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:247)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:421)
...
Can somebody help me please?






RE: Urgent attention needed to solve mysterious SocketException error

2004-08-05 Thread Ralph Einfeldt

Are you running tomcat stand alone ?

One possible cause is that tomcat is trying to open a socket where 
nobody is listening. (Invalid argument or EINVAL is a common error
returned by all kind of socket operations in this case)

Without more of the stacktrace it's difficult (at least for me)
to say anything about the context where the problem is occuring.


 -Original Message-
 From: Adrian G. Klingel [mailto:[EMAIL PROTECTED]
 Sent: Thursday, August 05, 2004 5:27 PM
 To: [EMAIL PROTECTED]
 Subject: Urgent attention needed to solve mysterious SocketException
 error
 
 
 I'm running Tomcat 5.0.25 in our DMZ.  The server crashes 
 every day.  I see
 thousands and thousands of lines like this in Catalina.out:
  
 Aug 5, 2004 10:50:31 AM 
 org.apache.tomcat.util.net.TcpWorkerThread runIt
 SEVERE: Remote Host /xx.xx.xx.1 SocketException: Invalid argument
  
 That IP (obfuscated) is our gateway.  The application on this 
 server is not
 distributed, it does make some calls to an external database.
  
 I can't find any documentation on this error.  I found one 
 reference to
 someone else who had the problem, but there were no solutions offered.
  
 Any help is greatly appreciated.
  
 Sincerely,
 Adrian
 
  
 

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



RE : TR : [jaas integration between tomcat/weblogic]

2004-08-05 Thread LERBSCHER Jean-Pierre
Any responses?
Does somebody think that it could be a bug or like an improvement?
Thanks.

-Message d'origine-
De : LERBSCHER Jean-Pierre [mailto:[EMAIL PROTECTED] 
Envoyé : mardi 27 juillet 2004 19:07
À : '[EMAIL PROTECTED]'
Objet : [jaas integration between tomcat/weblogic]

Hi,

 

I would like to make EJB-calls from Tomcat to EJB in Weblogic in secure
environment (using j2ee roles). I

configure a custom JAAS Realm that uses client side LoginModule connecting
to WLS

(weblogic.security.auth.login.UsernamePasswordLoginModule).

 

I put weblogic.jar into common/lib directory and my login module classes in
common/classes. 

I configure webapp context like this :

  Realm className=org.apache.catalina.realm.JAASRealm


appName=Sample   

 
userClassNames=weblogic.security.principal.WLSUserImpl   

 
roleClassNames=weblogic.security.principal.WLSGroupImpl 

debug=99/

I grant all permission (for test only) in Catalina.policy.

And I run Catalina with -security option.

 

At this stage tomcat uses login module (and weblogic authentification
provider) to authenticate the user.

 

Everything works fine.

 

The subject build by weblogic is used to create a GenericPrincipal used
internally by Tomcat.

 

My problem is that I need to use weblogic security api to propagate
implicitly the subject when i call the ejb component with the security data
provided by weblogic authentification provider (the subject).

 

First I try to run Tomcat with the security option and the permission,
enables me to get the tomcat subject (for example like this
javax.security.auth.Subject mySubject =
javax.security.auth.Subject.getSubject(java.security.AccessController.getCon
text()); ) and call the weblogic security api with that subject.

 

However the Tomcat GenericPrincipal is not serializable and I get an
exception [java.io.NotSerializableException:

org.apache.catalina.realm.GenericPrincipal]...

 

Secondly  I try to rebuild the weblogic subject  with the subject generated
by
javax.security.auth.Subject.getSubject(java.security.AccessController.getCon
text());

I get an java.lang.SecurityException: [Security:090398]Invalid Subject:
principals=[my_username] exception generated by weblogic.

 

It seems obviously that there are problems of integration!

 

My suggestions are to keep a trace of original subject (for example in
session with a specific key) or in a classe that is accessible to
application classes (and not dependent on tomcat specific api).

 

Do you have any others suggestions ?

 

Environment:

 

Tomcat 5.0.27 (full install), running on xp, java 1.4.2_02

WLS 8 sp2, running on w2k, java 1.4.2_02

(= both on same machine, same environment)

 


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


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



Realm configuration not working

2004-08-05 Thread Ruth, Brice
Greetings!
I've recently decided to take advantage of Tomcat's authentication 
mechanism, however, it doesn't appear to be working for me. I've 
configured a Realm in my context (through the admin tool). It is a 
DataSourceRealm.

When I've tested everything, I keep getting pushed out to the error page 
that I've configured in my login settings. Since I couldn't figure out 
what was going on when I screwed up the debugging levels, I grabbed the 
source and started stepping through it in my debugger. Here's where it 
gets interesting. When FormAuthenticator.java gets the Realm to 
authenticate against:

Realm realm = context.getRealm();
The Realm that is returned is Tomcat's global UserDatabaseRealm - not 
my DataSourceRealm. At this point, its no wonder that the authentication 
isn't succeeding!!

Why isn't Tomcat using the Realm configured in the context?! This is on 
Tomcat 5.0.27 under jdk 1.4.2.

Any help would be appreciated!!
--
Brice Ruth, Sr. IT Analyst
Fiskars Brands Inc
http://www.fiskarsbrands.com/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: JTA tomcat

2004-08-05 Thread Guy Katz
hi;
actually, my need are very basic. i dont even need a distributed transaction
only a simple JDBC transaction but for architecture reasons i cant use the
JDBC transaction in the DAO level but something in a higher level such as
JTA.
will the tomcat user transaction implementation be enough in this case?

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 05, 2004 5:26 PM
To: Tomcat Users List
Subject: RE: JTA  tomcat



Hola,
Version 5.0.26 (and better yet, 5.0.27 which is stable) fixes the
TransactionFactory bug you're seeing.  So update to 5.0.27 if you can.

You would probably need to download JOTM (not JTOM, unless JTOM just
happens to be a Java transaction provider project I don't know about ;))
or another similar component, but that depends on your needs: how do you
plan on using these transactions?  If you use a JDBC DataSource provider
that's XA-enabled, such as Tyrex, you can use its transactions and
leverage Tomcat's JNDI capabilities all in one: see the User
Transactions section of
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.htm
l.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Guy Katz [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 05, 2004 12:17 PM
To: '[EMAIL PROTECTED]'
Subject: JTA  tomcat

hi;
threre are some thread regarding this but i did not find a definite
answer.

does tomcat has a UserTransaction implementation ready to use out of
the
box? or do i have to download JTOM or something similar in order to use
a
JTA UserTransaction.
i use tomcat 5.0.25.   when i lookup  java:comp:UserTransaction i get
an
exception below:
javax.naming.NamingException: Cannot create resource instance
at
org.apache.naming.factory.TransactionFactory.getObjectInstance(Transa
ctionFactory.java:145)
at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:3
01)
at org.apache.naming.NamingContext.lookup(NamingContext.java:838)

so i guess that something is binded under this name in JNDI and flow
goes
to
the trasactionFactory so what the deal here?
any help is appreciated.
thanks in advance.


Guy Katz
Allot Communications
[EMAIL PROTECTED]
tel: +972 9 7619288
fax: +972 9 7443626


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




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


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

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



Servlet coming as file download

2004-08-05 Thread Carlos Roberto de Oliveira Queiroz
Hello, I have a Apache 2.0.50 with an active mod_deflate connecting to Tomcat 
(4.x) via mod_jk2. After I activated deflate, sometimes when I call a servlet IE 
doesn´t open the page with the servlet response, but a file download window as if I 
was trying to download a file named 'servlet'. Can anyone please suggest a solution ?

Thanks

Tomcat 5.0.27 -- Servlet.service() for servlet invoker threw exception

2004-08-05 Thread Kyle A. Boyd
I recently upgraded from Tomcat 5.0.25 to Tomcat 5.0.27. Now at times my 
client application is getting a 500 Internal Server Error.

I found the following exception in localhost_log.2004-08-05.txt. Does 
anyone know what is causing the exception considering the same code 
works fine under Tomat 5.0.25.

2004-08-05 09:20:47 StandardWrapperValve[invoker]: Servlet.service() for 
servlet invoker threw exception
java.lang.AbstractMethodError
   at com.brit.MiniRIS.Servlet.DB.executeBatch(DB.java:423)
   at com.brit.MiniRIS.Servlet.UserDB.updateUser(UserDB.java:1395)
   at 
com.brit.MiniRIS.Servlet.MRISServlet.updateUser(MRISServlet.java:9249)
   at 
com.brit.MiniRIS.Servlet.MRISServlet.doPost(MRISServlet.java:2432)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at 
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:419)
   at 
org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:169)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
   at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
   at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
   at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
   at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
   at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
   at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
   at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
   at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
   at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
   at 
org.apache.catalina.valves.RequestDumperValve.invoke(RequestDumperValve.java:169)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
   at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
   at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
   at 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
   at 
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
   at 
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
   at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
   at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
   at 
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
   at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
   at java.lang.Thread.run(Thread.java:479)

Thanks,
Kyle
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Realm configuration not working

2004-08-05 Thread Dennis Dai
On 8/5/2004 9:26 AM, Ruth, Brice wrote:
Greetings!
I've recently decided to take advantage of Tomcat's authentication 
mechanism, however, it doesn't appear to be working for me. I've 
configured a Realm in my context (through the admin tool). It is a 
DataSourceRealm.

When I've tested everything, I keep getting pushed out to the error page 
that I've configured in my login settings. Since I couldn't figure out 
what was going on when I screwed up the debugging levels, I grabbed the 
source and started stepping through it in my debugger. Here's where it 
gets interesting. When FormAuthenticator.java gets the Realm to 
authenticate against:

Realm realm = context.getRealm();
The Realm that is returned is Tomcat's global UserDatabaseRealm - not 
my DataSourceRealm. At this point, its no wonder that the authentication 
isn't succeeding!!

Why isn't Tomcat using the Realm configured in the context?! This is on 
Tomcat 5.0.27 under jdk 1.4.2.

Any help would be appreciated!!
Make sure resource-ref / in web.xml is pointing to the correct 
resource (ie., the one in the context).

--
Dennis Dai
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Strage Behaviour - Tomcat Memory Leak

2004-08-05 Thread Roberto Rios
Hi,

I was doing an evaluation of JProfiler in order see the improvements did
since the last time I used it. I has a feature (like other profilers) that
shows the heap usage in real time.

As I always do, I have installed a new copy of tomcat, with NO changes. I
have just unziped it into a directory (by the way, I am using winXP,
J2SDK1.4.2_05, JProfiler 3.1 and tomcat 4.1.30/5.0.25).

So I started JProfiler, that automatically starts tomcat (I have tested it
against 4.1.30 and 5.0.25 - same behaviour), and I also started the heap
monitor (that JProfiler calls VM Telemetry).

What I saw, IMHO, is very strange: time to times (around every 30 minutes)
the heap is totally filled, and the garbage collector runs. So the graph
looks like a saw:

  /|  /|  /|  /
 / | / | / | /
/  |/  |/  |/

What is strange, is that I does't touch tomcat. I just start it. Nothing is
running under it (except the default applications: manager, examples,
etc Anyway, I have cleaned the server.xml and webapps, removing the
manager, admin and examples app. Same bahaviour again).

IMHO, the heap usage should be a flat line if nothing is running under
tomcat. Something like (the initial increase is due to tomcat startup) this:

  /--
 /
/

My conclusion, is that OR tomcat has a huge memory leak, OR JProfiler isn't
reliable.

Does anyone has an explanation about this behaviour? Is it know? Maybe a
listener, logger, etc?

TIA,

Bob


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



Re: Tomcat Realm-- pasword encryption servlet location in a webApp

2004-08-05 Thread Andoni List
Encryption:

There is only one way to encrypt passwords if you are not using SSL.  That
is to use Paj's JavaScript module available here:
http://pajhome.org.uk/crypt/md5/
Although the Tomcat Realm does have an MD5 flag which you can set to encrypt
the passwords being sent to it this is too late as the passwords have
already been sent in the clear over the internet to your server.  The only
use for this is when you are accessing a server on which the passwords are
stored in MD5 encrypted format and you don't care about the network.
You may also be told that you can use a Digest login instead of a Form login
or Basic Login but again you have a problem: Digest logins are only
available in IE so if you know all your users are definitely only using IE
then go ahead, it will be doing the same job as the JavaScript i.e.
encrypting before sending down the wire.
In order to encrypt the passwords in the first place you can use Java1.4's
java.security.* package or you can use Catalina's
org.apache.catalina.realm.RealmBase which can be used at the command line
thus:

C:\java org.apache.catalina.realm.RealmBase -a MD5 mypassword

or you can use the JavaScript.  If you have the passwords in an Oracle
Database you can also use the Oracle Function DBMS_OBFUSCATION_TOOLKIT.MD5()
by writing an oracle Function something like this:

CREATE OR REPLACE FUNCTION get_md5 (plaintext IN VARCHAR2)
RETURN VARCHAR2 IS
test VARCHAR2(16);
BEGIN
test:=DBMS_OBFUSCATION_TOOLKIT.MD5(INPUT_STRING=plaintext);
RETURN test;
END get_md5;
/

Note: using a function like this you can create a view of the passwords
table in your database which would mean that though your passwords appear
hashed to Tomcat, they are actually still visible to you!

The servlet invoker /servlet/*
If you are adding the servlets to your web.xml file then you do not need to
use the servlet invoker anywhere and hence do not need to call it using
/servlet/.
Whether or not you add the servlets to the same package is a programming
decision which has to do with what the servlets do and whether they do the
same thing as the other classes in that package.  This has no bearing on the
administrative decisions of how to keep the server secure.

Hope that all helps.

Andoni.

- Original Message - 
From: Ben Bookey [EMAIL PROTECTED]
To: Tomcat User List [EMAIL PROTECTED]
Sent: Thursday, August 05, 2004 9:02 AM
Subject: Tomcat Realm-- pasword encryption  servlet location in a webApp


 Dear list,

 2 questions

 1) I think I remember reading somewhere that there was a .bat batch file
 which we could run
 on production machines, so that passwords are encrypted. Can anyone
 enlighten ?

 2) Whats the best configuration mechanism for my servlets? I think its
 better to add the
 the servlets to my com.mycompany.myapp package (or?), BUT, is it a
security
 flaw when
 I set in my app, the url-pattern begininning with /servlet/* (see below
 example). I again have read that the
 servlet url-pattern should not begin with /servlet

  servlet-mapping
 servlet-nameservletName/servlet-name
 url-pattern/servlet/servletName/url-pattern
   /servlet-mapping

 regards.

 Ben


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



RE: Strage Behaviour - Tomcat Memory Leak

2004-08-05 Thread Shapira, Yoav

Hi,
It depends on the size of your saw teeth: if they're small (2MB), it
can be attributed to anything including internal JVM optimizations.
HotSpot will move things around in memory even when no activity is
taking place.

Also, what you're describing is not a leak by definition, since the
memory is reclaimed, i.e. nothing maintains references to it ;)

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Roberto Rios [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 05, 2004 12:40 PM
To: [EMAIL PROTECTED]
Subject: Strage Behaviour - Tomcat Memory Leak

Hi,

I was doing an evaluation of JProfiler in order see the improvements
did
since the last time I used it. I has a feature (like other profilers)
that
shows the heap usage in real time.

As I always do, I have installed a new copy of tomcat, with NO changes.
I
have just unziped it into a directory (by the way, I am using winXP,
J2SDK1.4.2_05, JProfiler 3.1 and tomcat 4.1.30/5.0.25).

So I started JProfiler, that automatically starts tomcat (I have tested
it
against 4.1.30 and 5.0.25 - same behaviour), and I also started the
heap
monitor (that JProfiler calls VM Telemetry).

What I saw, IMHO, is very strange: time to times (around every 30
minutes)
the heap is totally filled, and the garbage collector runs. So the
graph
looks like a saw:

  /|  /|  /|  /
 / | / | / | /
/  |/  |/  |/

What is strange, is that I does't touch tomcat. I just start it.
Nothing is
running under it (except the default applications: manager, examples,
etc Anyway, I have cleaned the server.xml and webapps, removing the
manager, admin and examples app. Same bahaviour again).

IMHO, the heap usage should be a flat line if nothing is running under
tomcat. Something like (the initial increase is due to tomcat startup)
this:

  /--
 /
/

My conclusion, is that OR tomcat has a huge memory leak, OR JProfiler
isn't
reliable.

Does anyone has an explanation about this behaviour? Is it know? Maybe
a
listener, logger, etc?

TIA,

Bob


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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: Strage Behaviour - Tomcat Memory Leak

2004-08-05 Thread Peter Lin
I've used JProfiler in the past and I found it somewhat unreliable,
since it is pretty heavy weight. I should say it was based on a half
dozen tests using JProfiler and not a scientific evaluation.

it was the free eval version a couple years back. I find optimizeIt
more reliable for me and a little less heavy weight. I've use
OptimizeIt in the past and tomcat without any requests shows flat
memory usage. in other words constant.


peter


On Thu, 5 Aug 2004 13:39:44 -0300, Roberto Rios
[EMAIL PROTECTED] wrote:
 Hi,
 
 I was doing an evaluation of JProfiler in order see the improvements did
 since the last time I used it. I has a feature (like other profilers) that
 shows the heap usage in real time.
 
 As I always do, I have installed a new copy of tomcat, with NO changes. I
 have just unziped it into a directory (by the way, I am using winXP,
 J2SDK1.4.2_05, JProfiler 3.1 and tomcat 4.1.30/5.0.25).
 
 So I started JProfiler, that automatically starts tomcat (I have tested it
 against 4.1.30 and 5.0.25 - same behaviour), and I also started the heap
 monitor (that JProfiler calls VM Telemetry).
 
 What I saw, IMHO, is very strange: time to times (around every 30 minutes)
 the heap is totally filled, and the garbage collector runs. So the graph
 looks like a saw:
 
  /|  /|  /|  /
 / | / | / | /
 /  |/  |/  |/
 
 What is strange, is that I does't touch tomcat. I just start it. Nothing is
 running under it (except the default applications: manager, examples,
 etc Anyway, I have cleaned the server.xml and webapps, removing the
 manager, admin and examples app. Same bahaviour again).
 
 IMHO, the heap usage should be a flat line if nothing is running under
 tomcat. Something like (the initial increase is due to tomcat startup) this:
 
  /--
 /
 /
 
 My conclusion, is that OR tomcat has a huge memory leak, OR JProfiler isn't
 reliable.
 
 Does anyone has an explanation about this behaviour? Is it know? Maybe a
 listener, logger, etc?
 
 TIA,
 
 Bob
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



RE: Strage Behaviour - Tomcat Memory Leak

2004-08-05 Thread Caldarale, Charles R
 From: Peter Lin [mailto:[EMAIL PROTECTED]
 Subject: Re: Strage Behaviour - Tomcat Memory Leak
 
 I've use OptimizeIt in the past and tomcat without any 
 requests shows flat memory usage. in other words constant.

Memory usage also depends on configuration options such as auto deploy.  When this is 
on, Tomcat periodically probes for changes in the webapps directory.  Doing so 
generates short-lived objects which accumulate until GC runs.

 - Chuck


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

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



RE: Strage Behaviour - Tomcat Memory Leak

2004-08-05 Thread Allistair Crossley
As Yoav points out, this is quite normal. I also run JProbe and if you just 
leave it alone, very small memory usage is made and at regular intervals the GC will 
jump in, producing your saw tooth (since the GC will only jump in when it really 
thinks the heap needs clearing out is why it gets quite high).
 
Also when you say the heap is totally filled I don;t think you mean that the 
total memory available to Tomcat is filled, e.g 128-512MB or whatever. What you mean 
is that the heap used is filled and I bet that heap size is actually only about 7Mb or 
so if as you claim it is just a startup of Tomcat. Therefore it is quite possible that 
it looks alarming but it is not really.
 
Cheers, ADC. 
 
-Original Message- 
From: Peter Lin [mailto:[EMAIL PROTECTED] 
Sent: Thu 05/08/2004 17:55 
To: Tomcat Users List 
Cc: 
Subject: Re: Strage Behaviour - Tomcat Memory Leak



I've used JProfiler in the past and I found it somewhat unreliable,
since it is pretty heavy weight. I should say it was based on a half
dozen tests using JProfiler and not a scientific evaluation.

it was the free eval version a couple years back. I find optimizeIt
more reliable for me and a little less heavy weight. I've use
OptimizeIt in the past and tomcat without any requests shows flat
memory usage. in other words constant.


peter


On Thu, 5 Aug 2004 13:39:44 -0300, Roberto Rios
[EMAIL PROTECTED] wrote:
 Hi,

 I was doing an evaluation of JProfiler in order see the improvements did
 since the last time I used it. I has a feature (like other profilers) that
 shows the heap usage in real time.

 As I always do, I have installed a new copy of tomcat, with NO changes. I
 have just unziped it into a directory (by the way, I am using winXP,
 J2SDK1.4.2_05, JProfiler 3.1 and tomcat 4.1.30/5.0.25).

 So I started JProfiler, that automatically starts tomcat (I have tested it
 against 4.1.30 and 5.0.25 - same behaviour), and I also started the heap
 monitor (that JProfiler calls VM Telemetry).

 What I saw, IMHO, is very strange: time to times (around every 30 minutes)
 the heap is totally filled, and the garbage collector runs. So the graph
 looks like a saw:

  /|  /|  /|  /
 / | / | / | /
 /  |/  |/  |/

 What is strange, is that I does't touch tomcat. I just start it. Nothing is
 running under it (except the default applications: manager, examples,
 etc Anyway, I have cleaned the server.xml and webapps, removing the
 manager, admin and examples app. Same bahaviour again).

 IMHO, the heap usage should be a flat line if nothing is running under
 tomcat. Something like (the initial increase is due to tomcat startup) this:

  /--
 /
 /

 My conclusion, is that OR tomcat has a huge memory leak, OR JProfiler isn't
 reliable.

 Does anyone has an explanation about this behaviour? Is it know? Maybe a
 listener, logger, etc?

 TIA,

 Bob

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



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





FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT

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

worker2.properties conf

2004-08-05 Thread Valter G. Nogueira Jr.
I want to know more about worker2.properties files to config my IIS.

How can I make the uri independent from webapp context? I mean 
http://localhost/samples be linked to jsp-samples instead of samples webapp context.

When I read http://jakarta.apache.org/tomcat/connectors-doc/jk2/jk2/configwebcom.html 
I just stucked. My head have been flooded by why, when and how questions about using 
such directives.

Is there any doc to enligthen me about this topics

Thanks

Valter

Re: Realm configuration not working

2004-08-05 Thread Ruth, Brice
Dennis Dai wrote:
On 8/5/2004 9:26 AM, Ruth, Brice wrote:
Greetings!
I've recently decided to take advantage of Tomcat's authentication 
mechanism, however, it doesn't appear to be working for me. I've 
configured a Realm in my context (through the admin tool). It is a 
DataSourceRealm.

When I've tested everything, I keep getting pushed out to the error 
page that I've configured in my login settings. Since I couldn't 
figure out what was going on when I screwed up the debugging levels, 
I grabbed the source and started stepping through it in my debugger. 
Here's where it gets interesting. When FormAuthenticator.java gets 
the Realm to authenticate against:

Realm realm = context.getRealm();
The Realm that is returned is Tomcat's global UserDatabaseRealm - 
not my DataSourceRealm. At this point, its no wonder that the 
authentication isn't succeeding!!

Why isn't Tomcat using the Realm configured in the context?! This is 
on Tomcat 5.0.27 under jdk 1.4.2.

Any help would be appreciated!!
Make sure resource-ref / in web.xml is pointing to the correct 
resource (ie., the one in the context).

OK, I don't know what was going on ... but when I went to start 
copy/pasting my config files into this email, I saw that my context's 
XML file in Catallina/localhost didn't have a Realm in it any longer. 
What?! I obviously didn't dream that I configured it  committed the 
changes ... ugh. Maybe I did forget to commit the changes, who knows?! 
Man-o-man.

Thanks, though. Its all working now. Very nice :)
--
Brice Ruth, Sr. IT Analyst
Fiskars Brands Inc
http://www.fiskarsbrands.com/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: custom error pages

2004-08-05 Thread Mike Curwen
I think the essence of the request is to get Tomcat to not show a tomcat
error page under any circumstances.  For those using Tomcat stand-alone,
(ie: they do not have the benefit of being able to use custom apache error
pages), is there a solution?

If you say that errorpages specified in web.xml are part of the web app, and
so are not available unless the app is available, would this be more
appropriately handled by a customized Connector? ie: 

com.foo.my.Connector extends org.apache.coyote.tomcat4.CoyoteConnector
 
and then I can set up customized pages for 404, 500, etc, etc ?




 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, August 05, 2004 8:11 AM
 To: Tomcat Users List
 Subject: RE: custom error pages
 
 
 
 Hi,
 The stuff in conf/web.xml is virtually appended to your 
 web.xml.  If your web.xml is inactive or non-existent the 
 stuff in conf/web.xml is not applicable and not consulted.
 
 
 Yoav Shapira
 Millennium Research Informatics
 


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



Re: Tomcat 5.0.27 -- Servlet.service() for servlet invoker threw exception

2004-08-05 Thread QM
On Thu, Aug 05, 2004 at 11:40:48AM -0500, Kyle A. Boyd wrote:
: I recently upgraded from Tomcat 5.0.25 to Tomcat 5.0.27. Now at times my 
: client application is getting a 500 Internal Server Error.
: 
: [snip]
: 
: 2004-08-05 09:20:47 StandardWrapperValve[invoker]: Servlet.service() for 
: servlet invoker threw exception
: java.lang.AbstractMethodError

Assuming your classpath is clean, what happens if you recompile your app
against the 5.0.27 JARs?  This isn't always necessary between minor-rev
changes, but given the definition of AbstractMethodError[1] that'd be the
first place I'd look.

btw, please post *new* messages to the list instead of replying to old
ones and just changing the subject.  This plays hell with thread-aware
mailers, and you risk helpful people skipping past your message (because
it shows up as part of another, unrelated thread).

-QM

[1] = http://java.sun.com/j2se/1.4.2/docs/api/java/lang/AbstractMethodError.html

public class AbstractMethodError
extends IncompatibleClassChangeError

Thrown when an application tries to call an abstract method. Normally,
this error is caught by the compiler; this error can only occur at run
time if the definition of some class has incompatibly changed since the
currently executing method was last compiled. 


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



RE: custom error pages

2004-08-05 Thread Shapira, Yoav

Hi,
Of course, you could write a customized Connector to do this.  Or you
could have an entirely separate server dedicated to error messages and
forward there from your custom connector.  Or whatever.  If you want to
go as far as to write a custom Connector to do this, you could do a lot
of other things.  My answer was in terms of current tomcat
code/features, there's no configurable setting to do this.  One of the
main benefits of an open source server with the Apache license is that
you can do whatever you want with it...

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Mike Curwen [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 05, 2004 2:44 PM
To: 'Tomcat Users List'
Subject: RE: custom error pages

I think the essence of the request is to get Tomcat to not show a
tomcat
error page under any circumstances.  For those using Tomcat
stand-alone,
(ie: they do not have the benefit of being able to use custom apache
error
pages), is there a solution?

If you say that errorpages specified in web.xml are part of the web
app,
and
so are not available unless the app is available, would this be more
appropriately handled by a customized Connector? ie:

com.foo.my.Connector extends org.apache.coyote.tomcat4.CoyoteConnector

and then I can set up customized pages for 404, 500, etc, etc ?




 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: Thursday, August 05, 2004 8:11 AM
 To: Tomcat Users List
 Subject: RE: custom error pages



 Hi,
 The stuff in conf/web.xml is virtually appended to your
 web.xml.  If your web.xml is inactive or non-existent the
 stuff in conf/web.xml is not applicable and not consulted.


 Yoav Shapira
 Millennium Research Informatics



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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Strage Behaviour - Tomcat Memory Leak

2004-08-05 Thread Roberto Rios
Everybody is right. The saw teeth is around 3mb. The heap is around 9mb. So
after the GC runs, the available heap falls to 6mb.

As Yoah said this isn't a memory leak, since all the objects that area
created are garbage collected. I called it as a memory leak because even
with nothing running under tomcat, object were created.

I did an experience (following what Allistair wrote), removing loggers and
setting autodeploy to false. The saw pattern still occuring, but the cycle
is a little bit longer.

And, now that the problem is solved, I think that JProfiler is quite good.
It has some nice features. Since the last time that I have tested it, they
have improved a lot.

Thanks,

Bob

-Mensagem original-
De: Roberto Rios [mailto:[EMAIL PROTECTED]
Enviada em: quinta-feira, 5 de agosto de 2004 13:40
Para: [EMAIL PROTECTED]
Assunto: Strage Behaviour - Tomcat Memory Leak


Hi,

I was doing an evaluation of JProfiler in order see the improvements did
since the last time I used it. I has a feature (like other profilers) that
shows the heap usage in real time.

As I always do, I have installed a new copy of tomcat, with NO changes. I
have just unziped it into a directory (by the way, I am using winXP,
J2SDK1.4.2_05, JProfiler 3.1 and tomcat 4.1.30/5.0.25).

So I started JProfiler, that automatically starts tomcat (I have tested it
against 4.1.30 and 5.0.25 - same behaviour), and I also started the heap
monitor (that JProfiler calls VM Telemetry).

What I saw, IMHO, is very strange: time to times (around every 30 minutes)
the heap is totally filled, and the garbage collector runs. So the graph
looks like a saw:

  /|  /|  /|  /
 / | / | / | /
/  |/  |/  |/

What is strange, is that I does't touch tomcat. I just start it. Nothing is
running under it (except the default applications: manager, examples,
etc Anyway, I have cleaned the server.xml and webapps, removing the
manager, admin and examples app. Same bahaviour again).

IMHO, the heap usage should be a flat line if nothing is running under
tomcat. Something like (the initial increase is due to tomcat startup) this:

  /--
 /
/

My conclusion, is that OR tomcat has a huge memory leak, OR JProfiler isn't
reliable.

Does anyone has an explanation about this behaviour? Is it know? Maybe a
listener, logger, etc?

TIA,

Bob


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



RE: Strage Behaviour - Tomcat Memory Leak

2004-08-05 Thread Larry Isaacs
I believe you would need to set the backgroundProcessorDelay attribute
on the Engine element to -1 in server.xml if you wanted keep it
from generating a little bit of garbage every 10 seconds.  I'm not
aware that this would disable anything critical (assuming you can live
without the auto, live and reloading features), but I'm too
lazy to make sure.

Cheers,
Larry

 -Original Message-
 From: Roberto Rios [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, August 05, 2004 3:35 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Strage Behaviour - Tomcat Memory Leak
 Importance: High
 
 
 Everybody is right. The saw teeth is around 3mb. The heap is 
 around 9mb. So
 after the GC runs, the available heap falls to 6mb.
 
 As Yoah said this isn't a memory leak, since all the objects that area
 created are garbage collected. I called it as a memory leak 
 because even
 with nothing running under tomcat, object were created.
 
 I did an experience (following what Allistair wrote), 
 removing loggers and
 setting autodeploy to false. The saw pattern still occuring, 
 but the cycle
 is a little bit longer.
 
 And, now that the problem is solved, I think that JProfiler 
 is quite good.
 It has some nice features. Since the last time that I have 
 tested it, they
 have improved a lot.
 
 Thanks,
 
 Bob
 
 -Mensagem original-
 De: Roberto Rios [mailto:[EMAIL PROTECTED]
 Enviada em: quinta-feira, 5 de agosto de 2004 13:40
 Para: [EMAIL PROTECTED]
 Assunto: Strage Behaviour - Tomcat Memory Leak
 
 
 Hi,
 
 I was doing an evaluation of JProfiler in order see the 
 improvements did
 since the last time I used it. I has a feature (like other 
 profilers) that
 shows the heap usage in real time.
 
 As I always do, I have installed a new copy of tomcat, with 
 NO changes. I
 have just unziped it into a directory (by the way, I am using winXP,
 J2SDK1.4.2_05, JProfiler 3.1 and tomcat 4.1.30/5.0.25).
 
 So I started JProfiler, that automatically starts tomcat (I 
 have tested it
 against 4.1.30 and 5.0.25 - same behaviour), and I also 
 started the heap
 monitor (that JProfiler calls VM Telemetry).
 
 What I saw, IMHO, is very strange: time to times (around 
 every 30 minutes)
 the heap is totally filled, and the garbage collector runs. 
 So the graph
 looks like a saw:
 
   /|  /|  /|  /
  / | / | / | /
 /  |/  |/  |/
 
 What is strange, is that I does't touch tomcat. I just start 
 it. Nothing is
 running under it (except the default applications: manager, examples,
 etc Anyway, I have cleaned the server.xml and webapps, 
 removing the
 manager, admin and examples app. Same bahaviour again).
 
 IMHO, the heap usage should be a flat line if nothing is running under
 tomcat. Something like (the initial increase is due to tomcat 
 startup) this:
 
   /--
  /
 /
 
 My conclusion, is that OR tomcat has a huge memory leak, OR 
 JProfiler isn't
 reliable.
 
 Does anyone has an explanation about this behaviour? Is it 
 know? Maybe a
 listener, logger, etc?
 
 TIA,
 
 Bob
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



Re: Intermittent exception during startup (5.0.25)

2004-08-05 Thread Robert Hunt
Nachricht- Original Message - 
Sent: Thursday, August 05, 2004 2:52 AM
Subject: AW: Intermittent exception during startup (5.0.25)


Hi Robert

I got the solution: you have to take the original jmx 1.2 RI version from
SUN instead of that jmx which comes with tomcat (see also
http://issues.apache.org/bugzilla/show_bug.cgi?id=29671)

- Download from http://java.sun.com/products/JavaManagement/download.html
the JMX 1.2 Reference Implementation
- Unzip lib/jmxri.jar from this file
- Copy jmxri.jar to $TOMCAT_HOME/bin/jmx.jar
- delete $TOMCAT_HOME/work/*
- restart Tomcat

I have tomcat 5.0.27 and it works perfectly!

Have a nice day and a good time
Didi

-Ursprüngliche Nachricht-
Gesendet: Mittwoch, 4. August 2004 15:36
An: Ludwig Dieter, Bedag
Betreff: Re: Intermittent exception during startup (5.0.25)


Thanks!



Rob Hunt
- Original Message - 
Sent: Wednesday, August 04, 2004 9:11 AM
Subject: AW: Intermittent exception during startup (5.0.25)


Hi Robert

Thanks for your answer! I have submit this as a bug
http://issues.apache.org/bugzilla/show_bug.cgi?id=30460
If I have the solution, you will receive it...

Greetings from Switzerland
Didi


-Ursprüngliche Nachricht-
Gesendet: Mittwoch, 4. August 2004 14:36
An: Ludwig Dieter, Bedag
Betreff: Re: Intermittent exception during startup (5.0.25)



Other than to restart the server and cross my fingers, no I haven't found a
solution.  Perhaps it should be submitted as a bug.


-- RH

- Original Message - 
Sent: Wednesday, August 04, 2004 2:40 AM
Subject: Intermittent exception during startup (5.0.25)


Hello Robert

I got the same error as you with tomcat 5.0.27. Sometimes the error occures,
and sometimes it doesn't!!! Did you found a solution?


Here is my catalina.out:

Aug 4, 2004 8:18:49 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8081
Aug 4, 2004 8:18:49 AM org.apache.coyote.tomcat5.MapperListener init
WARNING: Error registering contexts
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:930)
at java.util.HashMap$EntryIterator.next(HashMap.java:972)
at java.util.HashMap.putAllForCreate(HashMap.java:505)
at java.util.HashMap.clone(HashMap.java:799)
at
mx4j.server.DefaultMBeanRepository.clone(DefaultMBeanRepository.java:56)
at
mx4j.server.MBeanServerImpl.findMBeansByPattern(MBeanServerImpl.java:1603)
at
mx4j.server.MBeanServerImpl.queryObjectNames(MBeanServerImpl.java:1568)
at
mx4j.server.MBeanServerImpl.queryMBeans(MBeanServerImpl.java:1512)
at
org.apache.coyote.tomcat5.MapperListener.init(MapperListener.java:115)
at
org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:1537)
at
org.apache.catalina.core.StandardService.start(StandardService.java:489)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85
)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)
Aug 4, 2004 8:18:49 AM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /127.0.0.1:8010
Aug 4, 2004 8:18:49 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=3/163 config=/a6a/a6ak/tomcat/conf/jk2.properties
Aug 4, 2004 8:18:50 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 40958 ms

Regards,
Dieter Ludwig
Bedag Informatik AG


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



Re: classloader hangs

2004-08-05 Thread bgood
Hello,
I know this is naive of me, but how does one get a thread dump of the
JVM?  Anyway, as for the other comments, do I have to do something
different to use URLClassLoader under Tomcat than I do in a console
application?  I kept getting this same problem under Tomcat before when
I was creating URLClassLoaders without specifying
Thread.currentThread().getContextClassLoader() as the parent, but by
adding it, the error went away.  It just seems strange that code that
worked fine stopped working when the only change I made was to insert a
package statement.  As for the NoClassDefFoundError vs
ClassNotFoundException, I do have exception handling code around the
loadClass method, and it is not reporting anything, and to the best of
my knowledge, an error should terminate the JVM right?

Thanks,
Ben

On Thu, Aug 05, 2004 at 11:22:03AM -0400, Shapira, Yoav wrote:
 
 Hi,
 If you get a thread dump of the JVM while it's hanging, what does it
 show?
 
 The URLClassLoader is intended for use within Tomcat.  It's nice that
 you have a program using outside Tomcat, but it's not that meaningful
 for comparison testing.  The ClassLoading scheme and hierarchy inside a
 servlet container is significantly different from the one inside a
 console Java application.
 
 NoClassDefFound is not an exception, it's an Error.  It's different from
 ClassNotFoundException.  And that difference (see the JavaDoc for both)
 may be the root of your problem.
 
 Yoav Shapira
 Millennium Research Informatics
 
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Thursday, August 05, 2004 11:17 AM
 To: [EMAIL PROTECTED]
 Subject: classloader hangs
 
 Hello,
 I am writing a class to be deployed with the Tomcat SOAP web app (I'll
 call this class A).  It uses a URLClassloader to load classes from a
 directory (i call them modules).  I initialize my class loader with
 
 URLClassLoader initialLoader = new URLClassLoader(urls,
Thread.currentThread().getContextClassLoader());
 
 This worked fine for a while.  However, when I decided that
 my class A needed to have a package statement (I wanted to
 put it in a jar file along with some libraries for easy
 distribution), I was very much dismayed when the class
 loading did not work.  Yet the strange part is that it is not
 the usual NoClassDefFound exception, instead the entire
 program just seems to hang upon trying to load one of the
 modules.  I am very dismayed as what was once working code is
 now almost useless.  Chances are, I'm just making a stupid
 mistake, however if anyone could please help me I would be
 grateful.
 
 Thanks,
 Ben
 
 P.S. This works fine when I don't run it under Tomcat, that
 was my reason for posting it here.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 This e-mail, including any attachments, is a confidential business communication, 
 and may contain information that is confidential, proprietary and/or privileged.  
 This e-mail is intended only for the individual(s) to whom it is addressed, and may 
 not be saved, copied, printed, disclosed or used by anyone else.  If you are not 
 the(an) intended recipient, please immediately delete this e-mail from your computer 
 system and notify the sender.  Thank you.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



Tomcat does not see web.xml, which is the part of the war file

2004-08-05 Thread Piotr Galecki
I'm having a problem with Tomcat, which doesn't see
the web.xml file,
when processing a war file.
I checked many times - the web.xml file is in the war
file, which is created by ant.
However, when the war file is deployed,
Tomcat complains that web.xml is not there.
Here is the Tomcat log:

INFO: Installing web application at context path
/login from URL file:D:/Program 
Files/Apache Software Foundation/Tomcat
5.0/webapps/login
Aug 5, 2004 1:57:03 AM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 5, 2004 1:57:03 AM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 5, 2004 1:57:03 AM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 5, 2004 1:57:03 AM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 5, 2004 1:57:03 AM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 5, 2004 1:57:03 AM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 5, 2004 1:57:03 AM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 5, 2004 1:57:03 AM
org.apache.catalina.startup.ContextConfig
applicationConfig
INFO: Missing application web.xml, using defaults only
StandardEngine
[Catalina].StandardHost[localhost].StandardContext[/login]

What could be the problem here?

Any help is appreciated,
Piotr


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



RE: classloader hangs

2004-08-05 Thread Shapira, Yoav

Hi,

I know this is naive of me, but how does one get a thread dump of the
JVM?

Send a SIGQUIT to the JVM process.

package statement.  As for the NoClassDefFoundError vs
ClassNotFoundException, I do have exception handling code around the
loadClass method, and it is not reporting anything, and to the best of
my knowledge, an error should terminate the JVM right?

No, it shouldn't.  You can catch errors also by catching Throwable
instead of Exception.

Yoav



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Tomcat does not see web.xml, which is the part of the war file

2004-08-05 Thread Shapira, Yoav

Hi,
Post your WAR file structure (obtainable from a jar tvf command).

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Piotr Galecki [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 05, 2004 4:21 PM
To: [EMAIL PROTECTED]
Subject: Tomcat does not see web.xml, which is the part of the war file

I'm having a problem with Tomcat, which doesn't see
the web.xml file,
when processing a war file.
I checked many times - the web.xml file is in the war
file, which is created by ant.
However, when the war file is deployed,
Tomcat complains that web.xml is not there.
Here is the Tomcat log:

INFO: Installing web application at context path
/login from URL file:D:/Program
Files/Apache Software Foundation/Tomcat
5.0/webapps/login
Aug 5, 2004 1:57:03 AM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 5, 2004 1:57:03 AM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 5, 2004 1:57:03 AM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 5, 2004 1:57:03 AM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 5, 2004 1:57:03 AM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 5, 2004 1:57:03 AM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 5, 2004 1:57:03 AM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 5, 2004 1:57:03 AM
org.apache.catalina.startup.ContextConfig
applicationConfig
INFO: Missing application web.xml, using defaults only
StandardEngine
[Catalina].StandardHost[localhost].StandardContext[/login]

What could be the problem here?

Any help is appreciated,
Piotr


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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Catalina.out Error

2004-08-05 Thread Samuel V . Green III
My Catalina.out log contains the following:
	Can't find workers.properties at 
/usr/local/jakarta-tomcat-4.1.30/conf/jk/workers.properties
Please install it in the default location or  set the config location

I have my workers2.properties located at /usr/local/apache/libexec
Do I need to configure the server.xml of tomcat to solve this problem?
How?
thanks,
Samuel.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: classloader hangs

2004-08-05 Thread bgood
On Windows XP? :-(
(my employer doesn't enjoy linux)

 Send a SIGQUIT to the JVM process.

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



RE: classloader hangs

2004-08-05 Thread Mike Curwen
if you've got it running in a DOS window (which you might want to do, for
just this purpose), you can try either the Pause/Break key, and if that
doesn't do it, try 'Cntrl-C' in the DOS window.




 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, August 05, 2004 4:10 PM
 To: Tomcat Users List
 Subject: Re: classloader hangs
 
 
 On Windows XP? :-(
 (my employer doesn't enjoy linux)
 
  Send a SIGQUIT to the JVM process.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



special chars : é è ê ï etc...

2004-08-05 Thread Thai DANG
Hi all

I have troubles with accent.
Sometimes, tomcat displays the accent with a ? instead. I think it is a java 
configuration pb.
I have the version 5.0.27 and this is what I use to launch tomcat :

export JAVA_OPTS=-server

export CATALINA_OPTS=-Djava.awt.headless=true -Dfile.encoding=UTF-8 
-Ddcm.home=$installDir -Dbuild.
compiler.emacs=true -Djava.library.path=$installDir/lib -Xms256m -Xmx256m 
-XX:PermSize=128m -XX:MaxP
ermSize=128m


Note that $installDir is a custom dir with no importance


Thanks.

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



Re: special chars : é è ê ï etc...

2004-08-05 Thread Ruth, Brice
Thai DANG wrote:
Hi all
I have troubles with accent.
Sometimes, tomcat displays the accent with a ? instead. I think it is a java 
configuration pb.
I have the version 5.0.27 and this is what I use to launch tomcat :
export JAVA_OPTS=-server
export CATALINA_OPTS=-Djava.awt.headless=true -Dfile.encoding=UTF-8 
-Ddcm.home=$installDir -Dbuild.
compiler.emacs=true -Djava.library.path=$installDir/lib -Xms256m -Xmx256m 
-XX:PermSize=128m -XX:MaxP
ermSize=128m
Note that $installDir is a custom dir with no importance
Thanks.
 

Thai,
Are these characters encoded directly in the JSP or loaded via message 
bundles? How are they being output to the browser? What encoding are you 
using for the output? UTF-8? The default (ISO-8859-1) will not display 
these characters correctly.

Brice
--
Brice Ruth, Sr. IT Analyst
Fiskars Brands Inc
http://www.fiskarsbrands.com/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Jspc and Taglibs

2004-08-05 Thread Thai DANG
I made several measure, had a look to the generate code by Jspc.

It is clear that Taglibs reduce the performance (memory, speed) of your server.
Speed because the first time access is longer and memory because a pool system is 
there to make the next pages being displayed quicker.

So, as a developper, I'm wondering if the Tomcat gurus are aware of all of that and if 
they are taken some actions.
For example, I think that it is a (good or bad ?) idea to try to transform the taglibs 
instructions into scriptlets (like preprocessing in C) and then compile the JSP pages.

I am using JSTL recently and I am happy because my JSP are now scriptlet-less BUT the 
performance are hit.
I tried a few days to make a preloading system to fill the different pool, but it not 
seems possible. Anyway, I'll keep
JSTL because it is a good choice for maintaining easier your JSP.


I think there are a few steps to make all that very powerfull. What do you think ?

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



RE: Tomcat does not see web.xml, which is the part of the war file

2004-08-05 Thread Piotr Galecki
Hi Yoav,

Here is the war file content:

C:\JavaAdvTopics\edu\brandeis\PiotrGalecki\Homework2\login\dist\lib\JBuilderX\j
dk1.4\bin\jar.exe tvf login.war
 0 Thu Aug 05 18:49:28 EDT 2004 META-INF/
   106 Thu Aug 05 18:49:28 EDT 2004
META-INF/MANIFEST.MF
 0 Thu Aug 05 00:26:04 EDT 2004 WEB-INF/
  8481 Tue Jul 02 02:32:24 EDT 2002
WEB-INF/struts-bean.tld
  3629 Thu Aug 05 00:09:52 EDT 2004
WEB-INF/struts-config.xml
 59225 Tue Jul 02 02:32:24 EDT 2002
WEB-INF/struts-html.tld
 13871 Tue Jul 02 02:32:24 EDT 2002
WEB-INF/struts-logic.tld
  1466 Thu Aug 05 01:17:10 EDT 2004 WEB-INF/web.xml
   663 Wed Aug 04 23:30:26 EDT 2004 login.jsp
 0 Thu Aug 05 18:49:30 EDT 2004 WEB-INF/classes/
 0 Thu Aug 05 00:21:56 EDT 2004
WEB-INF/classes/edu/
 0 Thu Aug 05 00:21:56 EDT 2004
WEB-INF/classes/edu/brandeis/
 0 Thu Aug 05 00:21:56 EDT 2004
WEB-INF/classes/edu/brandeis/PiotrGalecki/
 0 Thu Aug 05 00:21:56 EDT 2004
WEB-INF/classes/edu/brandeis/PiotrGalecki/Ho
mework2/
 0 Thu Aug 05 00:21:56 EDT 2004
WEB-INF/classes/edu/brandeis/PiotrGalecki/Ho
mework2/login/
 0 Thu Aug 05 00:21:56 EDT 2004
WEB-INF/classes/edu/brandeis/PiotrGalecki/Ho
mework2/login/src/
  1249 Thu Aug 05 18:49:28 EDT 2004
WEB-INF/classes/edu/brandeis/PiotrGalecki/Ho
mework2/login/src/LoginAction.class
   637 Thu Aug 05 18:49:28 EDT 2004
WEB-INF/classes/edu/brandeis/PiotrGalecki/Ho
mework2/login/src/LoginForm.class
 0 Thu Aug 05 18:49:30 EDT 2004 WEB-INF/lib/
485731 Mon Dec 30 22:37:52 EST 2002
WEB-INF/lib/struts.jar

C:\JavaAdvTopics\edu\brandeis\PiotrGalecki\Homework2\login\dist\lib

- Piotr

--- Shapira, Yoav [EMAIL PROTECTED] wrote:

 
 Hi,
 Post your WAR file structure (obtainable from a jar
 tvf command).
 
 Yoav Shapira
 Millennium Research Informatics
 
 
 -Original Message-
 From: Piotr Galecki [mailto:[EMAIL PROTECTED]
 Sent: Thursday, August 05, 2004 4:21 PM
 To: [EMAIL PROTECTED]
 Subject: Tomcat does not see web.xml, which is the
 part of the war file
 
 I'm having a problem with Tomcat, which doesn't see
 the web.xml file,
 when processing a war file.
 I checked many times - the web.xml file is in the
 war
 file, which is created by ant.
 However, when the war file is deployed,
 Tomcat complains that web.xml is not there.
 Here is the Tomcat log:
 
 INFO: Installing web application at context path
 /login from URL file:D:/Program
 Files/Apache Software Foundation/Tomcat
 5.0/webapps/login
 Aug 5, 2004 1:57:03 AM java.util.jar.Attributes
 read
 WARNING: Duplicate name in Manifest: Class-Path
 Aug 5, 2004 1:57:03 AM java.util.jar.Attributes
 read
 WARNING: Duplicate name in Manifest: Class-Path
 Aug 5, 2004 1:57:03 AM java.util.jar.Attributes
 read
 WARNING: Duplicate name in Manifest: Class-Path
 Aug 5, 2004 1:57:03 AM java.util.jar.Attributes
 read
 WARNING: Duplicate name in Manifest: Class-Path
 Aug 5, 2004 1:57:03 AM java.util.jar.Attributes
 read
 WARNING: Duplicate name in Manifest: Class-Path
 Aug 5, 2004 1:57:03 AM java.util.jar.Attributes
 read
 WARNING: Duplicate name in Manifest: Class-Path
 Aug 5, 2004 1:57:03 AM java.util.jar.Attributes
 read
 WARNING: Duplicate name in Manifest: Class-Path
 Aug 5, 2004 1:57:03 AM
 org.apache.catalina.startup.ContextConfig
 applicationConfig
 INFO: Missing application web.xml, using defaults
 only
 StandardEngine

[Catalina].StandardHost[localhost].StandardContext[/login]
 
 What could be the problem here?
 
 Any help is appreciated,
 Piotr
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 
 
 
 This e-mail, including any attachments, is a
 confidential business communication, and may contain
 information that is confidential, proprietary and/or
 privileged.  This e-mail is intended only for the
 individual(s) to whom it is addressed, and may not
 be saved, copied, printed, disclosed or used by
 anyone else.  If you are not the(an) intended
 recipient, please immediately delete this e-mail
 from your computer system and notify the sender. 
 Thank you.
 
 

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


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



Re: Recursion in JSP

2004-08-05 Thread Makoto Nagata
Hi Andrew,
If what you need is to call JSPs recursively, MicroNova YUZU tag library
(http://sourceforge.net/projects/micronova-yuzu) supports recursion
passing arbitrary (non-string) objects using m:call and m:param tags
like this:
m:param var=input/
tag:tree
  c:forEach var=child items=${input.root.children}
m:call path=dfs.jsp
  m:set property=root value=${child}/
/m:call
  /c:forEach
/tag:tree
Hope this helps.
Best Regards,  Makoto Nagata
Andrew Janian wrote:
Does anyone know if I am able to use recursion to traverse a tree but then to use a 
tag inside the recursive method?  If that was unclear, I want to know if I can do this:
%!
void dfs(Node root){
%
tag:tree
%!
Vector children = root.getChildren();
for(int i=0; ichildren.size(); i++){
dfs((Node)(children.elementAt(i)));
}
%
/tag:tree
%!
}
%
Thanks,
Andrew Janian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


Re: ajp over ssl

2004-08-05 Thread Antonio Fiol Bonnín
Ralph Einfeldt wrote:
some other approaches:
- cryptcat
 http://farm9.org/Cryptcat/GetCryptcat.php
- openvpn
 http://openvpn.sourceforge.net/
- tinc
 http://www.tinc-vpn.org/
- CIPE
 http://sites.inka.de/sites/bigred/devel/cipe.html
 


What about stunnel?
Forwarding an insecure port securely from one machine to another.
http://www.stunnel.org/examples/generic_tunnel.html
Not sure if it will get through the list, so I CC'ed the original poster.
Antonio Fiol


smime.p7s
Description: S/MIME Cryptographic Signature