Re: ${pageContext.request.contextPath} not resolving

2012-03-11 Thread Ole Ersoy

Super - Thanks!
- Ole

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



Re: ${pageContext.request.contextPath} not resolving

2012-03-11 Thread Ole Ersoy

So, is it rendering it as text or is it throwing an exception?


Just rendering as text.
 

What is your jsp-config in web.xml?


http://java.sun.com/dtd/web-app_2_3.dtd"; >


  Archetype Created Web Application


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



${pageContext.request.contextPath} not resolving

2012-03-10 Thread Ole Ersoy

Hi,

I have a very simple jsp page like this:

<%@ page language="java"
 contentType="text/html; charset=UTF-8"
 pageEncoding="UTF-8"%>


${pageContext.request.contextPath}


${pageContext.request.contextPath} is not resolving.
I have the following maven dependencies:


javax.servlet
jstl
1.1.2
jar
compile



org.apache.tomcat
jsp-api
6.0.32
provided




taglibs
standard
1.1.2
jar
compile


Do I need anything else (Configuration, dependency, ...) in order to get it to 
resolve?

TIA,
- Ole

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



Re: Running Tomcat on Port 80 with Fedora 16 without IP tables redirect

2012-02-07 Thread Ole Ersoy

Thanks Andre and John.  I used jsvc to run tomcat before.  Maybe that's what 
got me around the root user restriction.  Seems the simplest solution is to 
just use NAT.  There are instructions at the bottom of this post for anyone 
else interested.

http://www.davidghedini.com/pg/entry/install_tomcat_7_on_centos

Cheers,
- Ole

On 02/07/2012 11:38 AM, John Renne wrote:


On Feb 7, 2012, at 6:14 PM, Ole Ersoy wrote:


Hi,

In the past I have been able to run tomcat on port 80 under a "tomcat" user.  
It seems like the latest versions of Fedora require that tomcat either be run as root or 
requests to 8080 have to be redirected using iptables.   Can anyone confirm this?


On each unix you will need root privileges to bind to a socket below 1024. 
Tomcat is no different so it will need either root privileges, or a port over 
1024 (default indeed 8080)

John


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




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



Running Tomcat on Port 80 with Fedora 16 without IP tables redirect

2012-02-07 Thread Ole Ersoy

Hi,

In the past I have been able to run tomcat on port 80 under a "tomcat" user.  
It seems like the latest versions of Fedora require that tomcat either be run as root or 
requests to 8080 have to be redirected using iptables.   Can anyone confirm this?

TIA,
- Ole

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



Re: Servlet 3.0 File Upload

2011-09-06 Thread Ole Ersoy

Thanks guys!

Ole

On 09/03/2011 10:51 AM, Konstantin Preißer wrote:

Hi,


-Original Message-
From: Jonathan Soons [mailto:jso...@juilliard.edu]
Sent: Saturday, September 03, 2011 2:24 PM
To: Ole Ersoy; Tomcat Users List
Subject: RE: Servlet 3.0 File Upload

You need to add a line in in your form:


Then in your servlet GetPost() method you put this filename in a
variable:
String filename;
filename = req.getParameter("filename");

Then instead of part.write("samplefile");
do:
part.write(filename);



Doesn't that mean that the user has to enter the filename by himself?

What I usually do to get the filename is:

Part uploadPart = request.getPart("uploadfield"); // get the Part
String contDispoHeader = uploadPart.getHeader("Content-Disposition"); // get 
Content-Disposition header
String uploadFilename = null;
if (contDispoHeader != null) {
try {
uploadFilename = new 
ContentDisposition(contDispoHeader).getParameter("filename");
} catch (ParseException e) { }
}

Note that "ContentDisposition" class is from JavaMail package 
(javax.mail.internet.ContentDisposition). Browser usually send filenames in the 
"filename" parameter of a Content-Disposition header.


Regards,

Konstantin Preißer


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




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



Re: [Servlet 3.0] Monitoring File Upload Progress

2011-09-06 Thread Ole Ersoy

Hi Andre,

I'm looking for something like this:

pfu.setProgressListener(new FileUploadProgressListener());

Described in this article:
http://www.ibm.com/developerworks/web/library/wa-aj-dwr/?ca=dgr-lnxw06AjaxDWR

I could just go back to commons file upload, but thought I'd look around to see 
if anything something similar could be done with servlet 3.0.

Thanks,
- Ole


On 09/05/2011 03:12 PM, André Warnier wrote:

Ole Ersoy wrote:

Hi,

Anyone know whether it's possible to monitor progress of a file upload?


What do you mean by "monitoring" ?

Is it a question of providing the user with some feedback, like a
progress bar ?

If so, then one of the easier ways would be to write your own java
applet, downloaded and run by the browser in your upload form, to do the
upload and display some progress bar to the user.
You may want to search for something already available to do it though,
because writing it from scratch is not really trivial.
Personally, I would only do that if it was /really/ worth the effort.
Like if many users get impatient and break off the upload before it
finishes. Or of course if the marketing guys insist on it, for the look.
But then tell them the cost.


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




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



Re: Servlet 3.0 File Upload

2011-09-05 Thread Ole Ersoy

Thank you for the advice.  I'll stick to hard coded file locations and names :).

Thanks again,
- Ole

On 09/05/2011 03:22 AM, André Warnier wrote:

This must be about the worst advice I have ever seen.
What about someone typing e.g. "/etc/passwd" in that text box?

If you allow people to upload files to your server, you should create
your own location and naming scheme for the uploaded files. You should
not even use the original filename, unless you are dying to experience
all the silly things that people can think of in terms of filenames
(with spaces in them, or characters that are valid on one platform but
not another, or characters in various character sets and so on.)


Jonathan Soons wrote:

You need to add a line in in your form:


Then in your servlet GetPost() method you put this filename in a
variable:
String filename;
filename = req.getParameter("filename");

Then instead of part.write("samplefile");
do:
part.write(filename);

Jonathan Soons
________
From: Ole Ersoy [ole.er...@gmail.com]
Sent: Friday, September 02, 2011 6:50 PM
To: Tomcat Users List
Subject: Servlet 3.0 File Upload

Hi,

I have a working file upload servlet, with the exception that it calls
the uploaded file "samplefile" instead of using the name of the file.
So if I upload different files, they all overwrite each other. Any
ideas on how to fix this? I used this tutorial to get it working:

http://www.servletworld.com/servlet-tutorials/servlet3/multipartconfig-file-upload-example.html


TIA,
- Ole


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





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




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



Re: Servlet 3.0 File Upload

2011-09-05 Thread Ole Ersoy

Thank you for the advice.  I'll stick to hard coded file locations and names :).

Thanks again,
- Ole

On 09/05/2011 03:22 AM, André Warnier wrote:

This must be about the worst advice I have ever seen.
What about someone typing e.g. "/etc/passwd" in that text box?

If you allow people to upload files to your server, you should create
your own location and naming scheme for the uploaded files. You should
not even use the original filename, unless you are dying to experience
all the silly things that people can think of in terms of filenames
(with spaces in them, or characters that are valid on one platform but
not another, or characters in various character sets and so on.)


Jonathan Soons wrote:

You need to add a line in in your form:


Then in your servlet GetPost() method you put this filename in a
variable:
String filename;
filename = req.getParameter("filename");

Then instead of part.write("samplefile");
do:
part.write(filename);

Jonathan Soons
________
From: Ole Ersoy [ole.er...@gmail.com]
Sent: Friday, September 02, 2011 6:50 PM
To: Tomcat Users List
Subject: Servlet 3.0 File Upload

Hi,

I have a working file upload servlet, with the exception that it calls
the uploaded file "samplefile" instead of using the name of the file.
So if I upload different files, they all overwrite each other. Any
ideas on how to fix this? I used this tutorial to get it working:

http://www.servletworld.com/servlet-tutorials/servlet3/multipartconfig-file-upload-example.html


TIA,
- Ole


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





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




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



[Servlet 3.0] Monitoring File Upload Progress

2011-09-03 Thread Ole Ersoy

Hi,

Anyone know whether it's possible to monitor progress of a file upload?

TIA,
- Ole

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



Servlet 3.0 Part Header Keys

2011-09-03 Thread Ole Ersoy

Hi,

Anyone know if the the keys for the various javax.servlet.http.Part headers are 
available as constants anywhere?  I'd like to do something like:

part.getHeader(Part.FILENAME);...instead of
part.getHeader("filename");

TIA,
- Ole

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



Re: Servlet 3.0 File Upload

2011-09-02 Thread Ole Ersoy

Never mind...I see the example hard codes the name of the file.  Sorry for the 
noise.

On 09/02/2011 05:50 PM, Ole Ersoy wrote:

Hi,

I have a working file upload servlet, with the exception that it calls
the uploaded file "samplefile" instead of using the name of the file. So
if I upload different files, they all overwrite each other. Any ideas on
how to fix this? I used this tutorial to get it working:

http://www.servletworld.com/servlet-tutorials/servlet3/multipartconfig-file-upload-example.html


TIA,
- Ole


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



Servlet 3.0 File Upload

2011-09-02 Thread Ole Ersoy

Hi,

I have a working file upload servlet, with the exception that it calls the uploaded file 
"samplefile" instead of using the name of the file.  So if I upload different 
files, they all overwrite each other.  Any ideas on how to fix this?  I used this 
tutorial to get it working:

http://www.servletworld.com/servlet-tutorials/servlet3/multipartconfig-file-upload-example.html

TIA,
- Ole   


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



Re: Tomcat 7 Shared Class Loader Removed?

2011-06-01 Thread Ole Ersoy

Chuck,

Thank you.  I have some jars that I'm going to create an RPM for to help with 
provisioning.  Since I'm doing that I thought linking or putting them in the 
shared class loader repository might be smart, but perhaps not :).

Thanks again,
- Ole




On 06/01/2011 03:10 PM, Caldarale, Charles R wrote:

From: Ole Ersoy [mailto:ole.er...@gmail.com]
Subject: Re: Tomcat 7 Shared Class Loader Removed?



I was thinking about putting the jars in the shared repository,
rather than deploying them with the war.  Could you please help
me understand why this is bad?


1) You would have data sharing - probably inadvertent - across all the webapps. 
 Information can leak from one to another, which has serious integrity and 
security implications.

2) You would introduce versioning dependencies across all your webapp 
deployments, so if one copy of the webapp needed to be updated for a given 
client set, all would have to be updated simultaneously.

3) Redeployment or restart of a single webapp would be impossible.

Other than saving a certain amount of disk and memory space (both of which are 
exceedingly cheap these days), what do you think you would gain?

  - 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




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



Re: Tomcat 7 Shared Class Loader Removed?

2011-06-01 Thread Ole Ersoy

Hi Chuck,

I may have a server that has several instances of the same web application 
running under different contexts.  I was thinking about putting the jars in the 
shared repository, rather than deploying them with the war.  Could you please 
help me understand why this is bad?

TIA,
- Ole 


On 06/01/2011 02:12 PM, Caldarale, Charles R wrote:

From: Ole Ersoy [mailto:ole.er...@gmail.com]
Subject: Tomcat 7 Shared Class Loader Removed?



I noticed that the tomcat 7 documentation has removed the "Shared"
classloader description.  Has the shared classloader been removed
from tomcat?


It wasn't removed per se, but it is no longer used by default.  You may still 
configure it in catalina.properties, if you have a pressing need to do so 
(usually a very, very bad idea).

Note that this actually happened with Tomcat 6, about 4.5 years ago...

  - 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




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



Tomcat 7 Shared Class Loader Removed?

2011-06-01 Thread Ole Ersoy

Hi,

I noticed that the tomcat 7 documentation has removed the "Shared" classloader 
description.  Has the shared classloader been removed from tomcat?

TIA,
- Ole

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



Re: Socket bind failed: [22] Invalid argument - Fedora 11

2009-07-16 Thread Ole Ersoy

Mark,

(And everyone) Thanks a gazillion for helping to clarify this.  I was building 
the APR connector with the wrong version number (1.1.14).  I must have had old 
apr connector files laying around from when I was building earlier tomcat 
versions.  The log is clean now.

Thanks again,
- Ole

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



Re: Socket bind failed: [22] Invalid argument - Fedora 11

2009-07-15 Thread Ole Ersoy

Mark,

I looked at the startup log a little closer and there's this line:

Jul 15, 2009 2:24:09 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.14.

I noticed below that you said I should be using 1.1.6.  So maybe this is the 
problem.  At first I thought I was using a much more recent version of APR, 
since I have the following installed:

apr-1.3.5-1.fc11.i586
[...@ole noarch]$ rpm -q apr-devel
apr-devel-1.3.5-1.fc11.i586
[...@ole noarch]$ rpm -q apr-util
apr-util-1.3.7-1.fc11.i586

So I'm trying to figure out why Tomcat says it's using 1.1.14?  Any ideas?

Thanks again,
- Ole



On 07/15/2009 01:10 PM, Mark Thomas wrote:


With the latest APR/native (1.1.16) and 6.0.20 ipv6 should work. At least it 
does for me on Ubuntu.

Mark


--- Original Message ---
From: Ole Ersoy
To: Tomcat Users List
Sent: 15/07/09, 18:45:06
Subject: Socket bind failed: [22] Invalid argument - Fedora 11

Hi,

I'm trying to get Tomcat 6.0.20 with APR and JSVC to run on Fedora 11.  During 
startup I get this:

SEVERE: Error initializing endpoint
java.lang.Exception: Socket bind failed: [22] Invalid argument
  at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:623)
  at 
org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:107)
  at 
org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
  at 
org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
  at 
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)

I think it's because IPv6 is enabled.  I'd like to keep IPv6 enabled.  Anyone 
know if there's a way?

TIA,
- Ole

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





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




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



Re: Socket bind failed: [22] Invalid argument - Fedora 11

2009-07-15 Thread Ole Ersoy

Hi,

I just tried a manual install and start using only the startup.sh script and it 
works fine.

[r...@ole bin]# chmod u+x *.sh
[r...@ole bin]# ./startup.sh
Using CATALINA_BASE:   /home/ole/apache-tomcat-6.0.20
Using CATALINA_HOME:   /home/ole/apache-tomcat-6.0.20
Using CATALINA_TMPDIR: /home/ole/apache-tomcat-6.0.20/temp
Using JRE_HOME:   /opt/jdk1.6.0_14

Log:
Jul 15, 2009 2:36:48 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal 
performance in production environments was not found on the java.library.path: 
/opt/jdk1.6.0_14/jre/lib/i386/client:/opt/jdk1.6.0_14/jre/lib/i386:/opt/jdk1.6.0_14/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
Jul 15, 2009 2:36:49 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jul 15, 2009 2:36:49 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1268 ms
Jul 15, 2009 2:36:49 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 15, 2009 2:36:49 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
Jul 15, 2009 2:36:50 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jul 15, 2009 2:36:50 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jul 15, 2009 2:36:50 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/89  config=null
Jul 15, 2009 2:36:50 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1881 ms

Ole

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



Re: Socket bind failed: [22] Invalid argument - Fedora 11

2009-07-15 Thread Ole Ersoy

Hi Mladen,

I tried adding the address attribute like this:



I also tried:



But I still get the same message.  I'll try it without jsvc next.

Thanks,
- Ole


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



Re: Socket bind failed: [22] Invalid argument - Fedora 11

2009-07-15 Thread Ole Ersoy

Mark,

Thanks - yeah - I read up on the ubuntu ticket, and decided to give 6.0.20 a 
try.  I built the rpm package using the following dependencies:

Requires: apr-devel = 1.3.5
Requires: apr = 1.3.5
Requires: apr-util = 1.3.7

I'm going to try just doing a manual install next to make sure it works with 
the shell scripts, like Mladen suggested.

Ole

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



Socket bind failed: [22] Invalid argument - Fedora 11

2009-07-15 Thread Ole Ersoy

Hi,

I'm trying to get Tomcat 6.0.20 with APR and JSVC to run on Fedora 11.  During 
startup I get this:

SEVERE: Error initializing endpoint
java.lang.Exception: Socket bind failed: [22] Invalid argument
at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:623)
at 
org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:107)
at 
org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
at 
org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
at 
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)

I think it's because IPv6 is enabled.  I'd like to keep IPv6 enabled.  Anyone 
know if there's a way?

TIA,
- Ole

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



Re: java.lang.NoClassDefFoundError: org.apache.catalina.mbeans.ServerLifecycleListener

2008-12-20 Thread Ole Ersoy

Hmmm - I'm running with OpenJDK 1.6 (Should that have gcj stuff in it - I'm 
also using jsvc and APR - maybe it got mixed in somehow?):

java -version
java version "1.6.0_0"
IcedTea6 1.4 (fedora-7.b12.fc10-i386) Runtime Environment (build 1.6.0_0-b12)
OpenJDK Client VM (build 10.0-b19, mixed mode)

I'm going to try to setup everything from scratch and see if I can isolate the 
issue better.

Thanks,
- Ole


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



java.lang.NoClassDefFoundError: org.apache.catalina.mbeans.ServerLifecycleListener

2008-12-19 Thread Ole Ersoy

Hi,

I'm attempting to install Tomcat 6.0.18 on Linux.  Right now I'm getting this:

19-Dec-08 2:39:58 PM org.apache.tomcat.util.digester.Digester startElement
SEVERE: Begin event threw error
java.lang.NoClassDefFoundError: 
org.apache.catalina.mbeans.ServerLifecycleListener
  at java.lang.Class.initializeClass(libgcj.so.9)
  at java.lang.Class.newInstance(libgcj.so.9)
  at 
org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:206)
  at org.apache.tomcat.util.digester.Rule.begin(Rule.java:153)
  at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1358)
  at gnu.xml.stream.SAXParser.parse(libgcj.so.9)
  at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644)
  at org.apache.catalina.startup.Catalina.load(Catalina.java:516)
  at java.lang.reflect.Method.invoke(libgcj.so.9)
  at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
  at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:275)
  at java.lang.reflect.Method.invoke(libgcj.so.9)
  at org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:160)
Caused by: java.lang.ClassNotFoundException: 
javax.management.modelmbean.ModelMBeanNotificationBroadcaster not found in 
org.apache.catalina.loader.StandardClassLoader{urls=[file:/var/lib/tomcat/common/tomcat-i18n-fr.jar,file:/var/lib/tomcat/common/jsp-api.jar,file:/var/lib/tomcat/common/catalina-ant.jar,file:/var/lib/tomcat/common/tomcat-dbcp.jar,file:/var/lib/tomcat/common/annotations-api.jar,file:/var/lib/tomcat/common/tomcat-i18n-ja.jar,file:/var/lib/tomcat/common/jasper-el.jar,file:/var/lib/tomcat/common/tomcat-i18n-es.jar,file:/var/lib/tomcat/common/el-api.jar,file:/var/lib/tomcat/common/catalina-ha.jar,file:/var/lib/tomcat/common/catalina-tribes.jar,file:/var/lib/tomcat/common/servlet-api.jar,file:/var/lib/tomcat/common/jasper-jdt.jar,file:/var/lib/tomcat/common/tomcat-coyote.jar,file:/var/lib/tomcat/common/jasper.jar,file:/var/lib/tomcat/common/catalina.jar],
 
parent=gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/lib/jvm/java/lib/tools.jar,file:/usr/share/tomcat/bin/
commons-daemon.jar,file:/usr/share/tomcat/bin/bootstrap.jar], 
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}}

Looking at the above it seems like the class loader knows where all the 
libraries are.  And they really are there:

[r...@ole conf]# ls -la /var/lib/tomcat/common
total 4764
drwxr-xr-x 2 root root  4096 2008-12-19 12:37 .
drwxr-xr-x 4 root root  4096 2008-12-19 12:37 ..
-rw-r--r-- 1 root tomcat   10797 2008-12-19 12:36 annotations-api.jar
-rw-r--r-- 1 root tomcat   49175 2008-12-19 12:36 catalina-ant.jar
-rw-r--r-- 1 root tomcat  122848 2008-12-19 12:36 catalina-ha.jar
-rw-r--r-- 1 root tomcat 1127397 2008-12-19 12:37 catalina.jar
-rw-r--r-- 1 root tomcat  228193 2008-12-19 12:36 catalina-tribes.jar
-rw-r--r-- 1 root tomcat   27671 2008-12-19 12:36 el-api.jar
-rw-r--r-- 1 root tomcat  102174 2008-12-19 12:36 jasper-el.jar
-rw-r--r-- 1 root tomcat  510002 2008-12-19 12:37 jasper.jar
-rw-r--r-- 1 root tomcat 1385552 2008-12-19 12:36 jasper-jdt.jar
-rw-r--r-- 1 root tomcat   72089 2008-12-19 12:36 jsp-api.jar
-rw-r--r-- 1 root tomcat   83556 2008-12-19 12:36 servlet-api.jar
-rw-r--r-- 1 root tomcat  741071 2008-12-19 12:36 tomcat-coyote.jar
-rw-r--r-- 1 root tomcat  197325 2008-12-19 12:36 tomcat-dbcp.jar
-rw-r--r-- 1 root tomcat   45634 2008-12-19 12:36 tomcat-i18n-es.jar
-rw-r--r-- 1 root tomcat   42659 2008-12-19 12:36 tomcat-i18n-fr.jar
-rw-r--r-- 1 root tomcat   48579 2008-12-19 12:36 tomcat-i18n-ja.jar

Any ideas on what could be causing the exception?  I start tomcat with jsvc 
like so:

export LD_LIBRARY_PATH=/usr/local/apr/lib:
CATALINA_HOME=/usr/share/tomcat
JAVA_HOME=/usr/lib/jvm/java
DAEMON_LAUNCHER=$CATALINA_HOME/bin/jsvc
TOMCAT_USER=tomcat
TMP_DIR=/var/cache/tomcat/temp
CATALINA_OPTS=
CLASSPATH=$JAVA_HOME/lib/tools.jar:$CATALINA_HOME/bin/commons-daemon.jar:$CATALINA_HOME/bin/bootstrap.jar

case "$1" in
 start)
   #
   # Start Tomcat
   #
if [ -e /var/run/jsvc.pid ]
then
   echo "Tomcat is running already"
else
   echo -n "Starting tomcat"
   echo
   $DAEMON_LAUNCHER \
   -user $TOMCAT_USER \
   -home $JAVA_HOME \
   -Dcatalina.home=$CATALINA_HOME \
   -Djava.io.tmpdir=$TMP_DIR \
   -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
   -Djava.util.logging.config.file=$CATALINA_HOME/conf/logging.properties \
   -outfile /var/log/tomcat/catalina.out \
   -errfile '&1' \
   $CATALINA_OPTS \
   -cp $CLASSPATH \
   org.apache.catalina.startup.Bootstrap
   touch /var/lock/subsys/apache-tomcat
   #
   # To get a verbose JVM
   #-verbose # To get a debug of jsvc.
   #-debug
fi
   ;;

My java version is this:

java version "1.6.0_0"
IcedTea6 1.4 (fedora-7.b12.fc10-i386) Runtime Environment (build 1.6.0_0-b12)
OpenJDK Client VM (build 10.0-b19, mixed mode)

TIA,
- Ole

-
To unsubscribe, e-mail: users-unsubscr...@tomc

Re: Building Tomcat With IcedTea

2008-10-18 Thread Ole Ersoy

Chuck,

That must be it (Even though the build instructions for Tomcat 6 say 1.5.x or later).  Thanks again for the heads up.  


- Ole


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



Building Tomcat With IcedTea

2008-10-17 Thread Ole Ersoy

Hi,

I'm trying to build tomcat with IcedTea.  I get the following types of errors 
while DBCP is being built:

   [javac] 
/usr/share/java/tomcat6-deps/dbcp/src/java/org/apache/tomcat/dbcp/dbcp/cpdsadapter/PoolablePreparedStatementStub.java:34:
 isClosed() in org.apache.tomcat.dbcp.dbcp.DelegatingStatement cannot implement 
isClosed() in java.sql.Statement; attempting to assign weaker access 
privileges; was public
   [javac] class PoolablePreparedStatementStub extends 
PoolablePreparedStatement {
   [javac] ^
   [javac] 
/usr/share/java/tomcat6-deps/dbcp/src/java/org/apache/tomcat/dbcp/dbcp/datasources/PerUserPoolDataSource.java:52:
 org.apache.tomcat.dbcp.dbcp.datasources.PerUserPoolDataSource is not abstract and 
does not override abstract method isWrapperFor(java.lang.Class) in 
java.sql.Wrapper
   [javac] public class PerUserPoolDataSource
   [javac]^
   [javac] 
/usr/share/java/tomcat6-deps/dbcp/src/java/org/apache/tomcat/dbcp/dbcp/datasources/SharedPoolDataSource.java:45:
 org.apache.tomcat.dbcp.dbcp.datasources.SharedPoolDataSource is not abstract and 
does not override abstract method isWrapperFor(java.lang.Class) in 
java.sql.Wrapper
   [javac] public class SharedPoolDataSource
   [javac]^
   [javac] Note: Some input files use or override a deprecated API.
   [javac] Note: Recompile with -Xlint:deprecation for details.
   [javac] Note: Some input files use unchecked or unsafe operations.
   [javac] Note: Recompile with -Xlint:unchecked for details.
   [javac] 15 errors


Anyone know of any workarounds?

Thanks,
- Ole




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



[Logging] Tutorial Contribution] - Links

2008-06-25 Thread Ole Ersoy

OK - It's up:

http://wiki.apache.org/tomcat/Logging_Tutorial

Plus a few additions to the FAQ:
http://wiki.apache.org/tomcat/FAQ/Logging

Thanks for all the feedback and earlier QA!
Ole



-
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: [Logging] Tutorial Contribution

2008-06-25 Thread Ole Ersoy



Christopher Schultz wrote:
SNIP


There are things that I suspect are much easier to do using log4j (such
as rolling logs on a schedule other than once per day) or things that
cannot be done without either implementing a lot of stuff yourself or
switching to log4j (such as logging to a database or UNIX syslog daemon).


Thanks for pointing these out.  Unix syslog sounds killer - but I need to play 
more.



These topics should be considered advanced and the reader can be
referred to existing Tomcat documentation for how to switch to using log4j.

| Do you have by chance?  I could add a "Why you should consider log4j
| section...".

See above. I'm sure others will have other ideas.


Thanks for the feedback.  I agree your thoughts on that.  I'm going to get the 
current content up on the wiki now, and then take a breather.

Ole

-
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: [Logging] Tutorial Contribution

2008-06-25 Thread Ole Ersoy



Hexsel, Gustavo wrote:
  That helps!  


Whh.  Good!  I was a little worried people would say "This stinks!  I'm more 
confused than ever!!!"...And then I would have to go back to the drawing board 
again.  :-)


A few suggestions for the tomcat deployment:
- make using log4j easier (either offer a binary version of
tomcat-juli.jar that uses log4j - no source required since I can't build
locally due to some dbcp error;  alternatively it could use
common-logging's autodetect, if log4j is available on the path, use
it...)


I would go after Log4J in the tutorial, but to be honest I did not really see any killer 
use cases for it.  Also, for people just trying to figure out logging, it's much easier 
to start with what's already there, get very comfortable with that, and then attempt the 
log4j switcho in the event that there is a use case X that they just have to have.  Do 
you have by chance?  I could add a "Why you should consider log4j section...".


- adapt the main log4j formatter (I'll see if I can do that, I'll submit
it here if it works)


If you have a patch that makes using Log4J easier I would submit it directly 
through Bugzilla.  I'm just a user, so the only thing I control is what goes 
into the tutorial initially.




  Thanks for the tutorial, Ole!


Great to hear that you found it useful- Thanks,
- Ole

-
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: [Logging] Tutorial Contribution

2008-06-25 Thread Ole Ersoy

Chuck,

Thanks for the "Spring Cleaning" and the positive feed back!  After 3 days of analyzing logging, I was feeling a little "Logged Out", so the pep definitely helps.  


I made all the changes you suggested (Good eye).  I think it's ready the wiki 
now, unless anyone has additional modification.

I still need to go through a few more of the earlier responses to the thread.

Thanks again,
- Ole



Caldarale, Charles R wrote:

From: Ole Ersoy [mailto:[EMAIL PROTECTED]
Subject: [Logging] Tutorial Contribution


Thanks for putting this together.  I have a few comments, mostly nit-picking.


The goal of this primer is to demonstrate how to to log with
java.util.logging (JULI)


This give the impression that java.util.logging == JULI, which is a bit misleading.  
Perhaps something more along the lines of "java.util.logging, as implemented by 
JULI" would be more appropriate.


Now you have a logger to create logging messages from you
class CriticalComponent.


Typo: "you class" should be "your class".


If you ran this code with a deployed web application you
would see this statement
on the console or in catalina.out out like:


Drop the "out like" from the end of that sentence.


What if you wanted the output to appear in a file and on the
console?  For that you need to define a 2 Handlers.


Remove the "a" prior to the "2".


Lets start with a root Logger.  A root logger is a logger
whose name is "".
What's the purpose of it.


Terminate that last sentence with a question mark, not a period.


Now remember that once something gets logged by myLogger,
it's handed over to myLogger's Handlers.  But what if we
never assigned any Handlers to myLogger.  How would it get
it's Handler?


The first "it's" above is correct, as a contraction of "it is"; the second one is not, 
since the possessive "its" does not contain an apostrophe.  There are several other occurrences of 
the same typo, which I won't list.


.level = OFF


Might want to also mention the other pseudo-level ALL for the serious 
tree-killers.


How do I customize the location of the tomcat logging.properies file?


"logging.properies" should be "logging.properties".


Example:
-Djava.util.logging.config.file=/etc/tomcat/logging.properties

Note that this property is not set when running catalina.sh.

The reason for this is that the download provided by the
Apache Tomcat project knows where the file is already.


Not true - the script does set the property if the conf/logging.properties file 
exists.  See lines 182-185 of the 6.0.16 catalina.sh script.  It also set 
java.util.logging.manager to point to the JULI LogManager implementation.

This is a superb addition to the Tomcat documentation set; thanks again for 
creating 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]




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



[Logging] Tutorial Contribution

2008-06-25 Thread Ole Ersoy

Hi,

Initially I was going to add to the WIKI FAQ, but all the Logging questions are so inter 
related that I decided to write a tutorial instead.  I have not "Tested" this 
so there may be some inaccuracies.  I'd appreciate feedback and will update the tutorial. 
 As soon as the dust settles I'll post the end result on the WIKI.  Note that there's 
also a couple of FAQs added at the end.

Here's the tutorial:



This document is provided "as is", without warranty of any kind, 
express or implied, including but not limited to the warranties of merchantability, 
fitness for a particular purpose and noninfringement. 
In no event shall the author be liable for any claim, 
damages or other liability, whether in an action of contract, 
tort or otherwise, arising from, out of or in connection with 
this document or the use or other dealings in this document.


PRIMER ON java.util.logging and JULI 

The goal of this primer is to demonstrate how to to log with 
java.util.logging (JULI) as a backdrop to the rest of the tutorial, in particular

the sections related to configuring Tomcat logging with the configuration file.
One may think it's wise to skip this section and proceed directly to the section
on the configuration file, but all the concepts talked about here and necessary
to understand the configuration file.  The examples used in this section
show programmatically how logging is configured.  The section on Tomcat's 
configuration
file discusses how to accomplish declaratively what is done programmatically in
this section.

The following concepts (Classes) are important:
- LogManager
- Loggers
- Handlers
- Levels
- Root Logger
- Root Handler

The official Tomcat logging documentation refers to 
these above concepts / classes extenstively.  


Lets start with Loggers.
What's the purpose of a Logger?  A Logger is what a developer uses to write a log statements 
to the console, to a file, to the network, etc.  If you wanted to log something from
your web application's class CriticalComponent using java.util.logging you would 
first create a logger like this:


private String nameOfLogger = 'com.example.myapp.CriticalComponent';
or
private String nameOfLogger = CriticalComponent.class.getName();

private static Logger myLogger = Logger.getLogger(nameOfLogger);

Pay attention to how we defined the name of the Logger.  This is important
to the material explaining Tomcat's logging configuration.  You may also
want to think about why the myLogger is a static field (Hint myLogger is shared
among all instances of CriticalComponent).

Now you have a logger to create logging messages from you class 
CriticalComponent.
For example you could now try something like this:

public void wasssup() 
{

  myLogger.info("Ah Yeah Baby - that's the end of System.out.println");
}

If you ran this code with a deployed web application you would see this 
statement
on the console or in catalina.out out like:

INFO; 322125105255ms; 4407662;# 1; com.example.myapp.CriticalComponent; 
wasssup; Ah Yeah Baby - that's the end of System.out.println

Notice that both the name of the Logger and the method that logged the message are 
mentioned in the log statement.  This is important to know when you want to alter 
the configuration of the Logger.  For example you might want to turn this logger off,

because it's not that useful.

What if you wanted the output to appear in a file and on the console?  For that you need to 
define a 2 Handlers.  Create the two like this:


Handler fileHandler = new FileHandler("/var/log/tomcat/myapp.log");
Handler consoleHandler = new ConsoleHandler();
myLogger.addHandler(fileHandler);
myLogger.addHandler(consoleHandler);

Now myLogger will log to both the console and the file 
/var/log/tomcat/myapp.log.

So now we understand Loggers and Handlers, but we have not touched on Levels, 
Root Loggers, and Root Handlers yet.  What are those?


Lets start with a root Logger.  A root logger is a logger whose name is "".
What's the purpose of it.  Suppose you tried to do some logging with 
myLogger like this:


myLogger.finest("So Fine");

And nothing shows up in your log, but you know that this statement is being 
called.  What's going on?  The answer is that the JULI root logger's Level

is set to INFO by default (TRUE?).  The level INFO has a corresponding integer
assigned to it, which is 3 (TRUE? - Comment: In any case I'm just using it as 
an example
which fits with the rest of the tutorial...so the logic works out regardless).  
When myLogger attempts to log it first checks it's level.  If myLogger's level is greater 
than the level intrinsic to the method doing the 
logging (finest), then the record will be logged.  In this case the logging method finest 
corresponds to Level zero.  Zero is less than 3, hence the logger does not log the message.
My logger will only log messages with a level that is greater than or equal to 3.  So for 
instance if myLogger.severe("Oohhh [EMAIL PROTECTED]") is called, it will ge

Re: [Logging] Facility Specific Properties

2008-06-24 Thread Ole Ersoy

|  From what I understand Tomcat 6 logging has been overhauled and the
| java.util.logging implementation was replaced with JULI, which
| understands how to load per web app configuration files and make the
| corresponding configuration available via the LogManager to the web app.

I think that happened in 5.5, but I haven't read the code. :(


Good catch!  I just checked the 5.5 documentation and it's the same as Tomcat 6.




Yes, log4j Appenders ~= Java logging's Handlers
The name "logger" in both packages are roughly equivalent.


Cool - Thanks for confirming,
- Ole



-
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: [Logging] Facility Specific Properties

2008-06-23 Thread Ole Ersoy



Martin wrote:

Found this helpful
http://tomcat.apache.org/tomcat-5.5-doc/logging.html
default logging is commons-logging with known limitation to Engines and 
Hosts
this limitation of JDK Logging appears to be the genesis of per-web 
application logging as the configuration is per-VM


That sounds great for Tomcat 5.

From what I understand Tomcat 6 logging has been overhauled and the 
java.util.logging implementation was replaced with JULI, which understands how 
to load per web app configuration files and make the corresponding 
configuration available via the LogManager to the web app.




to overcome these limitations as well as the ability to configure in 
Appenders (socket/file etc) replace with Log4j

http://logging.apache.org/log4j/1.2/index.html


I think Appenders are the same as Handlers in java.util.logging.  So for those 
going with Tomcat 6, JULI provides pretty much the same capabilities AFAIK 
(Socket communication / Handlers / XML Format, etc.).

Ole

-
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: [Logging] Facility Specific Properties

2008-06-23 Thread Ole Ersoy

Super - Thanks for the elaboration!

- Ole

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ole,

Ole Ersoy wrote:
| I hope the mappings are all inclusive from java.util.logging's
| perspective so that if I set the a level to INFO I get info, plus
| possibly some other level's that are greater than INFO?  In other words
| something that should be mapped to info, does not end up corresponding
| to say FINE, and is thus left out?

Yes. The level chosen really means "this level and above" -- it's not
specifically that level and that level only.

| I would think that it's always appropriate to use commons logging within
| Tomcat and anything (java.util.logging, log4j, or commons-logging) goes
| for webapps?

Tomcat uses commons-logging internally and then your choice of "real"
loggers to actually do the job. In your webapps, you can use (that is,
write into your own code) commons-logging or log4j or Java's logging or
whatever you want.

If you use commons-logging and the same logger across all web
applications, you get the benefit of all logging for the entire server
(internals + webapps) being set up in one place.

If you separate them (which I recommend), you get the benefit of logging
configuration for a particular application being bundled with that
application (which sort of follows the "self-contained" principle of
applications.

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

iEYEARECAAYFAkhgPRcACgkQ9CaO5/Lv0PBtSwCfQl+hau6bgp+XSgI35PexhHBm
SJAAn2Ku7yDaCgflfP3Zsu0F37LEbPBW
=F9Fn
-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]




-
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: [Logging] Facility Specific Properties

2008-06-23 Thread Ole Ersoy

SNIP

No it would grab the logger for the context, which will automatically be 
the one for [/mywebapp] and not [/manager]. It can't log to the logger 
of another context. Look at javax.servlet.ServletContext.log().


OOh - OK - The gears are starting to turn...maybe.  The context logger configuration 
configures the ServletContext logger.  I just erased that from my "To 
understand" list, since it seems I could just use a pre configured logger per 
Servlet, but it's good to know.


make logging calls on it, which assuming the default configuration 
would end up in the manager prefixed log?


So now you should be able to write an improved version of the logging 
documentation page ;)


Well after having spent a few days reading java logging stuff, commons logging, 
LogManager stuff, and the Logging for Dummies thread, I'd say that the Tomcat Logging 
Official documentation hits the nail right on the head.  It's about as brief and concise 
as can be (I'm still going to put in a ticket for a spelling mistake and the context 
stuff at the end), and gives all the necessary little hooks that someone can branch off 
on to figure out what's going on.  I think the primary cause of panic for Squirl brained 
individuals, like myself, is that once the branching begins there's a massive (Keep in 
mind - squirrel brain) amount of information that has to be analyzed and 
"Felt/Experienced".  For instance I spent time playing with java logging to get 
a reasonable grip after reading through some tutorials and the overview.

So what I'll do is go through the Logging for Dummies thread again and this 
thread and come with with additions to the logging FAQ on the wiki.  I'll do my 
best to put in an answer + example, but I might need help still.

Thanks again.  Hope to have a list compiled asap!
Ole

-
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: [Logging] Facility Specific Properties

2008-06-23 Thread Ole Ersoy

SNIP


I think one of the confusing things about the current logging environment is 
the lack of documentation about the mapping between commons-logging and 
java.util.logging levels and APIs, as implemented by JULI.  For example, c-l 
has six logging levels, whereas as j.u.l has seven; some of the mappings are 
obvious, some are not.  (Yes, I did find the mappings in the DirectJDKLog.java 
source.)


I hope the mappings are all inclusive from java.util.logging's perspective so 
that if I set the a level to INFO I get info, plus possibly some other level's 
that are greater than INFO?  In other words something that should be mapped to 
info, does not end up corresponding to say FINE, and is thus left out?

I also assume that the if developers stick to levels that are common to both 
java.util.logging and commons-logging, the mapping is straightforward?  It's 
only an issue when attempting to read tomcat log statements or adding new ones 
right?



In the above snippet from the last two e-mails, Ole uses java.util.logging 
APIs, and Rainer responds with commons-logging; it's not clear when it's 
appropriate to use one or the other.


I would think that it's always appropriate to use commons logging within Tomcat 
and anything (java.util.logging, log4j, or commons-logging) goes for webapps?

Ole


-
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: [Logging] Facility Specific Properties

2008-06-23 Thread Ole Ersoy

SNIP

Close to that. Since "Catalina" and "localhost" are names of elements in 
server.xml, and those names can be changed, this logger name is 
generated dynamically. So you won't find it verbosely in the code. Look 
at method logName() in ContainerBase.java.


Thanks for the tip - I will do.

No, the call log.info(SOMETHING) will need to calculae something, before 
it really calls the error method of the logger, which then immediately 
might notice, that the configured log level doesn't allow handling an 
info message.


Now SOMETHING is quite often not a simple string, but e.g. a localised 
message, an exception text, a string concatenation containing some 
variable data etc. Java will first calculate SOMETHING, before it jumps 
into the logger method. If you have a lot of debug log statements, which 
get called during every request, it will have a noticeable impact on 
performnce.


OK - I get it ... hopefully :-).  We want to do something like:

if (log.isDebugEnabled())
{
  //Calculate SOMETHING - Very expensive
  String SOMETHING = SOMETHINGA + SOMETHINGELSE;
  log.debug(SOMETHING);
}

So if we are only interested in SEVERE messages, then it seems like it would be 
a good thing to set all of the Tomcat loggers to only log severe messages?  Is 
there a simple way to do that?  I would think that the Tomcat loggers get their 
log level from a root logger, and that if I set the log level on that logger, 
then it automatically sets it on all the other loggers, unless I directly 
override the logging level as with Facility specific properties?


Warnings are not frequent enough to justify the if statement.


So I assume the logic is that most running instances will be interested in 
warnings, hence just skip the if?

SNIP



Because I know that I'll only be doing myLogger.warn('This is really 
severe');  type messages.  Then if someone wanted to make my logging 
calls really efficient they could just set the level of my logger to 
SEVERE and since I only make warn calls on myLogger, all the calls 
will be as efficient as possible with Java logging...without removing 
the logging statement completely that is?


Hmmm, didn't get the point.


That's OK.  I didn't either :-).

SNIP



But: the loggers with the strange names 
...Catalina...localhost...mycontext are generated for each context, and 
can be used by the webapp developer as part of the servlet API (the 
context logger). So the webapp producer might have some documentation, 
what kind of log messages he creates at which level.


OK - so /mywebapp could grab the Logger for the /manager context and make 
logging calls on it, which assuming the default configuration would end up in 
the manager prefixed log?



head on why I'd want to muck around with the Facility Specific 
Properties...Maybe the documentation just mentioned them to say "Here 
- See - You can Muck!" and then didn't say anything else because 
theres no point in mucking...?


Yes, maybe.


I guess when the day comes for mucking, I'll know it :-).

Thanks again,
- Ole

-
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: [Logging] Facility Specific Properties

2008-06-22 Thread Ole Ersoy



Rainer Jung wrote:
SNIP

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager] 
is the name of a logger, in this case the name of the logger associated 
with the context /manager in host localhost in Engine Catalina.


Most loggers get their names from class names, but context loggers are 
special cases.


OK - I think I got that.  So I imagine if we grep the tomcat code for 'org.apache.catalina.core.ContainerBase.[Catalina].[localhost]' I'll find some Logging initialization lines that use that string as the name of their logger?  

Loggers usually check their configured log level before calling the log 
method (for FINE/FINEST, resp. DEBUG/TACE). 


CASE A:
OK - So if I'm logging with myLogger and I say myLogger.warn('This is a 
warning'); and the logger's level is set to OFF, then the logger will do 
minimal work in terms of passing the record to the handler?  The reason I 
mention it is because the below seems to indicate a different approach (CASE B).

The way this is done, is 
that the developer using the logger checks with an if statement, if the 
level is at least the one the message has. 


CASE B:
So the tomcat developer has to write something like:

if (myLogger.getLevel() >= Level.WARNING)
{
	myLogger.warn('This is a warning'); 
}


That way, the message doesn't 
need to be concatenated as a string when the configured level will not 
generate the message. 


I'm just thinking about how I would implement Logger.warn...  I think I would 
do it like this:

public warn(String message)
{
  if (this.level > Level.WARNING)
{
//Now do work to put together a concatenated message
}
//Otherwise this loggers level is not really set to high enough
//so we just return 
}

Seems like a plausible way to implement, that way if statements are not needed 
outside of the logger.  Just want to make sure I'm not missing something...?

This is especially important for debug messages. 
The developer has no possibility to check the handlers level in the 
code, because the handler as an object is more in the realm of the 
administrator).



From what I understand the developer could do something like List 
handlers = myLogger.getHandlers() and check their levels that way.  Hope I don't seem 
non appreciative of your help.  I rarely use logging myself, so I'm just trying to 
make sure I understand everything correctly?


It seems that the only rational for tweaking the level of the loggers in the 
logging configuration is to make the logging calls even less expensive?  So for 
example I could do:

Logger myLogger = LogManager.createLogger(the.name.of.this.class);
myLogger.setLevel = Level.WARNING;

Because I know that I'll only be doing myLogger.warn('This is really severe');  
type messages.  Then if someone wanted to make my logging calls really 
efficient they could just set the level of my logger to SEVERE and since I only 
make warn calls on myLogger, all the calls will be as efficient as possible 
with Java logging...without removing the logging statement completely that is?

Given that the tomcat logging documentation does not go into tweaking the log levels of 
all the loggers, I assume that this is something that would yield very little utility?  
To be honest I'm still scratching my head on why I'd want to muck around with the 
Facility Specific Properties...Maybe the documentation just mentioned them to say 
"Here - See - You can Muck!" and then didn't say anything else because theres 
no point in mucking...?

SNIP

Thanks again,
- Ole


-
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: [Logging] Facility Specific Properties

2008-06-22 Thread Ole Ersoy

Quick correction:


# For example, set the com.xyz.foo logger to only log SEVERE
# messages:
#org.apache.catalina.startup.ContextConfig.level = FINE
#org.apache.catalina.startup.HostConfig.level = FINE
#org.apache.catalina.session.ManagerBase.level = FINE

Should the left side of the equal sign be SEVERE 


That would be the right side - sorry. 
- Ole



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



[Logging] Facility Specific Properties

2008-06-22 Thread Ole Ersoy

Hi,

I would really appreciate it if someone could elaborate on the case for these 
logging properties:


# Facility specific properties.
# Provides extra control for each logger.


org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level 
= INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers
 = \
  3manager.org.apache.juli.FileHandler

For example what additional logging capabilities does the above give in the 
context of these properties:

3manager.org.apache.juli.FileHandler.level = FINE
3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
3manager.org.apache.juli.FileHandler.prefix = manager.

Also there's this part:

# For example, set the com.xyz.foo logger to only log SEVERE
# messages:
#org.apache.catalina.startup.ContextConfig.level = FINE
#org.apache.catalina.startup.HostConfig.level = FINE
#org.apache.catalina.session.ManagerBase.level = FINE

Should the left side of the equal sign be SEVERE in the above cases (I'll put 
in a documentation ticket, just making sure)?  Seems like these are setting the 
log level directly on the Logger for the classes listed.

Would it be better to have something like this in the documentation:

# For example, set the org.apache.catalina.session.ManagerBase logger to only 
log SEVERE
# messages:
#org.apache.catalina.session.ManagerBase.level = SEVERE

?

Also, assuming that the log level is set directly on the logger, does that buy 
anything?  From what I understand the logger has to delegate to a handler 
eventually, and then the handlers level takes precedence...so is there a point 
to setting it directly on the Logger?

Thanks,
- Ole

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

2008-06-17 Thread Ole Ersoy

So if I wanted hibernate-3.0.14.jar to be visible to all
webapps I could stick in in CATALINA_HOME/shared/lib and set
shared.loader =
${catalina.home}/shared/lib/hibernate-3.0.14.jar and now it's
visible to all webapps, but not to Tomcat?


Also correct, but I don't know why you'd go to that trouble.  Adding 
classloaders does not improve performance, nor does preventing the Tomcat 
kernel from seeing certain jars buy you anything.


I've been sitting here trying to come up with some hypothetical reasons that 
might make sense, but after writing them out, they all seem pointless, so good 
point! At least I know what's in catalina.properties now :-).

Actually one case I think is somewhat valid from an administration point of view is if you are RedBoss and you want to say to users "Place all shared/provided webapp libraries in /var/lib/tomcat" and have the corresponding Tomcat package pre-configured for this. 


Thanks again,
- Ole




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

2008-06-17 Thread Ole Ersoy

I was wondering whether Tomcat 6.0 still has a classloader
for classes that should be globally visible to all webapps
only?


Not by default.  However, you can edit conf/catalina.properties to create any 
classloader hierarchy you want.


So I take it:

common.loader = Tomcat's classes/jars visible to both webapps and to itself.  
server.loader = only tomcat

shared.loader = only webapps

So if I wanted hibernate-3.0.14.jar to be visible to all webapps I could stick 
in in CATALINA_HOME/shared/lib and set shared.loader = 
${catalina.home}/shared/lib/hibernate-3.0.14.jar and now it's visible to all 
webapps, but not to Tomcat?

Thanks!
- Ole




-
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: Class Loader Documentation

2008-06-17 Thread Ole Ersoy
I think its because its just hard to explain, but maybe it could be made 
clearer.

I think *ignores* is the wrong word.

Especially if someone actually looks at catalina bat and sees this line.
set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar
Doesnt look like that script is ignoring CLASSPATH to me ;)


When Tomcat starts up, its internal system classes take *priority* over 
those in the normal "system" classloader CLASSPATH.
This is to prevent "Java DLL hell", making sure that external 
applications do not see the internal tomcat engine, and making sure that 
tomcat does not use an external class (eg an xml parser), that may be 
incompatible with tomcat (Its trying to save your butt).






Ah OK - I see what you are saying.

I looked at setclasspath.sh and the first thing is does is clear the users 
CLASSPATH variable.  So seems like the Tomcat startup scripts rebuild the 
CLASSPATH variable such that only JARS that are available to it on the 
classpath.  So if I were to add more jars to the startup script, those would 
still be visible to Tomcat and all applications.


--- add your version here --- ;)

(This is what you're saying I think.  When I saw *priority* I started thinking "How 
does it priorize?", and for me it's a little clearer if I understand that the 
CLASSPATH variable is rebuilt from scratch...assuming that's corrects...OK Here Goes


When Tomcat starts up, the startup script first clears the CLASSPATH variable.  
It then adds a few libraries that Tomcat needs to boot, such as bootstrap.jar.  
These libraries contain additional class loaders that Tomcat delegates to when 
it needs it's system classes  (Libraries visible to Tomcat only and typically 
contained in CATALINA_HOME/lib).

Note that if you add additional libraries to the startup script lines that 
initialize the CLASSPATH for Tomcat, these will be visible to Tomcat and all 
running web applications as well.


Thoughts?

Thanks,
- Ole










-
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 6.0 Classloaders

2008-06-17 Thread Ole Ersoy

Hi,

I was wondering whether Tomcat 6.0 still has a classloader for classes that 
should be globally visible to all webapps only?  I read through the classloader 
documentation and it seems to be saying that $CATALINA_HOME/lib contains 
classes that are visible to both Tomcat and the webapps.

However this resource:
http://helpme.morphexchange.com/tomcat6/help/items/chapter_4_2_shared_lib

Is saying that shared/lib contains the classes visible to all webapps...

Thoughts?

Thanks,
- Ole

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



Class Loader Documentation

2008-06-16 Thread Ole Ersoy

Hi,

Reading through the classloader documentation for 6.0 I noticed this:

...
However, the standard Tomcat 5 startup scripts 
...


It seems like this should be:

the standard Tomcat 6 startup scripts

But I figured I'd check before filing a ticket.

Also it seems like this section could be simplified:


System - This class loader is normally initialized from the contents of the 
CLASSPATH environment variable. All such classes are visible to both Tomcat 
internal classes, and to web applications.


So this seems to be saying that "normally" all classes that should be visible 
to both Tomcat and webapps are placed in the CLASSPATH environment variable.  The second 
sentence seems to reinforce that placing the libraries in the CLASSPATH makes them 
visible to both Tomcat and the webapps.

Then reading a little further the text seems to be saying "Forget all that 
stuff".  Tomcat does not do it this way

If I'm reading it right, would it be simpler to just replace the above 
mentioned text with,


System - The standard Tomcat 6 startup scripts ($CATALINA_HOME/bin/catalina.sh 
or %CATALINA_HOME%\bin\catalina.bat) ignore the contents of the CLASSPATH 
environment variable (Unlike most java daemons and applications), and instead
build the system classloader from the following repositories:
...


Thoughts?

Thanks,
- Ole


-
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: StandardContext start,SEVERE: Error filterStart When Including HttpServletRequestWrapper in Filter in 6.0.14

2008-02-03 Thread Ole Ersoy

Konstantin,

Man - you are so right.  Thanks for hanging in there.  I should have looked at the target/classes directory and the log a little closer :-).  


Thanks again,
- Ole




Once again, just to be sure.

The compiler creates two files, "TestFilter.class" and
"TestFilter$1.class".  Do you copy both of them? You wrote "it", not
"they".



Strange right?


Yes, it is strange.

Do you restart the web application after copying the files? What
tomcat version are you using?

-
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: StandardContext start,SEVERE: Error filterStart When Including HttpServletRequestWrapper in Filter in 6.0.14

2008-02-02 Thread Ole Ersoy

Hi Konstantin,

In this case I just recompiling the filter and copying it over the the classes 
folder of the webapp.  It's definitely there.  If I compile and copy with a 
statement like this in the filter:

HttpServletRequestWrapper wrapper = new HttpServletRequestWrapper((HttpServletRequest)servletRequest); 


The filter works.  As soon as I override getParameter like this:


HttpServletRequestWrapper wrapper =  new 
HttpServletRequestWrapper((HttpServletRequest)servletRequest)
{
public String getParameter(String name)
{
  return "foo";
}
}; 


I get the class not found exception.  Strange right?

- Ole



Konstantin Kolinko wrote:

How do you package and deploy your application?

If you are seeing
java.lang.NoClassDefFoundError: test/filter/TestFilter$1

please check, that the class file "TestFilter$1.class" is present in
your app's WEB-INF/classes/test/filter/ directory on the web server.



still present.  The localhost log has this:

SEVERE: Exception starting filter testFilter
java.lang.NoClassDefFoundError: test/filter/TestFilter$1
   at java.lang.Class.getDeclaredConstructors0(Native Method)
   at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
   at java.lang.Class.getConstructor0(Class.java:2699)
   at java.lang.Class.newInstance0(Class.java:326)
   at java.lang.Class.newInstance(Class.java:308)


-
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: StandardContext start,SEVERE: Error filterStart When Including HttpServletRequestWrapper in Filter in 6.0.14

2008-02-02 Thread Ole Ersoy

I managed to narrow it down a little further.  The same exception appears if 
the HttpServletRequestWrapper instance is defined like this:

		HttpServletRequestWrapper wrapper = 
			new HttpServletRequestWrapper((HttpServletRequest)servletRequest)

{
			   public String getParameter(String name) 
			   { 
return "foo";

   }
};

The filter runs fine if I replace the above with this:
		HttpServletRequestWrapper wrapper = 
			new HttpServletRequestWrapper((HttpServletRequest)servletRequest);


Any ideas?

Thanks,
- Ole


Ole Ersoy wrote:
Well, I was certain it had to be the difference in the JDKs causing it, 
but after compiling the filter with the Sun JDK, the same exception is 
still present.  The localhost log has this:


SEVERE: Exception starting filter testFilter
java.lang.NoClassDefFoundError: test/filter/TestFilter$1
   at java.lang.Class.getDeclaredConstructors0(Native Method)
   at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
   at java.lang.Class.getConstructor0(Class.java:2699)
   at java.lang.Class.newInstance0(Class.java:326)
   at java.lang.Class.newInstance(Class.java:308)

So for some reason it does not see the filter after I add this code:

HttpServletRequestWrapper wrapper = new 
HttpServletRequestWrapper((HttpServletRequest)servletRequest) {
   public java.lang.String getParameter(java.lang.String 
name){

  if ("foo".equals(name))   {
 return "bar"; }
  else   {
 return super.getParameter(name); }
   }
};

Without this code the filter runs fine.  Any ideas?

Thanks,
- Ole



Ole Ersoy wrote:
Actually I probably got this one.  I'm compiling the filter with 
IcedTea, but using the Sun JDK to run tomcat, since IcedTea has issues 
with keystore certificates.  So if I compile with the Sun JDK I think 
the issue will go away.


Cheers,
- Ole
Ole Ersoy wrote:

Hi,

I'm getting a:

org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart

When inluding an HttpServletRequestWrapper in a filter.  The code 
compiles fine and the filter part causing the ruckus looks like this:


HttpServletRequestWrapper wrapper = new 
HttpServletRequestWrapper((HttpServletRequest)servletRequest) 
{
   public java.lang.String getParameter(java.lang.String 
name){

  if ("foo".equals(name))   {
 return "bar"; }
  else   {
 return 
super.getParameter(name); }

   }
};
Thoughts?

Thanks,
- Ole















-
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: StandardContext start,SEVERE: Error filterStart When Including HttpServletRequestWrapper in Filter in 6.0.14

2008-02-02 Thread Ole Ersoy

Well, I was certain it had to be the difference in the JDKs causing it, but 
after compiling the filter with the Sun JDK, the same exception is still 
present.  The localhost log has this:

SEVERE: Exception starting filter testFilter
java.lang.NoClassDefFoundError: test/filter/TestFilter$1
   at java.lang.Class.getDeclaredConstructors0(Native Method)
   at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
   at java.lang.Class.getConstructor0(Class.java:2699)
   at java.lang.Class.newInstance0(Class.java:326)
   at java.lang.Class.newInstance(Class.java:308)

So for some reason it does not see the filter after I add this code:

		HttpServletRequestWrapper wrapper = 
			new HttpServletRequestWrapper((HttpServletRequest)servletRequest) 
			{
			   public java.lang.String getParameter(java.lang.String name) 
			   {
			  if ("foo".equals(name)) 
			  {
			 return "bar";   
			  }
			  else 
			  {
			 return super.getParameter(name);   
			  }

   }
};

Without this code the filter runs fine.  Any ideas?

Thanks,
- Ole



Ole Ersoy wrote:
Actually I probably got this one.  I'm compiling the filter with 
IcedTea, but using the Sun JDK to run tomcat, since IcedTea has issues 
with keystore certificates.  So if I compile with the Sun JDK I think 
the issue will go away.


Cheers,
- Ole
Ole Ersoy wrote:

Hi,

I'm getting a:

org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart

When inluding an HttpServletRequestWrapper in a filter.  The code 
compiles fine and the filter part causing the ruckus looks like this:


HttpServletRequestWrapper wrapper = new 
HttpServletRequestWrapper((HttpServletRequest)servletRequest) 
{
   public java.lang.String getParameter(java.lang.String 
name){

  if ("foo".equals(name))   {
 return "bar"; }
  else   {
 return 
super.getParameter(name); }

   }
};
Thoughts?

Thanks,
- Ole













-
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: StandardContext start,SEVERE: Error filterStart When Including HttpServletRequestWrapper in Filter in 6.0.14

2008-02-02 Thread Ole Ersoy

Actually I probably got this one.  I'm compiling the filter with IcedTea, but 
using the Sun JDK to run tomcat, since IcedTea has issues with keystore 
certificates.  So if I compile with the Sun JDK I think the issue will go away.

Cheers,
- Ole 


Ole Ersoy wrote:

Hi,

I'm getting a:

org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart

When inluding an HttpServletRequestWrapper in a filter.  The code 
compiles fine and the filter part causing the ruckus looks like this:


HttpServletRequestWrapper wrapper = new 
HttpServletRequestWrapper((HttpServletRequest)servletRequest) {
   public java.lang.String getParameter(java.lang.String 
name){

  if ("foo".equals(name))   {
 return "bar"; }
  else   {
 return super.getParameter(name); }
   }
};
Thoughts?

Thanks,
- Ole











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



StandardContext start,SEVERE: Error filterStart When Including HttpServletRequestWrapper in Filter in 6.0.14

2008-02-02 Thread Ole Ersoy

Hi,

I'm getting a:

org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart

When inluding an HttpServletRequestWrapper in a filter.  The code compiles fine 
and the filter part causing the ruckus looks like this:

		HttpServletRequestWrapper wrapper = 
			new HttpServletRequestWrapper((HttpServletRequest)servletRequest) 
			{
			   public java.lang.String getParameter(java.lang.String name) 
			   {
			  if ("foo".equals(name)) 
			  {
			 return "bar";   
			  }
			  else 
			  {
			 return super.getParameter(name);   
			  }

   }
};
Thoughts?

Thanks,
- Ole









-
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: Invalid Keystore Format Exception

2008-01-30 Thread Ole Ersoy
OK - Looks like it's an IcedTea thing.  I installed JDK 1.6, regenerated the key, and now it works fine.  


Thanks again for all the helpful suggestions,
- Ole



Vamsavardhana Reddy wrote:

Seems strange.  Can you send a keystore file that you generated along with
the passwords you used for the keystore as well as the key (you can generate
one with password "secret" say)?  May be I can investigate if there is
something wrong with the keystore.  Also, what JDK/JVM are you using?

++Vamsi

On Jan 30, 2008 8:12 PM, Ole Ersoy <[EMAIL PROTECTED]> wrote:


Hi Vamsi,

I tried:
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA -storetype JKS

Thanks for the suggestion though,
- Ole



Vamsavardhana Reddy wrote:

May be you should use the "-storetype JKS" to be sure of the format in

which

the keystore is generated.

++Vamsi

On Jan 30, 2008 11:11 AM, Ole Ersoy <[EMAIL PROTECTED]> wrote:


Hi,

I'm trying to get SSL working real quick for some experiments, and I

did

this:

$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA

Answered the questions, got .keystore to appear in my home directory

and

then I uncommented the SSL Connector element in server.xml and filled

out

the keystoreFile and keystorePass attributes.

Now I get this exception:

Jan 29, 2008 11:27:38 PM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.io.IOException: Invalid keystore format
   at sun.security.provider.JavaKeyStore.engineLoad(

JavaKeyStore.java

:651)
   at sun.security.provider.JavaKeyStore$JKS.engineLoad(
JavaKeyStore.java:56)
   at java.security.KeyStore.load(KeyStore.java:1202)
   at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(
JSSESocketFactory.java:319)
   at

org.apache.tomcat.util.net.jsse.JSSESocketFactory.getTrustStore(

JSSESocketFactory.java:293)
   at
org.apache.tomcat.util.net.jsse.JSSESocketFactory.getTrustManagers(
JSSESocketFactory.java:444)
   at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(
JSSESocketFactory.java:378)
   at

org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(

JSSESocketFactory.java:125)


Anyone know why this is happening?  I tried regenerating a few times

but

hte results are still the same.

Thanks,
- Ole

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






-
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: Invalid Keystore Format Exception

2008-01-30 Thread Ole Ersoy

Hmmm...Maybe it's an IcedTea thing.  I looked here:
http://www.ensode.net/java_fedora_8_icedtea.html

I'll give the Sun JDK a shot.

Cheers,
- Ole



Vamsavardhana Reddy wrote:

Seems strange.  Can you send a keystore file that you generated along with
the passwords you used for the keystore as well as the key (you can generate
one with password "secret" say)?  May be I can investigate if there is
something wrong with the keystore.  Also, what JDK/JVM are you using?

++Vamsi

On Jan 30, 2008 8:12 PM, Ole Ersoy <[EMAIL PROTECTED]> wrote:


Hi Vamsi,

I tried:
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA -storetype JKS

Thanks for the suggestion though,
- Ole



Vamsavardhana Reddy wrote:

May be you should use the "-storetype JKS" to be sure of the format in

which

the keystore is generated.

++Vamsi

On Jan 30, 2008 11:11 AM, Ole Ersoy <[EMAIL PROTECTED]> wrote:


Hi,

I'm trying to get SSL working real quick for some experiments, and I

did

this:

$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA

Answered the questions, got .keystore to appear in my home directory

and

then I uncommented the SSL Connector element in server.xml and filled

out

the keystoreFile and keystorePass attributes.

Now I get this exception:

Jan 29, 2008 11:27:38 PM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.io.IOException: Invalid keystore format
   at sun.security.provider.JavaKeyStore.engineLoad(

JavaKeyStore.java

:651)
   at sun.security.provider.JavaKeyStore$JKS.engineLoad(
JavaKeyStore.java:56)
   at java.security.KeyStore.load(KeyStore.java:1202)
   at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(
JSSESocketFactory.java:319)
   at

org.apache.tomcat.util.net.jsse.JSSESocketFactory.getTrustStore(

JSSESocketFactory.java:293)
   at
org.apache.tomcat.util.net.jsse.JSSESocketFactory.getTrustManagers(
JSSESocketFactory.java:444)
   at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(
JSSESocketFactory.java:378)
   at

org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(

JSSESocketFactory.java:125)


Anyone know why this is happening?  I tried regenerating a few times

but

hte results are still the same.

Thanks,
- Ole

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






-
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: Invalid Keystore Format Exception

2008-01-30 Thread Ole Ersoy
Seems strange.  


Agreed - It used to be real easy :-)


Can you send a keystore file that you generated along with
the passwords you used for the keystore as well as the key (you can generate
one with password "secret" say)?  


Absolutely - Thanks for being so helpful.  Here's what I did:

[EMAIL PROTECTED] ~]$ rm .keystore
[EMAIL PROTECTED] ~]$ $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA 
-storetype JKS
Enter keystore password:
Re-enter new password:
What is your first and last name?
 [Unknown]:  Ole Ersoy
What is the name of your organizational unit?
 [Unknown]:  Zippy Chicken Butt
What is the name of your organization?
 [Unknown]:  leisure engineering
What is the name of your City or Locality?
 [Unknown]:  nice
What is the name of your State or Province?
 [Unknown]:  monaco
What is the two-letter country code for this unit?
 [Unknown]:  FR
Is CN=Ole Ersoy, OU=Zippy Chicken Butt, O=leisure engineering, L=nice, 
ST=monaco, C=FR correct?
 [no]:  yes

Enter key password for 
   (RETURN if same as keystore password):
[EMAIL PROTECTED] ~]$ vi .keystore

Which results in this file:

[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@^B»0<82>^B·0^N^F
[EMAIL PROTECTED]<82>^B£6ç»ø¯ö§ÔU<93>³
<9a>^Ptã<90>A<96>GUÒ±¥^GþÞ^AîUÝRÐd<9d>bã;<9d>½^G^Kp<87>âÍö<83>ñ<8d>f³ûFNVÚÜv>^V<9f>ÎoÔO^[^B^VÒG<93>¸<95>¸^[^F'Hf<88>óT]ª<91>^]<8c>âÃò<85>Àß
ot^C^H(ÿv^N¦<81>F^Vát<85>3^HòÐÜ°î^^]T4<9c>|ñ\^D<94>p)t_^GH}`ðV<9c>ºï<8a>:^\^?®^^<82>Ý£^U"äø<85>lñ<98>\<9a>¿Ñi^?^^¤ª<9e>¤5;Þ=<9a>ê+^Z^NÑ^[^L<8c><9f>gÐÕ(ç^\^LRf½^Xj#\Ae^3^Hüto^N¬3ÎÙF<9e>:w<9c>^Z¹kò<8a>Ë©v-^XØb<8a>T^^2N;om¿Ì<98>ð<82>É+TÛ<9c><84>9<87>^^×zó#Í^Kt^F^N^M<87>^N^g<9b>ö^K­ä^V,íÞÑk­·:^C<98>ìI^S<88>Úd
éÙ<8d>^O³eµ;ìjË<9d>jB^\ét)Ê<8f>^Q[m>ñê7^B^QK^]±Åñ<<­Ê·,w^C[cüéça<93>"<9d>¤<97>¼8ÿ÷^LDãLÍ<85>v}<8a>î§^^Sá¦Ðöpè[¢<95>¶¿)+<8e>Ì<81>Ô!Ñ¡f4=^N^HÊÓã^U Ñ©4Õ½û^N<9b>òZ+<98>u<8c>^?ã½ï<9a>`R<94>?m^Qr%<87>"<84><93><86>¬\<9e>î^K\^[6ýÝÃ`­eÕ-aðf^Hô4b¦<98>0úø<80>   oÖÙE<9a>[EMAIL 
PROTECTED]@!Vj^[¾ä4öCä<8d><93><94>8Ò^?^LS-$<91>^[À¸2å®ô<95>2  Ö¶ÿ%ÒÜ´^K¾øõºþÃ*d2ÖGµ<8d>°Ö<94><9b><84>^H[Ù»§-p,ÅV=<9f>µ^ZÆ]ü<8f><94><8f>+-àç¹aâ?^WpÈ^^^P··Øb·<9b>jý0<9c>[EMAIL PROTECTED] vÝ7°sàS1^[Ã^Y2<9c>r^W4Re`,ÿ}¸·"¾©æºÈôùý#Cö¤<95>Oï- HÐ^\<96>`B^\drZ2Òÿª^M¡Ü¶°7^[9Ê<98><88>^Zpæö 
Ó̧<8e>:áÆÁÕ¥ÇM<84>^QÂ`¯Må<91><89><8a>[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@^B<96>0<82>^B<92>0<82>^Aû ^C^B^A^B^B^DG <9f>¸0^M^F   *<86>H<86>[EMAIL PROTECTED]|1^K0   ^F^CU^D^F^S^BFR1^O0^M^F^CU^D^H^S^Fmonaco1^M0^K^F^CU^D^G^S^Dnice1^\0^Z^F^CU^D
^S^Sleisure engineering1^[0^Y^F^CU^D^K^S^RZippy Chicken Butt1^R0^P^F^CU^D^C^S   
Ole Ersoy0^^^W^M080130160304Z^W^M080429160304Z0|1^K0
^F^CU^D^F^S^BFR1^O0^M^F^CU^D^H^S^Fmonaco1^M0^K^F^CU^D^G^S^Dnice1^\0^Z^F^CU^D
^S^Sleisure engineering1^[0^Y^F^CU^D^K^S^RZippy Chicken Butt1^R0^P^F^CU^D^C^S   Ole Ersoy0<81><9f>0^M^F *<86>H<86>[EMAIL PROTECTED]<81><8d>[EMAIL PROTECTED]<81><89>^B<81><81>[EMAIL 
PROTECTED]"<91>^?¨ñp¬^O^Y<8c>¾^_<8c>ty$^K^[^[Å<82>®<92>^^A<þõ^PKùÿ%*Ã*Q<98>»^D^BÉNät<9d>¦<8f>65Ïã`mK£9xjå0NÎ<84>´Æ$^B¥<93>^T^Aq^KFÈ=^T 
&<90>ÇÊ£·úúSð<8f>É/J²<8e><8a><9a>Ì<84>1äÔ}cÒÓ2³Bm¸rÅ^Lتo¸<89><97>[EMAIL PROTECTED]@W:¶UGýîOÍ·³ä¨0^M^F  *<86>H<86>[EMAIL PROTECTED]<81><81>[EMAIL PROTECTED]<95>⢵ªR^X~<83><8b>í<85>Ê¿
fÿW~ÎêN^Eϱ(^^^WM3z¡^R§<8a>A^Y<9b>[EMAIL PROTECTED]
92A°»3S<8e>^P÷Ah<83>`Dÿ^N*u «A  ^ö¸8<90>» ^Voä<9d>rñ]^FãC²­,^E^UStÃ>GUp³Û^Kp^XüU¯õg^MV^A$ox 
úEäº^K<9d>¡^F%K^H±¸Ý[)e3Bj<85>


This is the connector element in server.xml:
   

I'm running the IcedTea java that comes with Fedora 8, on Tomcat 6.0.14.

This is a fresh exception with this keystore:
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jan 30, 2008 10:08:26 AM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.io.IOException: Invalid keystore format
   at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:651)
   at 
sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:56)
   at java.security.KeyStore.load(KeyStore.java:1202)

Th

Re: Invalid Keystore Format Exception

2008-01-30 Thread Ole Ersoy

Hi Vamsi,

I tried:
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA -storetype JKS

Thanks for the suggestion though,
- Ole



Vamsavardhana Reddy wrote:

May be you should use the "-storetype JKS" to be sure of the format in which
the keystore is generated.

++Vamsi

On Jan 30, 2008 11:11 AM, Ole Ersoy <[EMAIL PROTECTED]> wrote:


Hi,

I'm trying to get SSL working real quick for some experiments, and I did
this:

$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA

Answered the questions, got .keystore to appear in my home directory and
then I uncommented the SSL Connector element in server.xml and filled out
the keystoreFile and keystorePass attributes.

Now I get this exception:

Jan 29, 2008 11:27:38 PM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.io.IOException: Invalid keystore format
   at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java
:651)
   at sun.security.provider.JavaKeyStore$JKS.engineLoad(
JavaKeyStore.java:56)
   at java.security.KeyStore.load(KeyStore.java:1202)
   at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(
JSSESocketFactory.java:319)
   at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getTrustStore(
JSSESocketFactory.java:293)
   at
org.apache.tomcat.util.net.jsse.JSSESocketFactory.getTrustManagers(
JSSESocketFactory.java:444)
   at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(
JSSESocketFactory.java:378)
   at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(
JSSESocketFactory.java:125)


Anyone know why this is happening?  I tried regenerating a few times but
hte results are still the same.

Thanks,
- Ole

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



Invalid Keystore Format Exception

2008-01-29 Thread Ole Ersoy

Hi,

I'm trying to get SSL working real quick for some experiments, and I did this:

$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA

Answered the questions, got .keystore to appear in my home directory and then I 
uncommented the SSL Connector element in server.xml and filled out the 
keystoreFile and keystorePass attributes.

Now I get this exception:

Jan 29, 2008 11:27:38 PM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.io.IOException: Invalid keystore format
   at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:651)
   at 
sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:56)
   at java.security.KeyStore.load(KeyStore.java:1202)
   at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:319)
   at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.getTrustStore(JSSESocketFactory.java:293)
   at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.getTrustManagers(JSSESocketFactory.java:444)
   at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:378)
   at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:125)


Anyone know why this is happening?  I tried regenerating a few times but hte 
results are still the same.

Thanks,
- Ole

-
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: NPE when adding dependency to webapp

2007-09-13 Thread Ole Ersoy

Hello again,

I noticed someone else had the same exception:

java.lang.IllegalStateException: No Factories configured for this Application.

And were able to resolve it by deleting the work directory.  I did the same 
(Nuked both work and temp), but I still get the same exception.

Any ideas?

Thanks,
- Ole



Ole Ersoy wrote:

Hi,

I'm getting an exception with myfaces when adding a dependency to the 
webapp.  This dependency contains a component and renderer, but I 
removed the META-INF directory, so it should just be interpreted as a 
"simple" java dependency.  If I completely remove the dependency the 
test app deploys and works fine as shown in the tomcat log here:


Sep 13, 2007 12:45:27 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive test9.war
Sep 13, 2007 12:45:27 PM org.apache.myfaces.config.FacesConfigurator 
feedStandardConfig

INFO: Reading standard config META-INF/standard-faces-config.xml
Sep 13, 2007 12:45:27 PM org.apache.myfaces.config.FacesConfigurator 
feedClassloaderConfigurations
INFO: Reading config 
jar:file:/var/lib/apache-tomcat/webapps/test9/WEB-INF/lib/jsf-facelets-1.1.13.jar!/META-INF/faces-config.xml 

Sep 13, 2007 12:45:28 PM org.apache.myfaces.config.FacesConfigurator 
feedWebAppConfig

INFO: Reading config /WEB-INF/faces-config.xml
Sep 13, 2007 12:45:28 PM org.apache.myfaces.config.FacesConfigurator 
logMetaInf
INFO: Starting up MyFaces-package : myfaces-api in version : 1.2.0 from 
path : 
file:/var/lib/apache-tomcat/webapps/test9/WEB-INF/lib/myfaces-api-1.2.0

.jar
Sep 13, 2007 12:45:28 PM org.apache.myfaces.config.FacesConfigurator 
logMetaInf
INFO: Starting up MyFaces-package : myfaces-impl in version : 1.2.0 from 
path : 
file:/var/lib/apache-tomcat/webapps/test9/WEB-INF/lib/myfaces-impl-1.2

.0.jar
Sep 13, 2007 12:45:28 PM org.apache.myfaces.config.FacesConfigurator 
logMetaInf

INFO: MyFaces-package : tomahawk-sandbox not found.
Sep 13, 2007 12:45:28 PM org.apache.myfaces.config.FacesConfigurator 
logMetaInf

INFO: MyFaces-package : tomahawk not found.
Sep 13, 2007 12:45:28 PM org.apache.myfaces.shared_impl.util.LocaleUtils 
toLocale
WARNING: Locale name in faces-config.xml null or empty, setting locale 
to default locale : en_US
Sep 13, 2007 12:45:28 PM org.apache.myfaces.config.FacesConfigurator 
handleSerialFactory
INFO: Serialization provider : class 
org.apache.myfaces.shared_impl.util.serial.DefaultSerialFactory
Sep 13, 2007 12:45:28 PM 
org.apache.myfaces.webapp.DefaultFacesInitializer initFaces

INFO: ServletContext '/var/lib/apache-tomcat/webapps/test9/' initialized.
Sep 13, 2007 12:45:38 PM com.sun.facelets.compiler.TagLibraryConfig 
loadImplicit
INFO: Added Library from: 
jar:file:/var/lib/apache-tomcat/webapps/test9/WEB-INF/lib/jsf-facelets-1.1.13.jar!/META-INF/jstl-core.taglib.xml 

Sep 13, 2007 12:45:38 PM com.sun.facelets.compiler.TagLibraryConfig 
loadImplicit
INFO: Added Library from: 
jar:file:/var/lib/apache-tomcat/webapps/test9/WEB-INF/lib/jsf-facelets-1.1.13.jar!/META-INF/jsf-core.taglib.xml 

Sep 13, 2007 12:45:38 PM com.sun.facelets.compiler.TagLibraryConfig 
loadImplicit
INFO: Added Library from: 
jar:file:/var/lib/apache-tomcat/webapps/test9/WEB-INF/lib/jsf-facelets-1.1.13.jar!/META-INF/jstl-fn.taglib.xml 

Sep 13, 2007 12:45:38 PM com.sun.facelets.compiler.TagLibraryConfig 
loadImplicit
INFO: Added Library from: 
jar:file:/var/lib/apache-tomcat/webapps/test9/WEB-INF/lib/jsf-facelets-1.1.13.jar!/META-INF/jsf-html.taglib.xml 

Sep 13, 2007 12:45:38 PM com.sun.facelets.compiler.TagLibraryConfig 
loadImplicit
INFO: Added Library from: 
jar:file:/var/lib/apache-tomcat/webapps/test9/WEB-INF/lib/jsf-facelets-1.1.13.jar!/META-INF/jsf-ui.taglib.xml 





However, if I add the dependency the log looks like this:



INFO: Deploying web application archive test10.war
Sep 13, 2007 12:49:04 PM 
org.apache.myfaces.webapp.DefaultFacesInitializer initFaces

SEVERE: Error initializing MyFaces: null
java.lang.NullPointerException
   at 
org.apache.myfaces.webapp.DefaultFacesInitializer.initFaces(DefaultFacesInitializer.java:102) 

   at 
org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:57) 

   at 
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830) 

   at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
   at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) 

   at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
   at 
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
   at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:515)
   at 
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1220)

   at sun.reflect.NativeMethodAccessorImpl.invoke0

Re: jsvc.pid question / Possibility of jsvc.pid collisions?

2007-09-04 Thread Ole Ersoy

Super - Thanks Azhar - definitely making a note of the -pidfile switch.

Thanks again,
- Ole



Waseem Azhar wrote:

Yes, this is a valid issue from the start/stop tomcat perspective. If
you have multipe tomcat servers running on the same machine you can
use
-pidfile switch to specify the different pid file location for each
server. Otherwise you won't be able to start both servers
simultaneously.

e.g

-pidfile /var/run/server1/jsvc.pid
-pidfile /var/run/server2/jsvc.pid

OR

-pidfile /var/run/jsvc1.pid
-pidfile /var/run/jsvc2.pid

Thanks,
-Azhar

On 9/1/07, Ole Ersoy <[EMAIL PROTECTED]> wrote:

Hi,

I was wondering whether there is a possibility for collisions for multiple 
servers running with jsvc on the same machine.  JSVC stores the tomcat process 
ID in:

/var/run/jsvc.pid

What if another server tried to do the same?  Is this a valid concern and if so 
is there a way to change the name of jsvc.pid to say tomcat-jsvc.pid?

Thanks,
- Ole


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




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



Does the Connector SSLCertificateFile attribute support URIs?

2007-09-03 Thread Ole Ersoy

Hi,

Does anyone know if the SSLCertificateFile attribute of the connector element 
supports URIs?  So for instance if there were 10 hosts for example.com and each 
host wanted to share the same certificate and private key they could do 
something like:

SSLCertificateFile = http://shared/host/tomcat.crt
SSLCertificateKeyFile = http://shared/secured/internal/host/tomcat.key

Thanks,
- Ole


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



jsvc.pid question / Possibility of jsvc.pid collisions?

2007-08-31 Thread Ole Ersoy

Hi,

I was wondering whether there is a possibility for collisions for multiple 
servers running with jsvc on the same machine.  JSVC stores the tomcat process 
ID in:

/var/run/jsvc.pid

What if another server tried to do the same?  Is this a valid concern and if so 
is there a way to change the name of jsvc.pid to say tomcat-jsvc.pid?

Thanks,
- Ole


-
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: jsvc.exec error: Cannot find daemon loader

2007-08-30 Thread Ole Ersoy

I think I have this reasonably well isolated.  On Fedora if I:

chmod 750 bootstrap.jar 


I get the error:
31/08/2007 01:05:25 14411 jsvc.exec error: Cannot find daemon loader 
org/apache/commons/daemon/support/DaemonLoader
31/08/2007 01:05:25 14410 jsvc.exec error: Service exit with a return value of 1

But if I do this instead:
chmod 755 bootstrap.jar 


It works fine.  Strange that bootstrap.jar has to be world readable and 
executable in order for java to find the daemon loader.  The same case applies 
to setting permissions for other files, although I have not isolated the exact 
cases yet.  Right now I'm just leaving the permissions as 644 and 755, rather 
than 640 and 750, although I'd prefer the latter.

Cheers,
- Ole







Ole Ersoy wrote:

Hi Markus,

Thank you for the suggestion.  I tried that as well, but I still get the 
same message.  I think there is something funky going on with Fedora, as 
described here:


http://i-hacker.blogspot.com/2007/01/cannot-find-daemon-loader-issue-with.html 



I also tried what they did, but still no love.  I'll keep trying with 
more and more parameters. 
Cheers,

- Ole



Markus Schönhaber wrote:

Ole Ersoy schrieb:

I'm trying to run tomcat with jsvc.  I did all the things in the 
manual, and now I'm trying to run it with:


./bin/jsvc -cp ./bin/bootstrap.jar \
-outfile ./logs/catalina.out -errfile ./logs/catalina.err \
org.apache.catalina.startup.Bootstrap

And I get this in catalina.err:

22/08/2007 12:17:31 6772 jsvc.exec error: Cannot find daemon loader 
org/apache/commons/daemon/support/DaemonLoader
22/08/2007 12:17:31 6771 jsvc.exec error: Service exit with a return 
value of 1


Any ideas how to fix this?


Add commons-daemon.jar to the classpath:

./bin/jsvc -cp ./bin/commons-daemon.jar:./bin/bootstrap.jar \
-outfile ./logs/catalina.out -errfile ./logs/catalina.err \
org.apache.catalina.startup.Bootstrap

Regards
  mks

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



Tomcat Logging Configuration

2007-08-29 Thread Ole Ersoy

Hi,

I'm trying to point the catalina handler to /var/log/apache-tomcat like by 
configuring the logging.properties file like this:

1catalina.org.apache.juli.FileHandler.level = FINE
1catalina.org.apache.juli.FileHandler.directory = /var/log/apache-tomcat/
1catalina.org.apache.juli.FileHandler.prefix = catalina.

However when I start Tomcat I get this message:

[EMAIL PROTECTED] apache-tomcat]# service tomcat start
Starting tomcat
Unable to redirect to /usr/share/apache-tomcat/logs/catalina.out

Any ideas on how to fix this?

Thanks,
- Ole


-
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: 20 Tips for Using Tomcat in Production

2007-08-29 Thread Ole Ersoy

Incidentally - since we are talking about pooling - should the executor 
configuration be a tip?  It allows the connectors to share a single thread 
pool, rather than each connector having its own.  This seems like a memory and 
performance slurpee to me.

Cheers,
- Ole

myrealbruno wrote:

IMHO the only good reason to move a library out from an application and
place it into /common/lib (or /lib) is to get advantage of connection
pooling.
http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html

Then, yes, if you have different database versions you might find yourself
in the usual library versions nightmare.. :-)

-Original Message-
From: Diego Yasuhiko Kurisaki [mailto:[EMAIL PROTECTED] 
Sent: 22 August 2007 00:35

To: Tomcat Users List
Subject: Re: 20 Tips for Using Tomcat in Production


I agree, i'm not willing to pay the management overhead of putting my shared
libraries to the tomcat common lib, unless my gains are very big in terms of
memory consumption.

I don't really think you should change for another one though, but you can
make regards about the cons of that approach.

Anyway, great work 5 stars.


On 8/21/07, Ben Souther <[EMAIL PROTECTED]> wrote:

 From:
Christopher Schultz
I also agree with David and, uh, David, that #6 is a little dubious. 
Yes, moving shared libraries into the common/lib directory will save 
you some memory, but it creates a management headache when it comes 
to version numbers, WAR packaging, etc. Ideally, the WAR contains 
everything the webapp needs. If you rely on the servlet container to 
provide essential libraries, you are changing your deployment 
strategy significantly.

+1

Starting with Servlet Spec 2.3 (I think) there has been an emphasis on 
putting everything a web app needs to run into its war file. To put 
include something that runs contrary to this 'best practice' in an 
article of tips at this point in time doesn't sound like a good idea.


I would seriously consider replacing that one with something else.




-
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: 20 Tips for Using Tomcat in Production

2007-08-28 Thread Ole Ersoy

Chuck and Chris,

Thank you for the tips!  I'll probably code a little servlet that has a peak, 
but now that I'm aware of Lambda Probe, I just have to play with it :-)  
Extremely cool toy!

Thanks again,
- Ole


Caldarale, Charles R wrote:
From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Subject: Re: 20 Tips for Using Tomcat in Production


Or just look at the value for the system property "java.vm.name".


Yes, that's exactly what both JConsole and Lambda Probe do; I was just
trying to suggest a mechanism that didn't require writing additional
code.

 - 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: I'm in a mess with Tomcat 5.5

2007-08-28 Thread Ole Ersoy

It looks like they are repackaging Tomcat to use an FHS layout for all the 
directories and files.  You would place webapps in 
/var/lib/apace-tomcat/webapps and secure the directory correspondingly with the 
group as tomcat and the user as root, only giving root write permissions, etc.  
JPackage does this.

These packages usually do a pretty good job at securing tomcat, however 
documentation is usually lacking, so you'd have to read the RPM spec or 
something similar.

The one scary thing about JPackage, for instance, is that they try to shoehorn 
in dependencies.  So say for instance you have a package that was built using 
maven and a dependency with version number 1.2.3.  Well, the curent release of 
JPackage only supports dependency 1.1.1.  Well, they might give that dependency 
a try, and if it seems to work, just use it.

So I think you are best off either packaging Tomcat yourself, or just 
installing it as recommended by others here.

Cheers,
- Ole




David Smith wrote:
You might want to start with asking the Ubuntu packagers about this.  A 
_*normal*_ tomcat installation using the .tar.gz or .zip archive from an 
Apache mirror is not structured like this.  If you can't find any help 
there, you might want to remove the tomcat packages and just install the 
.tar.gz distribution from the Apache Tomcat website.


--David

jeusdi wrote:
I've installed Tomcat 5.5 into my Ubuntu + sun-java-1.5, 
tomcat5.5-webapps

and tomcat5.5-admin.

I'm in a mess because the structure of directories has changed.
   For example:*tomcat5.5-webapps package installs webapps 
into

/usr/share/tomcat5.5-webapps, but tomcat5.5 is in /usr/share/tomcat5.5
(symbolic link to /var/lib/tomcat5.5 !!). I don't know how on earth
tomcat5.5 can find these webapps?
   *Other question is when I deploy a single war file 
correctly, it

is deployed into /var/lib/tomcat5.5/webapps

As you can see bellow (executing a "ls -l"):
/usr/share/tomcat5.5/:
   ... bin
   ... common
   ... conf -> /var/lib/tomcat5.5/conf
   ... doc -> ../doc/tomcat5.5
   ... logs -> /var/lib/tomcat5.5/logs
   ... server
   ... shared -> /var/lib/tomcat5.5/shared
   ... temp -> /var/lib/tomcat5.5/temp
   ... work -> /var/lib/tomcat5.5/work

/var/lib/tomcat5.5/:
   ... conf
   ... logs -> ../../log/tomcat5.5
   ... shared
   ... temp
   ... webapps
   ... work -> ../../cache/tomcat5.5

It implies that exists three webapps directories:
/usr/share/tomcat5.5/server/webapps
   ... admin
   ... host-manager
   ... manager

/usr/share/tomcat5.5-webapps/   (tomcat5.5-webapps ubunti package 
(apatitude

install tomcat5.5-webapps)
   ... balancer
   ... balancer.xml
   ... jsp-examples
   ... jsp-examples.xml
   ... ROOT
   ... ROOT.xml
   ... servlets-examples
   ... servlets-examples.xml
   ... tomcat-docs
   ... tomcat-docs.xml
   ... webdav
   ... webdav.xml
And as last:  (where tomcat manager has deployed my web application)
/var/lib/tomcat5.5/webapps/
   ... web_gm
   ... web_gm.war

And to make things worse, tomcat manager says that web_gm (my web app) is
running!!! When I want to access it (http://host:8180/web_gm), tomcat 
says
me that "The requested resource (/web_gm/) is not available.", however 
I can

access to manager, admin, jsp-examples applications.

So, Can you help with this structure of directories?
Where are the config files that links all.

Other question:

Why context.xml is as bellow? It is empty!!!






WEB-INF/web.xml






Can you help me please?
Note I'm running tomcat using daemon (/etc/init.d/tomcat5.5)

Other question:
in catalina.out there is:

Aug 18, 2007 6:52:27 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive web_gm.war
java.io.FileNotFoundException: 
/var/lib/tomcat5.5/web_gm/work/tldCache.ser

(No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(FileOutputStream.java:179)
at java.io.FileOutputStream.(FileOutputStream.java:131)
at 
org.apache.catalina.startup.TldConfig.execute(TldConfig.java:316)

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.access$0(ContainerBase.java:743)
at
org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:143) 


at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:737)
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.deployApps(HostConfig.java:497)
at
org.apache.catalina.startup.Ho

Re: 20 Tips for Using Tomcat in Production

2007-08-27 Thread Ole Ersoy

Hi,

I ran ./jsvc help and notice it had a -jvm option.  So I tried this:

CATALINA_HOME=/usr/share/apache-tomcat
JAVA_HOME=/usr/lib/jvm/java
DAEMON_LAUNCHER=$CATALINA_HOME/bin/jsvc
TOMCAT_USER=tomcat
TMP_DIR=/var/cache/apache-tomcat/temp
CLASSPATH=$JAVA_HOME/lib/tools.jar:$CATALINA_HOME/bin/commons-daemon.jar:$CATALINA_HOME/bin/bootstrap.jar

case "$1" in
 start)
   #
   # Start Tomcat
   #
   echo -n "Starting tomcat"
   echo
   $DAEMON_LAUNCHER \
   -jvm server \ #<<<
Hi,

I'm trying to get the -server option working with jsvc.  When inserting 
-server I get this:


[EMAIL PROTECTED] init.d]# service tomcat start
Starting tomcat
27/08/2007 21:11:08 10371 jsvc error: Invalid option -server
27/08/2007 21:11:08 10371 jsvc error: Cannot parse command line arguments

The script looks like this (Note that if I remove "-server" tomcat start 
fine):


CATALINA_HOME=/usr/share/apache-tomcat
JAVA_HOME=/usr/lib/jvm/java
DAEMON_LAUNCHER=$CATALINA_HOME/bin/jsvc
TOMCAT_USER=tomcat
TMP_DIR=/var/cache/apache-tomcat/temp
CATALINA_OPTS=-server
CLASSPATH=$JAVA_HOME/lib/tools.jar:$CATALINA_HOME/bin/commons-daemon.jar:$CATALINA_HOME/bin/bootstrap.jar 



case "$1" in
 start)
   #
   # Start Tomcat
   #
   echo -n "Starting tomcat"
   echo
   $DAEMON_LAUNCHER -server \
   -user $TOMCAT_USER \
   -home $JAVA_HOME \
   -Dcatalina.home=$CATALINA_HOME \
   -Djava.io.tmpdir=$TMP_DIR \
   -outfile $CATALINA_HOME/logs/catalina.out \
   -errfile '&1' \
   -cp $CLASSPATH \
   org.apache.catalina.startup.Bootstrap
   #
   # To get a verbose JVM
   #-verbose # To get a debug of jsvc.
   #-debug
   ;;

Any ideas?

Thanks,
- Ole




Karel Sedlacek wrote:

OK, let me give this a whirl.

Karel

At 09:20 AM 8/22/2007, you wrote:
See the table in this page. On Windows on i586 java always defaults 
to client runtime. (amd64 or ia-64 are different)

http://java.sun.com/docs/hotspot/gc5.0/ergo5.html

If you can set JAVA_OPTS=-server java starts with it. Print 
System.getProperties() and you can see what runtime is used.


Ronald.

On Wed Aug 22 14:15:27 CEST 2007 Tomcat Users List 
 wrote:

I am running a 4 core, 8GB, Server 2003 SP1 EE (not R2) machine.
One JRE: 1.5.0_09
Karel
> as far as i know this option is outdated, hence the vm automatically
> goes into server mode if it detects a server class machine (>=2GB 
RAM,

> 2 processors (which also includes ht or dualcore)
>
> leon
>
> maybe wrong though
>
> On 8/22/07, Ben Souther <[EMAIL PROTECTED]> wrote:
>> It depends on which operating system you're using and how you've
>> installed Tomcat.
>> Can you tell us which it is?
>>
>>
>>
>> On Wed, 2007-08-22 at 07:19, Karel V Sedlacek wrote:
>> > Thanks for this info,...
>> >
>> > How do I implement this tip?
>> >
>> > #18. Use the -server JVM option. This enables the server JVM, 
which

>> JIT
>> > compiles bytecode much earlier, and with stronger optimizations.
>> Startup
>> > and first calls will be slower due to JIT compilation taking more
>> time,
>> > but subsequent ones will be faster.
>> >
>> > Karel
>> >
>> > > In putting #1 into the JAVA_OPTS (which it appears that is the
>> > > CATALINA_OPTS
>> > > for our implementation), it doesn't appear to work, as Tomcat
>> doesn't
>> > > restart. It could be our version -- which is currently 5.0.30.
>> please
>> > > let
>> > > me know if there are other steps we need to take here as well.
>> > >
>> > > thanks,
>> > > Kim :-)
>> > >
>> > > On 8/21/07, Shane Witbeck <[EMAIL PROTECTED]> wrote:
>> > >>
>> > >> I thought my latest blog post would be of interest to the 
people on

>> this
>> > >> list:
>> > >>
>> > >>
>> > >> 
http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-production/ 


>> > >>


Karel Sedlacek  [EMAIL PROTECTED]
CIT Data Administration Phn 607-255-7742
Cornell University  Fax 
607-255-1297

Ithaca, NY 14853


-
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: 20 Tips for Using Tomcat in Production

2007-08-27 Thread Ole Ersoy

Hi,

I'm trying to get the -server option working with jsvc.  When inserting -server 
I get this:

[EMAIL PROTECTED] init.d]# service tomcat start
Starting tomcat
27/08/2007 21:11:08 10371 jsvc error: Invalid option -server
27/08/2007 21:11:08 10371 jsvc error: Cannot parse command line arguments

The script looks like this (Note that if I remove "-server" tomcat start fine):

CATALINA_HOME=/usr/share/apache-tomcat
JAVA_HOME=/usr/lib/jvm/java
DAEMON_LAUNCHER=$CATALINA_HOME/bin/jsvc
TOMCAT_USER=tomcat
TMP_DIR=/var/cache/apache-tomcat/temp
CATALINA_OPTS=-server
CLASSPATH=$JAVA_HOME/lib/tools.jar:$CATALINA_HOME/bin/commons-daemon.jar:$CATALINA_HOME/bin/bootstrap.jar

case "$1" in
 start)
   #
   # Start Tomcat
   #
   echo -n "Starting tomcat"
   echo
   $DAEMON_LAUNCHER -server \
   -user $TOMCAT_USER \
   -home $JAVA_HOME \
   -Dcatalina.home=$CATALINA_HOME \
   -Djava.io.tmpdir=$TMP_DIR \
   -outfile $CATALINA_HOME/logs/catalina.out \
   -errfile '&1' \
   -cp $CLASSPATH \
   org.apache.catalina.startup.Bootstrap
   #
   # To get a verbose JVM
   #-verbose # To get a debug of jsvc.
   #-debug
   ;;

Any ideas?

Thanks,
- Ole




Karel Sedlacek wrote:

OK, let me give this a whirl.

Karel

At 09:20 AM 8/22/2007, you wrote:
See the table in this page. On Windows on i586 java always defaults to 
client runtime. (amd64 or ia-64 are different)

http://java.sun.com/docs/hotspot/gc5.0/ergo5.html

If you can set JAVA_OPTS=-server java starts with it. Print 
System.getProperties() and you can see what runtime is used.


Ronald.

On Wed Aug 22 14:15:27 CEST 2007 Tomcat Users List 
 wrote:

I am running a 4 core, 8GB, Server 2003 SP1 EE (not R2) machine.
One JRE: 1.5.0_09
Karel
> as far as i know this option is outdated, hence the vm automatically
> goes into server mode if it detects a server class machine (>=2GB RAM,
> 2 processors (which also includes ht or dualcore)
>
> leon
>
> maybe wrong though
>
> On 8/22/07, Ben Souther <[EMAIL PROTECTED]> wrote:
>> It depends on which operating system you're using and how you've
>> installed Tomcat.
>> Can you tell us which it is?
>>
>>
>>
>> On Wed, 2007-08-22 at 07:19, Karel V Sedlacek wrote:
>> > Thanks for this info,...
>> >
>> > How do I implement this tip?
>> >
>> > #18. Use the -server JVM option. This enables the server JVM, which
>> JIT
>> > compiles bytecode much earlier, and with stronger optimizations.
>> Startup
>> > and first calls will be slower due to JIT compilation taking more
>> time,
>> > but subsequent ones will be faster.
>> >
>> > Karel
>> >
>> > > In putting #1 into the JAVA_OPTS (which it appears that is the
>> > > CATALINA_OPTS
>> > > for our implementation), it doesn't appear to work, as Tomcat
>> doesn't
>> > > restart. It could be our version -- which is currently 5.0.30.
>> please
>> > > let
>> > > me know if there are other steps we need to take here as well.
>> > >
>> > > thanks,
>> > > Kim :-)
>> > >
>> > > On 8/21/07, Shane Witbeck <[EMAIL PROTECTED]> wrote:
>> > >>
>> > >> I thought my latest blog post would be of interest to the 
people on

>> this
>> > >> list:
>> > >>
>> > >>
>> > >> 
http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-production/ 


>> > >>


Karel Sedlacek  [EMAIL PROTECTED]
CIT Data Administration Phn 607-255-7742
Cornell University  Fax 
607-255-1297

Ithaca, NY 14853


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



Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location - find_vma failed

2007-08-23 Thread Ole Ersoy

Hi,

Tomcat runs fine, but the log contains this message:

Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location 
- find_vma failed

Another thread said this was most likely due to the tomcat user not having 
access to the /proc file system, and that it's not a biggie.  Just thought I'd 
air it out, to see if anyone has any concerns about this?

Thanks,
- Ole


-
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: jsvc.exec error: Cannot find daemon loader

2007-08-22 Thread Ole Ersoy

Hi Markus,

Thank you for the suggestion.  I tried that as well, but I still get the same 
message.  I think there is something funky going on with Fedora, as described 
here:

http://i-hacker.blogspot.com/2007/01/cannot-find-daemon-loader-issue-with.html

I also tried what they did, but still no love.  I'll keep trying with more and more parameters.  


Cheers,
- Ole



Markus Schönhaber wrote:

Ole Ersoy schrieb:


I'm trying to run tomcat with jsvc.  I did all the things in the manual, and 
now I'm trying to run it with:

./bin/jsvc -cp ./bin/bootstrap.jar \
-outfile ./logs/catalina.out -errfile ./logs/catalina.err \
org.apache.catalina.startup.Bootstrap

And I get this in catalina.err:

22/08/2007 12:17:31 6772 jsvc.exec error: Cannot find daemon loader 
org/apache/commons/daemon/support/DaemonLoader
22/08/2007 12:17:31 6771 jsvc.exec error: Service exit with a return value of 1

Any ideas how to fix this?


Add commons-daemon.jar to the classpath:

./bin/jsvc -cp ./bin/commons-daemon.jar:./bin/bootstrap.jar \
-outfile ./logs/catalina.out -errfile ./logs/catalina.err \
org.apache.catalina.startup.Bootstrap

Regards
  mks

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



jsvc.exec error: Cannot find daemon loader

2007-08-22 Thread Ole Ersoy

Hi,

I'm trying to run tomcat with jsvc.  I did all the things in the manual, and 
now I'm trying to run it with:

./bin/jsvc -cp ./bin/bootstrap.jar \
   -outfile ./logs/catalina.out -errfile ./logs/catalina.err \
   org.apache.catalina.startup.Bootstrap

And I get this in catalina.err:

22/08/2007 12:17:31 6772 jsvc.exec error: Cannot find daemon loader 
org/apache/commons/daemon/support/DaemonLoader
22/08/2007 12:17:31 6771 jsvc.exec error: Service exit with a return value of 1

Any ideas how to fix this?

Thanks,
- Ole



-
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: Installing APR on Fedora

2007-08-16 Thread Ole Ersoy

Ooooh - OK - That makes a lot of sense :-)  Sweet - It looks like it's humming 
real well now, except for a few SSL complaints, but I should be able to bang 
those out.

Thanks a gazillion Filip, Rainer, Stephen, Lakshmi, and Hassan.  You gracious 
help enabled me to keep my last hair :-)

- Ole

Filip Hanik - Dev Lists wrote:

ok, in your catalina.sh script you will need to do

export LD_LIBRARY_PATH=/usr/local/apr/lib:$LD_LIBRARY_PATH

the file it finds is the correct one.

the CLASSPATH variable only applies to java libraries, this is a native 
C library.


Filip


Ole Ersoy wrote:

Hi Rainer and Filip,

Could tcnative.so be called something else?  I ran this:

find / -name tcnative*.so

and it came up blank.  I tried
find / -name *tc*.so

And it finds:

/home/ole/Desktop/tomcat-6.0.14/bin/tomcat-native-1.1.10-src/jni/native/.libs/libtcnative-1.so 


/usr/local/apr/lib/libtcnative-1.so

I ran:

ldd /usr/local/apr/lib/libtcnative-1.so all the dependencies returned 
are in /lib or /usr/lib and there were no missing dependencies.


I figured I'd give it a try with the libtcnative-1.so, so I updated 
the catalina classpath like this:
CLASSPATH="/usr/local/apr/lib":"$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar:"$CATALINA_HOME"/bin/commons-logging-api.jar 



However it seems like catalina is not using the CLASSPATH when looking 
for the library because I still get this:


Aug 16, 2007 4:37:21 PM org.apache.catalina.core.AprLifecycleListener 
init
INFO: The Apache Tomcat Native library which allows optimal 
performance in production environments was not found on the 
java.library.path: 
/usr/lib/jvm/java-1.6.0-sun-1.6.0.1/jre/lib/i386/client:/usr/lib/jvm/java-1.6.0-sun-1.6.0.1/jre/lib/i386:/usr/lib/jvm/java-1.6.0-sun-1.6.0.1/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib 



Thoughts?

Thanks again for all the super help!
- Ole







Rainer Jung wrote:

Where do you put tcnative.so?

And: if you do ldd PATH_TO_TCNATIVE/tcnative.so: are there any 
dependencies shown, which do not lie in /lib or /usr/lib, or which 
ldd can not resolve? If yes: which libraries, and which path resp. 
which libraries without path? Maybe just post the result of the ldd 
command.


Ole Ersoy wrote:

Hi Rainer,

Thanks again for that great fix.  When I fired up Tomcat, I still 
get this message:
Aug 16, 2007 9:53:05 AM 
org.apache.catalina.core.AprLifecycleListener init
INFO: The Apache Tomcat Native library which allows optimal 
performance in production environments was not found on the 
java.library.path: 
/usr/lib/jvm/java-1.6.0-sun-1.6.0.1/jre/lib/i386/client:/usr/lib/jvm/java-1.6.0-sun-1.6.0.1/jre/lib/i386:/usr/lib/jvm/java-1.6.0-sun-1.6.0.1/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib 



I read in a post that adding /lib and /usr/lib/ to the classpath 
would take care of it, but I must be missing something else as 
well.  Any ideas?


Thanks again,
- Ole


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





-
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: Installing APR on Fedora

2007-08-16 Thread Ole Ersoy

Hi Rainer and Filip,

Could tcnative.so be called something else?  I ran this:

find / -name tcnative*.so

and it came up blank.  I tried 


find / -name *tc*.so

And it finds:

/home/ole/Desktop/tomcat-6.0.14/bin/tomcat-native-1.1.10-src/jni/native/.libs/libtcnative-1.so
/usr/local/apr/lib/libtcnative-1.so

I ran:

ldd /usr/local/apr/lib/libtcnative-1.so all the dependencies returned are in 
/lib or /usr/lib and there were no missing dependencies.

I figured I'd give it a try with the libtcnative-1.so, so I updated the 
catalina classpath like this:
CLASSPATH="/usr/local/apr/lib":"$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar:"$CATALINA_HOME"/bin/commons-logging-api.jar

However it seems like catalina is not using the CLASSPATH when looking for the 
library because I still get this:

Aug 16, 2007 4:37:21 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The Apache Tomcat Native library which allows optimal performance in 
production environments was not found on the java.library.path: 
/usr/lib/jvm/java-1.6.0-sun-1.6.0.1/jre/lib/i386/client:/usr/lib/jvm/java-1.6.0-sun-1.6.0.1/jre/lib/i386:/usr/lib/jvm/java-1.6.0-sun-1.6.0.1/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib

Thoughts?

Thanks again for all the super help!
- Ole







Rainer Jung wrote:

Where do you put tcnative.so?

And: if you do ldd PATH_TO_TCNATIVE/tcnative.so: are there any 
dependencies shown, which do not lie in /lib or /usr/lib, or which ldd 
can not resolve? If yes: which libraries, and which path resp. which 
libraries without path? Maybe just post the result of the ldd command.


Ole Ersoy wrote:

Hi Rainer,

Thanks again for that great fix.  When I fired up Tomcat, I still get 
this message:
Aug 16, 2007 9:53:05 AM org.apache.catalina.core.AprLifecycleListener 
init
INFO: The Apache Tomcat Native library which allows optimal 
performance in production environments was not found on the 
java.library.path: 
/usr/lib/jvm/java-1.6.0-sun-1.6.0.1/jre/lib/i386/client:/usr/lib/jvm/java-1.6.0-sun-1.6.0.1/jre/lib/i386:/usr/lib/jvm/java-1.6.0-sun-1.6.0.1/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib 



I read in a post that adding /lib and /usr/lib/ to the classpath would 
take care of it, but I must be missing something else as well.  Any 
ideas?


Thanks again,
- Ole


-
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: Installing APR on Fedora

2007-08-16 Thread Ole Ersoy

Hi Rainer,

Thanks again for that great fix.  When I fired up Tomcat, I still get this 
message:
Aug 16, 2007 9:53:05 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The Apache Tomcat Native library which allows optimal performance in 
production environments was not found on the java.library.path: 
/usr/lib/jvm/java-1.6.0-sun-1.6.0.1/jre/lib/i386/client:/usr/lib/jvm/java-1.6.0-sun-1.6.0.1/jre/lib/i386:/usr/lib/jvm/java-1.6.0-sun-1.6.0.1/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib

I read in a post that adding /lib and /usr/lib/ to the classpath would take 
care of it, but I must be missing something else as well.  Any ideas?

Thanks again,
- Ole





Rainer Jung wrote:

Hi Ole,

when you tried against your installed APR most likely the dev rpm, which 
includes the necessary header files for compiltions where not installed.


When you tried against a BUILD directory, most likely the APR library 
need for linking was not there.


Whichever way you choose, you need a full APR. I guess it would be 
easiest to install the dev RPMs for apr and apr-util and then use the 
installed files for configuring tcnative.


Now after you installed the additional dev packages (those are *not* the 
src packages), you might want to check, where those packages installed 
their contents to, because you need to give a path to the --with-apr 
flag. You can check package install pathes for rpm with


rpm -q --filesbypkg PACKAGENAME

If your packages choose the default system instalation pathes, you 
should be able to build without the with-apr flag. If the RPMs choose a 
special installation dir, but are build nicely, you will have shell 
scripts apr-1-config as part of one of the RPMs and you can give 
with-apr the path to this file as parameter, which will tell configure 
about the pathes of libs and headers. Lastly if you don't have the 
config script, but libs and headers are in lib/ and include/ below some 
dir, this dir will be a code value for with-apr.


HTH.

Rainer

Ole Ersoy wrote:

Hi Hassan,

I did the following:

rm -dfr tomcat-native-1.1.10-src/ tar xvfz tomcat-native.tar.gz
cd tomcat-native-1.1.10-src/jni/native
./configure --prefix=/usr/local/apr 
--with-apr=/home/ole/rpmbuild/BUILD/apr-1.2.8/ && make && make install


And I still get:

le/rpmbuild/BUILD/apr-1.2.8/libapr-1.la -luuid -lcrypt -lpthread -ldl )
/usr/bin/ld: cannot find -lapr-1
collect2: ld returned 1 exit status
libtool: install: error: relink `libtcnative-1.la' with the above 
command before installing it

make: *** [install] Error 1

Thoughts?

Thanks again,
- Ole



Hassan Schroeder wrote:

On 8/15/07, Ole Ersoy <[EMAIL PROTECTED]> wrote:

I have a lot more progress now!  I get the following (The only 
important part is the bottom i think):


[EMAIL PROTECTED] native]# ./configure 
--with-apr=/home/ole/rpmbuild/BUILD/apr-1.2.8/

...
libtool: install: error: relink `libtcnative-1.la' with the above 
command before installing it

make: *** [install] Error 1

Any idea what this means?


I'd suggest re-running this with a specific prefix to avoid potential
conflict with anything currently installed, e.g.

./configure --prefix=/usr/local/apr
--with-apr=/home/ole/rpmbuild/BUILD/apr-1.2.8/

FWIW,


-
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: Installing APR on Fedora

2007-08-16 Thread Ole Ersoy

Hi Jung,

That did the trick!

I downloaded and installed:
http://www.axint.net/apache/apr/binaries/rpm/i386/apr-devel-1.2.8-1.i386.rpm

Then I ran this:
./configure --with-apr=/usr/bin/apr-1-config && make && make install

That did the trick :-)

Thanks Jung, Hassan, and Stephen,
- Ole



Rainer Jung wrote:

Hi Ole,

when you tried against your installed APR most likely the dev rpm, which 
includes the necessary header files for compiltions where not installed.


When you tried against a BUILD directory, most likely the APR library 
need for linking was not there.


Whichever way you choose, you need a full APR. I guess it would be 
easiest to install the dev RPMs for apr and apr-util and then use the 
installed files for configuring tcnative.


Now after you installed the additional dev packages (those are *not* the 
src packages), you might want to check, where those packages installed 
their contents to, because you need to give a path to the --with-apr 
flag. You can check package install pathes for rpm with


rpm -q --filesbypkg PACKAGENAME

If your packages choose the default system instalation pathes, you 
should be able to build without the with-apr flag. If the RPMs choose a 
special installation dir, but are build nicely, you will have shell 
scripts apr-1-config as part of one of the RPMs and you can give 
with-apr the path to this file as parameter, which will tell configure 
about the pathes of libs and headers. Lastly if you don't have the 
config script, but libs and headers are in lib/ and include/ below some 
dir, this dir will be a code value for with-apr.


HTH.

Rainer

Ole Ersoy wrote:

Hi Hassan,

I did the following:

rm -dfr tomcat-native-1.1.10-src/ tar xvfz tomcat-native.tar.gz
cd tomcat-native-1.1.10-src/jni/native
./configure --prefix=/usr/local/apr 
--with-apr=/home/ole/rpmbuild/BUILD/apr-1.2.8/ && make && make install


And I still get:

le/rpmbuild/BUILD/apr-1.2.8/libapr-1.la -luuid -lcrypt -lpthread -ldl )
/usr/bin/ld: cannot find -lapr-1
collect2: ld returned 1 exit status
libtool: install: error: relink `libtcnative-1.la' with the above 
command before installing it

make: *** [install] Error 1

Thoughts?

Thanks again,
- Ole



Hassan Schroeder wrote:

On 8/15/07, Ole Ersoy <[EMAIL PROTECTED]> wrote:

I have a lot more progress now!  I get the following (The only 
important part is the bottom i think):


[EMAIL PROTECTED] native]# ./configure 
--with-apr=/home/ole/rpmbuild/BUILD/apr-1.2.8/

...
libtool: install: error: relink `libtcnative-1.la' with the above 
command before installing it

make: *** [install] Error 1

Any idea what this means?


I'd suggest re-running this with a specific prefix to avoid potential
conflict with anything currently installed, e.g.

./configure --prefix=/usr/local/apr
--with-apr=/home/ole/rpmbuild/BUILD/apr-1.2.8/

FWIW,


-
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: Installing APR on Fedora

2007-08-15 Thread Ole Ersoy

Hi Hassan,

I did the following:

rm -dfr tomcat-native-1.1.10-src/ 
tar xvfz tomcat-native.tar.gz

cd tomcat-native-1.1.10-src/jni/native
./configure --prefix=/usr/local/apr --with-apr=/home/ole/rpmbuild/BUILD/apr-1.2.8/ && 
make && make install

And I still get:

le/rpmbuild/BUILD/apr-1.2.8/libapr-1.la -luuid -lcrypt -lpthread -ldl )
/usr/bin/ld: cannot find -lapr-1
collect2: ld returned 1 exit status
libtool: install: error: relink `libtcnative-1.la' with the above command 
before installing it
make: *** [install] Error 1

Thoughts?

Thanks again,
- Ole



Hassan Schroeder wrote:

On 8/15/07, Ole Ersoy <[EMAIL PROTECTED]> wrote:


I have a lot more progress now!  I get the following (The only important part 
is the bottom i think):

[EMAIL PROTECTED] native]# ./configure 
--with-apr=/home/ole/rpmbuild/BUILD/apr-1.2.8/

...

libtool: install: error: relink `libtcnative-1.la' with the above command 
before installing it
make: *** [install] Error 1

Any idea what this means?


I'd suggest re-running this with a specific prefix to avoid potential
conflict with anything currently installed, e.g.

./configure --prefix=/usr/local/apr
--with-apr=/home/ole/rpmbuild/BUILD/apr-1.2.8/

FWIW,


-
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: Installing APR on Fedora

2007-08-15 Thread Ole Ersoy
REENTRANT 
-D_GNU_SOURCE -D_LARGEFILE64_SOURCE -DHAVE_OPENSSL 
-I/home/ole/Desktop/tomcat-6.0.14/bin/tomcat-native-1.1.10-src/jni/native/include
 -I/usr/lib/jvm/java/include -I/usr/lib/jvm/java/include/linux 
-I/home/ole/rpmbuild/BUILD/apr-1.2.8/include -version-info 1:10:1 -o 
libtcnative-1.la -rpath /usr/local/apr/lib src/user.lo src/sslinfo.lo 
src/ssl.lo src/stdlib.lo src/os.lo src/file.lo src/thread.lo src/poll.lo 
src/sslcontext.lo src/ss
etwork.lo src/lock.lo src/misc.lo src/shm.lo src/proc.lo src/sslutils.lo 
src/address.lo src/network.lo src/info.lo src/jnilib.lo src/multicast.lo 
src/error.lo src/dir.lo src/pool.lo src/mmap.lo os/unix/uxpipe.lo 
os/unix/system.lo -lssl -lcrypto /home/ole/rpmbuild/BUILD/apr-1.2.8/libapr-1.la 
-luuid -lcrypt -lpthread -ldl )

But I get:

bash: etwork.lo: command not found.  I thought maybe it was supposed to be 
network.lo, so I tried that as well, but it just gives me network.lo not found. 
 So I tried src/network.lo and this works (I had to make network.lo 
executable).  But when I now run make install I get this:

/usr/bin/ld: cannot find -lapr-1
collect2: ld returned 1 exit status
libtool: install: error: relink `libtcnative-1.la' with the above command 
before installing it
make: *** [install] Error 1

Yes!  The hamster made it all the way around.

Thoughts?  


Thanks again for all the help,
- Ole






[EMAIL PROTECTED] wrote:

Hi Ole,
I may be wrong but I think the command, based on what you have 
listed below, should have been:


 ./configure --with-apr=/usr/lib/ && make && make install

The other problem that I think you have is that given you are 
compiling, I think it is looking for the source & header for apr, hence 
depending on how your distribution does things you may need the apr-devel 
packages. The naming conventions that my distribution uses indicates that 
the apr packages you have indicated are the binary files. Assuming you are 
compiling Tomcat all that may be necessary is to copy the .so files that 
provide the apr api's into the appropriate Tomcat lib directory depending 
on which version of Tomcat you are trying to use.


Stephen Morris 
Security Technician, IT Security Access Management 
Technology Security & Risk, National Australia Bank 

Level 8, 800 Bourke St, Melbourne VIC 3000 
Tel: +61 (0) 3 8634 1755   |  Mob: 0438 537 569 
Email: [EMAIL PROTECTED] 





Ole Ersoy <[EMAIL PROTECTED]> 
16/08/2007 08:02 AM

Please respond to
"Tomcat Users List" 


To
users@tomcat.apache.org
cc

Subject
Installing APR on Fedora






Hi,

I'm trying to get the APR native capabilities working on Fedora.  I first 
checked that apr and opensll was installed like this:


[EMAIL PROTECTED] ~]$ rpm -qa | grep apr
apr-util-1.2.8-7
apr-1.2.8-6

[EMAIL PROTECTED] native]# rpm -qa | grep openssl
openssl-0.9.8b-12.fc7
openssl-devel-0.9.8b-12.fc7


Then I try to compile like this:

[EMAIL PROTECTED] native]# ./configure && make && make install 
--with-apr=/usr/lib/

checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for working mkdir -p... yes
Tomcat Native Version: 1.1.10
checking for chosen layout... tcnative
checking for APR... no
configure: error: APR could not be located. Please use the --with-apr 
option.
[EMAIL PROTECTED] native]# 


And like this:

[EMAIL PROTECTED] native]# ./configure && make && make install 
--with-apr=/usr/lib/apr-util-1/

checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for working mkdir -p... yes
Tomcat Native Version: 1.1.10
checking for chosen layout... tcnative
checking for APR... no
configure: error: APR could not be located. Please use the --with-apr 
option.
[EMAIL PROTECTED] native]# 


Anyone have any ideas on how to fix this?

Thanks,
- Ole


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




National Australia Bank Ltd - ABN 12 004 044 937
This email may contain confidential information. If you are not the intended recipient, 
please immediately notify us at [EMAIL PROTECTED] or by replying to the sender, and then 
destroy all copies of this email. Except where this email indicates otherwise, views 
expressed in this email are those of the sender and not of National Australia Bank Ltd. 
Advice in this email does not take account of your objectives, financial situation, or 
needs. It is important for you to consider these matters and, if the e-mail refers to a 
product(s), you should read the relevant Product Disclosu

Re: Installing APR on Fedora

2007-08-15 Thread Ole Ersoy

Hi Hassan,

I tried that as well:

[EMAIL PROTECTED] native]# ./configure --with-apr=/usr/lib
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for working mkdir -p... yes
Tomcat Native Version: 1.1.10
checking for chosen layout... tcnative
checking for APR... configure: error: the --with-apr parameter is incorrect. It 
must specify an install prefix, a build directory, or an apr-config file.

I think I liked it better before :-)

Thanks tough,
- Ole



Hassan Schroeder wrote:

On 8/15/07, Ole Ersoy <[EMAIL PROTECTED]> wrote:


Then I try to compile like this:

[EMAIL PROTECTED] native]# ./configure && make && make install 
--with-apr=/usr/lib/


? Shouldn't you run ./configure --with-apr=/usr/lib && make...

Off the top of my head... :-)



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



Installing APR on Fedora

2007-08-15 Thread Ole Ersoy

Hi,

I'm trying to get the APR native capabilities working on Fedora.  I first 
checked that apr and opensll was installed like this:

[EMAIL PROTECTED] ~]$ rpm -qa | grep apr
apr-util-1.2.8-7
apr-1.2.8-6

[EMAIL PROTECTED] native]# rpm -qa | grep openssl
openssl-0.9.8b-12.fc7
openssl-devel-0.9.8b-12.fc7


Then I try to compile like this:

[EMAIL PROTECTED] native]# ./configure && make && make install 
--with-apr=/usr/lib/
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for working mkdir -p... yes
Tomcat Native Version: 1.1.10
checking for chosen layout... tcnative
checking for APR... no
configure: error: APR could not be located. Please use the --with-apr option.
[EMAIL PROTECTED] native]# 


And like this:

[EMAIL PROTECTED] native]# ./configure && make && make install 
--with-apr=/usr/lib/apr-util-1/
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for working mkdir -p... yes
Tomcat Native Version: 1.1.10
checking for chosen layout... tcnative
checking for APR... no
configure: error: APR could not be located. Please use the --with-apr option.
[EMAIL PROTECTED] native]# 


Anyone have any ideas on how to fix this?

Thanks,
- Ole


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



Building Tomcat Using Maven?

2007-01-17 Thread Ole Ersoy
Hi,

Does anyone know if a Tomcat maven build exists
anywhere?

Thanks,
- Ole


 

Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front

-
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: 404

2006-06-04 Thread Ole Ersoy
Thanks Martin - I think I got it now - after updating
/etc/hosts with the domain name.  Yeah ... I was just
using www.mycompany.com as an example...would be
pretty cool to own that though!

Cheers,
- Ole

--- Martin Gainty <[EMAIL PROTECTED]> wrote:

> I guess if your a PHP guy I think you'll like
> it..Sorry sir the domain 
> www.mycompany.com is taken!
> Check the port number assigned to Tomcat i.e.
>  and use the port number to access your site
> http://localhost:8080
> 
> HTH
> Martin--
> 
> This email message and any files transmitted with it
> contain confidential
> information intended only for the person(s) to whom
> this email message is
> addressed.  If you have received this email message
> in error, please notify
> the sender immediately by telephone or email and
> destroy the original
> message without making a copy.  Thank you.
> 
> - Original Message - 
> From: "Ole Ersoy" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" 
> Sent: Sunday, June 04, 2006 4:14 PM
> Subject: 404
> 
> 
> > Hey Everybody,
> >
> > I'm trying to access setup access for
> > www.mycompany.com,
> > however I get a 404.
> >
> > If I try accessing tomcat on my internal network
> like
> > this (This is from a machine different than from
> what
> > tomcat is running on):
> >
> > http://192.168.1.4:8080/manager/html
> >
> > I get access.
> >
> > However, when trying from a machine outside my
> > internal network like this:
> >
> > http://www.mycompany.com:8080/manager/html
> >
> > I get a 404.
> >
> > I have setup NAT on my router to forward to port
> 8080
> > and I tested my ISP to make sure it's not blocking
> > port 8080.  So port 8080 is open on the router,
> and I
> > also have it open on the firewall for the machine
> > running tomcat.  There is nothing else inbetween.
> >
> > I also tried the ip address directly from outside
> the
> > internal network like this:
> >
> > http://67.234.33.22:8080/manager/html and I still
> get
> > a 404.
> >
> > Any ideas on how to trouble shoot this?  Tomcat is
> > running on Linux Fedora 3.
> >
> > Thanks a gazillion!
> >
> > Cheers,
> > - Ole
> >
> >
> > __
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> > protection around
> > http://mail.yahoo.com
> >
> > __
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.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]
> >
> > 
> 
>
-
> To start a new topic, e-mail:
> users@tomcat.apache.org
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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: 404

2006-06-04 Thread Ole Ersoy
Whoops - Sorry - I should have thought about that -
Thanks for the heads up.

Cheers,
- Ole


--- Mark Thomas <[EMAIL PROTECTED]> wrote:

> When starting a new thread (ie sending a message to
> the list about a
> new topic) please do not reply to an existing
> message and change the
> subject line. To many of the list archiving services
> and mail clients
> used by list subscribers this  makes your new
> message appear as part
> of the old thread. This makes it harder for other
> users to find
> relevant information when searching the lists.
> 
> This is known as thread hijacking and is behaviour
> that is frowned
> upon on this list. Frequent offenders will be
> removed from the list.
> It should also be noted that many list subscribers
> automatically
> ignore any messages that hijack another thread.
> 
> The correct procedure is to create a new message
> with a new subject.
> This will start a new thread.
> 
> Mark
> tomcat-user-owner
> 
>
-
> To start a new topic, e-mail:
> users@tomcat.apache.org
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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]



404

2006-06-04 Thread Ole Ersoy
Hey Everybody,

I'm trying to access setup access for
www.mycompany.com,
however I get a 404.

If I try accessing tomcat on my internal network like
this (This is from a machine different than from what
tomcat is running on):

http://192.168.1.4:8080/manager/html

I get access.

However, when trying from a machine outside my
internal network like this:

http://www.mycompany.com:8080/manager/html

I get a 404.

I have setup NAT on my router to forward to port 8080
and I tested my ISP to make sure it's not blocking
port 8080.  So port 8080 is open on the router, and I
also have it open on the firewall for the machine
running tomcat.  There is nothing else inbetween.

I also tried the ip address directly from outside the
internal network like this:

http://67.234.33.22:8080/manager/html and I still get
a 404.

Any ideas on how to trouble shoot this?  Tomcat is
running on Linux Fedora 3.

Thanks a gazillion!

Cheers,
- Ole


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam
protection around 
http://mail.yahoo.com 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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]