Re: Tomcat 6 / Apache 2.2 integration problem (no images, no css loaded)

2008-03-21 Thread Andreas Schneider
The other thing why the auto generated mod_jk.conf is using the 
extracted webapp in the temp folder. If I would configure it by myself, 
why I shouldn't use the folder in catalina_home/webapps/sw-builder?



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Regarding installation of Tomcat service wrapper

2008-03-21 Thread radhika123

Hi
I want to know the details how to run Tomcat as service wrapper.
http://www.nabble.com/file/p16194942/error.docx error.docx 
I am getting the above mentioned error.
Could anybody please resolve this error ASAP.



-- 
View this message in context: 
http://www.nabble.com/Regarding-installation-of-Tomcat-service-wrapper-tp16194942p16194942.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: sessionListener.sessionDestroyed is called on shutdown of a node in the cluster

2008-03-21 Thread Ronald Klop

In sessionDestroyed I register the user as logged out.

How can I know if sessionDestroyed is called from session.invalidate() from the 
real expiration of the session or shutdown of one cluster node?


Ronald.

On Thu Mar 20 17:40:26 CET 2008 Tomcat Users List users@tomcat.apache.org 
wrote:
It's expected behavior, sessions will always expire on the local node 
during a graceful shutdown.


expireSessionsOnShutdown=false simply means that we don't expire 
sessions in the remote nodes


Filip


Ronald Klop wrote:
 Hello,

 When I shutdown a node in my cluster (tomcat 5.5.26) sessionDestroyed 
 is called on all SessionListeners on that node.
 But I'm running a cluster, so one node stopping doesn't mean the 
 session is destroyed.


 My understanding is that expireSessionsOnShutdown=false by default 
 and I don't change it in my config.


 Is this a bug, a feature or am I doing something wrong?

 Ronald.
 

 No virus found in this incoming message.
 Checked by AVG. 
 Version: 7.5.519 / Virus Database: 269.21.7/1334 - Release Date: 3/18/2008 8:52 PM
 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



issue:reading the constant variables from txt/properties file

2008-03-21 Thread Nilesh Yadav
Hi All ;

can anyone suggest me regarding the following issue.
it's urgent.

environmental situation:
I am working on the hyperion portal HS9; here on this server Two
tomcats(both of :5.0.28) are present; one is used to run this portal 
another one is used to run the 6 java applications present(publish) on
this portal those are devloped by using the Sun jav  hyperion Api.
here my six applications were taking the common variables(those are
defined like:public static final String var=value ) from one of the
.java files previously. later on i changed it  we are taking these
all variables from the one of the .properties file say
config.properties.
also test server is not distributed but production server is distributed

issue:
it is found that when i will change the value  in the config file 
restart the server it gets reflected in the 6 applications those are
using these
variables; it is ok for the test server(say TestServerA) which is not
distributed. but my production environment is distributed for load
balancing say prodserverA ProdServerB here after the change in the
config file i need to compile all the applications  then restarting
tomcat is only reflecting this changes in the apps. ideally as similar
the test  environment it should have reflected only by server startup
but i had to recompile the apps; i do not want to recompile the
appliactions.
here other prod server ProdServerB is considered as virtual for my
application  i have deploy my application only on prodserverA
i don't know whether it is because of distributed environment/not? 
do not the exact cause
can anyone tell/help me, why this is happening like this???
please send me the solution/suggestion regarding this ???


Thanks  Regards
Nilesh.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



jmx gives ConcurrentModificationException

2008-03-21 Thread Ronald Klop

Hi,

I'm doing listSessionIds by JMX on Tomcat 5.5.26.
Sometimes I get this exception. Is this only harmful to my jmx client or can it 
also harm the running Tomcat?
Caused by: java.util.ConcurrentModificationException
   at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
   at java.util.HashMap$KeyIterator.next(HashMap.java:877)
   at 
org.apache.catalina.session.ManagerBase.listSessionIds(ManagerBase.java:1145)
   at sun.reflect.GeneratedMethodAccessor390.invoke(Unknown Source)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at 
org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:458)
   at 
com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
   at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
   at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
   at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)

Ronald.

displaying an image from outside the webapps directory

2008-03-21 Thread Kimberly Begley
Hi,
I'm trying to make a jsp display a plot that is a jpeg in a directory
outside the catalina_home directory - I do not have the option of
putting it in the webapp directory (there's 1000's of them - my page
will just display one of them as selected by the user - along with
some other info) - how do I go about displaying it?
Thanks

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: displaying an image from outside the webapps directory

2008-03-21 Thread Lars Nielsen Lind

Kimberly Begley skrev:

Hi,
I'm trying to make a jsp display a plot that is a jpeg in a directory
outside the catalina_home directory - I do not have the option of
putting it in the webapp directory (there's 1000's of them - my page
will just display one of them as selected by the user - along with
some other info) - how do I go about displaying it?
Thanks

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  
You can do that with a Servlet. Here are some sample code. Replace 
content of  with your own data.




package package name;

import java.io.*;
import java.util.*;

import javax.servlet.*;
import javax.servlet.http.*;

public class OpenFile extends HttpServlet {
  
   private String documentHome = .;

   private String page = ;
   private String version = ;
   private String remotehost = ;
   private String remoteaddress = ;
  
   protected File findFile(HttpServletRequest request) throws IOException {

   File file = new File(filename);
  
   return file;

   }
  
   protected void sendFile(File file, HttpServletResponse response) 
throws IOException {

   int c = 0;
   FileInputStream fis = null;
  
   try {

   ServletOutputStream sos = response.getOutputStream();
   fis = new FileInputStream(file);
  
   while ((c = fis.read()) != -1) {

   sos.write(c);
   }
  
   sos.flush();

   } finally {
   if (fis != null) {
   fis.close();
   }
   }
   }
  
   public void service(HttpServletRequest request, HttpServletResponse 
response) throws ServletException, IOException {

   ServletConfig config = getServletConfig();
   ServletContext application = config.getServletContext();
   File file = findFile(request);
  
   if (file == null) {

   } else {
  
   
response.setContentType(application.getMimeType(application/ + 
file.getName()));

   response.setContentLength((int)file.length());
   response.setHeader(Content-Disposition, attachment; 
filename =  + file.getName());
   sendFile(file, response);   
   }

   }
  
}


Hope that this is useful.

regards,

Lars Lind

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: displaying an image from outside the webapps directory

2008-03-21 Thread Kimberly Begley
Wow - great - thanks for the fast response - I will try it out.
Have a great weekend!
Kimberly

On Fri, Mar 21, 2008 at 9:12 PM, Lars Nielsen Lind
[EMAIL PROTECTED] wrote:
 Kimberly Begley skrev:


  Hi,
   I'm trying to make a jsp display a plot that is a jpeg in a directory
   outside the catalina_home directory - I do not have the option of
   putting it in the webapp directory (there's 1000's of them - my page
   will just display one of them as selected by the user - along with
   some other info) - how do I go about displaying it?
   Thanks
  
   -
   To start a new topic, e-mail: users@tomcat.apache.org
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  You can do that with a Servlet. Here are some sample code. Replace
  content of  with your own data.



  package package name;

  import java.io.*;
  import java.util.*;

  import javax.servlet.*;
  import javax.servlet.http.*;

  public class OpenFile extends HttpServlet {

 private String documentHome = .;
 private String page = ;
 private String version = ;
 private String remotehost = ;
 private String remoteaddress = ;

 protected File findFile(HttpServletRequest request) throws IOException {
 File file = new File(filename);

 return file;
 }

 protected void sendFile(File file, HttpServletResponse response)
  throws IOException {
 int c = 0;
 FileInputStream fis = null;

 try {
 ServletOutputStream sos = response.getOutputStream();
 fis = new FileInputStream(file);

 while ((c = fis.read()) != -1) {
 sos.write(c);
 }

 sos.flush();
 } finally {
 if (fis != null) {
 fis.close();
 }
 }
 }

 public void service(HttpServletRequest request, HttpServletResponse
  response) throws ServletException, IOException {
 ServletConfig config = getServletConfig();
 ServletContext application = config.getServletContext();
 File file = findFile(request);

 if (file == null) {
 } else {


  response.setContentType(application.getMimeType(application/ +
  file.getName()));
 response.setContentLength((int)file.length());
 response.setHeader(Content-Disposition, attachment;
  filename =  + file.getName());
 sendFile(file, response);
 }
 }

  }

  Hope that this is useful.

  regards,

  Lars Lind

  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Kimberly Begley

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6 / Apache 2.2 integration problem (no images, no css loaded)

2008-03-21 Thread Mark Thomas

Andreas Schneider wrote:

Hi,

I am trying to use my tomcat 6 over Apache 2.2. I have deployed a war called 
sw-builder.war into the webapps folder of the tomcat instance.


Since you are using Apache 2.2 I'd use mod_proxy_ajp. Configuration is as 
simple as:


1. Make sure AJP connector is enabled (eg on port 8009) of Tomcat

2. Add the following to httpd.conf

ProxyRequests Off

Proxy *
Order deny,allow
Allow from all
/Proxy

ProxyPass /sw-builder ajp://127.0.0.1:8009/sw-builder
ProxyPassReverse /sw-builder ajp://127.0.0.1:8009/sw-builder

Mark


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



lock wait endless in FastAsyncSocketSender

2008-03-21 Thread Ronald Klop

Hello,

I have this on one of my cluster nodes. Is this normal?
We are running Tomcat 5.5.26 on linux 2.6.22.1. On all nodes netstat gives full 
send and receive buffers on the tcp connections of the replication.

Cluster-FastAsyncSocketSender-6 daemon prio=1 tid=0x08d16af0 nid=0x78d7 in 
Object.wait() [0x766fe000..0x766ff140]
   at java.lang.Object.wait(Native Method)
   - waiting on 0x83e2a1b0 (a 
org.apache.catalina.cluster.util.SingleRemoveSynchronizedAddLock)
   at 
org.apache.catalina.cluster.util.SingleRemoveSynchronizedAddLock.lockRemove(SingleRemoveSynchronizedAddLock.java:205)
   - locked 0x83e2a1b0 (a 
org.apache.catalina.cluster.util.SingleRemoveSynchronizedAddLock)
   at org.apache.catalina.cluster.util.FastQueue.remove(FastQueue.java:552)
   at 
org.apache.catalina.cluster.tcp.FastAsyncSocketSender$FastQueueThread.getQueuedMessage(FastAsyncSocketSender.java:506)
   at 
org.apache.catalina.cluster.tcp.FastAsyncSocketSender$FastQueueThread.run(FastAsyncSocketSender.java:485)

netstat -n | grep 8015
tcp78829  46336 10.0.10.91:8015 10.0.10.94:37980ESTABLISHED
tcp36957  95568 10.0.10.91:5386710.0.10.87:8015 ESTABLISHED
tcp79063  46336 10.0.10.91:8015 10.0.10.88:55031ESTABLISHED
tcp36912  95568 10.0.10.91:3426610.0.10.88:8015 ESTABLISHED
tcp33282  0 10.0.10.91:3480310.0.10.95:8015 ESTABLISHED
tcp78290  46336 10.0.10.91:8015 10.0.10.95:60555ESTABLISHED
tcp78618  46336 10.0.10.91:8015 10.0.10.87:57796ESTABLISHED
tcp36930  95568 10.0.10.91:4063210.0.10.94:8015 ESTABLISHED

Any tips on how to debug/solve this?

Ronald.

Re: Regarding installation of Tomcat service wrapper

2008-03-21 Thread Mark Thomas

adhika123 wrote:

Hi
I want to know the details how to run Tomcat as service wrapper.
http://www.nabble.com/file/p16194942/error.docx error.docx 
I am getting the above mentioned error.

Could anybody please resolve this error ASAP.


Given that the file you point to is unreadable - no.

It would also help if you told us what Tomcat version you are using, what 
operating system (Windows) what steps you have performed from which page of 
the Tomcat documentation to install the service.


Mark


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: issue:reading the constant variables from txt/properties file

2008-03-21 Thread Mark Thomas

Nilesh Yadav wrote:

can anyone suggest me regarding the following issue.
it's urgent.
You only need to post your message once. We all saw it the first time and 
don't want/need the spam of a duplicate message.



environmental situation:
I am working on the hyperion portal HS9; here on this server Two
tomcats(both of :5.0.28) are present;
5.0.28 is a) really old, b) has lots of unpatched security issues and c) is 
not supported. You need to move to at least 5.5.x and ideally 6.0.x



issue:
In summary. On test server changes to config.properties take effect after a 
Tomcat restart but in production (distributed servers) you have to 
re-compile the applications.



here other prod server ProdServerB is considered as virtual for my
application  i have deploy my application only on prodserverA
i don't know whether it is because of distributed environment/not?
This is not standard Tomcat functionality. Something else is providing this 
for you.



do not the exact cause
can anyone tell/help me, why this is happening like this???
No idea. I suspect it is related to what ever third party tool is 
responsible for making server B appear to be virtual.



please send me the solution/suggestion regarding this ???
Talk to the supplier of your virtualisation software. This doesn't appear t 
be a Tomcat issue.


Mark


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Regarding installation of Tomcat service wrapper

2008-03-21 Thread David Smith

Hi.

error.docx is a MS Word 2007 format file, unreadable by older Office 
products (thank you Microsoft!) and probably most third party readers 
without updates or extra software.  Could you repost this as a plain old 
text file?


--David

radhika123 wrote:


Hi
I want to know the details how to run Tomcat as service wrapper.
http://www.nabble.com/file/p16194942/error.docx error.docx 
I am getting the above mentioned error.

Could anybody please resolve this error ASAP.



 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Having problem deploy a simple webapp

2008-03-21 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

to whom it may concern,

Guest1234 wrote:
| You were right, the problem occurred because Tomcat couldn't find
| WSServletContextListener.
| I checked and the above class comes with Sun Java Server which I don't
| have.
| Does Tomcat comes with a listener that supports the Annotations API (the
| @WebService and @WebMethod)?

No, Tomcat doesn't come with anything like that.

| If not where could I download a library that has a listener that supports
| the Annotations API?

I'm not sure. Check Sun's site for things like the Web Services
Development Pack (or whatever its current name is).

You could also try Apache Axis. They appear as one of the contributors
to JSR-181 (http://jcp.org/en/jsr/detail?id=181) and so they probably
are implementing it themselves.

See http://ws.apache.org/axis2/index.html : it shows that Axis2 supports
JSR 181.

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

iEYEARECAAYFAkfju7AACgkQ9CaO5/Lv0PDZngCfa5Y89P8GuPpwl4ZFKHeq5oZy
fWAAnRse8hCD10gWWn41QyZ0QUVWhkN5
=UqtQ
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Manager app authentication not working with JDBCRealm

2008-03-21 Thread Caldarale, Charles R
 From: Mark Leone [mailto:[EMAIL PROTECTED] 
 Subject: Re: Manager app authentication not working with JDBCRealm
 
 But why does my custom app display JDBCRealm in the credentials 
 prompt?

Because the 401.jsp file in the manager webapp overrides the default
dialog box; since your custom webapp has no such error page, the
realm-name is used.  Note that realm-name is purely cosmetic; you
can put anything you want there.

 Either this is not the right way to make an app work with JDBCRealm 
 (though it works with my custom app), or there's something wrong in
 this version of Tomcat.

I don't think there's anything wrong with Tomcat 6.0 in this regard,
since it's working fine for us with a Realm other than
UserDatabaseRealm.

1) Do you perhaps have a conf/Catalina/[host]/manager.xml file with its
own Realm?

2) Have you checked the traffic between Tomcat and the DB server when
you attempt to log in to the manager webapp?

3) Have you emptied your browser's cache, including saved credentials?

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: lock wait endless in FastAsyncSocketSender

2008-03-21 Thread Rainer Jung

Hello Ronald,

Ronald Klop schrieb:

Hello,

I have this on one of my cluster nodes. Is this normal?
We are running Tomcat 5.5.26 on linux 2.6.22.1. On all nodes netstat 
gives full send and receive buffers on the tcp connections of the 
replication.


Cluster-FastAsyncSocketSender-6 daemon prio=1 tid=0x08d16af0 
nid=0x78d7 in Object.wait() [0x766fe000..0x766ff140]

   at java.lang.Object.wait(Native Method)
   - waiting on 0x83e2a1b0 (a 
org.apache.catalina.cluster.util.SingleRemoveSynchronizedAddLock)
   at 
org.apache.catalina.cluster.util.SingleRemoveSynchronizedAddLock.lockRemove(SingleRemoveSynchronizedAddLock.java:205) 

   - locked 0x83e2a1b0 (a 
org.apache.catalina.cluster.util.SingleRemoveSynchronizedAddLock)

   at org.apache.catalina.cluster.util.FastQueue.remove(FastQueue.java:552)
   at 
org.apache.catalina.cluster.tcp.FastAsyncSocketSender$FastQueueThread.getQueuedMessage(FastAsyncSocketSender.java:506) 

   at 
org.apache.catalina.cluster.tcp.FastAsyncSocketSender$FastQueueThread.run(FastAsyncSocketSender.java:485) 



netstat -n | grep 8015
tcp78829  46336 10.0.10.91:8015 10.0.10.94:37980
ESTABLISHED
tcp36957  95568 10.0.10.91:5386710.0.10.87:8015 
ESTABLISHED
tcp79063  46336 10.0.10.91:8015 10.0.10.88:55031
ESTABLISHED
tcp36912  95568 10.0.10.91:3426610.0.10.88:8015 
ESTABLISHED
tcp33282  0 10.0.10.91:3480310.0.10.95:8015 
ESTABLISHED
tcp78290  46336 10.0.10.91:8015 10.0.10.95:60555
ESTABLISHED
tcp78618  46336 10.0.10.91:8015 10.0.10.87:57796
ESTABLISHED
tcp36930  95568 10.0.10.91:4063210.0.10.94:8015 
ESTABLISHED


Any tips on how to debug/solve this?


If you haven't set a removeWaitTimeout (which you shouldn't) the lock 
wait is interrupted every 30 seconds and started again. Waiting for the 
lock is usual unless the queue gets filled up. So if your observation 
indicates a problem or not should be debugged by looking at the queue 
size. You can get the queue size e.g. from the jmxproxy of the manager 
webapp (http://myserver:myport/manager/jmxproxy?qry=*:*) or the 
JConsole. Look for FastAsyncSocketSender and attribute queueSize. 
Usually it should be 0 most of the time.


There are more statictics for the replication, so you should be able to 
see, if your replication actually is stuck, or if it only can't cope 
with the amount of replication needed.


If not: do a couple of thread dumps (kill -QUIT) on one node with pauses 
of about 3 seconds in between. The results go to catalina.out. Then have 
a look, which threads actually hold the lock, the FastAsyncSocketSender 
is waiting for. Are they changing? If not, what are the threads holding 
the lock doing? You could also post the dumps or make them available to 
look at somewhere.




Ronald.


Regards,

Rainer

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Apache TomCat 6.x

2008-03-21 Thread joseph . ctr . herold

Because of a security issue with Apache TomCat 4.x, our office was required
to upgrade to version 6.x.  The software was loaded and installed on a
Windows 2003 server.  I see in the bottom right block the icon for Apache
TomCat 6.x but when I click on it, it shows that the service needs to be
started.  It doesn't appear to start.  Also checked under Win2K3 services
and trying to start the service there fails as well.

The problem is that I need Apache TomCat for my copy of JSpell.  The
version of JSpell may not be compatible with this version of Apache TomCat
but can't confirm since I am unsure if Apache TomCat is actually running.


I am seeing this in the jakarta_service_20080321.log file:

[2008-03-21 09:42:19] [info] Starting service...
[2008-03-21 09:42:20] [174  javajni.c] [error] The specified module could
not be found.
[2008-03-21 09:42:20] [986  prunsrv.c] [error] Failed creating java
C:\Program Files\Java\jre1.6.0_05\bin\client\jvm.dll
[2008-03-21 09:42:20] [1260 prunsrv.c] [error] ServiceStart returned 1
[2008-03-21 09:42:20] [info] Run service finished.
[2008-03-21 09:42:20] [info] Procrun finished.




Thank You,
Joseph Herold
Voice:  202-267-3768
Fax:  202-267-5532
E-Mail:  [EMAIL PROTECTED]


NOTICE:  This communication may contain privileged or other confidential
information.  If you are not the intended recipient or believe you may have
received this communication in error, please reply to the sender indicating
that fact and delete the copy you received.  In addition, you should not
print, copy, retransmit, disseminate, or otherwise use the information.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: lock wait endless in FastAsyncSocketSender

2008-03-21 Thread Ronald Klop

On Fri Mar 21 14:46:03 CET 2008 Tomcat Users List users@tomcat.apache.org 
wrote:

Hello Ronald,

Ronald Klop schrieb:
 Hello,
 
 I have this on one of my cluster nodes. Is this normal?
 We are running Tomcat 5.5.26 on linux 2.6.22.1. On all nodes netstat 
 gives full send and receive buffers on the tcp connections of the 
 replication.
 
 Cluster-FastAsyncSocketSender-6 daemon prio=1 tid=0x08d16af0 
 nid=0x78d7 in Object.wait() [0x766fe000..0x766ff140]

 at java.lang.Object.wait(Native Method)
 - waiting on 0x83e2a1b0 (a 
 org.apache.catalina.cluster.util.SingleRemoveSynchronizedAddLock)
 at 
 org.apache.catalina.cluster.util.SingleRemoveSynchronizedAddLock.lockRemove(SingleRemoveSynchronizedAddLock.java:205) 
 
 - locked 0x83e2a1b0 (a 
 org.apache.catalina.cluster.util.SingleRemoveSynchronizedAddLock)

 at org.apache.catalina.cluster.util.FastQueue.remove(FastQueue.java:552)
 at 
 org.apache.catalina.cluster.tcp.FastAsyncSocketSender$FastQueueThread.getQueuedMessage(FastAsyncSocketSender.java:506) 
 
 at 
 org.apache.catalina.cluster.tcp.FastAsyncSocketSender$FastQueueThread.run(FastAsyncSocketSender.java:485) 
 
 
 netstat -n | grep 8015
 tcp 78829 46336 10.0.10.91:8015 10.0.10.94:37980 
 ESTABLISHED
 tcp 36957 95568 10.0.10.91:53867 10.0.10.87:8015 
 ESTABLISHED
 tcp 79063 46336 10.0.10.91:8015 10.0.10.88:55031 
 ESTABLISHED
 tcp 36912 95568 10.0.10.91:34266 10.0.10.88:8015 
 ESTABLISHED
 tcp 33282 0 10.0.10.91:34803 10.0.10.95:8015 
 ESTABLISHED
 tcp 78290 46336 10.0.10.91:8015 10.0.10.95:60555 
 ESTABLISHED
 tcp 78618 46336 10.0.10.91:8015 10.0.10.87:57796 
 ESTABLISHED
 tcp 36930 95568 10.0.10.91:40632 10.0.10.94:8015 
 ESTABLISHED
 
 Any tips on how to debug/solve this?


If you haven't set a removeWaitTimeout (which you shouldn't) the lock 
wait is interrupted every 30 seconds and started again. Waiting for the 
lock is usual unless the queue gets filled up. So if your observation 
indicates a problem or not should be debugged by looking at the queue 
size. You can get the queue size e.g. from the jmxproxy of the manager 
webapp (http://myserver:myport/manager/jmxproxy?qry=*:*) or the 
JConsole. Look for FastAsyncSocketSender and attribute queueSize. 
Usually it should be 0 most of the time.


There are more statictics for the replication, so you should be able to 
see, if your replication actually is stuck, or if it only can't cope 
with the amount of replication needed.


If not: do a couple of thread dumps (kill -QUIT) on one node with pauses 
of about 3 seconds in between. The results go to catalina.out. Then have 
a look, which threads actually hold the lock, the FastAsyncSocketSender 
is waiting for. Are they changing? If not, what are the threads holding 
the lock doing? You could also post the dumps or make them available to 
look at somewhere.


 
 Ronald.


Regards,

Rainer




Hi,

I have queueSizes of about 25000 in jconsole. Not good I think.
Most cluster threads are waiting in socket.write() 
(SocketReplicationThread.sendAck and 
FastAsyncSocketSender$FastQueueThread.pushQueuedMessages). The tcp buffers in 
linux are full. It looks like all my clusterthreads in tomcat are writing, but 
nobody is reading.

Regards,

Ronald.

RE: Apache TomCat 6.x

2008-03-21 Thread Caldarale, Charles R
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Subject: Apache TomCat 6.x
 
 Because of a security issue with Apache TomCat 4.x, our 
 office was required to upgrade to version 6.x.

It's Tomcat, not TomCat.

 [2008-03-21 09:42:20] [174  javajni.c] [error] The specified 
 module could not be found.

A little Googling or search of the mailing list archives will get you
here:
http://issues.apache.org/bugzilla/show_bug.cgi?id=41538

The gist is that msvcr71.dll can't be found; to quote from Mark T:

The short-term fix is to copy msvcr71.dll from %JAVA_HOME%\bin to
%SYSTEM_ROOT%\system32 or any other location on the path.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Apache TomCat 6.x

2008-03-21 Thread joseph . ctr . herold
I will try this.  Thank you.

Hey at least I didn't title it TomKat.


Thank You,
Joseph Herold
Voice:  202-267-3768
Fax:  202-267-5532
E-Mail:  [EMAIL PROTECTED]


NOTICE:  This communication may contain privileged or other confidential
information.  If you are not the intended recipient or believe you may have
received this communication in error, please reply to the sender indicating
that fact and delete the copy you received.  In addition, you should not
print, copy, retransmit, disseminate, or otherwise use the information.


   
 Caldarale,   
 Charles R
 Chuck.Caldarale@  To 
 unisys.com   Tomcat Users List 
   users@tomcat.apache.org   
 03/21/2008 10:17   cc 
 AM
   Subject 
   RE: Apache TomCat 6.x   
 Please respond to 
   Tomcat Users   
   List   
 [EMAIL PROTECTED] 
 che.org  
   
   




 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Subject: Apache TomCat 6.x

 Because of a security issue with Apache TomCat 4.x, our
 office was required to upgrade to version 6.x.

It's Tomcat, not TomCat.

 [2008-03-21 09:42:20] [174  javajni.c] [error] The specified
 module could not be found.

A little Googling or search of the mailing list archives will get you
here:
http://issues.apache.org/bugzilla/show_bug.cgi?id=41538

The gist is that msvcr71.dll can't be found; to quote from Mark T:

The short-term fix is to copy msvcr71.dll from %JAVA_HOME%\bin to
%SYSTEM_ROOT%\system32 or any other location on the path.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: displaying an image from outside the webapps directory

2008-03-21 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Lars,

Lars Nielsen Lind wrote:
| You can do that with a Servlet. Here are some sample code. Replace
| content of  with your own data.

This would be a much better class if it:

* Did not have extraneous class members.
* Used a buffer for reading and writing to the streams.
* Did not truncate content-lengths that exceed Integer.MAX_VALUE.
* Used the proper MIME type (bug!), or allowed the servlet to
~  override it.
* Handled exceptions properly.
* Returned proper response codes.
* Included documentation (but hey, it's sample code!)

:(

I point out these problems not to embarrass Lars, but to point out that
giving code with these kinds of problems to a likely newbie (apologies,
Kimberly, if you are not a newbie... but your question admits a certain
level of understanding) does not serve them well. They come to the list
hoping to get good advice from good developers and you hand them a class
that is rife with problems.

My guess is that this kind of thing happens all the time and the
recipient is certainly happy to get some working code, but they don't go
over it and fix all the problems because it came from someone smarter
than them. Your code may become an example for how to do certain things.
Given that, we should endeavor to provide the highest quality code
possible to the readers of this list. We'll be helping them to be better
programmers.

Allow me to suggest a re-write of this class.

package ...;

import java.io.*;
import java.util.*;

import javax.servlet.*;
import javax.servlet.http.*;

public class DownloadServlet
~extends HttpServlet
{
~private static final int BUFFER_SIZE = 4096;
~private static final String BASE_FILE_PATH = /path/to/your/files;

~protected File findFile(HttpServletRequest request)
~   throws IOException
~{
~// This is a reasonable default implementation.
~// Feel free to change it.
~File file = new File(BASE_FILE_PATH + request.getPathInfo());

~return file;
~}

~protected File getMimeType(HttpServletRequest request, File file)
~{
~// This is a reasonable default implementation.
~// Feel free to change it.
~ServletContext application = request.getServletContext();

~return application.getMimeType(file.getName());
~}

~protected void sendFile(File file, HttpServletResponse response)
~throws IOException
~{
BufferedInputStream in = null;

~try {
int count;
~byte[] buffer = new byte[BUFFER_SIZE];

~in = new BufferedInputStream(new FileInputStream(file));

~ServletOutputStream out = response.getOutputStream();

~while(-1 != (count = in.read(buffer)))
~out.write(buffer, 0, count);

~out.flush();
~}
~finally
~{
~if (in != null)
~{
~try { in.close(); }
~catch (IOException ioe) { /* log an error! */ }
~}
~}
~}

~public void service(HttpServletRequest request,
~HttpServletResponse response)
~throws ServletException, IOException
~{
~File file = findFile(request);

~if(null == file || !file.exists())
~{
~response.sendError(HttpServletResponse.SC_NOT_FOUND);
~}
~else if(!file.canRead())
~{
~// Feel free to send NOT_FOUND instead, if you don't want to
~// give up potentially sensitive security information.
~response.sendError(HttpServletResponse.SC_FORBIDDEN);
~}
~else
~{
~response.setStatus(HttpServletResponse.SC_OK);
~response.setContentType(getMimeType(request, file));
~response.setHeader(Content-Type,
~   String.valueOf(file.length());
~response.setHeader(Content-Disposition,
~   attachment; filename=
~  + file.getName());

~sendFile(file, response);
~}
~}
}

- -chris

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

iEYEARECAAYFAkfjxWoACgkQ9CaO5/Lv0PBiFACeJuF3Gb91N5pwJlaWDFrVkksb
NhYAoKg9CtqkwNqmO2l0iA8+pPBzPM1d
=1LA6
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6 / Apache 2.2 integration problem (no images, no css loaded)

2008-03-21 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andreas,

Andreas Schneider wrote:
| I am trying to use my tomcat 6 over Apache 2.2 [using mod_jk].

Your problem is more likely the addition of ;jsessionid=... to the
URLs on your login page (because the server doesn't yet know if the
client supports cookies).

You have a few options:

1. Have Tomcat handle your static content (more JkMount lines)
2. Use mod_rewrite to remove ;jsessionid=... from URLs that
~   mod_jk does not handle
3. Use JkStripSession

I recommend #3 because it's the easiest and probably the most efficient.

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

iEYEARECAAYFAkfjxlgACgkQ9CaO5/Lv0PB9VQCffkTc0YrPtsrmuurpDWKGjwNw
xMQAoLz8w8wZEqIUxzdg9I78ZBw6y+VW
=IKf0
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: lock wait endless in FastAsyncSocketSender

2008-03-21 Thread Rainer Jung

Ronald Klop schrieb:
On Fri Mar 21 14:46:03 CET 2008 Tomcat Users List 
users@tomcat.apache.org wrote:

Hello Ronald,

Ronald Klop schrieb:
 Hello,
  I have this on one of my cluster nodes. Is this normal?
 We are running Tomcat 5.5.26 on linux 2.6.22.1. On all nodes netstat 
 gives full send and receive buffers on the tcp connections of the  
replication.
  Cluster-FastAsyncSocketSender-6 daemon prio=1 tid=0x08d16af0  
nid=0x78d7 in Object.wait() [0x766fe000..0x766ff140]

 at java.lang.Object.wait(Native Method)
 - waiting on 0x83e2a1b0 (a  
org.apache.catalina.cluster.util.SingleRemoveSynchronizedAddLock)
 at  
org.apache.catalina.cluster.util.SingleRemoveSynchronizedAddLock.lockRemove(SingleRemoveSynchronizedAddLock.java:205) 
  - locked 0x83e2a1b0 (a  
org.apache.catalina.cluster.util.SingleRemoveSynchronizedAddLock)
 at 
org.apache.catalina.cluster.util.FastQueue.remove(FastQueue.java:552)
 at  
org.apache.catalina.cluster.tcp.FastAsyncSocketSender$FastQueueThread.getQueuedMessage(FastAsyncSocketSender.java:506) 
  at  
org.apache.catalina.cluster.tcp.FastAsyncSocketSender$FastQueueThread.run(FastAsyncSocketSender.java:485) 
   netstat -n | grep 8015

 tcp 78829 46336 10.0.10.91:8015 10.0.10.94:37980  ESTABLISHED
 tcp 36957 95568 10.0.10.91:53867 10.0.10.87:8015  ESTABLISHED
 tcp 79063 46336 10.0.10.91:8015 10.0.10.88:55031  ESTABLISHED
 tcp 36912 95568 10.0.10.91:34266 10.0.10.88:8015  ESTABLISHED
 tcp 33282 0 10.0.10.91:34803 10.0.10.95:8015  ESTABLISHED
 tcp 78290 46336 10.0.10.91:8015 10.0.10.95:60555  ESTABLISHED
 tcp 78618 46336 10.0.10.91:8015 10.0.10.87:57796  ESTABLISHED
 tcp 36930 95568 10.0.10.91:40632 10.0.10.94:8015  ESTABLISHED
  Any tips on how to debug/solve this?

If you haven't set a removeWaitTimeout (which you shouldn't) the lock 
wait is interrupted every 30 seconds and started again. Waiting for 
the lock is usual unless the queue gets filled up. So if your 
observation indicates a problem or not should be debugged by looking 
at the queue size. You can get the queue size e.g. from the jmxproxy 
of the manager webapp 
(http://myserver:myport/manager/jmxproxy?qry=*:*) or the JConsole. 
Look for FastAsyncSocketSender and attribute queueSize. Usually it 
should be 0 most of the time.


There are more statictics for the replication, so you should be able 
to see, if your replication actually is stuck, or if it only can't 
cope with the amount of replication needed.


If not: do a couple of thread dumps (kill -QUIT) on one node with 
pauses of about 3 seconds in between. The results go to catalina.out. 
Then have a look, which threads actually hold the lock, the 
FastAsyncSocketSender is waiting for. Are they changing? If not, what 
are the threads holding the lock doing? You could also post the dumps 
or make them available to look at somewhere.


  Ronald.

Regards,

Rainer




Hi,

I have queueSizes of about 25000 in jconsole. Not good I think.
Most cluster threads are waiting in socket.write() 
(SocketReplicationThread.sendAck and 
FastAsyncSocketSender$FastQueueThread.pushQueuedMessages). The tcp 
buffers in linux are full. It looks like all my clusterthreads in tomcat 
are writing, but nobody is reading.


Yes, 25000 is bad. Would you mind making the thread dumps available?
You should also post your cluster config block from server.xml.
Did you set waitForAck? Default should be false for Async, you can 
check in JConsole. Your thread observation seems to indicate that it's true?


Regards,

Rainer

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6 / Apache 2.2 integration problem (no images, no css loaded)

2008-03-21 Thread Rainer Jung

Christopher Schultz schrieb:

Andreas,

Andreas Schneider wrote:
| I am trying to use my tomcat 6 over Apache 2.2 [using mod_jk].

Your problem is more likely the addition of ;jsessionid=... to the
URLs on your login page (because the server doesn't yet know if the
client supports cookies).

You have a few options:

1. Have Tomcat handle your static content (more JkMount lines)
2. Use mod_rewrite to remove ;jsessionid=... from URLs that
~   mod_jk does not handle
3. Use JkStripSession

I recommend #3 because it's the easiest and probably the most efficient.


Although that's a good hint, I would expect the original error messages

client denied by server configuration: 
E:/server/apache-tomcat-6.0/temp/0-sw-builder/images/blank.gif, ...


client denied by server configuration: 
E:/server/apache-tomcat-6.0/temp/0-sw-builder/ci.css, ...


indicate, that those URLs did not include a jsessionid.

The same holds true for Mark's comment: although mod_proxy_* is easier 
to setup than mod_jk for simple situations, I expect that in this case 
here there really is a httpd configuration problem not related to Tomcat 
or mod_jk/mod_proxy_*. The web server already detected that it should 
deliver the content by itself, but it denies access to the file.


Why? Hard to tell without the full httpd configuration. Could be some 
interaction between Directory and Location settings.


Regards,

Rainer


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



more info Re: cluster problem (sessions lost)

2008-03-21 Thread Ronald Klop

Hi,

I am using the FastAsyncSocketSender. Ngrep show me it sends a session and than 
receives 3 bytes (ack?). These 3 bytes are never read by the 
FastAsyncSocketSender, so the recv buffer of Linux is filling up. If the recv 
buffer is full. The send buffer on the other side is filled up after which the 
session replication halts.

Is it normal behaviour for FastAsyncSocketSender to not read the 3 bytes 
response?

Is can reproduce this on 5.5.20, 5.5.23 and 5.5.26.

Ronald.



On Mon Mar 17 12:15:30 CET 2008 Tomcat Users List users@tomcat.apache.org 
wrote:

Hello,

I have this problem in which there is very little data to get to a solution.
- Running a 5 node cluster of 5.5.23 on java 1.5.0_10. Debian 4.0 and kernel 
2.6.22.18-SMP.
- It runs behind a Linux LVS which balances the connections over the cluster.
- Attached is my server.xml.
- Sessions last for 8 hours, so customers can make a full workday while staying 
logged in.

This has run very stable for months. Nothing changed in handling sessions. The 
rest of the fixes were very small last weeks and I reviewed them more than ones 
and nothing related to sessions happened.
But since two weeks a lot of users are logged out now and than. This happens in 
bursts I think. If I restart every node in the cluster the problem disappears 
for a while (a day or a couple of hours).
Last week I upgraded to 5.5.26, but the problem is still there.
The logs give no errors.
I'm running Tomcat clusters for a couple of years now and solved a couple of 
problems with them, but now I have no clue in any logs about what is happening 
except users don't have a session anymore. (Possibly sessions aren't shared 
very well and after a 'load re-balancing' users get on a server which doesn't 
know the session.)

Are there any tips? How can I start debugging this? Is there a way to verify 
all servers have the same sessions?

Ronald.-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Tomcat 6 / Apache 2.2 integration problem (no images, no css loaded)

2008-03-21 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rainer,

Rainer Jung wrote:
| Although that's a good hint, I would expect the original error messages
|
| client denied by server configuration:
| E:/server/apache-tomcat-6.0/temp/0-sw-builder/images/blank.gif, ...
|
| client denied by server configuration:
| E:/server/apache-tomcat-6.0/temp/0-sw-builder/ci.css, ...
|
| indicate, that those URLs did not include a jsessionid.

Good call. Apologies for jumping to conclusions. I should have read the
error messages more closely.

Since this is the Apache httpd config:

| Directory E:/server/apache-tomcat-6.0/webapps/sw-builder
|   Order allow,deny
|   Allow from all
| /Directory

I'm guessing that the path should be changed (path above is
temp/0-sw-builder instead of webapps/sw-builder). Seems odd.

- -chris

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

iEYEARECAAYFAkfj090ACgkQ9CaO5/Lv0PCcMgCbBUQZi1vxFRjvcUa8rhq+ALCp
xWsAoLiaK/M3s4IEg9sNrgDPAtA8hVm8
=0Gyw
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6 / Apache 2.2 integration problem (no images, no css loaded)

2008-03-21 Thread Rainer Jung

Christopher Schultz schrieb:

Rainer,

Rainer Jung wrote:
| Although that's a good hint, I would expect the original error messages
|
| client denied by server configuration:
| E:/server/apache-tomcat-6.0/temp/0-sw-builder/images/blank.gif, ...
|
| client denied by server configuration:
| E:/server/apache-tomcat-6.0/temp/0-sw-builder/ci.css, ...
|
| indicate, that those URLs did not include a jsessionid.

Good call. Apologies for jumping to conclusions. I should have read the
error messages more closely.

Since this is the Apache httpd config:

| Directory E:/server/apache-tomcat-6.0/webapps/sw-builder
|   Order allow,deny
|   Allow from all
| /Directory

I'm guessing that the path should be changed (path above is
temp/0-sw-builder instead of webapps/sw-builder). Seems odd.


Yes, at least the pathes are not consistent. The path 
.../temp/0-sw-builder/... shows up at the beginning of the original post 
and at the end it's .../webapps/sw-builder/...


Andreas: where are the files actually? Why do you use inconsistent paths 
in the config?


Regards,

Rainer

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat Log Error on app deployment - NullPointer Exception, META-INF?

2008-03-21 Thread micah7

Hi,

When I build and deploy my new Java web application war file (using ant on
Linux command-line), I get the application showing and working. However the
error below is in the logs.

There seems to be something wrong with TLD files but I don't reference any
standard or custom tag libraries in the application code. is there a problem
with META-INF or my build file? What could be causing the Nullpointer
exception/postgresql jar/META-INF error? not sure which is the root cause
and why?

I'd appreciate any help! The application context name is /irips/.

Mar 19, 2008 4:15:46 PM org.apache.catalina.startup.TldConfig tldScanJar
SEVERE: Exception processing TLD META-INF/scriptfree.tld in JAR at resource
path
/opt/plumtree/RUNTIME/apache-tomcat-5.5.20/webapps/irips/WEB-INF/lib/standard.jar
in context /irips
java.lang.NullPointerException
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
at
org.apache.catalina.startup.TldConfig.tldScanStream(TldConfig.java:514)
at org.apache.catalina.startup.TldConfig.tldScanJar(TldConfig.java:472)
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:307)
at
org.apache.catalina.core.StandardContext.processTlds(StandardContext.java:4302)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4139)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:809)
at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:698)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1190)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:292)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1305)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1569)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1558)
at java.lang.Thread.run(Thread.java:595)
Mar 19, 2008 4:15:46 PM org.apache.catalina.startup.TldConfig tldScanJar
SEVERE: Exception processing TLD META-INF/sql-1_0-rt.tld in JAR at resource
path
/opt/plumtree/RUNTIME/apache-tomcat-5.5.20/webapps/irips/WEB-INF/lib/standard.jar
in context /irips
java.lang.NullPointerException
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
at
org.apache.catalina.startup.TldConfig.tldScanStream(TldConfig.java:514)
at org.apache.catalina.startup.TldConfig.tldScanJar(TldConfig.java:472)
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:307)
at
org.apache.catalina.core.StandardContext.processTlds(StandardContext.java:4302)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4139)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:809)
at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:698)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1190)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:292)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1305)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1569)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1558)
at java.lang.Thread.run(Thread.java:595)
Mar 19, 2008 4:15:46 PM org.apache.catalina.startup.TldConfig tldScanJar
SEVERE: Exception processing TLD META-INF/sql-1_0.tld in JAR at resource
path
/opt/plumtree/RUNTIME/apache-tomcat-5.5.20/webapps/irips/WEB-INF/lib/standard.jar
in context /irips
java.lang.NullPointerException
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:)
at 

Re: RE: Manager app authentication not working with JDBCRealm

2008-03-21 Thread Mark Leone

 
 But why does my custom app display JDBCRealm in the credentials 
 prompt?

Because the 401.jsp file in the manager webapp overrides the default
dialog box; since your custom webapp has no such error page, the
realm-name is used.  Note that realm-name is purely cosmetic; you
can put anything you want there.

This got me to thinking that perhaps I should try Form-based authentication 
rather than DIGEST. So I changed the login-config to

login-config
  auth-methodFORM/auth-method
  realm-nameTomcat Manager Application/realm-name
  form-login-config
form-login-page/login.jsp/form-login-page
form-error-page/401.jsp/form-error-page
  /form-login-config
/login-config

And I copied login.jsp from the Tomcat examples app to 
${catalina.home}\webapps\manager\.

Then I added a user with manager role to my JDBCRealm datastore, with the 
password digested directly, as opposed to the way it's done with DIGEST 
authentication.

And this worked! So now I have manager working with my JDBCRealm, and I'm happy 
to use FORM vice DIGEST authentication if I must. But is this expected that 
manager would not work with DIGEST authentication? When authentication was 
failing, the credentials prompt was a window, not a browser-rendered html page; 
so I assume it was being generated by the JDBCRealm. And the login-config was 
specifying DIGEST authentication, so I thought it should work with a user whose 
password was stored in the realm as digested via the DIGEST authentication 
algorithm.

Perhaps since I used DIGEST authentication, it was necessary to put the proper 
name of the realm in realm-name, despite what you said above. I know I had in 
this element at first the same realm name I used for generating the digested 
password in my datastore; but perhaps I had something else configured wrong 
when I had the realm name correct. I'll try again with DIGEST authentication 
with the proper realm name, and see if that works.

-Mark



-Mark

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Refreshing Tomcat After Replacing Webapp Classes

2008-03-21 Thread Rick Strong
Setup: Tomcat 5.5, server OS is Red Hat; development/client environment 
is Eclipse on Mac OS X 10.4.11.


I've been noting that when I make changes to my webapp code and export 
the classes to the server, changes take quite a while to take effect. 
The amount of refreshing I have to do is more than I would have 
expected, and I wonder if I'm missing something. The context is defined 
as reloadable=true. Changing servlet code (or any classes it depends on) 
doesn't automatically refresh the app. Turning the server off and on 
again may or may not work. I have better (but not great) results 
deleting the classes to be modified, then starting/stopping, then adding 
the modified classes, then starting again. In Eclipse, remote debugging 
gets out of sync  - I can see the debugger tracing through phantom lines 
of code that were current before the last editing session.


This is making development very slow and frustrating - the steps I have 
to go through seem excessive, and I get the feeling that I'm missing 
something.


Thanks for any information!

Rick Strong


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Manager app authentication not working with JDBCRealm

2008-03-21 Thread Mark Leone



Mark Leone wrote:


Perhaps since I used DIGEST authentication, it was necessary to put the proper name 
of the realm in realm-name, despite what you said above. I know I had in this 
element at first the same realm name I used for generating the digested password in 
my datastore; but perhaps I had something else configured wrong when I had the realm 
name correct. I'll try again with DIGEST authentication with the proper realm name, 
and see if that works.


  


I think I just proved my theory correct. I changed back to using DIGEST authentication, 
and it did not work. But as I reported before, the credentials window identified the 
realm name as Tomcat Manager Application, which you explained earlier comes 
from the specified error file, 401.jsp. But since the credentials window thinks this is 
the realm name, it's not going to calculate the correct value for the digested password, 
which of course includes the eralm name in the calculation.

So I commented out the error-page element, the credentials window now displays 
JDBCRealm as the realm name, and the authentication was successful.

So it seems to me that it is not correct for the realm name to be overriden by the 
error page. If the web app developer specifies a value for realm-name, 
shouldn't that be what e uses to calculate his digested password? If there's some 
reason why this behavior is preferable, then perhaps at least the documentation 
should indicate that when DIGEST authentication is used, the realm name specified 
will be overridden by the error page if one is present.

-Mark


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat deletes ROOT.xml for several contextes when redeploying a WAR-file

2008-03-21 Thread frode


Hello

I have set up tomcat 6.0.13 with several virtual hosts, and uses mainly the 
root-context on each.

for some of the hosts, I have created context-files in the corresponding 
directory.

hosts-part of server.xml :
  Host name=jira appBase=/local/www/dummy 
unpackWARs=true autoDeploy=true xmlValidation=false
xmlNamespaceAware=false
Aliasjira.fritid.as/Alias
Context path=/manager debug=0 privileged=true 
docBase=/local/tomcat/webapps/manager /
  /Host


  Host name=asak appBase=/local/www/dummy 
unpackWARs=false autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
Aliasks.asak.no/Alias
Aliaswww.xn--asakmiljstein-inb.no/Alias
Context path=/manager debug=0 privileged=true 
docBase=/local/tomcat/webapps/manager /
  /Host

  Host name=lif appBase=/local/www/dummy 
unpackWARs=false autoDeploy=true xmlValidation=false
xmlNamespaceAware=false
Aliaswww.lorenskogif.no/Alias
Context path=/manager debug=0 privileged=true 
docBase=/local/tomcat/webapps/manager /
  /Host

  Host name=fau appBase=/local/www/dummy 
unpackWARs=false autoDeploy=true xmlValidation=false
xmlNamespaceAware=false
Aliaswww.solheim.fau.no/Alias
Context path= docBase=/local/www/fau debug=0
  Manager 
className=org.apache.catalina.session.PersistentManager saveOnRestart=false
/
/Context
Context path=/manager debug=0 privileged=true 
docBase=/local/tomcat/webapps/manager /
  /Host

  Host name=lux1 appBase=/local/www/dummy 
unpackWARs=false autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
Aliaslux.fritid.as/Alias
Context path=/manager debug=0 privileged=true 
docBase=/local/tomcat/webapps/manager /
  /Host

  Host name=jung appBase=/local/www/dummy 
unpackWARs=false autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
Aliaskurs.jungheinrich.fritid.as/Alias
Context path= docBase=/local/www/jung debug=0
  Manager 
className=org.apache.catalina.session.PersistentManager saveOnRestart=false
/
/Context
Context path=/manager debug=0 privileged=true 
docBase=/local/tomcat/webapps/manager /
  /Host


  Host name=localhost appBase=/local/www/default 
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
Aliaswh2.fritid.as/Alias
  /Host

for the hosts jira, asak, lux1 and lif I have created subfolders  
conf/Catalina/jira, conf/Catalina/asak etc. and into
those direcories I have put a single file ROOT.xml

like those :
(asak):
Context docBase=/local/www/asak debug=0
  Manager 
className=org.apache.catalina.session.PersistentManager saveOnRestart=false
/
/Context
(lif):

Context  docBase=/local/www/lif debug=0 reloadable=true

!-- Default set of monitored resources --
WatchedResourceWEB-INF/web.xml/WatchedResource


 Resource name=jdbc/lif auth=Container initialSize=3
  type=javax.sql.DataSource driverClassName=com.mysql.jdbc.Driver
  url=jdbc:mysql://10.1.3.1:3306/lif
  username= password= maxActive=25 maxIdle=2 
minIdle=0 maxWait=1000
removeAbandonedTimeout=10
   logAbandoned=true  removeAbandoned=true
  /

/Context

(lux) :

Context path= docBase=/local/www/luxApp-1.0-SNAPSHOT.war debug=0 
reloadable=true

!-- Default set of monitored resources --
WatchedResourceWEB-INF/web.xml/WatchedResource



/Context

As you can see, the LUX-context points to a packed WAR-file, and this is the 
one I have trouble with.

When I redploy this WAR-file (replaces it with a new one) Tomcat detects this, 
and redeploys this application. The
problem is that it also deletes the ROOT.xml for the three hosts (jira, lif and 
asak) the hosts with all
context-information inside server.xml is left untouched...

All three doc-bases are valid.

Why does Tomcat do this, and how can I stop it ?

Regards
Frode Halvorsen





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Manager app authentication not working with JDBCRealm

2008-03-21 Thread Caldarale, Charles R
 From: Mark Leone [mailto:[EMAIL PROTECTED] 
 Subject: Re: Manager app authentication not working with JDBCRealm

 So it seems to me that it is not correct for the realm name 
 to be overriden by the error page.

Actually, I think it is.  The reason the realm-name is cosmetic in the
case of the manager webapp is because of the following line in the
401.jsp file:

response.setHeader(WWW-Authenticate,
   Basic realm=\Tomcat Manager Application\);

Since the webapp has declared an override for the normal
container-generated 401 processing, it's the webapp's responsibility to
create the appropriate content for the browser to process.  Note that
the above header forces *basic* authentication along with the realm name
(cosmetic for non-digest).  However, the Realm is operating under the
assumption that digest authentication is to be used, since that's what's
declared in web.xml for the webapp.

Since there doesn't seem to be any means of the 401.jsp to interact with
the declared Realm to determine or specify the other necessary
attributes for a digest 401 response (e.g., the nonce), it looks like
it's impossible at this time to use a custom 401 handler with
container-managed digest authentication.

Nice bit of research you've done, by the way; thanks for all the work.
You would think that such interaction between a custom 401 page and
digest authentication would be documented in the servlet spec, but I
can't find any mention of it.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]