cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2005-03-18 Thread mturk
mturk   2005/03/18 00:13:55

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Use EMERG instead ERR for critical errors.
  
  Revision  ChangesPath
  1.75  +3 -3  jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- mod_jk.c  17 Mar 2005 12:06:03 -  1.74
  +++ mod_jk.c  18 Mar 2005 08:13:54 -  1.75
  @@ -1987,7 +1987,7 @@
  jk_shm_name(), rc);
   #if !defined(WIN32)  !defined(NETWARE)
   if (!jk_shm_file)
  -ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_NOERRNO, NULL,
  +ap_log_error(APLOG_MARK, APLOG_EMERG | APLOG_NOERRNO, NULL,
No JkShmFile defined in httpd.conf. 
LoadBalancer will not function properly!);
   #endif
  @@ -2018,7 +2018,7 @@
   if (!jk_map_read_properties(init_map, conf-worker_file, NULL)) {
   
   if (jk_map_size(init_map) == 0) {
  -ap_log_error(APLOG_MARK, APLOG_ERR, NULL,
  +ap_log_error(APLOG_MARK, APLOG_EMERG, NULL,
No worker file and no worker options in httpd.conf 

use JkWorkerFile to set workers);
   return;
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/apache-2.0 mod_jk.c

2005-03-18 Thread mturk
mturk   2005/03/18 00:14:42

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Fix STARTUP logging and use EMERG errors for missing JkShmFile
  
  Revision  ChangesPath
  1.132 +14 -9 jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v
  retrieving revision 1.131
  retrieving revision 1.132
  diff -u -r1.131 -r1.132
  --- mod_jk.c  17 Mar 2005 12:06:03 -  1.131
  +++ mod_jk.c  18 Mar 2005 08:14:42 -  1.132
  @@ -298,7 +298,7 @@
   #ifdef AS400
   int long rv = OK;
   if (rv = ap_change_request_body_xlate(p-r, 65535, 65535)) { 
   /* turn off request body translation */
  -ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0,
  +ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_CRIT, 0,
NULL,
mod_jk: Error on ap_change_request_body_xlate, 
rc=%d,
rv);
  @@ -368,7 +368,7 @@
   #ifdef AS400
   rc = ap_change_response_body_xlate(p-r, 65535, 65535); /* 
turn off response body translation */
   if (rc) {
  -ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0,
  +ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_CRIT, 0,
NULL,
mod_jk: Error on 
ap_change_response_body_xlate, rc=%d,
rc);
  @@ -396,7 +396,7 @@
*/
   #ifndef AS400
   if (ap_rflush(p-r) != APR_SUCCESS) {
  -ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0,
  +ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_CRIT, 0,
NULL, mod_jk: Error flushing);
   return JK_FALSE;
   }
  @@ -2181,7 +2181,7 @@
   status = apr_file_write(p-jklogfp, what, wrote);
   if (status != APR_SUCCESS) {
   apr_strerror(status, error, 254);
  -ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 
0,
  +ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0,
NULL,
mod_jk: jk_log_to_file %s failed: %s,
what, error);
  @@ -2349,11 +2349,16 @@
   jk_log(conf-log, JK_LOG_ERROR, Initializing shm:%s errno=%d,
  jk_shm_name(), rc);
   #if !defined(WIN32)  !defined(NETWARE)
  -if (!jk_shm_file)
  -ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_NOERRNO,
  +if (!jk_shm_file) {
  +ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_CRIT,
0, NULL,
No JkShmFile defined in httpd.conf. 
LoadBalancer will not function properly!);
  +ap_log_error(APLOG_MARK, APLOG_EMERG | APLOG_NOERRNO,
  + 0, NULL,
  + No JkShmFile defined in httpd.conf. 
  + LoadBalancer will not function properly!);
  +}
   #endif
   
   /* Set default connection cache size for worker mpm */
  @@ -2374,8 +2379,8 @@
   /* if(map_alloc(init_map)) { */
   if (!jk_map_read_properties(init_map, conf-worker_file, NULL)) {
   if (jk_map_size(init_map) == 0) {
  -ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO,
  - APLOG_EMERG, NULL,
  +ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_CRIT,
  + 0, NULL,
No worker file and no worker options in httpd.conf
use JkWorkerFile to set workers);
   return;
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/common jk_connect.c

2005-03-18 Thread mturk
mturk   2005/03/18 00:15:30

  Modified:jk/native/common jk_connect.c
  Log:
  Fix compile time warning about unused arg.
  
  Revision  ChangesPath
  1.50  +8 -2  jakarta-tomcat-connectors/jk/native/common/jk_connect.c
  
  Index: jk_connect.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_connect.c,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- jk_connect.c  17 Mar 2005 19:49:23 -  1.49
  +++ jk_connect.c  18 Mar 2005 08:15:30 -  1.50
  @@ -553,7 +553,13 @@
   fd_set fd;
   struct timeval tv;
   int rc;
  -
  +
  +/* socket_timeout is unused in select implemention
  + * If we change this to non blocking read, then we
  + * will use the timeout parameter.
  + */
  + timeout;
  + 
   FD_ZERO(fd);
   FD_SET(sd, fd);
   
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 Makefile.apxs.in Makefile.in

2005-03-18 Thread mturk
mturk   2005/03/18 00:17:59

  Modified:jk/native configure.in
   jk/native/apache-1.3 Makefile.apxs.in Makefile.in
  Log:
  Move -DJK_PREFORK from apache1.3 makefiles to configure.
  Fix setsockopt test for Solaris by adding -lsocket.
  
  Revision  ChangesPath
  1.43  +7 -3  jakarta-tomcat-connectors/jk/native/configure.in
  
  Index: configure.in
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/configure.in,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- configure.in  17 Mar 2005 12:48:40 -  1.42
  +++ configure.in  18 Mar 2005 08:17:59 -  1.43
  @@ -56,8 +56,10 @@
   dnl check for flock function.
   AC_CHECK_FUNC(flock, AC_DEFINE(HAVE_FLOCK,1,[Have flock()]))
   
  -AC_DEFUN(JK_CHECK_SETSOCKOPT, [
  +AC_DEFUN([JK_CHECK_SETSOCKOPT], [
   AC_MSG_CHECKING(whether to use $1 with setsockopt())
  +saved_LIBS=$LIBS
  +LIBS=$saved_LIBS -lsocket
   AC_TRY_RUN([
   #include sys/types.h
   #include sys/socket.h
  @@ -88,6 +90,7 @@
   , [ AC_MSG_RESULT([yes]) AC_DEFINE(USE_$1, 1, [Define to use $1 with 
setsockopt()]) ]
   , [ AC_MSG_RESULT([no]) ]
   )
  +LIBS=$saved_LIBS
   ])dnl
   
   dnl check for SO_RCVTIMEO and SO_SNDTIMEO
  @@ -141,7 +144,7 @@
   APA=`${GREP} STANDARD20 ${APXS}`
   if ${TEST} -z $APA ; then
   WEBSERVER=apache-1.3
  - APXSCFLAGS=`$APXS -q CFLAGS`
  + APXSCFLAGS=`$APXS -q CFLAGS` -DJK_PREFORK
APXS_CPPFLAGS=
   else
   WEBSERVER=apache-2.0
  @@ -211,6 +214,7 @@
  -I${withval}/src/${osdir}
  WEBSERVER=apache-1.3
  LIB_JK_TYPE=mod_jk.a
  +   CFLAGS=${CFLAGS} -DJK_PREFORK
  AC_MSG_RESULT([${apache_include}, version 1.3])
  else
  AC_MSG_ERROR([Sorry Apache 1.2.x is no longer supported.])
  
  
  
  1.7   +1 -1  
jakarta-tomcat-connectors/jk/native/apache-1.3/Makefile.apxs.in
  
  Index: Makefile.apxs.in
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/Makefile.apxs.in,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Makefile.apxs.in  17 Mar 2005 11:37:39 -  1.6
  +++ Makefile.apxs.in  18 Mar 2005 08:17:59 -  1.7
  @@ -7,7 +7,7 @@
   [EMAIL PROTECTED]@
   
   JK=../common/
  -JK_INCL=-DUSE_APACHE_MD5 -DJK_PREFORK -I ${JK}
  +JK_INCL=-DUSE_APACHE_MD5 -I ${JK}
   JAVA_INCL=-I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/${OS}
   JAVA_LIB=-L ${JAVA_HOME}/jre/lib/${ARCH} -L 
${JAVA_HOME}/lib/${ARCH}/native_threads
   
  
  
  
  1.15  +1 -1  
jakarta-tomcat-connectors/jk/native/apache-1.3/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/Makefile.in,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Makefile.in   17 Mar 2005 11:37:39 -  1.14
  +++ Makefile.in   18 Mar 2005 08:17:59 -  1.15
  @@ -25,7 +25,7 @@
   APACHE_FILES = Makefile.tmpl Makefile.libdir libjk.module
   
   JK=../common/
  -JK_INCL=-DUSE_APACHE_MD5 -DJK_PREFORK -I ${top_srcdir}/common
  +JK_INCL=-DUSE_APACHE_MD5 -I ${top_srcdir}/common
   JAVA_INCL=-I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/${OS}
   JAVA_LIB=-L ${JAVA_HOME}/jre/lib/${ARCH} -L 
${JAVA_HOME}/lib/${ARCH}/native_threads
   [EMAIL PROTECTED]@ @APXSCFLAGS@ @APXSCPPFLAGS@ -I${top_srcdir}/common
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/xdocs changelog.xml

2005-03-18 Thread mturk
mturk   2005/03/18 00:25:13

  Modified:jk/xdocs changelog.xml
  Log:
  Update changelog
  
  Revision  ChangesPath
  1.14  +11 -1 jakarta-tomcat-connectors/jk/xdocs/changelog.xml
  
  Index: changelog.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/xdocs/changelog.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- changelog.xml 13 Mar 2005 06:36:22 -  1.13
  +++ changelog.xml 18 Mar 2005 08:25:12 -  1.14
  @@ -25,8 +25,18 @@
 br /
 subsection name=Native
   changelog
  +  fix
  +  bug33248/bugFix builds where apxs defines multiple
  +  directories for APR includes. (mturk)
  +  /fix
  +  fix
  +  bug32696/bugReturn 404 instead 403 when WEB-INF is requested
  +  to comply with Servlet spec. (mturk)
  +  /fix
  +  updateAdded ANT task for managing jkstatus. (pero)
  +  /update
 update
  -  If socket_timeout is set check if socket is alive before
  +  If socket_timeout is set, check if socket is alive before
 sending any request to Tomcat. (mturk)
 /update
 update
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/xdocs/news 20041100.xml

2005-03-18 Thread mturk
mturk   2005/03/18 00:30:28

  Modified:jk/xdocs/news 20041100.xml
  Log:
  Add 1.2.9-beta note.
  
  Revision  ChangesPath
  1.9   +24 -0 jakarta-tomcat-connectors/jk/xdocs/news/20041100.xml
  
  Index: 20041100.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/xdocs/news/20041100.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- 20041100.xml  23 Feb 2005 08:10:20 -  1.8
  +++ 20041100.xml  18 Mar 2005 08:30:28 -  1.9
  @@ -21,6 +21,30 @@
   /a
   hr size=1 noshade=noshade /
   --
  +a name=20050318.1 
  +h318 March - JK-1.2.9-beta released/h3
  +pThe Apache Jakarta Tomcat team is proud to announce the immediate 
availability
  +of Jakarta Tomcat Connectors 1.2.9-beta. The release contains a significant 
number
  +of bug fixes and new features. 
  +/p
  +p
  +We expect it to be ratified as a Stable release when the vote takes place
  +in the next two weeks.
  +/p
  +p
  + Please see the a href=../changelog.htmlChangeLog/a for a full list of 
changes.
  +/p
  +warn
  +Since release 1.2.9 the bJkShmFile/b property has been added for
  +Apache 1.3.x and Apache 2.x web servers on UNIX and LINUX platforms.
  +Load balancer will not work properly if this directive is not present.
  +/warn
  +pIf you find any bugs during testing this release, please fill in the
  +a 
href=http://issues.apache.org/bugzilla/enter_bug.cgi?product=Tomcat%205;Bugzilla/a
  +Bug Report. When entering bug select bNative:JK/b Component.
  +/p
  +/a 
  +
   a name=20041224.1 
   h317 December - JK-1.2.8 released/h3
   pThe Apache Jakarta Tomcat team is proud to announce the immediate 
availability
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/xdocs/news 20041100.xml

2005-03-18 Thread mturk
mturk   2005/03/18 00:39:24

  Modified:jk/xdocs/news 20041100.xml
  Log:
  Add missing hr tag.
  
  Revision  ChangesPath
  1.10  +1 -1  jakarta-tomcat-connectors/jk/xdocs/news/20041100.xml
  
  Index: 20041100.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/xdocs/news/20041100.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- 20041100.xml  18 Mar 2005 08:30:28 -  1.9
  +++ 20041100.xml  18 Mar 2005 08:39:24 -  1.10
  @@ -44,7 +44,7 @@
   Bug Report. When entering bug select bNative:JK/b Component.
   /p
   /a 
  -
  +hr size=1 noshade=noshade /
   a name=20041224.1 
   h317 December - JK-1.2.8 released/h3
   pThe Apache Jakarta Tomcat team is proud to announce the immediate 
availability
  
  
  

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



Locked files /www/jakarta.tomcat.org/connectors-doc

2005-03-18 Thread Mladen Turk
Mark,
Can you reset the permissions on files
changelog.html
printer/changelog.html
news/*
I see the files have 664, but seems that I can not change
any file that you updated.
Regards,
Mladen
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[PATCH] Jasper and external entities parsing support

2005-03-18 Thread Henri Gomez
The provided patch will help Jasper support the external entities
located in a WAR.

Thanks to review and if positive feedback I'll commit it

Regards

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

[GUMP@brutus]: Project jakarta-tomcat-jk-native (in module jakarta-tomcat-connectors) failed

2005-03-18 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at [EMAIL PROTECTED]

Project jakarta-tomcat-jk-native has an issue affecting its community 
integration.
This issue affects 1 projects,
 and has been outstanding for 15 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- jakarta-tomcat-jk-native :  Connectors to various web servers


Full details are available at:

http://brutus.apache.org/gump/public/jakarta-tomcat-connectors/jakarta-tomcat-jk-native/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -INFO- Failed with reason build failed



The following work was performed:
http://brutus.apache.org/gump/public/jakarta-tomcat-connectors/jakarta-tomcat-jk-native/gump_work/build_jakarta-tomcat-connectors_jakarta-tomcat-jk-native.html
Work Name: build_jakarta-tomcat-connectors_jakarta-tomcat-jk-native (Type: 
Build)
Work ended in a state of : Failed
Elapsed: 
Command Line: make 
[Working Directory: 
/usr/local/gump/public/workspace/jakarta-tomcat-connectors/jk/native]
-
Making all in common
make[1]: Entering directory 
`/home/gump/workspaces2/public/workspace/jakarta-tomcat-connectors/jk/native/common'
/bin/sh 
/usr/local/gump/public/workspace/apache-httpd/dest-18032005/build/libtool 
--silent --mode=compile gcc 
-I/usr/local/gump/public/workspace/apache-httpd/dest-18032005/include -g -O2 -g 
-O2 -pthread -DHAVE_APR  
-I/usr/local/gump/public/workspace/apr/dest-18032005/include/apr-1 -g -O2 
-DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE 
-I/home/gump/workspaces2/public/workspace/apache-httpd/srclib/pcre -I 
/opt/jdk1.4/include -I /opt/jdk1.4/include/ -c jk_ajp12_worker.c 
/usr/local/gump/public/workspace/apache-httpd/dest-18032005/build/libtool: 
/usr/local/gump/public/workspace/apache-httpd/dest-18032005/build/libtool: No 
such file or directory
make[1]: *** [jk_ajp12_worker.lo] Error 127
make[1]: Leaving directory 
`/home/gump/workspaces2/public/workspace/jakarta-tomcat-connectors/jk/native/common'
make: *** [all-recursive] Error 1
-

To subscribe to this information via syndicated feeds:
- RSS: 
http://brutus.apache.org/gump/public/jakarta-tomcat-connectors/jakarta-tomcat-jk-native/rss.xml
- Atom: 
http://brutus.apache.org/gump/public/jakarta-tomcat-connectors/jakarta-tomcat-jk-native/atom.xml

== Gump Tracking Only ===
Produced by Gump version 2.2.
Gump Run 3118032005, brutus:brutus-public:3118032005
Gump E-mail Identifier (unique within run) #22.

--
Apache Gump
http://gump.apache.org/ [Instance: brutus]

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



Re: Web apps vs. Logging vs. Tomcat

2005-03-18 Thread Remy Maucherat
Jess Holle wrote:
Remy Maucherat wrote:
Jess Holle wrote:
Why out of curiosity?  I don't have a pro-UGLI ax to grind here, but 
Commons-Logging's behavior in Tomcat is really undesirable as is.
It would be the same anyway: the loading configuration and the logger 
instances will be tied to the webapp classloader. It has to work this 
way. As I understand it, the thing that does not work for you right 
now is that Tomcat uses your webapp's logger namespace before your 
callbacks are called.
Yes.  The issue is really that Tomcat uses log4j out of my web app for 
loggers that are to be used outside my web app.  Not only is the library 
used out of my web app but so is the configuration -- meaning web app A 
gets core Tomcat log output from web apps B and C...

Yoav confirmed that the solution is to move log4j and a default 
configuration higher in the stack so that everything uses it.  This 
together with a per-web-app ClassLoader (but not contextual 
classloader!) based LoggerRepository will ensure each web app gets its 
own loggers and configuration files and Tomcat core gets its own.
Yes, the logging namespaces need to be separate. I was faced with the 
issue very recently when writing a log manager for java.util.logging 
which would have a separate logger namespace for each classloader.

Now if you're inside JBoss and it has pre-established log4j and 
configured it prior to Tomcat loading, then I don't see a problem 
with Commons Logging.  Standalone Tomcat's Commons Logging behavior 
vis-a-vis log4j would seem to be an issue, though.  The issues are 
especially bad and bizarre when log4j is used in a web app but Tomcat 
itself does not have log4j installed, but this is only part of the 
issue.
I don't see any real difference. There should be plenty of container 
listeners and stuff available to configure this.
(I see Bill just mentioned conf/tomcat5-mbeans.xml but I have no clue 
what it is)
The nice thing about this as I understand it is that it would allow me 
to set up my own MBeans for a Tomcat-level / app-wide log4j 
LoggerRepository.

You're right, though, as far as per-web-app MBeans and 
LoggerRepository's -- there are more than enough servlet listeners, etc, 
in the servlet spec to handle this.

BTW, JBoss (supposedly, I didn't check personally) uses 
commons-logging everywhere, and the logging implementation used is log4j.
That works since *everything* uses log4j.  The issue is with Tomcat is 
really one of *not* having log4j at the Tomcat level but having it in 
your web app.  This leads to:

   * whole crop of loggers using java.util.logging (fine, to be
 expected, and there are Java 5 MBeans -- albeit limited -- to
 interact with these)
   * a few core Tomcat loggers that are *not* by nature per web app
 loggers using the log4j jar and configuration of the first web app
 that uses the class enclosing them (e.g. the first web app to get
 a request!)
   * the web app's own classes using whatever you specify
It is the 2nd of these 3 bullet that is so disturbing to me.  I'd like 
to see these either have separate loggers for each web app, or behave 
like the rest the Tomcat loggers and cause a leak of data and references 
between web apps.  This -- and a reasonable set of MBeans to 
control/expose loggers seems quite doable with the approach Yoav and 
Bill laid out.  It's just unfortunate that the out-of-the-box behavior 
with web apps using log4j is so onerous.
The core loggers you talk about are probably the ones used for reporting 
your servlets/filters/etc loading errors. This seems webapp related to me.

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


DO NOT REPLY [Bug 34034] - Jasper didn't respect external entities

2005-03-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=34034.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34034





--- Additional Comments From [EMAIL PROTECTED]  2005-03-18 14:47 ---
Created an attachment (id=14517)
 -- (http://issues.apache.org/bugzilla/attachment.cgi?id=14517action=view)
a patch to allow Jasper to resolve external entities located in WEBAPP


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



Re: Web apps vs. Logging vs. Tomcat

2005-03-18 Thread Jess Holle
Remy Maucherat wrote:
BTW, JBoss (supposedly, I didn't check personally) uses 
commons-logging everywhere, and the logging implementation used is 
log4j.
That works since *everything* uses log4j.  The issue is with Tomcat 
is really one of *not* having log4j at the Tomcat level but having it 
in your web app.  This leads to:

   * whole crop of loggers using java.util.logging (fine, to be
 expected, and there are Java 5 MBeans -- albeit limited -- to
 interact with these)
   * a few core Tomcat loggers that are *not* by nature per web app
 loggers using the log4j jar and configuration of the first web app
 that uses the class enclosing them (e.g. the first web app to get
 a request!)
   * the web app's own classes using whatever you specify
It is the 2nd of these 3 bullet that is so disturbing to me.  I'd 
like to see these either have separate loggers for each web app, or 
behave like the rest the Tomcat loggers and cause a leak of data and 
references between web apps.  This -- and a reasonable set of MBeans 
to control/expose loggers seems quite doable with the approach Yoav 
and Bill laid out.  It's just unfortunate that the out-of-the-box 
behavior with web apps using log4j is so onerous.
The core loggers you talk about are probably the ones used for 
reporting your servlets/filters/etc loading errors. This seems webapp 
related to me.
Considering the classes containing these loggers are not per web app as 
best I can tell I don't believe the loggers are, but I guess more 
thorough debugging on my part is in order.  Perhaps I am mistaken and 
these are Tomcat loggers, but are specific to my web app.

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


DO NOT REPLY [Bug 34034] - Jasper didn't respect external entities

2005-03-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=34034.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34034





--- Additional Comments From [EMAIL PROTECTED]  2005-03-18 16:05 ---
if (systemId.startsWith(file:///WEB-INF/))
  return new InputSource(ctxt.getResourceAsStream(systemId.substring(7)));

- -1
No surprise here ...

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 34034] - Jasper didn't respect external entities

2005-03-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=34034.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34034





--- Additional Comments From [EMAIL PROTECTED]  2005-03-18 16:15 ---
It's a trick :

if (systemId.startsWith(file:///WEB-INF/))
  return new InputSource(ctxt.getResourceAsStream(systemId.substring(7)));

XML parser have a pseudo root origine set to /WEB-INF/ and as such you get the
systemId filed with 'file:///WEB-INF/whatever.xml' when you have defined a
ENTITY what SYSTEM whatever.xml

With the substring 7 we remove the file: and as such get
/WEB-INF/whatever.xml from ServletContext via getResourceAsStream.

So it should works EVEN if the webapp is not file based.

I do that to respect WHAT YOU REQUIRED, ie no InputSource from a File, just from
a resource.



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



cvs commit: jakarta-tomcat-connectors/jk/native/common jk_map.c

2005-03-18 Thread mturk
mturk   2005/03/18 07:22:24

  Modified:jk/native/common jk_map.c
  Log:
  Skip comment and empty lines.
  
  Revision  ChangesPath
  1.31  +5 -3  jakarta-tomcat-connectors/jk/native/common/jk_map.c
  
  Index: jk_map.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_map.c,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- jk_map.c  21 Feb 2005 08:25:33 -  1.30
  +++ jk_map.c  18 Mar 2005 15:22:24 -  1.31
  @@ -423,8 +423,10 @@
   
   while (NULL != (prp = fgets(buf, LENGTH_OF_LINE, fp))) {
   trim_prp_comment(prp);
  -if ((rc =jk_map_read_property(m, prp)) == JK_FALSE)
  -break;
  +if (*prp) {
  +if ((rc =jk_map_read_property(m, prp)) == JK_FALSE)
  +break;
  +}
   }
   fclose(fp);
   if (modified)
  
  
  

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



Re: [VOTE] Propose Jim Jagielski and William A. Rowe as JakartaTomcatConnectors commiters

2005-03-18 Thread Henri Yandell
Could you send a [RESULT] for this and Cc the [EMAIL PROTECTED] list to
record the addition of new committers?

Thanks,

Hen

On Mon, 14 Mar 2005 17:49:43 -0600, William A. Rowe, Jr.
[EMAIL PROTECTED] wrote:
 At 02:09 PM 3/14/2005, Jim Jagielski wrote:
 Henri Gomez wrote:
 
  +1 for both of all.
 
  Should I understand they will works more on HTTPD related stuff and of
  course JK ?-)
 
 
 Yep, that's my intent :)
 
 Yes - I'm also interested in the AJP 14 implementation from the
 p.o.v. of ASP.NET backends.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



cvs commit: jakarta-tomcat-connectors/jk/native/common jk_map.c

2005-03-18 Thread mturk
mturk   2005/03/18 07:32:14

  Modified:jk/native/common jk_map.c
  Log:
  Add empty string checking for trim function.
  
  Revision  ChangesPath
  1.32  +6 -3  jakarta-tomcat-connectors/jk/native/common/jk_map.c
  
  Index: jk_map.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_map.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- jk_map.c  18 Mar 2005 15:22:24 -  1.31
  +++ jk_map.c  18 Mar 2005 15:32:14 -  1.32
  @@ -482,8 +482,11 @@
   static size_t trim(char *s)
   {
   size_t i;
  -
  -for (i = strlen(s) - 1; (i = 0) 
  +
  +/* check for empry strings */
  +if (!(i = strlen(s)))
  +return 0;
  +for (i = i - 1; (i = 0) 
isspace((int)((unsigned char)s[i])); i--);
   
   s[i + 1] = '\0';
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/common jk_map.c

2005-03-18 Thread mturk
mturk   2005/03/18 07:34:50

  Modified:jk/native/common jk_map.c
  Log:
  Fix typo in comment.
  
  Revision  ChangesPath
  1.33  +2 -2  jakarta-tomcat-connectors/jk/native/common/jk_map.c
  
  Index: jk_map.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_map.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- jk_map.c  18 Mar 2005 15:32:14 -  1.32
  +++ jk_map.c  18 Mar 2005 15:34:50 -  1.33
  @@ -483,7 +483,7 @@
   {
   size_t i;
   
  -/* check for empry strings */
  +/* check for empty strings */
   if (!(i = strlen(s)))
   return 0;
   for (i = i - 1; (i = 0) 
  
  
  

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



DO NOT REPLY [Bug 34076] New: - overriding content.xml docBase with manager webapp deploy function fails with java.util.zip.ZipException if context.xml specifies war and manager specifies directory

2005-03-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=34076.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34076

   Summary: overriding content.xml docBase with manager webapp
deploy function fails with java.util.zip.ZipException if
context.xml specifies war and manager specifies
directory
   Product: Tomcat 5
   Version: 5.0.28
  Platform: PC
   URL: http://localhost:8080/manager
OS/Version: Windows 2000
Status: NEW
  Severity: normal
  Priority: P2
 Component: Webapps:Manager
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]


When using the manager webapp specifying to deploy a local directory with the
war parameter and specifying a context.xml that specifies a war file with the
docBase parameter, the manager fails with java.util.zip.ZipException.

Here is an example deployment URL
http://localhost:8080/manager/deploy?config=file://C:/Projects/tts/apps/tts-webapp/src/conf/tts-dev-local.xmlwar=file://C:/Projects/tts/apps/tts-webapp/build/war

Error Message:
FAIL - Encountered exception java.io.IOException: java.util.zip.ZipException:
The system cannot find the file specified

where:
the URL file://C:/Projects/tts/apps/tts-webapp/src/conf/tts-dev-local.xml
points to a file containing this config (slightly abreviated):
Context displayName=My App Name path= docBase=tts.war debug=99
... some stuff ...
/Context

the URL file://C:/Projects/tts/apps/tts-webapp/build/war points to my
directory where I construct a war-format layout with my webapp

If I change the docBase in the context.xml to tts.wart it deploys:
OK - Deployed application from context file
file://C:/Projects/tts/apps/tts-webapp/src/conf/tts-dev-local.xml

It appears that the determination of whether we are deploying from a war file or
a directory is made when the context.xml is read and isn't overriden when the
war parameter to the manager's deploy action is specified.  Therefore, it's
either still using the value from the context.xml (and looking for it under
webapps) or it's trying to open the directory as a zip file or the directory
plus + .war or something.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



cvs commit: jakarta-tomcat-connectors/jk/native/iis/installer iisfilter.vbs isapi-redirector-win32-msi.ism

2005-03-18 Thread mturk
mturk   2005/03/18 10:09:49

  Modified:jk/native/iis/installer iisfilter.vbs
isapi-redirector-win32-msi.ism
  Log:
  Update installer.
  
  Revision  ChangesPath
  1.2   +28 -13
jakarta-tomcat-connectors/jk/native/iis/installer/iisfilter.vbs
  
  Index: iisfilter.vbs
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native/iis/installer/iisfilter.vbs,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- iisfilter.vbs 15 Dec 2004 11:07:09 -  1.1
  +++ iisfilter.vbs 18 Mar 2005 18:09:48 -  1.2
  @@ -28,10 +28,10 @@
   filterName = jakarta
   filterLib = bin\isapi_redirect.dll
 
  -Function IISInstallFilter(filterDir)
  +Function IISInstallFilter(filterDir, filterObject)
   
   Dim filters
  -Set filters = GetObject(IIS://LocalHost/W3SVC/1/Filters)
  +Set filters = GetObject(filterObject)
   If err Then err.clear
   info Got Filters  + filters.FilterLoadOrder
   
  @@ -42,13 +42,21 @@
   info Creating Filter  -  + filterName
   Dim filter
   Set filter = filters.Create( IISFilter, filterName )
  -If err then
  +If err Then
err.clear
info Filter exists - deleting
filters.delete IISFilter, filterName
  - If err Then fail Error Deleting Filter
  + If err Then
  + info Error Deleting Filter
  + IISInstallFilter = 0
  + Exit Function
  + End If
Set filter = filters.Create( IISFilter, filterName )
  - If Err Then fail Error Creating Filter
  + If Err Then
  + info Error Creating Filter
  + IISInstallFilter = 0
  + Exit Function
  + End If
   End If
   
   '
  @@ -77,18 +85,18 @@
If Len(loadOrders)  0  Then loadOrders = loadOrders + ,
filters.FilterLoadOrder = loadOrders + filterName
filters.SetInfo
  - info Filter added. 
  + info Added Filter  + filterName 
   Else
info Filter already exists in load order - no update required.
   End If
  -
  -End FUnction
  +IISInstallFilter = 1
  +End Function
   
   ' 
   ' Helper function for snafus
   '
   Function fail(message)
  -'MsgBox E:  + message
  +'MsgBox   + message
WScript.Quit(1)
   End function
   
  @@ -99,6 +107,13 @@
   'MsgBox   + message
   End Function 
   
  -info Starting... + Session.Property(INSTALLDIR)
  -IISInstallFilter Session.Property(INSTALLDIR)
  -info FInished!
  +info Installing IIS Filter  + Session.Property(INSTALLDIR)
  +Dim rv
  +rv = 0
  +rv = IISInstallFilter(Session.Property(INSTALLDIR), 
IIS://LocalHost/W3SVC/1/Filters)
  +If rv = 0 Then
  +rv = IISInstallFilter(Session.Property(INSTALLDIR), 
/LM/W3SVC/Filters)
  +End If
  +If rv = 0 Then
  +rv = IISInstallFilter(Session.Property(INSTALLDIR), 
/LM/W3SVC/1/Filters)
  +End If
  
  
  
  1.5   +1 -1  
jakarta-tomcat-connectors/jk/native/iis/installer/isapi-redirector-win32-msi.ism
  
  Index: isapi-redirector-win32-msi.ism
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native/iis/installer/isapi-redirector-win32-msi.ism,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- isapi-redirector-win32-msi.ism25 Feb 2005 09:28:59 -  1.4
  +++ isapi-redirector-win32-msi.ism18 Mar 2005 18:09:48 -  1.5
  @@ -1040,7 +1040,7 @@

rowtdISSelfRegisterFiles/tdtd1025/tdtdISSELFREG.DLL/tdtdISSelfRegisterFiles/tdtd//row


rowtdISSelfRegisterFinalize/tdtd1/tdtdISSELFREG.DLL/tdtdISSelfRegisterFinalize/tdtd//row


rowtdISUnSelfRegisterFiles/tdtd1025/tdtdISSELFREG.DLL/tdtdISUnSelfRegisterFiles/tdtd//row

  - 
rowtdInstallFilter/tdtd326/tdtdNewBinary19/tdtd/td//row

  + 
rowtdInstallFilter/tdtd70/tdtdNewBinary19/tdtd/td//row


rowtdSetARPINSTALLLOCATION/tdtd51/tdtdARPINSTALLLOCATION/tdtd[INSTALLDIR]/tdtd//row


rowtdSetAllUsersProfileNT/tdtd51/tdtdALLUSERSPROFILE/tdtd[%SystemRoot]\Profiles\All
 Users/tdtd//row


rowtdcaCreateVRoots/tdtd1025/tdtdbinIISHelper/tdtdCreateIISVRoots/tdtd//row

  
  
  

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



DO NOT REPLY [Bug 34034] - Jasper didn't respect external entities

2005-03-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=34034.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34034





--- Additional Comments From [EMAIL PROTECTED]  2005-03-18 20:17 ---
It should be enough to do (in JspConfig):
  URL uri = ctcx.getResource(WEB_XML);
  InputSource ip = new InputSource(uri.openStream());
  ip.setSystemId(uri.toExternalForm());

and leave the EntityResolver alone.  Between Xerces and o.a.naming they can 
work out the relative Entity references.





-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



Re: Web apps vs. Logging vs. Tomcat

2005-03-18 Thread Jess Holle
Jess Holle wrote:
Remy Maucherat wrote:
BTW, JBoss (supposedly, I didn't check personally) uses 
commons-logging everywhere, and the logging implementation used is 
log4j.
That works since *everything* uses log4j.  The issue is with Tomcat 
is really one of *not* having log4j at the Tomcat level but having 
it in your web app.  This leads to:

   * whole crop of loggers using java.util.logging (fine, to be
 expected, and there are Java 5 MBeans -- albeit limited -- to
 interact with these)
   * a few core Tomcat loggers that are *not* by nature per web app
 loggers using the log4j jar and configuration of the first web app
 that uses the class enclosing them (e.g. the first web app to get
 a request!)
   * the web app's own classes using whatever you specify
It is the 2nd of these 3 bullet that is so disturbing to me.  I'd 
like to see these either have separate loggers for each web app, or 
behave like the rest the Tomcat loggers and cause a leak of data and 
references between web apps.  This -- and a reasonable set of MBeans 
to control/expose loggers seems quite doable with the approach Yoav 
and Bill laid out.  It's just unfortunate that the out-of-the-box 
behavior with web apps using log4j is so onerous.
The core loggers you talk about are probably the ones used for 
reporting your servlets/filters/etc loading errors. This seems webapp 
related to me.
Considering the classes containing these loggers are not per web app 
as best I can tell I don't believe the loggers are, but I guess more 
thorough debugging on my part is in order.  Perhaps I am mistaken and 
these are Tomcat loggers, but are specific to my web app.
Okay, I did a bit more digging.
*If*:
   * Your web app contains log4j.jar *and* commons-logging.jar.
   * You do not have log4j installed in any of Tomcat's own lib
 directories.
   * You use a JNDI or other contextual classloader based
 LogRepositorySelector.
*Then*:
   * The first Tomcat web application will steal loggers from the
 Tomcat base, i.e. any that happen to be obtained while the first
 web app's contextual classloader is active.
 o In a brief, simple test, whichever web app receives the
   first JSP page request will steal the following Tomcat
   loggers:
   + org.apache.jasper.compiler.Compiler
   + org.apache.jasper.compiler.JspReader
   + org.apache.jasper.runtime.PageContextImpl
   + org.apache.jasper.servlet.JspServletWrapper
   + org.apache.jasper.xmlparser.ParserUtils
   * By steal, I mean that these loggers end up in the
 LoggerRepository of the given web app. Their configuration is thus
 controlled by it.  Also, they use the log4j library from the given
 web app.
I could always be mistaken, but my examination of the LoggerRepository's 
involved seems pretty conclusive.

If one has to have log4j and commons-logging in one's web app, then the 
only solution appears to be to put log4j in Tomcat and use a 
non-contextual classloader based LogRepositorySelector.  Avoiding the 
contextual classloader based LogRepositorySelector only keeps Tomcats 
loggers from sharing the web app's intended LoggerRepository -- they 
still use the web app's log4j and its default LoggerRepository.

--
Jess Holle


DO NOT REPLY [Bug 34080] New: - JDBCRealm looses original exception, fabricates exception type

2005-03-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=34080.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34080

   Summary: JDBCRealm looses original exception, fabricates
exception type
   Product: Tomcat 5
   Version: Nightly Build
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


naughty, naughty programmer ditches the original exception.  See line 684 of
current nightly build of org.apache.catalina.realm.JDBCRealm.java

// Instantiate our database driver if necessary
if (driver == null) {
try {
Class clazz = Class.forName(driverName);
driver = (Driver) clazz.newInstance();
} catch (Throwable e) {
throw new SQLException(e.getMessage());
}
}

As you can see, only the message of the exception is retained which is usually
meaningless without knowning the exception it's self.  The original stack trace
is also lost.  To make matters worse, SQLException doesn't take a rootCause to
show you this because it expects this to come from a DBMS and not a driver class
loading routine.

The issues surrounding this catch Throwable is that Class.forName() can throw
some nasty errors and we dont want a bad JDBC realm configuration to bring down
Tomcat.  The possible Throwables from this try block are:

LinkageError
ExceptionInInitializerError
ClassNotFoundException
ClassCastException

Additionally, ExceptionInInitializerError can contain an exception from the
static initializer of the driver class that failed to load, compounding the
original lost exception issue.  This presents a diverse array of possible 
problems.

I propose we throw a LifeCycleException, but catch it in the start() method.  If
I understand the logic correctly, we want to let the app start up if they aren't
using authentication, even though they don't have their realm configured 
correctly.

Feedback please?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 34080] - JDBCRealm looses original exception, fabricates exception type

2005-03-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=34080.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34080





--- Additional Comments From [EMAIL PROTECTED]  2005-03-19 05:41 ---
Actually, the open() method is called from several places, looks like it may be
better to have a RealmException class or even an internal mechanism or private
static innerclass or something.

Feedback please?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 34081] New: - JDBCRealm embeded in Context wont load if driver class isn't global

2005-03-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=34081.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34081

   Summary: JDBCRealm embeded in Context wont load if driver class
isn't global
   Product: Tomcat 5
   Version: Nightly Build
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


When initializing a StandardContext, the JDBCReam doesn't use the Context's
class loader making the driver classes unavailable if they aren't installed
globally (eew).  This breaks the ability to use the manager application to
deploy an app that uses a JDBCRealm because the driver class is unknown to the
default loader.  This also erodes abstraction between the web application and
the application server and would appear to be a bug rather than a feature
request as in bug 33266 
(http://issues.apache.org/bugzilla/show_bug.cgi?id=33266).

This issue was particularly irritating due to bug 34080
(http://issues.apache.org/bugzilla/show_bug.cgi?id=34080) that I just entered
in.  Because I didn't have my jdbc driver classes globally installed, I was
getting this for an error (trace from 5.0.28 BTW):

JDBCRealm[]: Exception performing authentication
java.sql.SQLException: oracle.jdbc.driver.OracleDriver
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:589)
at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:344)
at ... blah blah blah ...

This obviously didn't give me the information that I needed to understand what
the problem was, although I did get a hint.

Consider lines 678 through 686 in the current JDBCRealm.java:

// Instantiate our database driver if necessary
if (driver == null) {
try {
Class clazz = Class.forName(driverName);
driver = (Driver) clazz.newInstance();
} catch (Throwable e) {
throw new SQLException(e.getMessage());
}
}

it would appear that solving this problem would be as simple as changing line
681 to:

Class clazz = container.getLoader() != null
? Class.forName(driverName, container.getLoader())
: Class.forName(driverName);

This would be my 1st time building tomcat, so I'll have to try this this
weekend.  Is anybody aware of issues that would occur with having a class that
was loaded by a different loader however?  Also, can anybody think of problems
that this could cause for containers other than Contexts (i.e., should we check
if container is a Context before we do this)?

Thanks,
Daniel

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 34081] - JDBCRealm embeded in Context wont load if driver class isn't global

2005-03-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=34081.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34081





--- Additional Comments From [EMAIL PROTECTED]  2005-03-19 05:55 ---
bah! my newbie-dom is revealed.  I put the URLs for the bugs and Bugzilla links
them for you... (mental note)...

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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