DO NOT REPLY [Bug 5330] New: - JNDI ENC context problem.

2001-12-08 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5330

JNDI ENC context problem.

   Summary: JNDI ENC context problem.
   Product: Tomcat 4
   Version: 4.0.1 Final
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I put some object into HttpSession. Object implements 
HttpSession listener, and should perform some 
operation on JNDI context. Everything work fine for 
method 'valueBound(HttpSessionBindingEvent event)', 
but if I try to work with with JNDI from  
method 'valueUnbound(HttpSessionBindingEvent event)', 
I've got NameNotFoundException: conext 'env' not bound.
This problem occusre when session expired. I didn't perform any action from 
custom thread, nor action during undeploing application.
here is log file:
Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
Starting service Tomcat-Apache
Apache Tomcat/4.0.1
Bound into session: 04C46173A2F1381392C4C9A843D517F7
Is session new: true
Event name: TestSessionScopeJNDI
ClassLoader: WebappClassLoader
  available:
  delegate: false
  repositories:
/WEB-INF/classes/
  required:
--> Parent Classloader:
StandardClassLoader
  available:
  delegate: true
  repositories:
file:F:\tools\catalina\classes\
file:F:\tools\catalina\lib\jasper-compiler.jar
file:F:\tools\catalina\lib\jasper-runtime.jar
file:F:\tools\catalina\lib\naming-factory.jar
  required:
--> Parent Classloader:
StandardClassLoader
  available:
Extension[javax.mail, implementationVendor=Sun Microsystems, Inc., implement
ationVendorId=com.sun, implementationVersion=1.2, specificationVendor=Sun Micros
ystems, Inc., specificationVersion=1.2]
  delegate: true
  repositories:
file:F:\tools\catalina\common\classes\
file:F:\tools\catalina\common\lib\activation.jar
file:F:\tools\catalina\common\lib\jdbc2_0-stdext.jar
file:F:\tools\catalina\common\lib\jta.jar
file:F:\tools\catalina\common\lib\mail.jar
file:F:\tools\catalina\common\lib\naming-common.jar
file:F:\tools\catalina\common\lib\naming-resources.jar
file:F:\tools\catalina\common\lib\servlet.jar
file:F:\tools\catalina\common\lib\tyrex-0.9.7.0.jar
file:F:\tools\catalina\common\lib\xerces.jar
  required:
--> Parent Classloader:
sun.misc.Launcher$AppClassLoader@71732b




Unbound from session: 04C46173A2F1381392C4C9A843D517F7
Event name: TestSessionScopeJNDI
ClassLoader: StandardClassLoader
  available:
  delegate: true
  repositories:
file:F:\tools\catalina\server\classes\
file:F:\tools\catalina\server\lib\catalina.jar
file:F:\tools\catalina\server\lib\jakarta-regexp-1.2.jar
file:F:\tools\catalina\server\lib\servlets-common.jar
file:F:\tools\catalina\server\lib\servlets-default.jar
file:F:\tools\catalina\server\lib\servlets-invoker.jar
file:F:\tools\catalina\server\lib\servlets-manager.jar
file:F:\tools\catalina\server\lib\servlets-snoop.jar
file:F:\tools\catalina\server\lib\servlets-webdav.jar
file:F:\tools\catalina\server\lib\tomcat-ajp.jar
file:F:\tools\catalina\server\lib\tomcat-util.jar
file:F:\tools\catalina\server\lib\warp.jar
  required:
--> Parent Classloader:
StandardClassLoader
  available:
Extension[javax.mail, implementationVendor=Sun Microsystems, Inc., implement
ationVendorId=com.sun, implementationVersion=1.2, specificationVendor=Sun Micros
ystems, Inc., specificationVersion=1.2]
  delegate: true
  repositories:
file:F:\tools\catalina\common\classes\
file:F:\tools\catalina\common\lib\activation.jar
file:F:\tools\catalina\common\lib\jdbc2_0-stdext.jar
file:F:\tools\catalina\common\lib\jta.jar
file:F:\tools\catalina\common\lib\mail.jar
file:F:\tools\catalina\common\lib\naming-common.jar
file:F:\tools\catalina\common\lib\naming-resources.jar
file:F:\tools\catalina\common\lib\servlet.jar
file:F:\tools\catalina\common\lib\tyrex-0.9.7.0.jar
file:F:\tools\catalina\common\lib\xerces.jar
  required:
--> Parent Classloader:
sun.misc.Launcher$AppClassLoader@71732b


javax.naming.NameNotFoundException: Name java:comp is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:811)
at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at JndiPrintBean.valueUnbound(JndiPrintBean.java:50)
at org.apache.catalina.session.StandardSession.removeAttribute(StandardS
ession.java:1073)
at org.apache.catalina.session.StandardSession.expire(StandardSessio

DO NOT REPLY [Bug 5329] - NT Service exits startup before Tomcat is finished starting up.

2001-12-08 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5329

NT Service exits startup before Tomcat is finished starting up.





--- Additional Comments From [EMAIL PROTECTED]  2001-12-08 14:05 ---
Many components in Tomcat are created asynchronously, but the connectors are 
not. So when the Service startup is marked are being over, the connectors have 
already been started.
The behavior of the connector may be inconsistent, in that they may return from 
the start method before they are ready to accept connections, which in some 
cases (like yours) can cause trouble. For some other connectors, like the HTTP 
connector, it is much less important than for the native webserver connectors, 
but unfortunately, all of them are currently based on the same code.
Another solution would be to have the native code in Apache be more flexible 
with the connection handling (and only connect on demand, or something like it).

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat/src/etc profile.xml prof-server.xml

2001-12-08 Thread larryi

larryi  01/12/08 07:47:41

  Removed: src/etc  profile.xml prof-server.xml
  Log:
  These files are no longer relevant.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native/iis jk_isapi_plugin.c

2001-12-08 Thread larryi

larryi  01/12/08 07:42:25

  Modified:jk/native/iis jk_isapi_plugin.c
  Log:
  Fix bug where if uri is shortened by un-escaping or normalizing, the query
  string gets lost.
  
  Also converted some tabs to spaces.
  
  Revision  ChangesPath
  1.10  +40 -32jakarta-tomcat-connectors/jk/native/iis/jk_isapi_plugin.c
  
  Index: jk_isapi_plugin.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/iis/jk_isapi_plugin.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- jk_isapi_plugin.c 2001/11/07 21:46:28 1.9
  +++ jk_isapi_plugin.c 2001/12/08 15:42:25 1.10
  @@ -60,7 +60,7 @@
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
* Author:  Larry Isaacs <[EMAIL PROTECTED]>   *
* Author:  Ignacio J. Ortega <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.9 $   *
  + * Version: $Revision: 1.10 $   *
***/
   
   // This define is needed to include wincrypt,h, needed to get client certificates
  @@ -554,21 +554,21 @@
   DWORD dwNotificationType, 
   LPVOID pvNotification)
   {
  - /* Initialise jk */
  - if (is_inited && !is_mapread) {
  - char serverName[MAX_SERVERNAME];
  - DWORD dwLen = sizeof(serverName);
  -
  - if (pfc->GetServerVariable(pfc, SERVER_NAME, serverName, &dwLen))
  - {
  - if (dwLen > 0) serverName[dwLen-1] = '\0';
  - if (init_jk(serverName))
  - is_mapread = JK_TRUE;
  - }
  - /* If we can't read the map we become dormant */
  - if (!is_mapread)
  - is_inited = JK_FALSE;
  - }
  +/* Initialise jk */
  +if (is_inited && !is_mapread) {
  +char serverName[MAX_SERVERNAME];
  +DWORD dwLen = sizeof(serverName);
  +
  +if (pfc->GetServerVariable(pfc, SERVER_NAME, serverName, &dwLen))
  +{
  +if (dwLen > 0) serverName[dwLen-1] = '\0';
  +if (init_jk(serverName))
  +is_mapread = JK_TRUE;
  +}
  +/* If we can't read the map we become dormant */
  +if (!is_mapread)
  +is_inited = JK_FALSE;
  +}
   
   if (is_inited &&
  (SF_NOTIFY_PREPROC_HEADERS == dwNotificationType)) { 
  @@ -627,22 +627,30 @@
   }
   getparents(uri);
   
  - if(p->GetHeader(pfc, "Host:", (LPVOID)Host, (LPDWORD)&szHost)) 
{
  - strcat(snuri,Host);
  - strcat(snuri,uri);
  - jk_log(logger, JK_LOG_DEBUG, 
  -"In HttpFilterProc Virtual Host redirection 
of %s\n", 
  -snuri);
  - worker = map_uri_to_worker(uw_map, snuri, logger); 
   
  - }
  - if (!worker) {
  - jk_log(logger, JK_LOG_DEBUG, 
  -"In HttpFilterProc test Default redirection 
of %s\n", 
  -uri);
  - worker = map_uri_to_worker(uw_map, uri, logger);
  - }
  -if (query) {
  -*query = '?';
  +if(p->GetHeader(pfc, "Host:", (LPVOID)Host, (LPDWORD)&szHost)) {
  +strcat(snuri,Host);
  +strcat(snuri,uri);
  +jk_log(logger, JK_LOG_DEBUG, 
  +   "In HttpFilterProc Virtual Host redirection of %s\n", 
  +   snuri);
  +worker = map_uri_to_worker(uw_map, snuri, logger);
  +}
  +if (!worker) {
  +jk_log(logger, JK_LOG_DEBUG, 
  +   "In HttpFilterProc test Default redirection of %s\n", 
  +   uri);
  +worker = map_uri_to_worker(uw_map, uri, logger);
  +}
  +if(query) {
  +char *querytmp = uri + strlen(uri);
  +*querytmp++ = '?';
  +query++;
  +/* if uri was shortened, move the query characters */
  +if (querytmp != query) {
  +while (*query != '\0')
  +*querytmp++ = *query++;
  +*querytmp = '\0';
  +}
   }
   
   if (worker) {
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



cvs commit: jakarta-tomcat/src/native/mod_jk/iis jk_isapi_plugin.c

2001-12-08 Thread larryi

larryi  01/12/08 07:40:59

  Modified:src/native/mod_jk/iis jk_isapi_plugin.c
  Log:
  Fix bug where if uri is shortened by un-escaping or normalizing, the query
  gets lost.
  
  Also converted some tabs to spaces.
  
  Revision  ChangesPath
  1.10  +24 -16jakarta-tomcat/src/native/mod_jk/iis/jk_isapi_plugin.c
  
  Index: jk_isapi_plugin.c
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/iis/jk_isapi_plugin.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- jk_isapi_plugin.c 2001/10/01 00:27:11 1.9
  +++ jk_isapi_plugin.c 2001/12/08 15:40:59 1.10
  @@ -57,7 +57,7 @@
* Description: ISAPI plugin for IIS/PWS   *
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
* Author:  Ignacio J. Ortega <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.9 $   *
  + * Version: $Revision: 1.10 $   *
***/
   
   // This define is needed to include wincrypt,h, needed to get client certificates
  @@ -594,22 +594,30 @@
   }
   getparents(uri);
   
  - if(p->GetHeader(pfc, "Host:", (LPVOID)Host, (LPDWORD)&szHost)) 
{
  - strcat(snuri,Host);
  - strcat(snuri,uri);
  - jk_log(logger, JK_LOG_DEBUG, 
  -"In HttpFilterProc Virtual Host redirection 
of %s\n", 
  -snuri);
  - worker = map_uri_to_worker(uw_map, snuri, logger); 
   
  - }
  - if (!worker) {
  - jk_log(logger, JK_LOG_DEBUG, 
  -"In HttpFilterProc test Default redirection 
of %s\n", 
  -uri);
  - worker = map_uri_to_worker(uw_map, uri, logger);
  - }
  +if(p->GetHeader(pfc, "Host:", (LPVOID)Host, (LPDWORD)&szHost)) {
  +strcat(snuri,Host);
  +strcat(snuri,uri);
  +jk_log(logger, JK_LOG_DEBUG, 
  +   "In HttpFilterProc Virtual Host redirection of %s\n", 
  +   snuri);
  +worker = map_uri_to_worker(uw_map, snuri, logger);
  +}
  +if (!worker) {
  +jk_log(logger, JK_LOG_DEBUG, 
  +   "In HttpFilterProc test Default redirection of %s\n", 
  +   uri);
  +worker = map_uri_to_worker(uw_map, uri, logger);
  +}
   if(query) {
  -*query = '?';
  +char *querytmp = uri + strlen(uri);
  +*querytmp++ = '?';
  +query++;
  +/* if uri was shortened, move the query characters */
  +if (querytmp != query) {
  +while (*query != '\0')
  +*querytmp++ = *query++;
  +*querytmp = '\0';
  +}
   }
   
   if(worker) {
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5322] - HttpResonseBase class sends headers with multiple field-values in a non HTTP compliant fashion.

2001-12-08 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5322

HttpResonseBase class sends headers with multiple field-values in a non HTTP compliant 
fashion.

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|Normal  |Enhancement
  Component|Catalina|HTTP/1.1 Connector
   Priority|Other   |Low



--- Additional Comments From [EMAIL PROTECTED]  2001-12-08 01:46 ---
There's a small misunderstanding here.
It only means that you can have multiple headers like that only and only if you 
can replace them by only one header, with the two values delimited by commas. 
If not, you can't have multiple headers with the same name.

With header 'foo', if
Foo: bar
Foo: bar2
means the same that:
Foo: bar, bar2
Then both are valid.

If they are not equivalent, then the first form is not allowed.
Using the addXXXHeader methods implies that the first form is valid.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JK2: Configuration(1)

2001-12-08 Thread Bojan Smojver

[EMAIL PROTECTED] wrote:

> Yes, Henri has added quite a bit of code for that. I did few changes to
> make the 'autoconf' usable with other workers and more 'exposed' - see
> jk_webapp, jk_uriEnv.
> 
> And this will remain and will be enhanced - we want tomcat to be able to
> send notifications like 'webapp reload' or 'webapp down', etc.
> 
> Or the reverse - apache to send this to the workers in the farm (
> assuming a 'central' tomcat or after a soft restart of apache ).

Soon enough, both Tomcat and Apache will weld the power switch and then
the question 'Is there God' will be answered ;-)

> The major problems and why I don't think this can be the only way:
> - it requires tomcat to be started
> 
> - it's not very clear how it'll work for a complex case ( many workers,
> some apps replicated, some not ). It's hard to imagine how to do that in
> general, having it automated and on the wire is too much.
>
> - it's hard to 'tune'. I think we are at an early stage, where we still
> learn how people are using tomcat/apache. With few scripts you can do a
> lot - like rsync webapps/, generate 'native' configs, insert special
> settings.

Seems logical.

Since mod_jk is going to be reading configuration files, one of them
being /WEB-INF/jkmappings.properties, which is a 'replica' of web.xml,
why not go all the way and include XML support. I think there is a C
library around for that (pretty sure since I played with it a bit).
People might not appreciate the fact the number of configuration files
is going up.

> On a complex site, Apache will probably server more that java pages - and
> talk with more than a single tomcat.
>
> Having a file-hierarchy based system can allow delegation ( change the
> permissions on a dir and let a group manage an application/vhosts ), etc.
> Things that would be hard to do if we rely only on a wire protocol ( or at
> least hard to do in the next 2-3 months, after we gain more experience I'm
> sure we can do it )

Maybe there should be virtual file system layer that is capable of
reading certain files over the wire by giving Tomcat proper requests. Or
something along those lines. Then you can have both local file system
and a remote one handled the same way (i.e. through mod_jk knowledge of
config files).

Just babbling... :-)

Bojan

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5329] New: - NT Service exits startup before Tomcat is finished starting up.

2001-12-08 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5329

NT Service exits startup before Tomcat is finished starting up.

   Summary: NT Service exits startup before Tomcat is finished
starting up.
   Product: Tomcat 4
   Version: 4.0.1 Final
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The NT Service "tomcat.exe" packaged with Tomcat 4.0.1 final finishes 
excecution before Tomcat has finished starting up.

Win2k allows administrators to define dependencies on system services. This 
allows admins to tell a service that it must "wait" for another service to 
start before starting itself - in addition when starting a service which is 
dependent on another, the service that is depended on will be started first. 

This allows the admin for instance to tell Apache Service to "wait" until the 
Tomcat Service has finished starting. This in effect ensures that when Apache 
starts, Tomcat is already up and running. This is important when not using 
Tomcat as a standalone server, becuase Apache tries to connect to Tomcat (via 
warp or ajp) when it starts up. Since the Tomcat Service exits before Tomcat 
has started, Apache starts up before Tomcat is fully loaded and cannot create 
connections to Tomcat.

This issue exists for Win2k pro and server (SP1 and SP2).

--
To unsubscribe, e-mail:   
For additional commands, e-mail: