source for JDBCRealm?

2005-02-09 Thread Stephen Charles Huey
I've been looking around the Apache/Jakarta site, and I can't find the
Realm-related stuff (I understand it's separate from Tomcat).  We're
running Tomcat 4, and I'd like to hack the query JDBCRealm sends to
Oracle so username checks are not case insensitive.  Btw, which JAR in
my Tomcat directories is related to JDBCRealm?  Thanks...

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



case sensitivity with JDBCRealm

2005-02-08 Thread Stephen Charles Huey
Here's our server.xml's Realm element:

Realm  className=org.apache.catalina.realm.JDBCRealm debug=99
driverName=oracle.jdbc.driver.OracleDriver
connectionURL=jdbc:oracle:thin:@192.168.1.144:1523:orcl
connectionName=scott connectionPassword=tiger userTable=users
userNameCol=username userCredCol=password userRoleTable=roles
roleNameCol=role /

Basically out of the textbook...but the problem is, we're moving from
MySQL to Oracle, and the MySQL database wasn't case sensitive when
checking the username.  Is there any way to turn off case sensitivity on
the JDBCRealm side of things when checking the username in the Oracle
database?

Thanks...

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



certificate question for 2 domains pointing to same website

2005-02-04 Thread Stephen Charles Huey
Right now, we have one domain that goes to our web application, and we
want to another new domain to point to the same web app (it already
does).  Naturally, if you access the site via the new domain, it tells
the browser that the certificate issued by the site doesn't match the
name of the site, so we're looking into getting an additional
certificate.  

If we do this and get that new certificate into the keystore used by our
Tomcat 4, will everything be fine, or will Tomcat present 2 certificates
to users accessing the site?  I mean, will it correctly present the
certificate for the old domain to the user when they go to the old
domain, and the new certificate to those entering via the new domain?  

Thanks,
Stephen

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



Re: AW: certificate question for 2 domains pointing to same website

2005-02-04 Thread Stephen Charles Huey
Wait a second...Tomcat will determine which cert to send down based upon
the IP address that the browser went to?  I guess that makes sense...so
does the web server never get to see what domain the browser was looking
up to come to the site, or is that info available?  

I'm just trying to figure out if there's a way to run the website for a
limited time with 2 domains and 2 certs--I mean, the 2 domains, each
with their own cert, but with one single public IP address.  We have a
bigIP load balancer in front of our Tomcat servers...so do our Tomcat
servers still see the public IP address that was used to reach them?  I
ask because those boxes only have private IPs, and the load balancer has
the only public IP.  

If there's no way to do it, then I guess we just arbitrarily switch at
some point and don't worry about the people using the old domain seeing
invalid certificate messages...




- Original message -
From: Steffen Heil [EMAIL PROTECTED]
To: 'Tomcat Users List' tomcat-user@jakarta.apache.org
Date: Sat, 5 Feb 2005 01:26:00 +0100
Subject: AW: certificate question for 2 domains pointing to same website

Hi

 If we do this and get that new certificate into the keystore 
 used by our Tomcat 4, will everything be fine, or will Tomcat 
 present 2 certificates to users accessing the site?  I mean, 
 will it correctly present the certificate for the old domain 
 to the user when they go to the old domain, and the new 
 certificate to those entering via the new domain?

No.
This is impossible.
The information which domain is used is already encrypted.

So if you need 2 certs, you need 2 ips.
If you configure 2 ips with 2 connectors and 2 certs, everything is
fine.

Regards,
  Steffen

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



SocketException: Too many open files

2005-02-01 Thread Stephen Charles Huey
I'm running some simple but fast-pounding test programs against our
Tomcat server from a machine on the same network, and we've been tuning
our database, etc, based on this.  But right now, I'm seeing a new one
coming out of our Java code whenever we try to open a URL:


java.net.SocketException: Too many open files
at java.net.Socket.createImpl(Socket.java:331)
at java.net.Socket.connect(Socket.java:450)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.init(DashoA12275)
at 
com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(DashoA12275)
at sun.net.www.protocol.https.HttpsClient.doConnect(DashoA12275)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
at sun.net.www.protocol.https.HttpsClient.init(DashoA12275)
at sun.net.www.protocol.https.HttpsClient.a(DashoA12275)
at sun.net.www.protocol.https.HttpsClient.a(DashoA12275)
at sun.net.www.protocol.https.HttpsClient.a(DashoA12275)
at 
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.plainConnect(DashoA12275)
at 
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(DashoA12275)
at 
sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(DashoA12275)



We're opening lots of these, and it appears we're opening more than a
maximum number of connections to the internet.  Is there a way to bump
this up?  Or maybe we're just pounding this harder than it will ever get
hit in the real world?  I'm also seeing this as well:





SEVERE: Endpoint ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=80]
ignored exception: java.net.SocketException: Too many open files
java.net.SocketException: Too many open files
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
at java.net.ServerSocket.implAccept(ServerSocket.java:448)
at java.net.ServerSocket.accept(ServerSocket.java:419)
at 
org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:107)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:356)
at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:529)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)
Feb 1, 2005 4:53:08 PM org.apache.tomcat.util.net.PoolTcpEndpoint
closeServerSocket
SEVERE: Caught exception trying to unlock accept.
java.net.SocketException: Too many open files
at java.net.Socket.createImpl(Socket.java:331)
at java.net.Socket.init(Socket.java:304)
at java.net.Socket.init(Socket.java:124)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.closeServerSocket(PoolTcpEndpoint.java:326)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:397)
at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:529)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)
Feb 1, 2005 4:53:08 PM org.apache.tomcat.util.net.PoolTcpEndpoint
acceptSocket
WARNING: Reinitializing ServerSocket


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



Re: SocketException: Too many open files

2005-02-01 Thread Stephen Charles Huey
Do other Tomcat users often need to raise this limit on Linux?  In
addition to talking to website users, our Tomcat also has to talk to
another web server elsewhere on the internet to verify a lot of stuff...


- Original message -
From: Remy Maucherat [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Date: Wed, 2 Feb 2005 00:52:56 +0100
Subject: Re: SocketException: Too many open files

On Tue, 01 Feb 2005 17:29:51 -0600, Stephen Charles Huey
[EMAIL PROTECTED] wrote:
 I'm running some simple but fast-pounding test programs against our
 Tomcat server from a machine on the same network, and we've been tuning
 our database, etc, based on this.  But right now, I'm seeing a new one
 coming out of our Java code whenever we try to open a URL:
 
 java.net.SocketException: Too many open files

If you're on Linux, use ulimit -a to see what the limits are, and
ulimit -n to change the value. However, only root is allowed to get
more than 1024 files (does somebody knows why ?).


-- 
x
R#233;my Maucherat
Developer  Consultant
JBoss Group (Europe) S#224;RL
x

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



Emergency: make Tomcat forward

2005-01-24 Thread Stephen Charles Huey
I have Tomcat 4.1.27 on a Linux box at a particular public IP address,
and I want to make it forward ALL requests to a Tomcat on a Windows box
at another public IP address.  Over the weekend, we changed the DNS to
the Linux box, but now we need to roll back to the Windows box, and we
already changed the DNS through our ISP, and a lot of folks are hitting
the Windows box, but some people are still hitting the Linux one.  So,
we want to turn on the Tomcat on the Linux box and somehow send all
those folks to the Windows one.  

Is there any way to do this?  


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



Does JDBCRealm close connections?

2005-01-24 Thread Stephen Charles Huey
Hey there--just wondering if JDBCRealm with Tomcat 4 ever closes
connections it opens...I'm assuming it can open up more than one
connection to the database if traffic gets heavy (because we think we're
seeing that, though it's hard to tell for sure).  If so, when does it go
about closing those connections?  I was reading about it here:
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/realm-howto.html#JDBCRealm

We're trying to debug a nasty problem, and we're wondering if a couple
hundred folks try to log in at the same time and there are only about
that many database connections that can be pooled (and a bunch of the db
connections are already in use by the web app), then does JDBCRealm just
keep opening up more and more connections to the database?  

Thanks,
Stephen

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



how many connections can tomcat handle?

2005-01-18 Thread Stephen Charles Huey
We're running Tomcat 4.1.27 on a pretty up-to-date Red Hat 8.  I'm
wondering what usually determines the number of connections Tomcat can
handle.  Would it typically be Tomcat breaking first, or just the server
itself trying to deal with so many connections?  Would it have to do
with memory, or processing power, or some other physical limitation?  

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



Tomcat 4 doesn't start http service on Linux?

2005-01-17 Thread Stephen Charles Huey
We just installed Tomcat 4 on 2 Red Hat servers, and we have a BigIP
load balancer in front of them.  In troubleshooting an issue, the guy
working with our BigIP said that when he was running Apache on either of
the Linux servers, the load balancer could tell that the http service
was running, but when Tomcat was running, it didn't know what to check
for on a service level, so in the end, they had to set it up to just do
a TCP check to see if the port was open.  

He says this isn't ideal since the port being open doesn't mean the
service is up (meaning Tomcat).  He thinks that Tomcat should start up
the http service (I guess he means httpd) when it starts--that maybe I
just need to look around in Tomcat's configuration for the place to set
this, but I'm not so sure that this is the case.  

In a nutshell:  is Tomcat supposed to start up the http service or
something similar to what BigIP is looking for from Apache?  

Thanks...

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



question on session info in manager webapp

2005-01-17 Thread Stephen Charles Huey
When I go to /manager/html and then click on the session count for one
of my webapps, it displays this:

OK - Session information for application at context path /testwebapp
Default maximum session inactive interval 30 minutes
120 - 130 minutes:4 sessions

If the default timeout is set to 30 minutes, why does it say 120 - 130
minutes?  When I look at other examples online where the default timeout
is set to 30 minutes, the 3rd line on those examples says 30 - 40
minutes.  So what does this mean?  That 4 sessions have been created in
the last couple of hours?  Why does it show it for a whole 2 hours
instead of just for the last half hour or whatever?  

Thanks,
Stephen

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



heap size params on linux

2005-01-03 Thread Stephen Charles Huey
Our script for installing Tomcat as a service on Windows is down below. 
We're moving to Linux, so I'm wondering where we specify the heap size
parameters (-Xmx and -Xms) for the Tomcat on Linux.  Would the correct
place be in the startup.sh file?  Thanks!


D:\tomcat\bin\tomcat.exe -install Apache_Tomcat
C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll -server -Xmx1536m -Xms1536m
-Djava.class.path=D:\Tomcat\bin\bootstrap.jar
-Dcatalina.home=D:\Tomcat
-Djava.endorsed.dirs=D:\Tomcat\common\endorsed -start
org.apache.catalina.startup.BootstrapService -params start -stop
org.apache.catalina.startup.BootstrapService -params stop -out
D:\Tomcat\logs\stdout.log -err D:\Tomcat\logs\stderr.log
pause

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



Re: heap size params on linux

2005-01-03 Thread Stephen Charles Huey
I see that JAVA_OPTS is mentioned in there quite a few times, so where
exactly can I put set JAVA_OPTS=-Xmx1536m?  Also, do I need to do both
the initial and max in one line?

E.g.  set JAVA_OPTS= -Xmx1536m -Xms1536m (with nothing on the end of the
line?)

Does the -server option go with JAVA_OPTS as well?

Thanks...


- Original message -
From: Ben Souther [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Date: Mon, 03 Jan 2005 14:41:07 -0500
Subject: Re: heap size params on linux

I do it from catalina.sh 

From the header comments.
22 #   JAVA_OPTS (Optional) Java runtime options used when the start,
23 #   stop, or run command is executed.
24 #




On Mon, 2005-01-03 at 14:38, Stephen Charles Huey wrote:
 Our script for installing Tomcat as a service on Windows is down below. 
 We're moving to Linux, so I'm wondering where we specify the heap size
 parameters (-Xmx and -Xms) for the Tomcat on Linux.  Would the correct
 place be in the startup.sh file?  Thanks!
 
 
 D:\tomcat\bin\tomcat.exe -install Apache_Tomcat
 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll -server -Xmx1536m -Xms1536m
 -Djava.class.path=D:\Tomcat\bin\bootstrap.jar
 -Dcatalina.home=D:\Tomcat
 -Djava.endorsed.dirs=D:\Tomcat\common\endorsed -start
 org.apache.catalina.startup.BootstrapService -params start -stop
 org.apache.catalina.startup.BootstrapService -params stop -out
 D:\Tomcat\logs\stdout.log -err D:\Tomcat\logs\stderr.log
 pause
 
 -
 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]



load balance with tomcat

2004-12-29 Thread Stephen Charles Huey
We're trying to install our existing web app on multiple machines and
put a BigIP load balancer in front of them.  Do we need to do anything
different with Tomcat and/or our web app to get this load balancing to
work, or should we basically be able to copy the Tomcat directory onto
each machine and go?  

The reason I ask is because if we access each web server directly via a
public IP address, we can use the web app.  However, if we try to go
through the BigIP's public address, it won't work (and we're trying to
figure out why).  

We're using Tomcat 4.  Thanks for any tips...

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



Where do I specify location of stdout and stderr?

2004-12-28 Thread Stephen Charles Huey
I'm trying to move my Tomcat directory from a Windows machine to a Linux
box, and I've already modified the server.xml to take care of path
differences, but I've noticed that stdout.log and stderr.log are no
longer being generated in the logs directory (I can't find them!).  Does
anyone have any idea where this would normally be?  I've also tried to
WinGrep for them in my app code, but so far nothing...

I see this in my server.xml, but this doesn't seem to be related to the
stderr and stdout log files:  


!-- Logger shared by all Contexts related to this virtual host.
 By default (when using FileLogger), log files are created in
the logs directory relative to $CATALINA_HOME.  If you wish,
you can specify a different directory with the directory
attribute.  Specify either a relative (to $CATALINA_HOME) or
absolute path to the desired directory.--

Logger className=org.apache.catalina.logger.FileLogger
directory=logs  prefix=localhost_log. suffix=.txt
timestamp=true/


Those log files mentioned above are being generated, but it doesn't
really make sense that I would need to add a node here for the stdout
and stderr ones if they're already being generated on the Windows box
without being mentioned in server.xml...

Thanks for any help...


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



Re: Where do I specify location of stdout and stderr?

2004-12-28 Thread Stephen Charles Huey
Ok, I just figured out that for the Windows box, we specified the
location of the files that the stdout and stderr get routed into in the
service install script.  However, we're not using any service install
script on Linux (should we be doing that?), so where can I specify that
all the stdout and stderr should go into some particular log files
instead of getting lost into thin air?  We need those log files,
particularly when we're troubleshooting!  Thanks...




- Original message -
From: Stephen Charles Huey [EMAIL PROTECTED]
To: Tomcat User tomcat-user@jakarta.apache.org
Date: Tue, 28 Dec 2004 15:40:09 -0600
Subject: Where do I specify location of stdout and stderr?

I'm trying to move my Tomcat directory from a Windows machine to a Linux
box, and I've already modified the server.xml to take care of path
differences, but I've noticed that stdout.log and stderr.log are no
longer being generated in the logs directory (I can't find them!).  Does
anyone have any idea where this would normally be?  I've also tried to
WinGrep for them in my app code, but so far nothing...

I see this in my server.xml, but this doesn't seem to be related to the
stderr and stdout log files:  


!-- Logger shared by all Contexts related to this virtual host.
 By default (when using FileLogger), log files are created in
the logs directory relative to $CATALINA_HOME.  If you wish,
you can specify a different directory with the directory
attribute.  Specify either a relative (to $CATALINA_HOME) or
absolute path to the desired directory.--

Logger className=org.apache.catalina.logger.FileLogger
directory=logs  prefix=localhost_log. suffix=.txt
timestamp=true/


Those log files mentioned above are being generated, but it doesn't
really make sense that I would need to add a node here for the stdout
and stderr ones if they're already being generated on the Windows box
without being mentioned in server.xml...

Thanks for any help...


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



maxActive in server.xml's ResourceParams

2004-12-13 Thread Stephen Charles Huey
In Tomcat 4's server.xml, one of the ResourceParams elements is
maxActive (set to 20 by default).  I'm wondering if there's any reason
why I wouldn't set this very high if I have a virtually unlimited number
of users for our Oracle database...I'm not sure how much this applies to
us since I don't believe we're using built-in connection pooling (we're
using some slightly customized classes--nothing nonstandard, though). 
Anyway, thanks for any tips...

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



what to do about port for Tomcat 4 on Linux?

2004-12-08 Thread Stephen Charles Huey
I want to move to Tomcat 5 right now, but can't yet, and for the time
being we need to move from Tomcat 4.1.23 on Windows to 4.1.31 on Red
Hat, so I'm now facing a question of what to do about the port Tomcat
runs on.  I've read stuff online that suggests it's best to leave it at
8080 since 80 is a privileged port on *nix.  

But from that point, I'm not sure what the best practice would be,
though I've read different options, like user space port forwarding,
kernal space port forwarding, or using a port forwarder (portfwd or
redir4a), none of which I'm familiar with.  What do you Tomcat users
suggest would be a good approach for someone who's only a
beginner/intermediate with Linux and using standalone Tomcat?  In case
it matters, note that we are also moving from our single Windows web
server to 2 Linux web servers (each running standalone Tomcat), and
we're trying to configure a load balancer hardware appliance in front of
the two web servers.  

Thanks for your suggestions,
Stephen

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



load balance standalone tomcat 4

2004-12-08 Thread Stephen Charles Huey
Is it actually possible to use a load balancing appliance (Big IP) with
a couple of web servers running standalone Tomcat 4?  Actually, I know
it's possible...what I mean is, do I have to do anything special with
Tomcat, or can I set each Tomcat up as if it was the only server, and
then just put the load balancing appliance in front of them?

The reason I'm a bit paranoid is because I've caught glimpses of things
like Tomcat clustering, which sounds like a lot more work!

Thanks,
Stephen

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



help with out of memory error

2004-11-22 Thread Stephen Charles Huey
Is this just a really ambiguous error message, or are there some
specific places I can be hunting for an issue:

Nov 22, 2004 3:53:42 PM
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run
SEVERE: Caught exception executing
[EMAIL PROTECTED], terminating thread
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start(Native Method)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.init(ThreadPool.java:582)
at 
org.apache.tomcat.util.threads.ThreadPool.openThreads(ThreadPool.java:460)
at org.apache.tomcat.util.threads.ThreadPool.runIt(ThreadPool.java:293)
at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:536)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)



Less than half of the 3GB of RAM on our Win2000 box was in use, and only
about 300MB was in use by Tomcat, and the site was just giving us a The
page cannot be displayed error when we would try to log into it, and
yet, the database was being updated by the web application (apparently,
one or more users had had a long operation started).  In other words, it
seemed like Tomcat/the web app was partially running, but not letting
anyone else in, or something like that.  

How do we troubleshoot this?  We allocate about 1.5GB to the JVM (for
initial and max heap size).   

Thanks,
Stephen

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



RE: help with out of memory error

2004-11-22 Thread Stephen Charles Huey
I've seen most of that info before, but thanks for pointing it out.  I'm
really kind of clueless about what the problem could be.  When I look at
the Virtual Memory for Tomcat in the Task Manager, I see about 1.6 GB
right now (whereas regular memory for Tomcat is about 300 MB).  For
Java, regular memory is currently 11 MB and Virtual Memory is 16 MB in
the production environment, but I guess none of that info is very
significant.  And as I said, I've never seen the memory usage very high
when we've run into this problem.  

Can you see anything wrong with our installation of Tomcat as a service
down below?  Thanks...


D:\tomcat\bin\tomcat.exe -install Apache_Tomcat
C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll -server -Xmx1536m -Xms1536m
-Djava.class.path=D:\Tomcat\bin\bootstrap.jar
-Dcatalina.home=D:\Tomcat
-Djava.endorsed.dirs=D:\Tomcat\common\endorsed -start
org.apache.catalina.startup.BootstrapService -params start -stop
org.apache.catalina.startup.BootstrapService -params stop -out
D:\Tomcat\logs\stdout.log -err D:\Tomcat\logs\stderr.log





- Original message -
From: Phillip Qin [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Date: Mon, 22 Nov 2004 16:56:25 -0500
Subject: RE: help with out of memory error

Have you looked at this page?

http://jakarta.apache.org/tomcat/faq/memory.html



-Original Message-
From: Stephen Charles Huey [mailto:[EMAIL PROTECTED] 
Sent: November 22, 2004 4:50 PM
To: Tomcat User
Subject: help with out of memory error


Is this just a really ambiguous error message, or are there some
specific
places I can be hunting for an issue:

Nov 22, 2004 3:53:42 PM
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run
SEVERE: Caught exception executing
[EMAIL PROTECTED], terminating thread
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start(Native Method)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.init(ThreadPool.
java:582)
at
org.apache.tomcat.util.threads.ThreadPool.openThreads(ThreadPool.java:460)
at
org.apache.tomcat.util.threads.ThreadPool.runIt(ThreadPool.java:293)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:536)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)
at java.lang.Thread.run(Thread.java:534)



Less than half of the 3GB of RAM on our Win2000 box was in use, and only
about 300MB was in use by Tomcat, and the site was just giving us a The
page cannot be displayed error when we would try to log into it, and
yet,
the database was being updated by the web application (apparently, one
or
more users had had a long operation started).  In other words, it seemed
like Tomcat/the web app was partially running, but not letting anyone
else
in, or something like that.  

How do we troubleshoot this?  We allocate about 1.5GB to the JVM (for
initial and max heap size).   

Thanks,
Stephen

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


!DSPAM:41a25ef9128851503898241!

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



problem - BindException: JVM_Bind: 80

2004-11-10 Thread Stephen Charles Huey
I'm seeing a strange error message.  We only run Tomcat as a service on
Windows 2000, and no IIS or anything else, so I can't see anything else
holding onto port 80.  Any idea what would be causing this?  Would it be
something as simple as choosing to Start or Restart the service when
it's already started and Tomcat isn't releasing hold of port 80 as it
stops and restarts?


Catalina.start: LifecycleException:  Protocol handler initialization
failed: java.net.BindException: Address already in use: JVM_Bind:80
LifecycleException:  Protocol handler initialization failed:
java.net.BindException: Address already in use: JVM_Bind:80
at 
org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:1119)
at 
org.apache.catalina.core.StandardService.initialize(StandardService.java:579)
at 
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:2246)
at 
org.apache.catalina.startup.CatalinaService.load(CatalinaService.java:236)
at 
org.apache.catalina.startup.CatalinaService.load(CatalinaService.java:258)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.apache.catalina.startup.BootstrapService.init(BootstrapService.java:231)
at 
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:297)
Bootstrap: Starting service
Starting service Tomcat-Standalone
Apache Tomcat/4.1.24-LE-jdk14
Catalina.start: LifecycleException:  Protocol handler start failed:
java.net.BindException: Address already in use: JVM_Bind:80
LifecycleException:  Protocol handler start failed:
java.net.BindException: Address already in use: JVM_Bind:80
at 
org.apache.coyote.tomcat4.CoyoteConnector.start(CoyoteConnector.java:1143)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:506)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
at 
org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:273)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.apache.catalina.startup.BootstrapService.start(BootstrapService.java:245)
at 
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:307)
Bootstrap: Service started

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



The CreateThread function failed for the following reason: Not enough storage is available to process this command.

2004-10-27 Thread Stephen Charles Huey
In the Event log on Windows 2000 Server, we're occasionally seeing a
weird error showing up for Apache Tomcat 4.27:

The CreateThread function failed for the following reason: Not enough
storage is available to process this command.
. 

We really don't know what's causing this.  Is Tomcat (or Java) low on
memory?  You'd think we'd know, but we don't, because by the time this
error pops up, the problem is no doubt over with.  We do have to restart
Tomcat for what we think are unrelated reasons...however, if Tomcat/Java
is running out of memory, then that definitely throws a kink in our
theory..

Thanks for any help!

Stephen

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



memory problem?

2004-10-27 Thread Stephen Charles Huey
We often have to restart Tomcat because of an ODBC issue (yes, we're
switching databases as soon as we can).  However, I've noticed this
error occuring in the Windows 2000 Event Log in association with Apache
Tomcat:

The CreateThread function failed for the following reason: Not enough
storage is available to process this command.
. 

It can show up a few times per day, or only every once in a while.  From
what I can tell by Googling around, this error message might actually
have to do with us running out of system memory!  However, I'm not
certain, so I'm wondering if this means that Tomcat/JVM is running out
of memory, or Windows is (in which case Tomcat would too, of course). 
In either case, does does this mean we need to move to clustering or
whatever?  The machine has about 3GB of RAM and the JVM gets half of
that allocated to it.  

Thanks for any advice,
Stephen

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



is tomcat failing?

2004-10-06 Thread Stephen Charles Huey
We're using Tomcat 4.1.27 and we have a main database that the web app
uses most of the time, and then a small MySQL database that Tomcat is
configured to use for basic authentication.  We used to have trouble
with the main db hanging up on us, so we had a little watch program
running to restart Tomcat to reset the db connections whenever it could
no longer open a JSP that performed some minor db access, but now we've
resolved that problem.  However, Tomcat still hangs on us (albeit less
frequently), and now we're wondering if this issue is completely
different.  

Could MySQL be hanging on us, or is it Tomcat?  For a while we've been
thinking it was MySQL, but couldn't test it very easily.  Today, I was
browsing the site, and all of a sudden some images stopped loading (only
some, not all), and some of the text sizes were weird, meaning it seemed
like the stylesheet wasn't loading.  Right after this, our site went
down as it does a few times every day, and we had to restart Tomcat. 
Often when we have to restart it, we have to restart it again a short
time later (during peak time).  

Any ideas as to what's going on here?  

Thanks,
Stephen

P.S.  I decided to play with Tomcat 5 a few months ago, but got annoyed
at all the changes necessary to reconfigure our web app, so I put it
aside without finishing it.  Do we need that, or just a later version of
Tomcat 4, or what?  

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



basic authentication

2004-10-04 Thread Stephen Charles Huey
Anybody have a clue as to why my basic authentication box would keep
coming back at me 2-6 times before letting me in, even though I'm typing
the correct username and password every single time?  This is Tomcat
4.1.27

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



RE: type in twice for basic authentication???

2004-10-03 Thread Stephen Charles Huey
Tomcat 4.1.27 -- please help!


- Original message -
From: Mark Thomas [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Date: Sat, 2 Oct 2004 10:03:49 +0100
Subject: RE: type in twice for basic authentication???

What version of tomcat? 

 -Original Message-
 From: Stephen Charles Huey [mailto:[EMAIL PROTECTED] 
 Sent: Friday, October 01, 2004 11:38 PM
 To: Tomcat Users List
 Subject: Re: type in twice for basic authentication???
 
 Yeah, I need some major help on this to figure out what's 
 going on!  We
 have a Windows version and a Linux version of the database.  I just
 changed my DSN over to the Linux one, and now it pops up 4 
 times!!!  No,
 wait...sometimes it still logs you in just after 2 times, and 
 sometimes
 it takes as many as 6!  Also, sometimes when browsing the 
 site, it makes
 you log in again in places where it didn't used to.  
 
 You see, we have a main database that drives our web app, but 
 we've been
 using a MySQL db to authenticate, and we'd like to get rid of 
 that so we
 can just deal with one database.  However, our main database 
 is behaving
 strangely.  Now, when clicking over to some of the other JSPs in the
 site, it will pop up and ask for the username and password in 
 places it
 didn't used to do that (and no, it shouldn't be changing contexts or
 anything like that).
 
 
 
 - Original message -
 From: Stephen Charles Huey [EMAIL PROTECTED]
 To: Tomcat User [EMAIL PROTECTED]
 Date: Fri, 01 Oct 2004 17:10:32 -0500
 Subject: type in twice for basic authentication???
 
 When my web app pops up a basic authentication box, I type in the
 username and password, and then it bounces back with blank text boxes
 asking for it again.  Every time when I type them in a second time it
 then lets me in!  What's going on?  Here's what I have in my 
 server.xml:
 
 
 Realm  className=org.apache.catalina.realm.JDBCRealm debug=99
 driverName=sun.jdbc.odbc.JdbcOdbcDriver
 connectionURL=jdbc:odbc:dbname
 userTable=users userNameCol=userid userCredCol=password
 userRoleTable=roles roleNameCol=role /
 
 -
 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]



type in twice for basic authentication???

2004-10-01 Thread Stephen Charles Huey
When my web app pops up a basic authentication box, I type in the
username and password, and then it bounces back with blank text boxes
asking for it again.  Every time when I type them in a second time it
then lets me in!  What's going on?  Here's what I have in my server.xml:


Realm  className=org.apache.catalina.realm.JDBCRealm debug=99
driverName=sun.jdbc.odbc.JdbcOdbcDriver
connectionURL=jdbc:odbc:dbname
userTable=users userNameCol=userid userCredCol=password
userRoleTable=roles roleNameCol=role /

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



Re: type in twice for basic authentication???

2004-10-01 Thread Stephen Charles Huey
Yeah, I need some major help on this to figure out what's going on!  We
have a Windows version and a Linux version of the database.  I just
changed my DSN over to the Linux one, and now it pops up 4 times!!!  No,
wait...sometimes it still logs you in just after 2 times, and sometimes
it takes as many as 6!  Also, sometimes when browsing the site, it makes
you log in again in places where it didn't used to.  

You see, we have a main database that drives our web app, but we've been
using a MySQL db to authenticate, and we'd like to get rid of that so we
can just deal with one database.  However, our main database is behaving
strangely.  Now, when clicking over to some of the other JSPs in the
site, it will pop up and ask for the username and password in places it
didn't used to do that (and no, it shouldn't be changing contexts or
anything like that).



- Original message -
From: Stephen Charles Huey [EMAIL PROTECTED]
To: Tomcat User [EMAIL PROTECTED]
Date: Fri, 01 Oct 2004 17:10:32 -0500
Subject: type in twice for basic authentication???

When my web app pops up a basic authentication box, I type in the
username and password, and then it bounces back with blank text boxes
asking for it again.  Every time when I type them in a second time it
then lets me in!  What's going on?  Here's what I have in my server.xml:


Realm  className=org.apache.catalina.realm.JDBCRealm debug=99
driverName=sun.jdbc.odbc.JdbcOdbcDriver
connectionURL=jdbc:odbc:dbname
userTable=users userNameCol=userid userCredCol=password
userRoleTable=roles roleNameCol=role /

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



website going down

2004-08-31 Thread Stephen Charles Huey
We had a problem where our website would hang because Tomcat couldn't
access the main database over DSN (on another machine), and it was a
problem with our vendor's ODBC driver, so we moved to the Linux version
(which was more stable).  We had created a Watchdog program that would
call a JSP with simple database access, and it would restart Tomcat
whenever the problem occurred (although that sometimes wasn't
sufficient--sometimes we would also have to go in and manually restart
the ODBC driver).  Anyway, our problems have lightened considerably, and
consequently our watchdog program doesn't have to do much, although from
once in a while it does restart Tomcat for us.  

However, we are now seeing a new problem.  The watchdog program will
keep going along as if there's no problem, and yet the website will be
hanging!  Because there was a problem in the early days of development
with using the main database for the basic authentication used to enter
our website, we set up a MySQL database on the same machine as Tomcat
and have it access that small database locally by telling it to use
JDBCRealm in our server.xml file.  The watchdog program doesn't access a
secure JSP, so it doesn't really have to log in.  

In other words, as far as I can see, Tomcat must be trying to go to
MySQL to pop up that basic authentication box, but the box never pops up
because I suppose MySQL is hanging for some reason.  Generally all we
have to do is restart Tomcat to get everything back to normal.  My
question is, do you know of any reason why MySQL would be doing this?  

Thanks,
Stephen

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



DBCP connection pooling by default?

2004-08-16 Thread Stephen Charles Huey
The 8th post in this Javaranch.com thread suggests that Tomcat uses DBCP
connection pooling by default:
http://www.midrangeserver.com/mpo/mpo081502-story04.html

That feature to indicate connection leaks sounds intriguing.  I found
the following in our server.xml and am wondering if this means we are
definitely using this Commons DBCP:

- !--  Define the top level container in our container hierarchy 
  -- 
- Engine name=Standalone defaultHost=localhost debug=0
- DefaultContext crossContext=true
  Resource name=jdbc/myResource auth=Container
  type=javax.sql.DataSource / 
- ResourceParams name=jdbc/myResource
- parameter
  namefactory/name 
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value 
  /parameter

I think we are NOT using it because we have some Java classes that are
intended to handle connection pooling, and they look similar to some of
the textbook ones floating around online.  I'm just wondering if there
would be connection pooling in place with the above XML if we didn't
somehow override that with our own connection pooling classes.  One
other thing is that we currently have to use the JDBC-ODBC bridge, so I
don't know if that would have anything to do with it.  

Thanks,
Stephen

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



Re: DBCP connection pooling by default?

2004-08-16 Thread Stephen Charles Huey
Whoops...I need an addendum.  The post can be found here:
http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topicf=13t=001073



- Original message -
From: Stephen Charles Huey [EMAIL PROTECTED]
To: Tomcat User [EMAIL PROTECTED]
Date: Mon, 16 Aug 2004 13:06:13 -0500
Subject: DBCP connection pooling by default?

The 8th post in this Javaranch.com thread suggests that Tomcat uses DBCP
connection pooling by default:
http://www.midrangeserver.com/mpo/mpo081502-story04.html

That feature to indicate connection leaks sounds intriguing.  I found
the following in our server.xml and am wondering if this means we are
definitely using this Commons DBCP:

- !--  Define the top level container in our container hierarchy 
  -- 
- Engine name=Standalone defaultHost=localhost debug=0
- DefaultContext crossContext=true
  Resource name=jdbc/myResource auth=Container
  type=javax.sql.DataSource / 
- ResourceParams name=jdbc/myResource
- parameter
  namefactory/name 
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value 
  /parameter

I think we are NOT using it because we have some Java classes that are
intended to handle connection pooling, and they look similar to some of
the textbook ones floating around online.  I'm just wondering if there
would be connection pooling in place with the above XML if we didn't
somehow override that with our own connection pooling classes.  One
other thing is that we currently have to use the JDBC-ODBC bridge, so I
don't know if that would have anything to do with it.  

Thanks,
Stephen

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



installing tomcat 4.1.27 on linux

2004-08-12 Thread Stephen Charles Huey
We're moving Tomcat over to a Linux box, and we're under pressure to get
it done as quickly as possible and put it into production right away
even though none of us knows Linux all that well beyond me using Solaris
back in my school days!  So, I'm looking for Tomcat 4.1.27 for Linux,
and I don't see that available here:

http://jakarta.apache.org/site/binindex.cgi

However, in searching around, I found this, and I'm wondering if this is
the right thing for me to be using:

http://rpmfind.net/linux/RPM/suse/9.0/i386/suse/i586/jakarta-tomcat-4.1.27-63.i586.html

I've heard about RPM only in the last day or so when looking around for
utilities for Linux.  I'll probably want the RPM version for Tomcat,
right?  This page talks about RPM:

http://www.rpm.org/

But I'm wondering if it comes with Red Hat 8 (I can't tell yet--my boss
is installing Red Hat across town and I'm just doing my homework so I'm
ready to roll when he's done with all the things he has to do on his
end).  

Thanks,
Stephen

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



Re: installing tomcat 4.1.27 on linux

2004-08-12 Thread Stephen Charles Huey
Sounds good to me!  Usually when we move Tomcat to a new Windows
machine, we just use that same executable zip
(jakarta-tomcat-4.1.27.exe) to install Tomcat on the new machine, and
then copy over our directories from the original machine to replace the
Tomcat directory that got created.  I know this might be a really dumb
question, but will that .exe file run and install everything on the
Linux box, or will I have to use jakarta-tomcat-4.1.27.zip and extract
everything?  It's all slowly and hazily making sense...I hope...on Red
Hat I won't have to install it quite as much as Windows which needs
to put things into the registries, etc, right?  So I just extract it and
put some kind of symbolic link to the Tomcat executable in usr/local/bin
or something like that, huh?  But will that be enough to mimic the
functionality we usually have, since typically on Windows we run it as a
service?  Sorry for my rambling...


- Original message -
From: Robert F. Hall [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Date: Thu, 12 Aug 2004 15:21:24 -0700
Subject: Re: installing tomcat 4.1.27 on linux

Howdy,

Tomcat is written in Java and is OS independent, you don't need a linux 
specific install.
We have the same Tomcat install running on Solaris, Linux, and Windoze.

-Robert

Stephen Charles Huey wrote:

We're moving Tomcat over to a Linux box, and we're under pressure to get
it done as quickly as possible and put it into production right away
even though none of us knows Linux all that well beyond me using Solaris
back in my school days!  So, I'm looking for Tomcat 4.1.27 for Linux,
and I don't see that available here:

http://jakarta.apache.org/site/binindex.cgi

However, in searching around, I found this, and I'm wondering if this is
the right thing for me to be using:

http://rpmfind.net/linux/RPM/suse/9.0/i386/suse/i586/jakarta-tomcat-4.1.27-63.i586.html

I've heard about RPM only in the last day or so when looking around for
utilities for Linux.  I'll probably want the RPM version for Tomcat,
right?  This page talks about RPM:

http://www.rpm.org/

But I'm wondering if it comes with Red Hat 8 (I can't tell yet--my boss
is installing Red Hat across town and I'm just doing my homework so I'm
ready to roll when he's done with all the things he has to do on his
end).  

Thanks,
Stephen

-
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: 1067 error when starting service after allocating more memory to JVM

2004-08-08 Thread Stephen Charles Huey
Sorry to be a pain, but I'm not exactly sure I understood what I was
supposed to do from your fourth paragraph?  Could you possibly give me
an example of how to find that out?  Aren't the parameters -Xmx and -Xms
specific to tomcat.exe and not to Windows?  I'm also not sure if you
meant that I should put -version on the end of my command line string
that I mentioned in the first post, or if I should do it just with the
memory flags, or what...  I'm just saying that I don't know how to find
out what my environment can handle!  

Thanks for the help,
Stephen

- Original message -
From: Caldarale, Charles R [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Date: Sat, 7 Aug 2004 13:31:29 -0500
Subject: RE: 1067 error when starting service after allocating more
memory to JVM

 From: Stephen Charles Huey [mailto:[EMAIL PROTECTED]
 Subject: 1067 error when starting service after allocating more memory to JVM
 
 Hey, we've been running Tomcat 4.1.27 for a couple of years on our
 webserver, and we just upgraded the server from 2GB of memory to 3GB. 
 We've been allocating 1GB to the JVM when installing Tomcat as a
 service, but now we'd like to do 2GB, so I just changed the two
 instances of 1024 to 2048 in this:

The short answer is you can't do that.

The long answer is, as usual, a bit more complicated.  First, Windows
normally splits the 4GB virtual space into 2GB for each user process,
and 2GB for the operating system, shared across all processes.  There is
an option for Windows Server bootstrap to change this boundary to 3GB
for user processes and 1GB for the OS (sorry, I don't remember the tag).

Second, the virtual space that Windows gives each user process is
fragmented by DLLs scattered around in it, and the Sun JVM insists on
having one contiguous area for its heap (at least it did in 1.4.1; have
not verified this in 1.4.2).  This makes it difficult to get a whole lot
more than 1GB for the heap.

Third, there is (or possibly was) a bug in the JVM heap initialization
that failed to treat the specified sizes as unsigned, so 2GB and above
was treated as negative.  Lots of weird results from that.  Again, I
haven't looked in the 1.4.2 code, so this may have been fixed by now.

Your best bet is to do a binary search with -Xms/-Xmx and see what your
environment will handle.  You don't need to do this with Tomcat - just
specifying -version will suffice.  (Just make sure you put the heap
settings before -version, because anything on the command line after
-version is ignored.)

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


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



RE: 1067 error when starting service after allocating more memory to JVM

2004-08-08 Thread Stephen Charles Huey
Thanks, you've been a big help.  1536m worked for me.  So, does this
mean my OS (Win 2K) will limit me and not allow me to allocate more
memory to the JVM even if I install more physical memory in the machine,
or will the amount allowed for allocation continue to rise as long as I
add more memory to the machine?  


- Original message -
From: Caldarale, Charles R [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Date: Sun, 8 Aug 2004 02:15:03 -0500
Subject: RE: 1067 error when starting service after allocating more
memory to   JVM

 From: Stephen Charles Huey [mailto:[EMAIL PROTECTED]
 Subject: RE: 1067 error when starting service after allocating more memory to JVM
 
 Aren't the parameters 
 -Xmx and -Xms
 specific to tomcat.exe and not to Windows?

Sounds like you're not that familiar with JVM execution, so you might
want to brush up on that aspect using some of the online tutorials on
the Sun web site (and other places).

The tomcat.exe executable is used when running Tomcat as a Windows
service, and then only as a launcher for the JVM; Tomcat itself is pure
Java, and you can run it as a regular Java program, if need be.  (It's a
lot easier to test things out that way.)  In any event, all I'm
suggesting you do is try something like the following, from a command
prompt:

java -Xms1024m -Xmx1024m -version
java -Xms1536m -Xmx1536m -version
java -Xms1280m -Xmx1280m -version
(etc.)

where you're varying the heap sizes in powers of two increments trying
to find the largest values that will work on your server.  (I'm assuming
the 2nd example above will fail - it does on my XP boxes, but works on
my Win2K one.)  Use -version, since that is the fastest way in and out
of the JVM (no program need be executed).  Once you've found the maximum
heap size that can be allocated, you can use that for your Tomcat
environment.  (You may have to reduce it a little since Windows needs
space in the process virtual memory for such things as a stack for each
thread, and Tomcat can kick off a lot of threads.)  Whether you want to
keep the minimum and maximum the same depends a lot on your workload;
larger heap sizes take longer to garbage collect, so you may want the
default lower to reduce delay time during not-so-busy periods.

You should really size your heap on what you actually need at times of
peak load.  Setting it to the maximum possible is not always the best
for server responsiveness.

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


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



1067 error when starting service after allocating more memory to JVM

2004-08-07 Thread Stephen Charles Huey
Hey, we've been running Tomcat 4.1.27 for a couple of years on our
webserver, and we just upgraded the server from 2GB of memory to 3GB. 
We've been allocating 1GB to the JVM when installing Tomcat as a
service, but now we'd like to do 2GB, so I just changed the two
instances of 1024 to 2048 in this:


D:\tomcat\bin\tomcat.exe -install Apache_Tomcat
C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll -server -Xmx2048m -Xms2048m
-Djava.class.path=D:\Tomcat\bin\bootstrap.jar
-Dcatalina.home=D:\Tomcat
-Djava.endorsed.dirs=D:\Tomcat\common\endorsed -start
org.apache.catalina.startup.BootstrapService -params start -stop
org.apache.catalina.startup.BootstrapService -params stop -out
D:\Tomcat\logs\stdout.log -err D:\Tomcat\logs\stderr.log


When I run that, it tells me the service was successfully installed. 
However, when I go to start the service, I get that 1067 error saying
that it terminated unexpectedly.  When I change each 2048 back to 1024,
it of course installs and starts just fine again.  How can I get this
thing installed and running with more memory allocated to it?  

Thanks,
Stephen

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



RE: session listener not listening

2004-07-16 Thread Stephen Charles Huey
I'm trying to add this session listener to a production site that often
has over 2,000 concurrent users (according to the Tomcat manager app). 
As far as I can tell, a session is created as soon as you log in because
the very first JSP is accessing a bunch of session beans.  However, my
listener doesn't seem to be listening!  


- Original message -
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Date: Fri, 16 Jul 2004 08:51:47 -0400
Subject: RE: session listener not listening


Hi,
Are you sure that page you are accessing creates a session? ;)

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Stephen Charles Huey [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 15, 2004 7:06 PM
To: Tomcat User
Subject: session listener not listening

My session listener doesn't seem to be listening.  At the top of my
web.xml (before any servlet elements, and I have nothing like a filter
or anything else before it), I have this:

listener
   listener-classcentral.OurSessionListener/listener-class
/listener





Here is my listener class:


package central;

import java.util.HashMap;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

import wwxchange.utility.*;
import wwxchange.beans.*;

public class OurSessionListener implements HttpSessionListener {

  public void sessionCreated(HttpSessionEvent se) {
HttpSession session = se.getSession();
UserAcctBean user = (UserAcctBean)
session.getAttribute(currentuser);
String loginID = user.getLoginID();
System.out.println(Added session:  + session.getId() +  for user
 + user.getLoginID());
SystemControl.addActiveUser(session.getId(), user.getLoginID() );
  }

  public void sessionDestroyed(HttpSessionEvent se) {
HttpSession session = se.getSession();
SystemControl.removeActiveUser(session.getId());
System.out.println(Removed session:  + session.getId());
  }
}


My SystemControl's static HashMap doesn't seem to be getting updated,
and the above methods aren't even getting called because nothing is
going to stdout when I log in as different users.

What am I doing wrong?  Is my listener not registered to listen?

Thanks,
Stephen

-
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: session listener not listening

2004-07-16 Thread Stephen Charles Huey
One other thing:  most of our web app's Java classes are put into a
single JAR file in JBuilder that we then dump into Tomcat's common\lib
directory.  However, we have to put our servlets individually into
Tomcat's common\classes directory.  My session listener class gets
compiled into the JAR file with all of the other classes in that central
package (see below), so I was wondering if perhaps this session listener
class needed to be dropped individually into the same place as where the
servlets go, and I've tried that (I've even tried making sure the class
was also dropped into a directory in common\lib\central in case that's
what it needed).  However, this still isn't working for me!  At least,
sessionCreated and sessionDestroyed never seem to be called, according
to my print statements (and the static methods they call don't seem to
be updating my session HashMap).  


- Original message -
From: Stephen Charles Huey [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Date: Fri, 16 Jul 2004 11:41:53 -0500
Subject: RE: session listener not listening

I'm trying to add this session listener to a production site that often
has over 2,000 concurrent users (according to the Tomcat manager app). 
As far as I can tell, a session is created as soon as you log in because
the very first JSP is accessing a bunch of session beans.  However, my
listener doesn't seem to be listening!  


- Original message -
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Date: Fri, 16 Jul 2004 08:51:47 -0400
Subject: RE: session listener not listening


Hi,
Are you sure that page you are accessing creates a session? ;)

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Stephen Charles Huey [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 15, 2004 7:06 PM
To: Tomcat User
Subject: session listener not listening

My session listener doesn't seem to be listening.  At the top of my
web.xml (before any servlet elements, and I have nothing like a filter
or anything else before it), I have this:

listener
   listener-classcentral.OurSessionListener/listener-class
/listener





Here is my listener class:


package central;

import java.util.HashMap;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

import wwxchange.utility.*;
import wwxchange.beans.*;

public class OurSessionListener implements HttpSessionListener {

  public void sessionCreated(HttpSessionEvent se) {
HttpSession session = se.getSession();
UserAcctBean user = (UserAcctBean)
session.getAttribute(currentuser);
String loginID = user.getLoginID();
System.out.println(Added session:  + session.getId() +  for user
 + user.getLoginID());
SystemControl.addActiveUser(session.getId(), user.getLoginID() );
  }

  public void sessionDestroyed(HttpSessionEvent se) {
HttpSession session = se.getSession();
SystemControl.removeActiveUser(session.getId());
System.out.println(Removed session:  + session.getId());
  }
}


My SystemControl's static HashMap doesn't seem to be getting updated,
and the above methods aren't even getting called because nothing is
going to stdout when I log in as different users.

What am I doing wrong?  Is my listener not registered to listen?

Thanks,
Stephen

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


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



session timeout: web.xml and setMaxInactiveInterval(int)

2004-07-15 Thread Stephen Charles Huey
My web.xml has the following:

session-config
session-timeout30/session-timeout
/session-config


However, when a user logs in, the following code in our app gets
executed:

  HttpSession session = request.getSession(false);
  session.setMaxInactiveInterval(7200);


I've been fiddling with the web.xml and didn't realize that other code
was in there, and I'm wondering who trumps who.  I would assume that the
web.xml's global setting would have priority over any individual
setting, but it could easily be the other way around!  

Thanks,
Stephen

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



session listener not listening

2004-07-15 Thread Stephen Charles Huey
My session listener doesn't seem to be listening.  At the top of my
web.xml (before any servlet elements, and I have nothing like a filter
or anything else before it), I have this:

listener
listener-classcentral.OurSessionListener/listener-class  
/listener





Here is my listener class:


package central;

import java.util.HashMap;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

import wwxchange.utility.*;
import wwxchange.beans.*;

public class OurSessionListener implements HttpSessionListener {

  public void sessionCreated(HttpSessionEvent se) {
HttpSession session = se.getSession();
UserAcctBean user = (UserAcctBean)
session.getAttribute(currentuser);
String loginID = user.getLoginID();
System.out.println(Added session:  + session.getId() +  for user
 + user.getLoginID());
SystemControl.addActiveUser(session.getId(), user.getLoginID() );
  }

  public void sessionDestroyed(HttpSessionEvent se) {
HttpSession session = se.getSession();
SystemControl.removeActiveUser(session.getId());
System.out.println(Removed session:  + session.getId());
  }
}


My SystemControl's static HashMap doesn't seem to be getting updated,
and the above methods aren't even getting called because nothing is
going to stdout when I log in as different users.  

What am I doing wrong?  Is my listener not registered to listen?  

Thanks,
Stephen

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



manager app: sessions

2004-07-14 Thread Stephen Charles Huey
I have read the Manager App HOW-TO at 
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/manager-howto.html

So, I'm accessing the following URL just like the example shows:
https://www.(mydomain).com/manager/sessions?path=/ristmain

I'm trying to interpret these results:
OK - Session information for application at context path /ristmain
Default maximum session inactive interval 30 minutes
30 - 40 minutes:100 sessions
120 - 130 minutes:1071 sessions

My main question is, does Tomcat update these numbers in realtime, or
only once in a while (like every 10 minutes)?  I'm wondering why it says
30 - 40 minutes...?  I logged into the web app as another user and that
100 didn't increase.  It's hard for me to tell if my logging in was
counted later on just because real users are logging in and out all the
time.  I guess the most important thing I need to know here is how long
I should wait to take another sampling...wait 10 minutes each time, or
what?  If it says 100 sessions, then that means within the past half an
hour (or 40 minutes?), there have been a total of about 100 users logged
in, right?  

Are these the only statistics available about sessions?  Would I have to
customize Tomcat to find out more?  

Thanks,
Stephen

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



Re: manager app: sessions

2004-07-14 Thread Stephen Charles Huey
What?  I can only find out how many sessions have been active for 30 to
40 minutes and 120 to 130 minutes?  That doesn't seem to make sense. 
I understand if Tomcat doesn't want to update the stats too frequently,
but what about stats on sessions logged in more than 40 minutes and less
than 2 hours?  Why would it arbitrarily jump up to 2 hours?  And how
likely is it that I have only 100 users who have been active for a total
of exactly 30 to 40 minutes, but 1071 users who have been active for
over 2 hours?  If my timeout is set to 30 minutes, then that means they
have to keep browsing the site at least every 30 minutes to avoid
getting timed out.  So is what you're saying right?  

 30 - 40 minutes:100 sessions
 120 - 130 minutes:1071 sessions

I mainly need to know about how many sessions are currently open.  I
thought that first line meant that about 100 sessions have been opened
in the past half hour, give or take 10 minutes.  Is this not true?  
 

- Original message -
From: Robert Bateman [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Date: Wed, 14 Jul 2004 13:29:33 -0400
Subject: Re: manager app:  sessions

Stephen,

If I understand what your asking, you are looking at statistics
generated by 
Tomcat that tells you how many *active* sessions are still laying around 
inside the server.  But the first row tells you about sessions that have
been 
alive between 30 and 40 minutes.  You logged in but your session was
active 
*way* under the 30 minute lower limit for the stats one line 1.

Bob


On Wednesday 14 July 2004 12:28 pm, Stephen Charles Huey wrote:
 I have read the Manager App HOW-TO at
 http://jakarta.apache.org/tomcat/tomcat-4.0-doc/manager-howto.html

 So, I'm accessing the following URL just like the example shows:
 https://www.(mydomain).com/manager/sessions?path=/ristmain

 I'm trying to interpret these results:
 OK - Session information for application at context path /ristmain
 Default maximum session inactive interval 30 minutes
 30 - 40 minutes:100 sessions
 120 - 130 minutes:1071 sessions

 My main question is, does Tomcat update these numbers in realtime, or
 only once in a while (like every 10 minutes)?  I'm wondering why it says
 30 - 40 minutes...?  I logged into the web app as another user and that
 100 didn't increase.  It's hard for me to tell if my logging in was
 counted later on just because real users are logging in and out all the
 time.  I guess the most important thing I need to know here is how long
 I should wait to take another sampling...wait 10 minutes each time, or
 what?  If it says 100 sessions, then that means within the past half an
 hour (or 40 minutes?), there have been a total of about 100 users logged
 in, right?

 Are these the only statistics available about sessions?  Would I have to
 customize Tomcat to find out more?

 Thanks,
 Stephen



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



session and connection timeouts

2004-07-06 Thread Stephen Charles Huey
Hello everyone, we're running Tomcat 4.1.27 and my conf/web.xml has a
session-timeout of 30, which I understand should override the default 20
minutes.  I'm wondering if it actually does, because I see here that
someone is saying there's a bug in Tomcat 4 so that sessions always time
out after 20 minutes:
http://listarchive.cinjug.org/html/users/2004-06/msg9.html

My main question is how Tomcat reacts if more and more sessions are
opened such that the memory allocated to the JVM gets close to the
max--does Tomcat crash/restart, or should it begin expiring the oldest
sessions in order to recover memory (even though they might be younger
than 20 minutes or whatever the timeout value is)?  

As for our issue with connection timeouts, we recently bumped it up to
12 in order to make sure large file uploads don't fail (usually less
than 1 MB and often less than 500 KB), but I'm wondering if that's a bit
excessive even for users on dial-up connections...

Thanks for your help,
Stephen

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



how many sessions in use?

2004-07-06 Thread Stephen Charles Huey
Is there any way to find out how many sessions are currently in use? 
I'm ultimately trying to get at how much memory is being used per
session...if there's no way to really get at this without a profiler
tool, do any of you use a particular one with Tomcat applications? 
JFluid, JProbe, etc?

Thanks!

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




basic authentication or not?

2004-06-17 Thread Stephen Charles Huey
In a nutshell, I'm wondering if it's better NOT to use basic
authentication.  We have over 10,000 regular users, and I think it would
be good for us to move to a more standard login page instead of that
authentication box that pops up.  My question is, would we have to
change a lot to do this?  At the moment, I'm not even sure we're using
basic authentication, and below I will outline my attempt to determine
if we're even using it...

When you type the URL to our website, it pops up an authentication box
before it shows you anything else and you must get past that to get into
the web app.  As far as I understand (the original developer is no
longer with us), we are using basic authentication with Tomcat 4. 
However, I was perusing this document to figure out where our basic
authentication is configured and it doesn't look like we have all this
stuff:

http://www.jguru.com/faq/view.jsp?EID=1131436

Notable exceptions are any security-constraint or login-config nodes
in our web.xml, and since the example on the jguru page put BASIC in the
login-config node, I'm really not sure that we're using basic
authentication (although that's still my gut feeling).  

In our server.xml, I see that both of the following are uncommented, but
I'm guessing that only the second one is being used since I don't think
we have anything (no JNDI) set up for the first one:


  Realm className=org.apache.catalina.realm.UserDatabaseRealm
  debug=0 resourceName=UserDatabase / 


  Realm className=org.apache.catalina.realm.JDBCRealm debug=99
  driverName=org.gjt.mm.mysql.Driver
  connectionURL=jdbc:mysql://127.0.0.1/mainDB connectionName=user
  connectionPassword=pass userTable=users userNameCol=Username
  userCredCol=Password userRoleTable=roles roleNameCol=Role / 


Aside the big database used by our web application, we have a small
MySQL database whose sole purpose is to authenticate users.  Would it be
just as simple to continue using that for authentication if we moved
away from this popup box authentication?  Is there any good reason to
have this authentication database outside of our main database?  Or is
this somehow protecting our web app more--making you authenticate before
you ever communicate with anything in our site (e.g. a LoginServlet or
something like that).  

I know this is long...I appreciate any feedback, though!  

Thanks,
Stephen

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



Re: basic authentication or not?

2004-06-17 Thread Stephen Charles Huey
Duh.  I was looking in the general Tomcat web.xml--yes, in my
app-specific one, we're using BASIC authentication.  

Ok, so Tomcat knows to use the additional MySQL database for
authentication.  Right now, if you go to www.ourDomain.com it'll make
you authenticate and then it will forward you to the default web
application at www.ourDomain.com/DefaultApp/Welcome.jsp, and we have
several web apps and you can cross from one to the other without
authenticating, so you could go up and modify the URL to
www.ourDomain.com/OtherApp/index.jsp and you'd be there instantly.  

So my question is, if we changed to form-based authentication so we
could present our look and feel from the start, would it work for
authenticating all the web apps if the login page was under a particular
web app's folder?  In other words, where would and could we stick a
Login.jsp that would be presented to the user when you type
www.ourDomain.com?  

Thanks so much,
Stephen


- Original message -
From: QM [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Date: Thu, 17 Jun 2004 16:04:21 -0500
Subject: Re: basic authentication or not?

(Please, create new messages when mailing the list.  Responding to
unrelated messages causes confusion for those of us who use thread-aware
mailers.)


: In a nutshell, I'm wondering if it's better NOT to use basic
: authentication.

My understanding is that FORM vs BASIC is just that the former lets you
create a custom login page that maintains your app's look and feel.
(read: that's all *I* have used it for ;)


: At the moment, I'm not even sure we're using
: basic authentication, and below I will outline my attempt to determine
: if we're even using it...

You mention that there are no security-constraint or login-config
elements in the web.xml.  You're checking the app-specific web.xml in
WEB-INF, and not the general one in the Tomcat install dir?  (Sorry to
ask; I have to check.)

Yet, there's a Real def in server.xml?

Perhaps auth is being done elsewhere (say, the web server), hence the
Realm isn't being used, and is leftover from an earlier configuration.
Unlikely, but worth investigating.


: Aside the big database used by our web application, we have a small
: MySQL database whose sole purpose is to authenticate users.  Would it
be
: just as simple to continue using that for authentication if we moved
: away from this popup box authentication?

If you move to FORM auth and use JDBCRealm, yes, you should be able to
continue using this database.  Provided, of course, the passwords are
hashed in the way JDBCRealm expects.


: Is there any good reason to
: have this authentication database outside of our main database?

One reason is load: separate auth traffic from app traffic.  This also
lets you share that single auth DB among several apps, and each app can
have its own database for its data.

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


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



how to show System Unavailable page when Tomcat is down

2004-06-14 Thread Stephen Charles Huey
Though I'm capable of adding to the JSPs and servlets on an existing
site, I'm no web server guru, so I'm having a hard time with this
problem.  Our database vendor's ODBC driver has issues, so occasionally
we have to restart Tomcat (and maybe the driver) to get the website
running again, and since this is used by thousands of people every day,
they can get pretty annoyed when all they see in their browser is Page
cannot be displayed (and this can go on for anywhere from 5-15
minutes).  

We need a way to show some redirect requests for the website to some
static HTML page when Tomcat is down.  Since Tomcat is running our
website, I'm really not sure of how to provide a solution for that (we
don't have multiple application servers--just one web server and one
database server).  Any thoughts would be greatly appreciated!

Thanks,
Stephen

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



Re: how to show System Unavailable page when Tomcat is down

2004-06-14 Thread Stephen Charles Huey
If we currently have Tomcat 4 running on Win 2000, would there be
significant overhead to run Apache as well just so that we can put up an
error page when Tomcat has to be restarted?

Some of you mentioned I should try using a type 4 driver, and I Googled
around to brush up on different types, and I realize we probably use a
type 1 driver since it's a JDBC to ODBC bridge.  The database we're
using is Raining Data's D3 database (a multivalue db), and I searched
around and only found a couple of JDBC drivers that look like they might
work, but they're type 3 drivers, and I'm wondering what (if any)
additional layer I need to make a type 3 driver talk to the D3 database,
or if I can simply drop it into my J2EE/Tomcat.  These are the drivers I
found:

FusionWare, halfway down the page:
http://www.sqlsummit.com/JDBCVend.htm

Liberty JDBC:
http://www.multivalue.com/LibJDBC.html


- Original message -
From: David Smith [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Date: Mon, 14 Jun 2004 20:10:11 -0400
Subject: Re: how to show System Unavailable page when Tomcat is down

To directly answer your question, essentially something has to be 
listening on port 80 even when Tomcat is down.  The only way I know of 
to do that is to put up some kind of proxy server with a error page.  I 
know Apache can be used that way, Squid looks like it could as well.

On the other hand, you could also replace your ODBC driver with a 
genuine type 4 driver and make your site much more reliable.  I think 
someone else already suggested that and I whole-heartedly agree.

--David

Stephen Huey wrote:

 Though I'm capable of adding to the JSPs and servlets on an existing
 site, I'm no web server guru, so I'm having a hard time with this
 problem.  Our database vendor's ODBC driver has issues, so occasionally
 we have to restart Tomcat (and maybe the driver) to get the website
 running again, and since this is used by thousands of people every day,
 they can get pretty annoyed when all they see in their browser is Page
 cannot be displayed (and this can go on for anywhere from 5-15
 minutes). 
 We need a way to show some redirect requests for the website to some
 static HTML page when Tomcat is down.  Since Tomcat is running our
 website, I'm really not sure of how to provide a solution for that (we
 don't have multiple application servers--just one web server and one
 database server).  Any thoughts would be greatly appreciated!

 Thanks,
 Stephen

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



emergency - need to get into admin app

2004-04-19 Thread Stephen Charles Huey
We reloaded the drives on our web server yesterday, but Tomcat keeps
choking, and we think it's because not enough memory is allocated, and
we're trying to get into the admin web application, but it keeps saying
our password isn't correct.  Even though I set a password during the
install, there was nothing in the tomcat-users.xml file, so I've now made
it this, but we still can't get in:

?xml version='1.0' encoding='utf-8'? 
tomcat-users
role rolename=admin/
role rolename=manager/
role rolename=tomcat/
role rolename=role1/
user username=admin password=secret roles=manager,admin/
user username=tomcat password=tomcat roles=tomcat/
user username=role1 password=tomcat roles=role1/
user username=both password=tomcat roles=tomcat,role1/
/tomcat-users

I've been restarting Tomcat after saving it after each modification. 

My boss is literally breathing down my neck, so please write back ASAP if
you have a clue, b/c Google isn't helping me out all that much!!!

Thanks,
Stephen

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



Re: emergency - need to get into admin app

2004-04-19 Thread Stephen Charles Huey
Thanks, but we are restarting after every modification.  And this is
Tomcat 4, by the way.  Our website is dead right now.  If anybody has a
clue why the password I'm putting in there isn't being accepted, please
let me know!  


- Original message -
From: Rob Cash [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Date: Mon, 19 Apr 2004 13:55:09 -0400
Subject: Re: emergency - need to get into admin app

I believe that tomcat-users.xml is only read when Tomcat is started. So
if you
modified the file after you started Tomcat, it won't help. You'd need to
restart
Tomcat after modifying the file. This is just my best guess, not a
definitive
fact.

Good luck.

Cheers,
Rob

Stephen Charles Huey [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 We reloaded the drives on our web server yesterday, but Tomcat keeps
 choking, and we think it's because not enough memory is allocated, and
 we're trying to get into the admin web application, but it keeps saying
 our password isn't correct.  Even though I set a password during the
 install, there was nothing in the tomcat-users.xml file, so I've now made
 it this, but we still can't get in:

 ?xml version='1.0' encoding='utf-8'?
 tomcat-users
 role rolename=admin/
 role rolename=manager/
 role rolename=tomcat/
 role rolename=role1/
 user username=admin password=secret roles=manager,admin/
 user username=tomcat password=tomcat roles=tomcat/
 user username=role1 password=tomcat roles=role1/
 user username=both password=tomcat roles=tomcat,role1/
 /tomcat-users

 I've been restarting Tomcat after saving it after each modification.

 My boss is literally breathing down my neck, so please write back ASAP if
 you have a clue, b/c Google isn't helping me out all that much!!!

 Thanks,
 Stephen




-
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: emergency - need to get into admin app

2004-04-19 Thread Stephen Charles Huey
Ok, I took out the security tags and I can get in there.  Is the admin
app where I set memory allocations in Tomcat???  I'm looking at adding an
Environment Entry or something, but I don't know what to do with this! 
Our total Java memory is only like 60 MB and we need at least a gig! 
Thanks...


- Original message -
From: Parsons Technical Services [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Date: Mon, 19 Apr 2004 14:01:14 -0400
Subject: Re: emergency - need to get into admin app

NOTE: This is an emergency fix only and will leave you wide open.

Edit the admin web.xml to allow no authentication.

DO NOT LEAVE IT THIS WAY.

What do you logs say?

What does the server.xml look like? Please post it.

Doug

- Original Message - 
From: Stephen Charles Huey [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, April 19, 2004 1:48 PM
Subject: emergency - need to get into admin app


 We reloaded the drives on our web server yesterday, but Tomcat keeps
 choking, and we think it's because not enough memory is allocated, and
 we're trying to get into the admin web application, but it keeps saying
 our password isn't correct.  Even though I set a password during the
 install, there was nothing in the tomcat-users.xml file, so I've now made
 it this, but we still can't get in:
 
 ?xml version='1.0' encoding='utf-8'? 
 tomcat-users
 role rolename=admin/
 role rolename=manager/
 role rolename=tomcat/
 role rolename=role1/
 user username=admin password=secret roles=manager,admin/
 user username=tomcat password=tomcat roles=tomcat/
 user username=role1 password=tomcat roles=role1/
 user username=both password=tomcat roles=tomcat,role1/
 /tomcat-users
 
 I've been restarting Tomcat after saving it after each modification. 
 
 My boss is literally breathing down my neck, so please write back ASAP if
 you have a clue, b/c Google isn't helping me out all that much!!!
 
 Thanks,
 Stephen
 
 -
 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: emergency - need to get into admin app

2004-04-19 Thread Stephen Charles Huey
I see something in catalina.bat about a JAVA_OPTS environment variable. 
Do I need to set this in Windows?  When I run java -X on the command
line, I see something about a -Xms option for setting the heap size.  Do
I just type -Xms some number in the Windows environment variable or
what?  


- Original message -
From: Stephen Charles Huey [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Date: Mon, 19 Apr 2004 13:06:46 -0500
Subject: Re: emergency - need to get into admin app

Thanks, but we are restarting after every modification.  And this is
Tomcat 4, by the way.  Our website is dead right now.  If anybody has a
clue why the password I'm putting in there isn't being accepted, please
let me know!  


- Original message -
From: Rob Cash [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Date: Mon, 19 Apr 2004 13:55:09 -0400
Subject: Re: emergency - need to get into admin app

I believe that tomcat-users.xml is only read when Tomcat is started. So
if you
modified the file after you started Tomcat, it won't help. You'd need to
restart
Tomcat after modifying the file. This is just my best guess, not a
definitive
fact.

Good luck.

Cheers,
Rob

Stephen Charles Huey [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 We reloaded the drives on our web server yesterday, but Tomcat keeps
 choking, and we think it's because not enough memory is allocated, and
 we're trying to get into the admin web application, but it keeps saying
 our password isn't correct.  Even though I set a password during the
 install, there was nothing in the tomcat-users.xml file, so I've now made
 it this, but we still can't get in:

 ?xml version='1.0' encoding='utf-8'?
 tomcat-users
 role rolename=admin/
 role rolename=manager/
 role rolename=tomcat/
 role rolename=role1/
 user username=admin password=secret roles=manager,admin/
 user username=tomcat password=tomcat roles=tomcat/
 user username=role1 password=tomcat roles=role1/
 user username=both password=tomcat roles=tomcat,role1/
 /tomcat-users

 I've been restarting Tomcat after saving it after each modification.

 My boss is literally breathing down my neck, so please write back ASAP if
 you have a clue, b/c Google isn't helping me out all that much!!!

 Thanks,
 Stephen




-
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: emergency - need to get into admin app

2004-04-19 Thread Stephen Charles Huey
Thanks to everyone who wrote back with suggestions.  We had a rough time,
and right now we're up because we slapped the old drives back in.  After
doing that, I found CATALINA_OPTS in the Environment Variables, and it
had the -Xms and -Xmx flags after the -server one, but I called the guy
who originally set everything up for us over a year ago, and he said he
remembered that that didn't work him (we're on Win 2000 Server) and he
had to set the memory via some super long command line when installing
tomcat as a Service.  

I'm trying to find info on setting the memory with command line args when
installing Tomcat as a service, so if you have a good idea of what needs
to be on the command line when doing that in Windows, feel free to let me
know or point me to the right docs.  

Thanks,
Stephen

- Original message -
From: Peter Davison [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Date: Mon, 19 Apr 2004 14:41:52 -0400
Subject: Re: emergency - need to get into admin app

Hi Stephen.

You need to modify the CATALINA_OPTS environment variable:
To give yourself a Gig of memory, try: 

export CATALINA_OPTS=-Xmx1024m

How you set this variable will depend on your environment/os etc.

Hope that helps.
Pete.

Quoting Stephen Charles Huey [EMAIL PROTECTED]:

 Ok, I took out the security tags and I can get in there.  Is the admin
 app where I set memory allocations in Tomcat???  I'm looking at adding an
 Environment Entry or something, but I don't know what to do with this! 
 Our total Java memory is only like 60 MB and we need at least a gig! 
 Thanks...
 
 
 - Original message -
 From: Parsons Technical Services [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Date: Mon, 19 Apr 2004 14:01:14 -0400
 Subject: Re: emergency - need to get into admin app
 
 NOTE: This is an emergency fix only and will leave you wide open.
 
 Edit the admin web.xml to allow no authentication.
 
 DO NOT LEAVE IT THIS WAY.
 
 What do you logs say?
 
 What does the server.xml look like? Please post it.
 
 Doug
 
 - Original Message - 
 From: Stephen Charles Huey [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Monday, April 19, 2004 1:48 PM
 Subject: emergency - need to get into admin app
 
 
  We reloaded the drives on our web server yesterday, but Tomcat keeps
  choking, and we think it's because not enough memory is allocated, and
  we're trying to get into the admin web application, but it keeps saying
  our password isn't correct.  Even though I set a password during the
  install, there was nothing in the tomcat-users.xml file, so I've now made
  it this, but we still can't get in:
  
  ?xml version='1.0' encoding='utf-8'? 
  tomcat-users
  role rolename=admin/
  role rolename=manager/
  role rolename=tomcat/
  role rolename=role1/
  user username=admin password=secret roles=manager,admin/
  user username=tomcat password=tomcat roles=tomcat/
  user username=role1 password=tomcat roles=role1/
  user username=both password=tomcat roles=tomcat,role1/
  /tomcat-users
  
  I've been restarting Tomcat after saving it after each modification. 
  
  My boss is literally breathing down my neck, so please write back ASAP if
  you have a clue, b/c Google isn't helping me out all that much!!!
  
  Thanks,
  Stephen
  
  -
  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]
 
 
 


-- 
Peter Davison
[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: emergency - need to get into admin app

2004-04-19 Thread Stephen Charles Huey
Thanks for this tip.  So, if I wanted to set both the initial and the max
heap size in this Windows batch file, do I say it with quotes like this:

set JAVA_OPTS=-Xms128m -Xmx128m

Thanks so much,
Stephen

P.S.  When I do that, it's only starting me at about 10MB, so I'm
wondering if this isn't the way to pass both of them at once...


- Original message -
From: Stephen Bacon [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Date: Mon, 19 Apr 2004 15:14:32 -0400
Subject: Re: emergency - need to get into admin app

In general, you only use it to pass options that you might need. For 
example the X flag controls memory, so if your app requires it you can 
instruct tomcat to launch JVMs with a higher max (i.e. if it seems to be 
running out of memory).
As an example I use: -Xmx128m to set the max at 128MB (i think the 
default is 64?)
Note I'm using this under linux so it's in a shell script.
In the Windows batch file, you'd just use:
   set JAVA_OPTS=-Xmx128m
Which I would put after the line rem - Execute The Requested 
Command - but that's just me ;^)
You could also use the control panel to set a system-wide env. variable, 
but you don't need everybody to have it defined, plus it may mess you up 
when running java apps other than tomcat.
-Steve

Stephen Charles Huey wrote:

 I see something in catalina.bat about a JAVA_OPTS environment variable. 
 Do I need to set this in Windows?  When I run java -X on the command
 line, I see something about a -Xms option for setting the heap size.  Do
 I just type -Xms some number in the Windows environment variable or
 what?  
 

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



quick question when getting started

2004-04-15 Thread Stephen Charles Huey
I'm upgrading from Tomcat 4 to 5 and I just installed Tomcat 5 on a dev
machine to play with it, and I know a couple things are organized a bit
differently, but the provided index page is weirding me out.  

I tried to add a line of text to the index.jsp in webapps\ROOT and when I
reload the page (that I browse to by going to localhost on my Win 2K
Server machine), that line of text isn't appearing.  I've tried adding
other bits, too, and I've tried restarting Tomcat, and I found a
catalina-root.jar in the WEB-INF\lib folder and deleted that in an effort
to get it to recompile the index.jsp, but nothing seems to be working! 
Why?

Here's an example of what I've modified in the HTML:

pcenterbIf you're seeing this page via a web browser, it means
Stephen has setup Tomcat successfully.

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



ZipFileException: can't access localhost anymore

2004-04-05 Thread Stephen Charles Huey
Our small company has been using Tomcat 4 for over a year to run our web
app, and on 8/15/2003 I downloaded Tomcat 4.1.27 to install on this
development machine, and I haven't had to think much about it since, and
I'm not super familiar with Tomcat.  About all I do with it is stop and
restart the service to load up changes I add to the site.  

Well, today it just isn't working.  Usually I access the site on my
machine by just typing localhost or http://localhost/ in IE 6, but it's
just giving me a page cannot be displayed error.  I'm perusing the
Jakarta docs and guides at OnJava and other places, but I figure I could
spend all day (or several days) on this, and I need to get my work done! 

What I need is a good idea of exactly what I can do to find and correct
this problem.  

I have no idea what this is about or why it would suddenly have become a
problem, but here's what's in my stdout:

Bootstrap: Create Catalina server
Bootstrap: Class loader creation threw exception
java.lang.IllegalArgumentException: addRepositoryInternal:
java.util.zip.ZipException: error in opening zip file
at 
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(StandardClassLoader.java:1110)
at 
org.apache.catalina.loader.StandardClassLoader.init(StandardClassLoader.java:200)
at 
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:202)
at org.apache.catalina.startup.BootstrapService.init(BootstrapService.java:163)
at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:297)


And here's my stderr:

java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.init(ZipFile.java:112)
at java.util.jar.JarFile.init(JarFile.java:127)
at java.util.jar.JarFile.init(JarFile.java:65)
at 
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(StandardClassLoader.java:1082)
at 
org.apache.catalina.loader.StandardClassLoader.init(StandardClassLoader.java:200)
at 
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:202)
at org.apache.catalina.startup.BootstrapService.init(BootstrapService.java:163)
at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:297)
java.lang.NullPointerException
at org.apache.catalina.startup.BootstrapService.init(BootstrapService.java:198)
at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:297)


And in case this helps, here's what I have in my conf\server.xml file for
the connectors:

- !--  Define a non-SSL Coyote HTTP/1.1 Connector on port 80 
  -- 
  Connector className=org.apache.coyote.tomcat4.CoyoteConnector
  port=80 minProcessors=50 maxProcessors=100 enableLookups=true
  redirectPort=8443 acceptCount=100 debug=0
  connectionTimeout=2 useURIValidationHack=false
  disableUploadTimeout=true / 
- !-- 
 Note : To disable connection timeouts, set connectionTimeout value 
 to -1 

  -- 
- !--  Define a SSL Coyote HTTP/1.1 Connector on port 443 
  -- 
- Connector className=org.apache.coyote.tomcat4.CoyoteConnector
port=443 minProcessors=100 maxProcessors=2000 enableLookups=true
acceptCount=100 debug=0 scheme=https secure=true
useURIValidationHack=false disableUploadTimeout=true
  Factory
  className=org.apache.coyote.tomcat4.CoyoteServerSocketFactory
  clientAuth=false protocol=TLS keystorePass=w0rldw1d3
  keystoreFile=c:\Tomcat\keystore.ksf / 
  /Connector


Thanks for any help!

Stephen


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



Re: ZipFileException: can't access localhost anymore

2004-04-05 Thread Stephen Charles Huey
I've resolved this issue.

We build a JAR file in JBuilder that contains all the JavaBeans, etc, and
we stick that in Tomcat's common\lib, and I checked it and somehow it had
0 KB!  Weird.  So I just copied it over again and I no longer get that
ZipException when starting up Tomcat.  It was like Tomcat overwrote the
JAR file by accident or something.  

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



refreshing what tomcat has in memory

2004-01-05 Thread Stephen Charles Huey
I have a copy of Tomcat both on my dev machine and my production machine.
 I have some code that looks for an image in a given location, and on the
dev machine (which I set up), the code was working fine (the code takes
that image and inserts it in the middle of a larger one that I'm
drawing).  I was wondering why the image wasn't appearing in the picture
I was generating on the production machine (which I didn't set up--that
contractor was around before I got on board and is no longer with us),
and then realized I simply hadn't copied the image over to the
appropriate directory on that computer.  However, when I did copy the
image into the right directory, it still wasn't picking it up, so I
restarted Tomcat using the Win 2000 Server Services explorer.  However,
the small 1 KB image still wasn't being picked up and placed into the
image I was drawing even though the code was the same as on the dev
machine.  I was baffled, and I stopped and started Tomcat a few times and
then it finally started getting picked up!  So then I deleted the image
from the directory, restarted Tomcat, and the image was still being found
even though it wasn't there!  I restarted Tomcat again, and finally it
wasn't being found anymore.  In my code, I'm explicitly specifying that
the image should be searched for in a pretty-hardcoded sort of manner
every single time it's needed, but I'm thinking Tomcat might cache
certain low-level operations in memory (or does Windows do it, perhaps?).
 I'm wondering if Tomcat might have remembered that that image hadn't
been found before, so was returning some sort of empty file (though I
don't think there were any exceptions, b/c I've searched for the expected
println statements in my Tomcat stdout and stderr log files) every time
after that...and if it was just in memory, then maybe stopping Tomcat
from the Windows Services explorer doesn't get rid of Tomcat's stack
memory (maybe Windows maintains that memory until you restart Tomcat,
even it seems like that wouldn't be the behavior you'd expect).  

I've included the code down at the bottom--it's pretty straightforward. 
I'd really like to know, because there have been times when I have tried
to deploy updated JAR files and Tomcat just wouldn't pick them up.  When
a modified JSP isn't being re-compiled, I know to go search for the
genereated Java code and class files in the work directory and delete
them to force re-compilation, but I don't know what to do it to find a
newly modified JAR file!  Or in my other case, a newly modified image!  

Thanks for any clarifications!

Here's the code I was referring to:

  String logoLocation = GlobalSettings.getSetting(imagedir) +
  AE89x35.png;
  try {
//Image logo =
Toolkit.getDefaultToolkit().getImage(logoLocation);
javax.swing.ImageIcon logoIcon = new
javax.swing.ImageIcon(logoLocation);
Image logo = logoIcon.getImage();
//System.out.println(logoLocation is  + logoLocation);
if (logo == null) System.err.println(logo is null, and toString
gives   + logo.toString());
// Draw image
boolean drawn = oCanvas.drawImage(logo, 185, 190, null);
//System.out.println(drawn is  + drawn);
  } catch (Exception e) {
System.err.println(Unable to find Airborne logo at  +
logoLocation + :  + e);
  }

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



RE: Tomcat exception report I don't understand

2003-09-09 Thread Stephen Charles Huey
I'm not entirely sure my JDK is the exact same, so I guess that could be
the problem.  Anyway, those two extra JAR files in my Tomcat common lib
have been copied to the production server's Tomcat's common lib, and now
the site works without any such exception.  So is that the most likely
cause--that I'm using a different JDK than the other developer?  I've got
1.4.2--is there some reason I would need xercesImpl.jar and
xmlParserAPIs.jar?  Thanks for your advice...



- Original message -
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Date: Tue, 9 Sep 2003 08:56:26 -0400
Subject: RE: Tomcat exception report I don't understand


Howdy,

and Tomcat 4, version 1.1 (the same as what's on the server).  I took

No such version exists of tomcat.  Check the string at the beginning of
$CATALINA_HOME/logs/catalina.out and tell us what version of tomcat
you're using ;)

I did find one notable difference between the Tomcat directories on the
two machines.  On my machine, I have two extra JAR files in Tomcat's
common\lib directory:  xercesImpl.jar and xmlParserAPIs.jar

That's the cause for your error.  See the release notes section on XML
parsers.

Here is what appears directly under root cause on the Exception
Report:

javax.servlet.ServletException:
org/apache/xerces/parsers/AbstractSAXParser
at

This indicates a mismatching version of the XML parser implementation
versus the SAX API version.

Are you using JDK 1.4?  Are you using the same JDK as the developer who
wrote the site?

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]


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



Tomcat exception report I don't understand

2003-09-08 Thread Stephen Charles Huey
We have a web app on a server that a contractor developed remotely using
JBuilder 7 Enterprise, and I'm a new guy in the office who's trying to
modify some of our site code on a dev laptop using JBuilder 9 Personal
and Tomcat 4, version 1.1 (the same as what's on the server).  I took
great pains to make sure my localhost configuration matched and that as
much as possible, locations and such wouldn't be hardcoded (and therefore
machine-dependent).  Last night was the first time I've tried to roll new
code changes by simply dropping a JBuilder-built JAR file into Tomcat's
common\lib and then dropping my updated JSP pages into their respective
places.  There are actually two semi-related webapps (in two different
directories in Tomcat's webapps\ directory) that both use common code in
my site's JAR file.  When I tried logging into the first app, it failed,
and I'll include part of the page I got down below.  

To get into the second app, you have to login just as you do for the
first app, but if you're already logged into the first app, you can
simply browse to the second one (e.g. highlight that part of the URL and
replace it with the appropriate directory name).  And when I did that,
the second app worked fine!  So, I know that at least a large part of my
JAR code works, at least with the second app (and hence there should be
no problem there).  Also, I didn't change the login page, so it can't be
that (but I know it's probably JAR file code that that page eventually
accesses, since it calls some bean methods to set things up).  

I did find one notable difference between the Tomcat directories on the
two machines.  On my machine, I have two extra JAR files in Tomcat's
common\lib directory:  xercesImpl.jar and xmlParserAPIs.jar

I've tried Googling a bit, but I'm still not really sure what these do or
where they came from (did I get them when I downloaded Tomcat?...if so,
why aren't they on the other machine if it's the same version of
Tomcat?), but at least one of them seems related to my problem since
xerces is mentioned when Tomcat throws up.  I did check the two
xerces.jar files, and they have the same modification timestamps (Oct 8,
2002), so I assume they're probably the same version!  

Here is what appears directly under root cause on the Exception Report:

javax.servlet.ServletException:
org/apache/xerces/parsers/AbstractSAXParser
at

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:536)
at org.apache.jsp.Login_jsp._jspService(Login_jsp.java:150)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


To reiterate...I could apparently log into my site since I was already
logged in when I tried to access the second app, but then something else
beyond that didn't work on the first app.  I would appreciate any
suggestions as to what the problem could be.  I'm wondering if those
extra JAR files might be picked up by the compiler and so confuse things.
I would test that right now, but I can't retry my dev site on the
production server until late tonight.  We really needed to get these new
changes rolled last night, so that's why I'm doing what I can today to
figure out what the problem could be before I try to roll again with only
blind guesswork.  

Thanks for any help,
Stephen 

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



Tomcat exception report I don't understand

2003-09-08 Thread Stephen Charles Huey
We have a web app on a server that a contractor developed remotely using
JBuilder 7 Enterprise, and I'm a new guy in the office who's trying to
modify some of our site code on a dev laptop using JBuilder 9 Personal
and Tomcat 4, version 1.1 (the same as what's on the server).  I took
great pains to make sure my localhost configuration matched and that as
much as possible, locations and such wouldn't be hardcoded (and therefore
machine-dependent).  Last night was the first time I've tried to roll new
code changes by simply dropping a JBuilder-built JAR file into Tomcat's
common\lib and then dropping my updated JSP pages into their respective
places.  There are actually two semi-related webapps (in two different
directories in Tomcat's webapps\ directory) that both use common code in
my site's JAR file.  When I tried logging into the first app, it failed,
and I'll include part of the page I got down below.  

To get into the second app, you have to login just as you do for the
first app, but if you're already logged into the first app, you can
simply browse to the second one (e.g. highlight that part of the URL and
replace it with the appropriate directory name).  And when I did that,
the second app worked fine!  So, I know that at least a large part of my
JAR code works, at least with the second app (and hence there should be
no problem there).  Also, I didn't change the login page, so it can't be
that (but I know it's probably JAR file code that that page eventually
accesses, since it calls some bean methods to set things up).  

I did find one notable difference between the Tomcat directories on the
two machines.  On my machine, I have two extra JAR files in Tomcat's
common\lib directory:  xercesImpl.jar and xmlParserAPIs.jar

I've tried Googling a bit, but I'm still not really sure what these do or
where they came from (did I get them when I downloaded Tomcat?...if so,
why aren't they on the other machine if it's the same version of
Tomcat?), but at least one of them seems related to my problem since
xerces is mentioned when Tomcat throws up.  I did check the two
xerces.jar files, and they have the same modification timestamps (Oct 8,
2002), so I assume they're probably the same version!  

Here is what appears directly under root cause on the Exception Report:

javax.servlet.ServletException:
org/apache/xerces/parsers/AbstractSAXParser
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:536)
at org.apache.jsp.Login_jsp._jspService(Login_jsp.java:150)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


To reiterate...I could apparently log into my site since I was already
logged in when I tried to access the second app, but then something else
beyond that didn't work on the first app.  I would appreciate any
suggestions as to what the problem could be.  I'm wondering if those
extra JAR files might be picked up by the compiler and so confuse things.
 I would test that right now, but I can't retry my dev site on the
production server until late tonight.  We really needed to get these new
changes rolled last night, so that's why I'm doing what I can today to
figure out what the problem could be before I try to roll again with only
blind guesswork.  

Thanks for any help,
Stephen

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