cvs commit: jakarta-tomcat-connectors/util/loader/org/apache/tomcat/util/loader Loader.java Module.java ModuleClassLoader.java ModuleListener.java Repository.java package.html LoaderProperties.java

2005-09-28 Thread costin
costin  2005/09/28 23:35:48

  Modified:util/loader/org/apache/tomcat/util/loader Loader.java
Module.java ModuleClassLoader.java
ModuleListener.java Repository.java package.html
  Removed: util/loader/org/apache/tomcat/util/loader
LoaderProperties.java
  Log:
  AFAIK this is not currently used, it's just an experimental refactoring of 
the loading I started long time ago. Besides beeing
  useable standalone and more generic, it supports few extra features, like 
reloading of .jar files and using a 'flat' loader, similar with jboss and jmx.
  
  - refactoring to clean up the interfaces ( code is based on catalina loader )
  - add support for delegating to a parent classloader, needed for the case 
this is embeded in another app
  - fix various things.
  
  Revision  ChangesPath
  1.3   +396 -36   
jakarta-tomcat-connectors/util/loader/org/apache/tomcat/util/loader/Loader.java
  
  Index: Loader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/loader/org/apache/tomcat/util/loader/Loader.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Loader.java   6 Oct 2004 15:41:44 -   1.2
  +++ Loader.java   29 Sep 2005 06:35:47 -  1.3
  @@ -19,18 +19,24 @@
   
   
   import java.io.File;
  +import java.io.FileInputStream;
  +import java.io.InputStream;
  +import java.lang.reflect.InvocationTargetException;
   import java.lang.reflect.Method;
   import java.net.MalformedURLException;
   import java.net.URL;
   import java.util.ArrayList;
   import java.util.Enumeration;
   import java.util.Hashtable;
  +import java.util.Properties;
   import java.util.StringTokenizer;
   import java.util.Vector;
   
   
   /**
  - * Boostrap loader for Catalina.  This application constructs a class loader
  + * Boostrap loader for Catalina or other java apps. 
  + * 
  + * This application constructs a class loader
* for use in loading the Catalina internal classes (by accumulating all of 
the
* JAR files found in the "server" directory under "catalina.home"), and
* starts the regular execution of the container.  The purpose of this
  @@ -38,20 +44,44 @@
* other classes they depend on, such as an XML parser) out of the system
* class path and therefore not visible to application level classes.
*
  + *
  + * Merged with CatalinaProperties:
  + * Load a properties file describing the modules and startup sequence.
  + * This is responsible for configuration of the loader. 
  + * TODO: support jmx-style configuration, including persistence.
  + * TODO: better separate legacy config and the new style
  + * 
  + * The properties file will be named "loader.properties" or 
  + * "catalina.properties" ( for backwad compatibility ) and
  + * will be searched in:
  + *  - TODO 
  + * 
  + * Properties used:
  + *  - TODO
  + *
  + * loader.* and *.loader properties are used internally by the loader ( 
  + *  *.loader is for backward compat with catalina ).
  + * All other properties in the config file are set as System properties.
  + * 
  + * Based on o.a.catalina.bootstrap.CatalinaProperties - utility class to 
read 
  + * the bootstrap Catalina configuration.
  +
  + *
* @author Craig R. McClanahan
* @author Remy Maucherat
* @author Costin Manolache
*/ 
   public final class Loader  {
   
  -private static final boolean DEBUG=true; 
//LoaderProperties.getProperty("loader.Loader.debug") != null;
  +private static final boolean DEBUG=true; 
//LoaderProperties.getProperty("loader.debug.Loader") != null;
  +// If flat, only one loader is created. If false - one loader per jar/dir
   private static final boolean 
FLAT=false;//LoaderProperties.getProperty("loader.Loader.flat") != null;
   
   // -- 
Constants
   
   
  -protected static final String CATALINA_HOME_TOKEN = "${catalina.home}";
  -protected static final String CATALINA_BASE_TOKEN = "${catalina.base}";
  +private static final String CATALINA_HOME_TOKEN = "${catalina.home}";
  +private static final String CATALINA_BASE_TOKEN = "${catalina.base}";
   
   
   // --- Static 
Variables
  @@ -75,24 +105,53 @@
   protected ClassLoader catalinaLoader = null;
   private String[] args;
   private Hashtable repositories=new Hashtable();
  +private ClassLoader parentClassLoader;
   
  +private static Properties properties = null;
  +
   
  +private static String propFile;
   
   //  Private 
Methods
  +
  +/** Set the parent class loader - can be used instea

Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2005-09-28 Thread Costin Manolache

Remy Maucherat wrote:

Jan Luehe wrote:

As a reminder, CVS shound't be used anymore.


I commited a bunch of small changes, don't know how easy it'll be to get 
them in after the switch to svn. Let me know if there's a problem, I can 
roll them back.


BTW - I had some of the changes in IntrospectionUtils in my workspace as 
well, so I don't have to commit that :-)


Costin


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



Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2005-09-28 Thread Remy Maucherat

Jan Luehe wrote:

No, I did.


Cool, there's one, at least :)


Yes, but with lazy resolution, it will be loaded when the
IntrospectionUtils symbol is first encountered, which may
be inside WebappClassLoader.stop().


Normally, it's used by plenty of things, like the digester. Who knows 
anyway, I find the classloading behavior to be weird sometimes.


So I am ok with your fix, but I don't understand how it can occur 
in regular Tomcat.


It's probably not occurring in standalone Tomcat, but only
in "embedded" Tomcat. In standalone Tomcat, IntrospectionUtils is
probably getting resolved (and its static initializer invoked)
prior to calling WebappClassLoader.stop(),
whereas in "embedded" mode, IntrospectionUtils is first referenced
and loaded by WebappClassLoader.stop().

The big comment block is quite pointless, as it tries to be 
informational, but doesn't correspond to reality (I am personally 
against this kind of "commit message duplication" comment).


Sure, I just thought this line might be an easy candidate for
being moved around if there was no comment.


Stuff won't get moved around for no reason ;)

It would actually be good to move the 3 cleanup calls to 
StandardContext.stop.


Rémy

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



Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2005-09-28 Thread Jan Luehe
Remy,

Remy Maucherat wrote On 09/28/05 10:18,:
> Jan Luehe wrote:
> 
>>We have seen the ThreadDeath in our callstacks, hence this fix.
> 
> 
> Nobody is reading what I am writing anymore ...

No, I did.

> I wrote:
> The static initializer is called when loading the class, and obviously 
> the webapp CL is not going to load IntrospectionUtils.
> 
> IntrospectionUtils will be loaded once, and its static initializer run 
> once.

Yes, but with lazy resolution, it will be loaded when the
IntrospectionUtils symbol is first encountered, which may
be inside WebappClassLoader.stop().

IntrospectionUtils' static initializer will cause an invocation of
loadClass() on the thread's context classloader, which corresponds to
the WebappClassLoader, whose loadClass() throws ThreadDeath when
its "started" flag has been set to FALSE.

Therefore, we must avoid referencing IntrospectionUtils in
WebappClassLoader.stop() after the "started" flag has been
set to FALSE.

> So I am ok with your fix, but I don't understand how it can occur 
> in regular Tomcat.

It's probably not occurring in standalone Tomcat, but only
in "embedded" Tomcat. In standalone Tomcat, IntrospectionUtils is
probably getting resolved (and its static initializer invoked)
prior to calling WebappClassLoader.stop(),
whereas in "embedded" mode, IntrospectionUtils is first referenced
and loaded by WebappClassLoader.stop().

> The big comment block is quite pointless, as it tries to be 
> informational, but doesn't correspond to reality (I am personally 
> against this kind of "commit message duplication" comment).

Sure, I just thought this line might be an easy candidate for
being moved around if there was no comment.

> As a reminder, CVS shound't be used anymore.

Yes.


Jan

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


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



Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2005-09-28 Thread Remy Maucherat

Jan Luehe wrote:

We have seen the ThreadDeath in our callstacks, hence this fix.


Nobody is reading what I am writing anymore ...

I wrote:
The static initializer is called when loading the class, and obviously 
the webapp CL is not going to load IntrospectionUtils.


IntrospectionUtils will be loaded once, and its static initializer run 
once. So I am ok with your fix, but I don't understand how it can occur 
in regular Tomcat.


The big comment block is quite pointless, as it tries to be 
informational, but doesn't correspond to reality (I am personally 
against this kind of "commit message duplication" comment).


As a reminder, CVS shound't be used anymore.

Rémy

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



Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2005-09-28 Thread Jan Luehe
Remy,

Remy Maucherat wrote On 09/28/05 03:12,:
> [EMAIL PROTECTED] wrote:
> 
>>  +/*
>>  + * Clear the IntrospectionUtils cache.
>>  + *
>>  + * Implementation note:
>>  + * Any reference to IntrospectionUtils which may cause the static
>>  + * initalizer of that class to be invoked must occur prior to 
>> setting
>>  + * the started flag to FALSE, because the static initializer of
>>  + * IntrospectionUtils makes a call to
>>  + * org.apache.commons.logging.LogFactory.getLog(), which ultimately
>>  + * calls the loadClass() method of the thread context classloader,
>>  + * which is the same as this classloader, whose impl throws a
>>  + * ThreadDeath if the started flag has been set to FALSE.
>>  + */
>>  +IntrospectionUtils.clear();
>>  +
> 
> 
> This commit does not make sense to me. The static initializer is called 
> when loading the class, and obviously the webapp CL is not going to load 
> IntrospectionUtils.

This code in IntrospectionUtils.java:

private static org.apache.commons.logging.Log log=
org.apache.commons.logging.LogFactory.getLog(
IntrospectionUtils.class );

will cause LogFactoryImpl.getLogConstructor() to be called, which
in turn will invoke LogFactoryImpl.loadClass(String name), which is
implemented as follows:

private static Class loadClass( final String name )
throws ClassNotFoundException
{
Object result = AccessController.doPrivileged(
new PrivilegedAction() {
public Object run() {
ClassLoader threadCL = getContextClassLoader();
if (threadCL != null) {
try {
return threadCL.loadClass(name);
} catch( ClassNotFoundException ex ) {
// ignore
}
}
try {
return Class.forName( name );
} catch (ClassNotFoundException e) {
return e;
}
}
});

if (result instanceof Class)
return (Class)result;

throw (ClassNotFoundException)result;
}

Notice the use of the thread context classloader (to load the class
with the given name), which is the same as the WebappClassLoader.

WebappClassLoader.loadClass() has this:

// Don't load classes if class loader is stopped
if (!started) {
log.info(sm.getString("webappClassLoader.stopped"));
throw new ThreadDeath();
}

We have seen the ThreadDeath in our callstacks, hence this fix.

Jan


> You should forget that the CVS exists, as we're in the middle of 
> migrating to SVN (of course, losing that commit will not be a problem).
> 
> Rémy
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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



Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2005-09-28 Thread Remy Maucherat

[EMAIL PROTECTED] wrote:

  +/*
  + * Clear the IntrospectionUtils cache.
  + *
  + * Implementation note:
  + * Any reference to IntrospectionUtils which may cause the static
  + * initalizer of that class to be invoked must occur prior to setting
  + * the started flag to FALSE, because the static initializer of
  + * IntrospectionUtils makes a call to
  + * org.apache.commons.logging.LogFactory.getLog(), which ultimately
  + * calls the loadClass() method of the thread context classloader,
  + * which is the same as this classloader, whose impl throws a
  + * ThreadDeath if the started flag has been set to FALSE.
  + */
  +IntrospectionUtils.clear();
  +


This commit does not make sense to me. The static initializer is called 
when loading the class, and obviously the webapp CL is not going to load 
IntrospectionUtils.


You should forget that the CVS exists, as we're in the middle of 
migrating to SVN (of course, losing that commit will not be a problem).


Rémy

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2005-09-27 Thread jfarcand
jfarcand2005/09/27 16:42:53

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  Port fix from SJSAS.
  
  Patch submitted by: Jan Luehe
  
  Revision  ChangesPath
  1.51  +16 -3 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- WebappClassLoader.java8 Sep 2005 15:00:54 -   1.50
  +++ WebappClassLoader.java27 Sep 2005 23:42:53 -  1.51
  @@ -1470,6 +1470,21 @@
*/
   public void stop() throws LifecycleException {
   
  +/*
  + * Clear the IntrospectionUtils cache.
  + *
  + * Implementation note:
  + * Any reference to IntrospectionUtils which may cause the static
  + * initalizer of that class to be invoked must occur prior to setting
  + * the started flag to FALSE, because the static initializer of
  + * IntrospectionUtils makes a call to
  + * org.apache.commons.logging.LogFactory.getLog(), which ultimately
  + * calls the loadClass() method of the thread context classloader,
  + * which is the same as this classloader, whose impl throws a
  + * ThreadDeath if the started flag has been set to FALSE.
  + */
  +IntrospectionUtils.clear();
  +
   started = false;
   
   int length = files.length;
  @@ -1515,8 +1530,6 @@
   org.apache.commons.logging.LogFactory.release(this);
   // Clear the classloader reference in the VM's bean introspector
   java.beans.Introspector.flushCaches();
  -// Clear the IntrospectionUtils cache
  -IntrospectionUtils.clear();
   
   }
   
  
  
  

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



svn commit: r291200 - in /tomcat/container/branches/tc4.1.x: catalina/src/share/org/apache/catalina/core/ catalina/src/share/org/apache/catalina/loader/ catalina/src/share/org/apache/catalina/mbeans/ webapps/admin/WEB-INF/classes/org/apache/webapp/admi...

2005-09-23 Thread markt
Author: markt
Date: Fri Sep 23 13:05:38 2005
New Revision: 291200

URL: http://svn.apache.org/viewcvs?rev=291200&view=rev
Log:
Fix bug 10026. Port of antiJARLocking functionality from TC5.

Modified:

tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardContext.java

tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java

tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/WebappLoader.java

tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml

tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties

tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/ContextForm.java

tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/EditContextAction.java

tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/SaveContextAction.java
tomcat/container/branches/tc4.1.x/webapps/admin/context/context.jsp
tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/config/context.xml

Modified: 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardContext.java?rev=291200&r1=291199&r2=291200&view=diff
==
--- 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardContext.java
 (original)
+++ 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardContext.java
 Fri Sep 23 13:05:38 2005
@@ -111,6 +111,12 @@
 
 
 /**
+ * The antiJARLocking flag for this Context.
+ */
+private boolean antiJARLocking = false;
+
+
+/**
  * The set of application listener class names configured for this
  * application, in the order they were encountered in the web.xml file.
  */
@@ -545,6 +551,32 @@
 }
 
 
+/**
+ * Return the antiJARLocking flag for this Context.
+ */
+public boolean getAntiJARLocking() {
+
+return (this.antiJARLocking);
+
+}
+
+
+/**
+ * Set the antiJARLocking feature for this Context.
+ *
+ * @param antiJARLocking The new flag value
+ */
+public void setAntiJARLocking(boolean antiJARLocking) {
+
+boolean oldAntiJARLocking = this.antiJARLocking;
+this.antiJARLocking = antiJARLocking;
+support.firePropertyChange("antiJARLocking",
+   new Boolean(oldAntiJARLocking),
+   new Boolean(this.antiJARLocking));
+
+}
+
+
 /**
  * Return the set of initialized application listener objects,
  * in the order they were specified in the web application deployment

Modified: 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java?rev=291200&r1=291199&r2=291200&view=diff
==
--- 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
 (original)
+++ 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
 Fri Sep 23 13:05:38 2005
@@ -18,6 +18,7 @@
 package org.apache.catalina.loader;
 
 import java.io.File;
+import java.io.FileOutputStream;
 import java.io.FilePermission;
 import java.io.InputStream;
 import java.io.ByteArrayInputStream;
@@ -312,6 +313,12 @@
 
 
 /**
+ * Path where resources loaded from JARs will be extracted.
+ */
+protected File loaderDir = null;
+
+
+/**
  * The PermissionCollection for each CodeSource for a web
  * application context.
  */
@@ -354,6 +361,13 @@
 private Permission allPermission = new java.security.AllPermission();
 
 
+/**
+ * Use anti JAR locking code, which does URL rerouting when accessing
+ * resources.
+ */
+boolean antiJARLocking = false; 
+
+
 // - Properties
 
 
@@ -422,6 +436,22 @@
 
 
 /**
+ * @return Returns the antiJARLocking.
+ */
+public boolean getAntiJARLocking() {
+return antiJARLocking;
+}
+
+
+/**
+ * @param antiJARLocking The antiJARLocking to set.
+ */
+public void setAntiJARLocking(boolean antiJARLocking) {
+this.antiJARLocking = antiJARLocking;
+}
+
+
+/**
  * If there is a Java SecurityManager create a read FilePermis

DO NOT REPLY [Bug 35056] - Class loader should ignore obsolete jar or print its name if not found

2005-05-25 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://issues.apache.org/bugzilla/show_bug.cgi?id=35056


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX




--- Additional Comments From [EMAIL PROTECTED]  2005-05-25 11:20 ---
Sorry, we will not implement that.

-- 
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 35056] New: - Class loader should ignore obsolete jar or print its name if not found

2005-05-25 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=35056>.
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=35056

   Summary: Class loader should ignore obsolete jar or print its
name if not found
   Product: Tomcat 5
   Version: 5.5.7
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


Configuration:

Apache/2.0.40 (Red Hat Linux)
mod_jk 1.2.8
Tomcat 5.5.7
Red Hat Linux 9
j2sdk-1_4_2_07

How to reproduce

- Deploy your application with multiple jar files in your application's lib
directory.
- The contents of one jar file are not required by the application (obsolete).
- The name of the obsolete jar file is such that it appears first in
  what I guess is Java's list() command.
- Delete the obsolete jar file.
- Request content of a servlet that has not been loaded before you deleted the
  obsolete file.

Expected behavior:

Tomcat should load the required class, or if it cannot load the class, then it
should print a helpful error message.

If the root cause is that a jar file cannot be opened, then the complete
filename of the jar file should be printed in the error message.


Actual behavior:

It appears (I am guessing here) that Tomcat caches the list of jar files in the
lib directory. It tries to open all files, including deleted ones.

It crashes with two errors:

1) WARNING: Failed to open JAR
java.util.zip.ZipException: No such file or directory
There are two issues here that need to be addressed:
a) Tomcat insists that a file that was available at deployment is available.
   It should ignore it if it does not exist.
b) It does not print the filename of the file it tries to open.

2) SEVERE: Allocate exception for servlet 
javax.servlet.ServletException: Error instantiating servlet 


Comment:

It might be better that Tomcat tests for the existence of the file and
if it does not exist then it should ignore it.
If that is not possible e.g. because Tomcat keeps an index of the file's
contents then it should print in the error message the complete filename of the
file it can't find.

Very much like in Java.io.FileNotFoundException where the filename is included
in the stack trace.

-- 
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-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2005-05-04 Thread jfclere
jfclere 2005/05/04 00:30:24

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  Allow to use properties in native encoding.
  In EBCDIC Environments the FileInputStream is localized but not the
  ByteArrayInputStream therefore loading a properties from such
  a file using the WebappClassLoader class loader failed.
  
  Revision  ChangesPath
  1.49  +32 -2 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- WebappClassLoader.java30 Mar 2005 13:01:00 -  1.48
  +++ WebappClassLoader.java4 May 2005 07:30:24 -   1.49
  @@ -354,6 +354,11 @@
*/
   protected boolean hasExternalRepositories = false;
   
  +/**
  + * need conversion for properties files
  + */
  +protected boolean needConvert = false;
  +
   
   /**
* All permission.
  @@ -1444,6 +1449,15 @@
   public void start() throws LifecycleException {
   
   started = true;
  +String encoding = null;
  +try {
  +encoding = System.getProperty("file.encoding");
  +} catch (Exception e) {
  +return;
  +}
  +if (encoding.indexOf("EBCDIC")!=-1) {
  +needConvert = true;
  +}
   
   }
   
  @@ -1695,6 +1709,8 @@
   
   Resource resource = null;
   
  +boolean fileNeedConvert = false;
  +
   for (i = 0; (entry == null) && (i < repositoriesLength); i++) {
   try {
   
  @@ -1728,6 +1744,12 @@
   return null;
   }
   
  +if (needConvert) {
  +if (path.endsWith(".properties")) {
  +fileNeedConvert = true;
  +}
  +}
  +
   // Register the full path for modification checking
   // Note: Only syncing on a 'constant' object is needed
   synchronized (allPermission) {
  @@ -1855,8 +1877,8 @@
   
   byte[] binaryContent = new byte[contentLength];
   
  +int pos = 0;
   try {
  -int pos = 0;
   
   while (true) {
   int n = binaryStream.read(binaryContent, pos,
  @@ -1874,6 +1896,14 @@
   return null;
   }
   
  +if (fileNeedConvert) {
  +String str = new String(binaryContent,0,pos);
  +try {
  +binaryContent = str.getBytes("UTF-8");
  +} catch (Exception e) {
  +return null;
  +}
  +}
   entry.binaryContent = binaryContent;
   
   // The certificates are only available after the JarEntry 
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2005-03-30 Thread remm
remm2005/03/30 05:01:00

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  - 33743: Additional syncs, since checking binaryContent== null by itself is 
unreliable.
  
  Revision  ChangesPath
  1.48  +7 -3  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- WebappClassLoader.java21 Mar 2005 15:59:26 -  1.47
  +++ WebappClassLoader.java30 Mar 2005 13:01:00 -  1.48
  @@ -1569,14 +1569,18 @@
   
   entry = findResourceInternal(name, classPath);
   
  -if ((entry == null) || (entry.binaryContent == null
  -&& entry.loadedClass == null))
  +if (entry == null)
   throw new ClassNotFoundException(name);
   
   Class clazz = entry.loadedClass;
   if (clazz != null)
   return clazz;
   
  +synchronized (this) {
  +if (entry.binaryContent == null && entry.loadedClass == null)
  +throw new ClassNotFoundException(name);
  +}
  +
   // Looking up the package
   String packageName = null;
   int pos = name.lastIndexOf('.');
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2005-03-21 Thread remm
remm2005/03/21 07:59:26

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  - private -> protected (as the class is not final).
  
  Revision  ChangesPath
  1.47  +16 -16
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- WebappClassLoader.java25 Jan 2005 13:16:32 -  1.46
  +++ WebappClassLoader.java21 Mar 2005 15:59:26 -  1.47
  @@ -100,14 +100,14 @@
   implements Reloader, Lifecycle
{
   
  -private static org.apache.commons.logging.Log log=
  +protected static org.apache.commons.logging.Log log=
   org.apache.commons.logging.LogFactory.getLog( 
WebappClassLoader.class );
   
   protected class PrivilegedFindResource
   implements PrivilegedAction {
   
  -private File file;
  -private String path;
  +protected File file;
  +protected String path;
   
   PrivilegedFindResource(File file, String path) {
   this.file = file;
  @@ -132,20 +132,20 @@
* but where the corresponding JAR files are required to run on
* earlier versions.
*/
  -private static final String[] triggers = {
  +protected static final String[] triggers = {
   "javax.servlet.Servlet" // Servlet API
   };
   
   /** 
* Jdk Compatibility Support.
*/
  -private static JdkCompat jdkCompat = JdkCompat.getJdkCompat();
  +protected static JdkCompat jdkCompat = JdkCompat.getJdkCompat();
   
   /**
* Set of package names which are not allowed to be loaded from a webapp
    * class loader without delegating first.
*/
  -private static final String[] packageTriggers = {
  +protected static final String[] packageTriggers = {
   };
   
   
  @@ -309,38 +309,38 @@
* A list of read File and Jndi Permission's required if this loader
* is for a web application context.
*/
  -private ArrayList permissionList = new ArrayList();
  +protected ArrayList permissionList = new ArrayList();
   
   
   /**
* Path where resources loaded from JARs will be extracted.
*/
  -private File loaderDir = null;
  +protected File loaderDir = null;
   
   
   /**
* The PermissionCollection for each CodeSource for a web
* application context.
*/
  -private HashMap loaderPC = new HashMap();
  +protected HashMap loaderPC = new HashMap();
   
   
   /**
* Instance of the SecurityManager installed.
*/
  -private SecurityManager securityManager = null;
  +protected SecurityManager securityManager = null;
   
   
   /**
* The parent class loader.
*/
  -private ClassLoader parent = null;
  +protected ClassLoader parent = null;
   
   
   /**
* The system class loader.
*/
  -private ClassLoader system = null;
  +protected ClassLoader system = null;
   
   
   /**
  @@ -358,7 +358,7 @@
   /**
* All permission.
*/
  -private Permission allPermission = new java.security.AllPermission();
  +protected Permission allPermission = new java.security.AllPermission();
   
   
   // - 
Properties
  @@ -1650,7 +1650,7 @@
*
* @return the loaded resource, or null if the resource isn't found
*/
  -private ResourceEntry findResourceInternal(File file, String path){
  +protected ResourceEntry findResourceInternal(File file, String path){
   ResourceEntry entry = new ResourceEntry();
   try {
   entry.source = getURI(new File(file, path));
  @@ -2038,7 +2038,7 @@
*
* @exception IOException if an input/output error occurs
*/
  -private boolean validateJarFile(File jarfile)
  +protected boolean validateJarFile(File jarfile)
   throws IOException {
   
   if (triggers == null)
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2005-01-25 Thread remm
remm2005/01/25 05:16:32

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  - 26135: Workaround for memory leak when reloading Struts based web 
applications.
  - Submitted by Tobias Löfstrand.
  - Please let me know if it actually fixes the problem (I didn't test it yet).
  
  Revision  ChangesPath
  1.46  +4 -1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- WebappClassLoader.java27 Oct 2004 00:07:45 -  1.45
  +++ WebappClassLoader.java25 Jan 2005 13:16:32 -  1.46
  @@ -1496,7 +1496,10 @@
   deleteDir(loaderDir);
   }
   
  +// Clear the classloader reference in common-logging
   org.apache.commons.logging.LogFactory.release(this);
  +// Clear the classloader reference in the VM's bean introspector
  +java.beans.Introspector.flushCaches();
   
   }
   
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2004-10-26 Thread remm
remm2004/10/26 17:07:45

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  - Fix condition which seems to not have been properly updated after adding 
entry.binaryContent = null a little below.
  - Remove useless sync trick.
  - Submitted by Joe Zhou as bug 31903.
  
  Revision  ChangesPath
  1.45  +17 -20
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- WebappClassLoader.java5 Oct 2004 16:46:15 -   1.44
  +++ WebappClassLoader.java27 Oct 2004 00:07:45 -  1.45
  @@ -1566,7 +1566,8 @@
   
   entry = findResourceInternal(name, classPath);
   
  -if ((entry == null) || (entry.binaryContent == null))
  +if ((entry == null) || (entry.binaryContent == null
  +&& entry.loadedClass == null))
   throw new ClassNotFoundException(name);
   
   Class clazz = entry.loadedClass;
  @@ -1620,26 +1621,22 @@
   
   }
   
  -if (entry.loadedClass == null) {
  -synchronized (this) {
  -if (entry.loadedClass == null) {
  -clazz = defineClass(name, entry.binaryContent, 0,
  -entry.binaryContent.length, 
  -codeSource);
  -entry.loadedClass = clazz;
  -entry.binaryContent = null;
  -entry.source = null;
  -entry.codeBase = null;
  -entry.manifest = null;
  -entry.certificates = null;
  -} else {
  -clazz = entry.loadedClass;
  -}
  +synchronized (this) {
  +if (entry.loadedClass == null) {
  +clazz = defineClass(name, entry.binaryContent, 0,
  +entry.binaryContent.length, 
  +codeSource);
  +entry.loadedClass = clazz;
  +entry.binaryContent = null;
  +entry.source = null;
  +entry.codeBase = null;
  +entry.manifest = null;
  +entry.certificates = null;
  +} else {
  +clazz = entry.loadedClass;
   }
  -} else {
  -clazz = entry.loadedClass;
   }
  -
  +
   return clazz;
   
   }
  
  
  

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



Re: loader

2004-10-06 Thread Costin Manolache
Remy Maucherat wrote:
I didn't have time to look at the code yet, though.
Wait a week or 2 - the loader part is fine, but the catalina side is 
still a bit messy and I need to find a good way to integrate with the 
build ( to make it completely optional/isolated - I don't want to affect 
the 5.5  schedule by breaking something :-)

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


Re: loader

2004-10-06 Thread Costin Manolache
Mladen Turk wrote:
Costin Manolache wrote:
Mladen Turk wrote:
What about commons-deamon?
What about it :-) ?
Daemon is a different level - it's about launching a resident process 
(or service in windows ). No connection with how the process is loading
its classes.


Sure, but the wheel was invented long time ago :).
How about making things usable?
Which things to make usable ? Daemon ? It's not my itch to start 
services on windows:-)

Yes, the wheel was invented long ago - and we are still using the 
simplistic hierarchical class loader + delegation.

Do we really need all those different loaders?
That can be said about anything :-)
I'm making the compile optional - so if you don't explicitely ask for it 
it'll not get compiled. When it's completely ready - I hope it will 
replace Bootstrap/StandardClassLoader - so we'll still have 1 loader for 
standalone.

If embeded - as I said, the intent is to not use the loader but the 
embedor's loader - however ability to split tomcat in smaller components 
and manage each separately should remain ( supported by the embedding 
app loader ). That's why the loader is mirroring the fundamental 
behavior of mlet/jboss/eclipse/osgi - i.e. repository of classloaders 
delegating to each other.

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


Re: loader

2004-10-06 Thread Remy Maucherat
Costin Manolache wrote:
Mladen Turk wrote:
Costin, can you elabborate the purpose of the patch?
Perhaps I've missed few discussions.
There are few goals:
- allow tomcat components ( connector, valves, etc ) to be 
added/removed/upgraded dynamically, at runtime - without requiring a 
full restart.
-  cleanup the startup code - the split startup package, lots of 
introspection and dependencies ( commons-logging, jmx needed in 
CLASSPATH )
- maybe improve the class loading - for example WebappClassLoader use 
of the jar index, the code is a bit complex, etc
- make it easier to integrate tomcat in apps like jboss or eclipse - 
which both use similar class loaders and module mechanisms ( jbossmx 
and osgi ).

One extra benefit may be on allowing more flexibility in the 
common/shared/webapp hierarchy - if WebappClassLoader extends the 
loader, it will be easier to have webapps using different versions of 
shared libraries ( right now you need to place shared libs in shared 
or common, and you can't have more than a version ).

I've been trying to do this for a very long time - there is some code 
in 3.3 ( interceptors can be loaded/unloaded from trusted webapps ), 
but using an m-let-like classloader is a better solution than what was 
there. 
+1: nice goals :)
I didn't have time to look at the code yet, though.
Rémy
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: loader

2004-10-06 Thread Mladen Turk
Costin Manolache wrote:
Mladen Turk wrote:
What about commons-deamon?
What about it :-) ?
Daemon is a different level - it's about launching a resident process 
(or service in windows ). No connection with how the process is loading
its classes.


Sure, but the wheel was invented long time ago :).
How about making things usable?
Do we really need all those different loaders?
MT.


smime.p7s
Description: S/MIME Cryptographic Signature


cvs commit: jakarta-tomcat-connectors/util/loader/org/apache/tomcat/util/loader Loader.java Module.java

2004-10-06 Thread costin
costin  2004/10/06 08:41:44

  Modified:util build.xml
   util/loader/org/apache/tomcat/util/loader Loader.java
Module.java
  Log:
  A bit of cleanup. The lib dir and the checked in binaries are long gone.
  Avoid creation of loader dir if loader is not used/compiled.
  
  Revision  ChangesPath
  1.30  +3 -3  jakarta-tomcat-connectors/util/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/util/build.xml,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- build.xml 6 Oct 2004 05:16:06 -   1.29
  +++ build.xml 6 Oct 2004 15:41:44 -   1.30
  @@ -18,8 +18,8 @@
   
   
   
  -
  -
  +
  +
   
   
   
  @@ -48,7 +48,6 @@
   
   
   
  -

   
   
  @@ -105,6 +104,7 @@
   
   
   
  +
   

Re: loader

2004-10-06 Thread Costin Manolache
Mladen Turk wrote:
Costin Manolache wrote:
Mladen Turk wrote:
Costin, can you elabborate the purpose of the patch?
Perhaps I've missed few discussions.
There are few goals:
- allow tomcat components ( connector, valves, etc ) to be 
added/removed/upgraded dynamically, at runtime - without requiring a 
full restart.
-  cleanup the startup code - the split startup package, lots of 
introspection and dependencies ( commons-logging, jmx needed in 
CLASSPATH )
- maybe improve the class loading - for example WebappClassLoader use 
of the jar index, the code is a bit complex, etc
- make it easier to integrate tomcat in apps like jboss or eclipse - 
which both use similar class loaders and module mechanisms ( jbossmx 
and osgi ).

One extra benefit may be on allowing more flexibility in the 
common/shared/webapp hierarchy - if WebappClassLoader extends the 
loader, it will be easier to have webapps using different versions of 
shared libraries ( right now you need to place shared libs in shared 
or common, and you can't have more than a version ).

I've been trying to do this for a very long time - there is some code 
in 3.3 ( interceptors can be loaded/unloaded from trusted webapps ), 
but using an m-let-like classloader is a better solution than what was 
there.

What about commons-deamon?
What about it :-) ?
Daemon is a different level - it's about launching a resident process 
(or service in windows ). No connection with how the process is loading
its classes.


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


Re: loader

2004-10-06 Thread Mladen Turk
Costin Manolache wrote:
Mladen Turk wrote:
Costin, can you elabborate the purpose of the patch?
Perhaps I've missed few discussions.
There are few goals:
- allow tomcat components ( connector, valves, etc ) to be 
added/removed/upgraded dynamically, at runtime - without requiring a 
full restart.
-  cleanup the startup code - the split startup package, lots of 
introspection and dependencies ( commons-logging, jmx needed in CLASSPATH )
- maybe improve the class loading - for example WebappClassLoader use of 
the jar index, the code is a bit complex, etc
- make it easier to integrate tomcat in apps like jboss or eclipse - 
which both use similar class loaders and module mechanisms ( jbossmx and 
osgi ).

One extra benefit may be on allowing more flexibility in the 
common/shared/webapp hierarchy - if WebappClassLoader extends the 
loader, it will be easier to have webapps using different versions of 
shared libraries ( right now you need to place shared libs in shared or 
common, and you can't have more than a version ).

I've been trying to do this for a very long time - there is some code in 
3.3 ( interceptors can be loaded/unloaded from trusted webapps ), but 
using an m-let-like classloader is a better solution than what was there.

What about commons-deamon?
MT.


smime.p7s
Description: S/MIME Cryptographic Signature


Re: loader

2004-10-06 Thread Costin Manolache
Mladen Turk wrote:
Costin, can you elabborate the purpose of the patch?
Perhaps I've missed few discussions.
There are few goals:
- allow tomcat components ( connector, valves, etc ) to be 
added/removed/upgraded dynamically, at runtime - without requiring a 
full restart.
-  cleanup the startup code - the split startup package, lots of 
introspection and dependencies ( commons-logging, jmx needed in CLASSPATH )
- maybe improve the class loading - for example WebappClassLoader use of 
the jar index, the code is a bit complex, etc
- make it easier to integrate tomcat in apps like jboss or eclipse - 
which both use similar class loaders and module mechanisms ( jbossmx and 
osgi ).

One extra benefit may be on allowing more flexibility in the 
common/shared/webapp hierarchy - if WebappClassLoader extends the 
loader, it will be easier to have webapps using different versions of 
shared libraries ( right now you need to place shared libs in shared or 
common, and you can't have more than a version ).

I've been trying to do this for a very long time - there is some code in 
3.3 ( interceptors can be loaded/unloaded from trusted webapps ), but 
using an m-let-like classloader is a better solution than what was there.

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


Re: loader

2004-10-06 Thread Mladen Turk
Costin Manolache wrote:
I checked in the first part - I'm still working on making build.xml 
changes and the catalina-side code.

It is certainly experimental code for now - I think it works better than 
Bootstrap/etc, but the reloading of connectors/etc is still very tricky 
 ( it kind of works, but I still don't have a clean interface ).

I placed it in util/loader mainly for eclipse/IDE users - I have it 
compiled to a separate classes dir, and use the eclipse autocompilation 
- it's pretty cool and efficient ( i.e. no need to use "ant" or compile 
most of the time, just type and run :-).

Costin, can you elabborate the purpose of the patch?
Perhaps I've missed few discussions.
Regards,
Mladen


smime.p7s
Description: S/MIME Cryptographic Signature


Re: loader

2004-10-05 Thread Mladen Turk
Costin Manolache wrote:
I checked in the first part - I'm still working on making build.xml 
changes and the catalina-side code.

It is certainly experimental code for now - I think it works better than 
Bootstrap/etc, but the reloading of connectors/etc is still very tricky 
 ( it kind of works, but I still don't have a clean interface ).

Didn't look much in detail...
We'll need something that will signal that all the classes are
loaded, probably even adding that as native (if native is used),
so we can use that instead TomcatLoader.
MT.


smime.p7s
Description: S/MIME Cryptographic Signature


loader

2004-10-05 Thread Costin Manolache
I checked in the first part - I'm still working on making build.xml 
changes and the catalina-side code.

It is certainly experimental code for now - I think it works better than 
Bootstrap/etc, but the reloading of connectors/etc is still very tricky 
 ( it kind of works, but I still don't have a clean interface ).

I placed it in util/loader mainly for eclipse/IDE users - I have it 
compiled to a separate classes dir, and use the eclipse autocompilation 
- it's pretty cool and efficient ( i.e. no need to use "ant" or compile 
most of the time, just type and run :-).

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


cvs commit: jakarta-tomcat-connectors/util/loader loader.properties

2004-10-05 Thread costin
costin  2004/10/05 22:01:16

  Added:   util/loader loader.properties
  Log:
  Example loader.properties ( I need to clean it up to match the distro, right now 
it's using
  my eclipse layout ).
  
  Revision  ChangesPath
  1.1  jakarta-tomcat-connectors/util/loader/loader.properties
  
  Index: loader.properties
  ===
  catalina.home=/opt/50
  
  loader.auto-startup=org.apache.tomcat.util.jmx.JmxRemoteLoader,\
   org.apache.catalina.startup.CatalinaModuleListener
  
  #
  # List of comma-separated packages that start with or equal this string
  # will cause a security exception to be thrown when
  # passed to checkPackageAccess unless the
  # corresponding RuntimePermission ("accessClassInPackage."+package) has
  # been granted.
  
loader.package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans.
  #
  # List of comma-separated packages that start with or equal this string
  # will cause a security exception to be thrown when
  # passed to checkPackageDefinition unless the
  # corresponding RuntimePermission ("defineClassInPackage."+package) has
  # been granted.
  #
  # by default, no packages are restricted for definition, and none of
  # the class loaders supplied with the JDK call checkPackageDefinition.
  #
  
loader.package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
  
  #
  #
  # List of comma-separated paths defining the contents of the "common" 
  # classloader. Prefixes should be used to define what is the repository type.
  # Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
  # If left as blank,the JVM system loader will be used as Catalina's "common" 
  # loader.
  # Examples:
  # "foo": Add this folder as a class repository
  # "foo/*.jar": Add all the JARs of the specified folder as class 
  #  repositories
  # "foo/bar.jar": Add bar.jar as a class repository
  common.loader=${catalina.home}/bin/jmx.jar,\
  ${catalina.home}/common/classes,\
  
${catalina.home}/common/i18n/tomcat-i18n-en.jar,${catalina.home}/common/endorsed/*.jar,${catalina.home}/common/lib/*.jar
  
  #
  # List of comma-separated paths defining the contents of the "server" 
  # classloader. Prefixes should be used to define what is the repository type.
  # Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
  # If left as blank, the "common" loader will be used as Catalina's "server" 
  # loader.
  # Examples:
  # "foo": Add this folder as a class repository
  # "foo/*.jar": Add all the JARs of the specified folder as class 
  #  repositories
  # "foo/bar.jar": Add bar.jar as a class repository
  
server.loader=/ws/apache/jakarta-tomcat-connectors/util/build/classes,/ws/apache/jakarta-tomcat-catalina/build/classes,/ws/apache/jakarta-tomcat-connectors/build/classes,${catalina.home}/server/lib/commons-modeler.jar
  
  #
  # List of comma-separated paths defining the contents of the "shared" 
  # classloader. Prefixes should be used to define what is the repository type.
  # Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
  # the "common" loader will be used as Catalina's "shared" loader.
  # Examples:
  # "foo": Add this folder as a class repository
  # "foo/*.jar": Add all the JARs of the specified folder as class 
  #  repositories
  # "foo/bar.jar": Add bar.jar as a class repository 
  shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar
  
  # Classes to preload to avoid security exceptions
  loader.security.preload=\
   org.apache.catalina.core.ApplicationContextFacade$1,\
   org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward,\
   org.apache.catalina.core.ApplicationDispatcher$PrivilegedInclude,\
   org.apache.catalina.core.ContainerBase$PrivilegedAddChild,\
   org.apache.catalina.core.StandardWrapper$1,\
   org.apache.catalina.loader.WebappClassLoader$PrivilegedFindResource,\
   org.apache.catalina.session.StandardSession,\
   org.apache.catalina.session.StandardSession$1,\
   org.apache.catalina.session.StandardManager$PrivilegedDoUnload,\
   org.apache.catalina.util.URL,\
   org.apache.catalina.util.Enumerator,\
   javax.servlet.http.Cookie,\
  org.apache.coyote.http11Http11Processor$1,\
  org.apache.coyote.http11InternalOutputBuffer$1,\
  org.apache.coyote.htt

cvs commit: jakarta-tomcat-connectors/util/loader/org/apache/tomcat/util/loader - New directory

2004-10-05 Thread costin
costin  2004/10/05 21:56:56

  jakarta-tomcat-connectors/util/loader/org/apache/tomcat/util/loader - New directory

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



cvs commit: jakarta-tomcat-connectors/util/loader/org/apache/tomcat/util - New directory

2004-10-05 Thread costin
costin  2004/10/05 21:56:53

  jakarta-tomcat-connectors/util/loader/org/apache/tomcat/util - New directory

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



cvs commit: jakarta-tomcat-connectors/util/loader/org/apache/tomcat - New directory

2004-10-05 Thread costin
costin  2004/10/05 21:56:48

  jakarta-tomcat-connectors/util/loader/org/apache/tomcat - New directory

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



cvs commit: jakarta-tomcat-connectors/util/loader/org/apache - New directory

2004-10-05 Thread costin
costin  2004/10/05 21:56:44

  jakarta-tomcat-connectors/util/loader/org/apache - New directory

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



cvs commit: jakarta-tomcat-connectors/util/loader/org - New directory

2004-10-05 Thread costin
costin  2004/10/05 21:56:39

  jakarta-tomcat-connectors/util/loader/org - New directory

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



cvs commit: jakarta-tomcat-connectors/util/loader - New directory

2004-10-05 Thread costin
costin  2004/10/05 21:56:33

  jakarta-tomcat-connectors/util/loader - New directory

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2004-10-01 Thread remm
remm2004/10/01 02:30:00

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  - I think the package triggers are no longer useful (especially on JDK 1.5, where 
everything got package renamed).
  - On JDK 1.4, there won't be any problem if Xerces and Xalan are endorsed (AFAIK, 
they need to be to be able to be used).
  
  Revision  ChangesPath
  1.43  +1 -6  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- WebappClassLoader.java29 Aug 2004 16:46:10 -  1.42
  +++ WebappClassLoader.java1 Oct 2004 09:30:00 -   1.43
  @@ -146,11 +146,6 @@
* class loader without delegating first.
*/
   private static final String[] packageTriggers = {
  -"javax", // Java extensions
  -"org.xml.sax",   // SAX 1 & 2
  -"org.w3c.dom",   // DOM 1 & 2
  -"org.apache.xerces", // Xerces 1 & 2
  -"org.apache.xalan"   // Xalan
   };
   
   
  
  
  

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



DO NOT REPLY [Bug 13331] - Class loader attempts to open directory as file

2004-09-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=13331>.
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=13331

Class loader attempts to open directory as file

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2004-09-18 21:37 ---
The code has been patched (4.1.6 and later) in this area but using an 
alternative method. I believe that this should resolve the issue but I do not 
have access to an OS/2 box to test this.

Please re-open this bug if it still occurs under OS/2.

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



DO NOT REPLY [Bug 30568] - Cannot find daemon loader

2004-09-15 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=30568>.
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=30568

Cannot find daemon loader





--- Additional Comments From [EMAIL PROTECTED]  2004-09-15 16:20 ---
I understand your comments, I think ;)  I'm asking you to provide a diff patch 
of setup.xml so that it is correct.

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



DO NOT REPLY [Bug 30568] - Cannot find daemon loader

2004-09-08 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=30568>.
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=30568

Cannot find daemon loader





--- Additional Comments From [EMAIL PROTECTED]  2004-09-09 01:33 ---
Perhaps you misinterpret my comments. The documentation describes two different
ways to start Tomcat. The method described in RUNNING.txt works okay. The method
described in setup.html fails with this "daemon loader" error.

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



DO NOT REPLY [Bug 30568] - Cannot find daemon loader

2004-09-08 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=30568>.
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=30568

Cannot find daemon loader





--- Additional Comments From [EMAIL PROTECTED]  2004-09-08 19:51 ---
OK, if you want, please submit doc patches for setup.xml and I'll modify that 
file so that the instructions are correct.

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



DO NOT REPLY [Bug 30568] - Cannot find daemon loader

2004-09-05 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=30568>.
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=30568

Cannot find daemon loader

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]
 Status|RESOLVED|REOPENED
 Resolution|INVALID |



--- Additional Comments From [EMAIL PROTECTED]  2004-09-05 07:44 ---
I see this same issue with Tomcat-5.0.28 binary distribution (on RedHat Linux 9
and J2SDK-1.4.1).
Followed the instructions at
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/setup.html
and get the same problems and described in this issue.

Following $CATALINA_HOME/RUNNING.txt and using startup.sh is okay.

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



cvs commit: jakarta-tomcat-catalina/webapps/docs class-loader-howto.xml realm-howto.xml

2004-09-03 Thread yoavs
yoavs   2004/09/03 14:58:39

  Modified:webapps/docs Tag: TOMCAT_5_0 class-loader-howto.xml
realm-howto.xml
  Log:
  A couple of typo fixes, courtesy of Ed Dodds.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.11.2.1  +1 -1  jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml
  
  Index: class-loader-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml,v
  retrieving revision 1.11
  retrieving revision 1.11.2.1
  diff -u -r1.11 -r1.11.2.1
  --- class-loader-howto.xml16 Jun 2004 18:04:39 -  1.11
  +++ class-loader-howto.xml3 Sep 2004 21:58:39 -   1.11.2.1
  @@ -197,7 +197,7 @@
   instead of delegating before looking.  There are exceptions. Classes which are
   part of the JRE base classes cannot be overriden. For some classes (such as
   the XML parser components in JDK 1.4+), the JDK 1.4 endorsed feature can be 
  -used used 
  +used  
   (see the common classloader definition above). In addition, for the following
   class patterns, the classloader will always delegate first 
   (and load the class itself if no parent classloader loads it):
  
  
  
  1.14.2.2  +1 -1  jakarta-tomcat-catalina/webapps/docs/realm-howto.xml
  
  Index: realm-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/realm-howto.xml,v
  retrieving revision 1.14.2.1
  retrieving revision 1.14.2.2
  diff -u -r1.14.2.1 -r1.14.2.2
  --- realm-howto.xml   21 Aug 2004 15:50:08 -  1.14.2.1
  +++ realm-howto.xml   3 Sep 2004 21:58:39 -   1.14.2.2
  @@ -1372,7 +1372,7 @@
   techniques are supported:
   
   If you are writing an application that needs to calculate digested
  -passowrds dynamically, call the static Digest() method of the
  +passwords dynamically, call the static Digest() method of the
   org.apache.catalina.realm.RealmBase class, passing the
   cleartext password and the digest algorithm name as arguments.  This
   method will return the digested password.
  
  
  

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



cvs commit: jakarta-tomcat-catalina/webapps/docs class-loader-howto.xml realm-howto.xml

2004-09-03 Thread yoavs
yoavs   2004/09/03 14:57:53

  Modified:webapps/docs class-loader-howto.xml realm-howto.xml
  Log:
  A couple of typo fixes, courtesy of Ed Dodds.
  
  Revision  ChangesPath
  1.13  +1 -1  jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml
  
  Index: class-loader-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- class-loader-howto.xml1 Sep 2004 22:04:27 -   1.12
  +++ class-loader-howto.xml3 Sep 2004 21:57:53 -   1.13
  @@ -203,7 +203,7 @@
   instead of delegating before looking.  There are exceptions. Classes which are
   part of the JRE base classes cannot be overriden. For some classes (such as
   the XML parser components in J2SE 1.4+), the J2SE 1.4 endorsed feature can be 
  -used used 
  +used  
   (see the common classloader definition above). In addition, for the following
   class patterns, the classloader will always delegate first 
   (and load the class itself if no parent classloader loads it):
  
  
  
  1.16  +1 -1  jakarta-tomcat-catalina/webapps/docs/realm-howto.xml
  
  Index: realm-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/realm-howto.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- realm-howto.xml   21 Aug 2004 12:39:08 -  1.15
  +++ realm-howto.xml   3 Sep 2004 21:57:53 -   1.16
  @@ -1372,7 +1372,7 @@
   techniques are supported:
   
   If you are writing an application that needs to calculate digested
  -passowrds dynamically, call the static Digest() method of the
  +passwords dynamically, call the static Digest() method of the
   org.apache.catalina.realm.RealmBase class, passing the
   cleartext password and the digest algorithm name as arguments.  This
   method will return the digested password.
  
  
  

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



Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader StandardClassLoader.java

2004-09-01 Thread correo
Respuesta automática: Hemos recibido un correo a la dirección de Nuestras Casas 
Rurales en Gredos, en breve le contestaremos. 



Para cualquier reserva, pueden llamar a los teléfonos: 618 01 83 11 // 91 798 21 10



Puede ver nuestras casas en http://www.lapasailla.com 



Atentamente, Casa Rural La Pasailla 





// 

OTRAS CASAS RURALES de 2 a 12 plazas en: 

http://www.lapasailla.com/casasenavila 

//



Consulta nuestras ofertas en http://www.lapasailla.com/casas/toprural.html



/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

LAS EDADES DEL HOMBRE ESTARÁ EN ÁVILA HASTA NOVIEMBRE



Alquila El Robledillo que está a sólo 30kms de Ávila, 5 kms de las 

ruinas de Castro de Ulaca y del CAstillo de Villaviciosa. De 6 a 12 Plazas.

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ 



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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader StandardClassLoader.java

2004-09-01 Thread funkman
funkman 2004/09/01 08:02:34

  Modified:catalina/src/share/org/apache/catalina/loader Tag:
TOMCAT_5_0 StandardClassLoader.java
  Log:
  Output the name of the repository if it failed to load.
  (I borked one of my jars one day and had to open each one to discover one was
  bad)
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.13.2.1  +7 -6  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java
  
  Index: StandardClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
  retrieving revision 1.13
  retrieving revision 1.13.2.1
  diff -u -r1.13 -r1.13.2.1
  --- StandardClassLoader.java  26 May 2004 15:47:34 -  1.13
  +++ StandardClassLoader.java  1 Sep 2004 15:02:34 -   1.13.2.1
  @@ -1,12 +1,12 @@
   /*
* Copyright 1999,2004 The Apache Software Foundation.
  - * 
  + *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
  - * 
  + *
*  http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -394,7 +394,7 @@
   /**
* Return a String array of the current repositories for this class
* loader.  If there are no repositories, a zero-length array is
  - * returned. For security reason, returns a clone of the Array (since 
  + * returned. For security reason, returns a clone of the Array (since
* String are immutable).
*/
   public String[] findRepositories() {
  @@ -955,7 +955,8 @@
   }
   } catch (Throwable t) {
   IllegalArgumentException iae = new IllegalArgumentException
  -("addRepositoryInternal");
  +("addRepositoryInternal: repository='" +
  + repository + "'");
   jdkCompat.chainException(iae, t);
   throw iae;
   } finally {
  
  
  

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



DO NOT REPLY [Bug 30568] - Cannot find daemon loader

2004-08-31 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=30568>.
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=30568

Cannot find daemon loader

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2004-08-31 14:23 ---
I don't have a Gentoo system to test.  This works for me on Solaris and RHEL by 
following the Tomcat docs, no problem.

bootstrap.jar includes commons-daemon.jar in its manifest Class Path.  If 
commons-daemon.jar is in the same directory with the proper file permissions, 
you should have no problem with this.  If you do have a problem, it's a 
configuration or installation issue, not a Tomcat bug.

Finally, please use separate Bugzilla issues for separate bugs, don't combine 
them.  For example, the ./configure script bug you report should be a separate 
issue.  (That one as I mentioned I can't test because I don't have a Gentoo 
system).  Thanks.

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



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader Constants.java Extension.java Reloader.java ResourceEntry.java StandardClassLoader.java WebappClassLoader.java WebappLoader.java

2004-08-26 Thread markt
markt   2004/08/26 14:34:02

  Modified:catalina/src/share/org/apache/catalina/loader Constants.java
Extension.java Reloader.java ResourceEntry.java
StandardClassLoader.java WebappClassLoader.java
WebappLoader.java
  Log:
  Update TC4 branch to Apache License 2.0.
  
  Revision  ChangesPath
  1.4   +13 -60
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/Constants.java
  
  Index: Constants.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/Constants.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Constants.java22 Jul 2001 20:25:10 -  1.3
  +++ Constants.java26 Aug 2004 21:34:02 -  1.4
  @@ -1,64 +1,17 @@
   /*
  - * $Header$
  - * $Revision$
  - * $Date$
  - *
  - * 
  - *
  - * The Apache Software License, Version 1.1
  - *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights
  - * reserved.
  - *
  - * Redistribution and use in source and binary forms, with or without
  - * modification, are permitted provided that the following conditions
  - * are met:
  - *
  - * 1. Redistributions of source code must retain the above copyright
  - *notice, this list of conditions and the following disclaimer.
  - *
  - * 2. Redistributions in binary form must reproduce the above copyright
  - *notice, this list of conditions and the following disclaimer in
  - *the documentation and/or other materials provided with the
  - *distribution.
  - *
  - * 3. The end-user documentation included with the redistribution, if
  - *any, must include the following acknowlegement:
  - *   "This product includes software developed by the
  - *Apache Software Foundation (http://www.apache.org/)."
  - *Alternately, this acknowlegement may appear in the software itself,
  - *if and wherever such third-party acknowlegements normally appear.
  - *
  - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
  - *Foundation" must not be used to endorse or promote products derived
  - *from this software without prior written permission. For written
  - *permission, please contact [EMAIL PROTECTED]
  - *
  - * 5. Products derived from this software may not be called "Apache"
  - *nor may "Apache" appear in their names without prior written
  - *permission of the Apache Group.
  - *
  - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  - * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  - * SUCH DAMAGE.
  - * 
  - *
  - * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation.  For more
  - * information on the Apache Software Foundation, please see
  - * <http://www.apache.org/>.
  - *
  - * [Additional notices, if required by prior licensing conditions]
  - *
  + * Copyright 1999,2004 The Apache Software Foundation.
  + * 
  + * Licensed under the Apache License, Version 2.0 (the "License");
  + * you may not use this file except in compliance with the License.
  + * You may obtain a copy of the License at
  + * 
  + *  http://www.apache.org/licenses/LICENSE-2.0
  + * 
  + * Unless required by applicable law or agreed to in writing, software
  + * distributed under the License is distributed on an "AS IS" BASIS,
  + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  + * See the License for the specific language governing permissions and
  + * limitations under the License.
*/
   
   
  
  
  
  1.5   +14 -61
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/Extension.java
  
  Index: Extension.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/Extension.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Ex

DO NOT REPLY [Bug 30543] - Deadlock in multithreaded SecurityManager access by class loader

2004-08-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=30543>.
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=30543

Deadlock in multithreaded SecurityManager access by class loader

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2004-08-18 19:57 ---
You need to add a test case for such problem. J2EE 1.4, with ship with Tomcat 5
embedded, turn security on by default and no problem has been reported. So I'm
closing this bug. Re-open it once you have a test case

-- Jeanfrancois

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappLoader.java

2004-08-16 Thread remm
remm2004/08/16 02:31:09

  Modified:catalina/src/share/org/apache/catalina/session
ManagerBase.java
   catalina/src/share/org/apache/catalina/core
StandardEngine.java StandardServer.java
StandardContext.java StandardHost.java
   catalina/src/share/org/apache/catalina Loader.java Host.java
Manager.java Engine.java
   catalina/src/share/org/apache/catalina/mbeans
DefaultContextMBean.java MBeanFactory.java
ServerLifecycleListener.java MBeanUtils.java
   catalina/src/share/org/apache/catalina/loader
WebappLoader.java
  Removed: catalina/src/share/org/apache/catalina/core
StandardDefaultContext.java
   catalina/src/share/org/apache/catalina DefaultContext.java
  Log:
  - Remove DefaultContext.
  - This will need cleanups.
  - For management, I think we should register dummy Context objects with special JMX 
names.
  
  Revision  ChangesPath
  1.31  +1 -32 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/ManagerBase.java
  
  Index: ManagerBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/ManagerBase.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- ManagerBase.java  15 Jul 2004 19:12:45 -  1.30
  +++ ManagerBase.java  16 Aug 2004 09:31:05 -  1.31
  @@ -38,7 +38,6 @@
   import javax.management.ObjectName;
   
   import org.apache.catalina.Container;
  -import org.apache.catalina.DefaultContext;
   import org.apache.catalina.Engine;
   import org.apache.catalina.Manager;
   import org.apache.catalina.Session;
  @@ -89,12 +88,6 @@
   
   
   /**
  - * The DefaultContext with which this Manager is associated.
  - */
  -protected DefaultContext defaultContext = null;
  -
  -
  -/**
* Return the MessageDigest implementation to be used when
* creating session identifiers.
*/
  @@ -251,30 +244,6 @@
   }
   
   
  -/**
  - * Return the DefaultContext with which this Manager is associated.
  - */
  -public DefaultContext getDefaultContext() {
  -
  -return (this.defaultContext);
  -
  -}
  -
  -
  -/**
  - * Set the DefaultContext with which this Manager is associated.
  - *
  - * @param defaultContext The newly associated DefaultContext
  - */
  -public void setDefaultContext(DefaultContext defaultContext) {
  -
  -DefaultContext oldDefaultContext = this.defaultContext;
  -this.defaultContext = defaultContext;
  -support.firePropertyChange("defaultContext", oldDefaultContext, 
this.defaultContext);
  -
  -}
  -
  -
   /** Returns the name of the implementation class.
*/
   public String getClassName() {
  
  
  
  1.25  +5 -63 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardEngine.java
  
  Index: StandardEngine.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardEngine.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- StandardEngine.java   27 Feb 2004 14:58:42 -  1.24
  +++ StandardEngine.java   16 Aug 2004 09:31:05 -  1.25
  @@ -18,12 +18,14 @@
   package org.apache.catalina.core;
   
   
  +import java.io.File;
  +import java.util.List;
  +
   import javax.management.MBeanServer;
   import javax.management.MalformedObjectNameException;
   import javax.management.ObjectName;
  +
   import org.apache.catalina.Container;
  -import org.apache.catalina.Context;
  -import org.apache.catalina.DefaultContext;
   import org.apache.catalina.Engine;
   import org.apache.catalina.Host;
   import org.apache.catalina.LifecycleException;
  @@ -35,8 +37,6 @@
   import org.apache.commons.logging.LogFactory;
   import org.apache.commons.modeler.Registry;
   import org.apache.commons.modeler.modules.MbeansSource;
  -import java.io.File;
  -import java.util.List;
   
   /**
* Standard implementation of the Engine interface.  Each
  @@ -115,11 +115,6 @@
*/ 
   private List mbeans;
   
  -/**
  - * DefaultContext config
  - */
  -private DefaultContext defaultContext;
  -
   
   /**
* The JVM Route ID for this Tomcat instance. All Route ID's must be unique
  @@ -208,30 +203,6 @@
   
   
   /**
  - * Set the DefaultContext
  - * for new web applications.
  - *
  - * @param defaultContext The new DefaultContext
  - */
  -public void addDefaultContext(DefaultContext defaultContext) {
  -
  -   

DO NOT REPLY [Bug 30568] New: - Cannot find daemon loader

2004-08-10 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=30568>.
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=30568

Cannot find daemon loader

   Summary: Cannot find daemon loader
   Product: Tomcat 5
   Version: 5.0.27
  Platform: Macintosh
OS/Version: Linux
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


There are multiple defects.  Some are likely to be defects with the Gentoo 
distribution of Tomcat5, and at least one of the defects (documented below) is 
in Catalina.  For the history of installation issues, see the following two 
URLS:

  http://forums.gentoo.org/viewtopic.php?t=208259
  http://bugs.gentoo.org/show_bug.cgi?id=59899

I spotted another report of this issue in an Apache mailing list:

  http://www.mail-archive.com/[EMAIL PROTECTED]/msg30457.html

Skipping the installation issues (because they may be in the scope of the 
Gentoo folks), I will go right to the problem that results following a manual 
install as per the Tomcat documentation.

Execution of:

cd $CATALINA_HOME
./bin/jsvc -Djava.endorsed.dirs=./common/endorsed -cp ./bin/bootstrap.jar \
-outfile ./logs/catalina.out -errfile ./logs/catalina.err \
org.apache.catalina.startup.Bootstrap

Results in:

  jsvc.exec error: Cannot find daemon loader 
org/apache/commons/daemon/support/DaemonLoader
  jsvc.exec error: Service exit with a return value of 1

I see no reason why jsvc would not be able to find the Daemon Loader.  The JAR 
file is in the $CATALINA_HOME/bin folder, and looking at the table of contents 
reveals the class that jsvc cannot find.

Also, it may still be worthwhile to look at the Gentoo installation issues, 
because the ./configure script that comes packaged with Tomcat fails when 
uname -m returns "ppc64".

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



DO NOT REPLY [Bug 30543] - Deadlock in multithreaded SecurityManager access by class loader

2004-08-09 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=30543>.
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=30543

Deadlock in multithreaded SecurityManager access by class loader

[EMAIL PROTECTED] changed:

   What|Removed |Added

Version|5.0.0   |5.0.27

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



DO NOT REPLY [Bug 30543] New: - Deadlock in multithreaded SecurityManager access by class loader

2004-08-09 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=30543>.
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=30543

Deadlock in multithreaded SecurityManager access by class loader

   Summary: Deadlock in multithreaded SecurityManager access by
class loader
   Product: Tomcat 5
   Version: 5.0.0
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Found one Java-level deadlock:
=
"http-8080-Processor4":
  waiting to lock monitor 0x180fe98 (object 0x26cb9c80, a  java.lang.Class),
  which is held by "http-8080-Processor2"
"http-8080-Processor2":
  waiting to lock monitor 0x180fde4 (object 0x9a1b040, a  [Ljava.lang.String;),
  which is held by "http-8080-Processor4"

Java stack information for the threads listed above:
===
"http-8080-Processor4":
at javax.security.auth.Policy.getPolicyNoCheck(Policy.java:193)
- waiting to lock <0x26cb9c80> (a java.lang.Class)
at javax.security.auth.Policy.getPolicy(Policy.java:179)
at 
javax.security.auth.SubjectDomainCombiner$2.run(SubjectDomainCombiner.ja va:178)
at java.security.AccessController.doPrivileged(Native Method)
at 
javax.security.auth.SubjectDomainCombiner.combine(SubjectDomainCombiner. java:174)
at 
java.security.AccessControlContext.goCombiner(AccessControlContext.java: 386)
at 
java.security.AccessControlContext.optimize(AccessControlContext.java: 310)
at 
java.security.AccessController.checkPermission(AccessController.java: 400)
at  java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
at  java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1491)
- locked <0x9a1b040> (a [Ljava.lang.String;)
at 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLo
ader.java:785)
at 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLo
ader.java:721)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
- locked <0x9a00598> (a  org.apache.catalina.loader.StandardClassLoader)
at 
org.apache.jasper.servlet.JspServletWrapper.(JspServletWrapper.jav a:90)
at  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:
285)
- locked <0x7808518> (a org.apache.jasper.servlet.JspServlet)
at  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at  org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:239)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
at  org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:
266)
at 
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.jav a:157)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:231)
at 
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFi
lterChain.java:50)
at 
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterC
hain.java:140)
at java.security.AccessController.doPrivileged(Native Method)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:136)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:214)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 520)
at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon
textValve.java:198)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:152)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:462)
at 
org.apache.catalina

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2004-07-30 Thread remm
remm2004/07/30 02:43:32

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  - Move the try/catch IOE inside the loop, as suggested in bug 30362.
  
  Revision  ChangesPath
  1.41  +14 -14
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- WebappClassLoader.java26 Jul 2004 15:52:17 -  1.40
  +++ WebappClassLoader.java30 Jul 2004 09:43:32 -  1.41
  @@ -1512,21 +1512,21 @@
*/
   public void closeJARs(boolean force) {
   if (jarFiles.length > 0) {
  -try {
   synchronized (jarFiles) {
   if (force || (System.currentTimeMillis() 
 > (lastJarAccessed + 9))) {
   for (int i = 0; i < jarFiles.length; i++) {
  -if (jarFiles[i] != null) {
  -jarFiles[i].close();
  -jarFiles[i] = null;
  +try {
  + if (jarFiles[i] != null) {
  + jarFiles[i].close();
  + jarFiles[i] = null;
  + }
  +} catch (IOException e) {
  +log.warn("Failed to close JAR", e);
   }
   }
   }
   }
  -} catch (IOException e) {
  -log.warn("Failed to close JAR", e);
  -}
   }
   }
   
  @@ -1541,12 +1541,12 @@
   if (started && (jarFiles.length > 0)) {
   lastJarAccessed = System.currentTimeMillis();
   if (jarFiles[0] == null) {
  -try {
  -for (int i = 0; i < jarFiles.length; i++) {
  -jarFiles[i] = new JarFile(jarRealFiles[i]);
  -}
  -} catch (IOException e) {
  -log.warn("Failed to open JAR", e);
  +for (int i = 0; i < jarFiles.length; i++) {
  + try {
  + jarFiles[i] = new JarFile(jarRealFiles[i]);
  + } catch (IOException e) {
  + log.warn("Failed to open JAR", e);
  + }
   }
   }
   }
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java WebappLoader.java

2004-07-26 Thread remm
remm2004/07/26 08:52:17

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java WebappLoader.java
  Log:
  - Update to use a flag for the anti JAR locking code. It isn't as foolproof as the 
other one, since you can't just delete a WAR or expanded
folder to undeploy (on Windows, of course).
  - I think the two flags together will cover all the needs.
  
  Revision  ChangesPath
  1.40  +37 -12
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- WebappClassLoader.java23 Jul 2004 22:40:11 -  1.39
  +++ WebappClassLoader.java26 Jul 2004 15:52:17 -  1.40
  @@ -160,6 +160,13 @@
   protected static final StringManager sm =
   StringManager.getManager(Constants.Package);
   
  +
  +/**
  + * Use anti JAR locking code, which does URL rerouting when accessing
  + * resources.
  + */
  +boolean antiJARLocking = false; 
  +
   
   // --- Constructors
   
  @@ -405,6 +412,22 @@
   
   
   /**
  + * @return Returns the antiJARLocking.
  + */
  +public boolean getAntiJARLocking() {
  +return antiJARLocking;
  +}
  +
  +
  +/**
  + * @param antiJARLocking The antiJARLocking to set.
  + */
  +public void setAntiJARLocking(boolean antiJARLocking) {
  +this.antiJARLocking = antiJARLocking;
  +}
  +
  +
  +/**
* If there is a Java SecurityManager create a read FilePermission
* or JndiPermission for the file directory path.
*
  @@ -1027,17 +1050,19 @@
   if (url != null) {
   // Locating the repository for special handling in the case 
   // of a JAR
  -ResourceEntry entry = (ResourceEntry) resourceEntries.get(name);
  -try {
  -String repository = entry.codeBase.toString();
  -if ((repository.endsWith(".jar")) 
  -&& (!(name.endsWith(".class" {
  -// Copy binary content to the work directory if not present
  -File resourceFile = new File(loaderDir, name);
  -url = resourceFile.toURL();
  +if (antiJARLocking) {
  +ResourceEntry entry = (ResourceEntry) resourceEntries.get(name);
  +try {
  +String repository = entry.codeBase.toString();
  +if ((repository.endsWith(".jar")) 
  +&& (!(name.endsWith(".class" {
  +// Copy binary content to the work directory if not present
  +File resourceFile = new File(loaderDir, name);
  +url = resourceFile.toURL();
  +}
  +} catch (Exception e) {
  +// Ignore
   }
  -} catch (Exception e) {
  -// Ignore
   }
   if (log.isDebugEnabled())
   log.debug("  --> Returning '" + url.toString() + "'");
  @@ -1766,7 +1791,7 @@
   }
   
   // Extract resources contained in JAR to the workdir
  -if (!(path.endsWith(".class"))) {
  +if (antiJARLocking && !(path.endsWith(".class"))) {
   byte[] buf = new byte[1024];
   File resourceFile = new File
   (loaderDir, jarEntry.getName());
  
  
  
  1.31  +3 -1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappLoader.java
  
  Index: WebappLoader.java
  =======
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- WebappLoader.java 23 Jul 2004 22:40:11 -  1.30
  +++ WebappLoader.java 26 Jul 2004 15:52:17 -  1.31
  @@ -645,6 +645,8 @@
   classLoader = createClassLoader();
   classLoader.setResources(container.getResources());
   classLoader.setDelegate(this.delegate);
  +if (container instanceof StandardContext)
  +classLoader.setAntiJARLocking(((StandardContext) 
container).getAntiJARLocking());

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java WebappLoader.java

2004-07-23 Thread remm
remm2004/07/23 15:40:11

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java WebappLoader.java
  Log:
  - enum -> enumeration (JDK 1.5 update).
  
  Revision  ChangesPath
  1.39  +7 -7  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- WebappClassLoader.java3 Jul 2004 19:51:14 -   1.38
  +++ WebappClassLoader.java23 Jul 2004 22:40:11 -  1.39
  @@ -703,10 +703,10 @@
   if (getJarPath() != null) {
   
   try {
  -NamingEnumeration enum = resources.listBindings(getJarPath());
  +NamingEnumeration enumeration = 
resources.listBindings(getJarPath());
   int i = 0;
  -while (enum.hasMoreElements() && (i < length)) {
  -NameClassPair ncPair = (NameClassPair) enum.nextElement();
  +while (enumeration.hasMoreElements() && (i < length)) {
  +NameClassPair ncPair = (NameClassPair) 
enumeration.nextElement();
   String name = ncPair.getName();
   // Ignore non JARs present in the lib folder
   if (!name.endsWith(".jar"))
  @@ -719,10 +719,10 @@
   }
   i++;
   }
  -if (enum.hasMoreElements()) {
  -while (enum.hasMoreElements()) {
  +if (enumeration.hasMoreElements()) {
  +while (enumeration.hasMoreElements()) {
   NameClassPair ncPair = 
  -(NameClassPair) enum.nextElement();
  +(NameClassPair) enumeration.nextElement();
   String name = ncPair.getName();
   // Additional non-JAR files are allowed
   if (name.endsWith(".jar")) {
  
  
  
  1.30  +7 -7  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappLoader.java
  
  Index: WebappLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- WebappLoader.java 23 Jun 2004 16:59:41 -  1.29
  +++ WebappLoader.java 23 Jul 2004 22:40:11 -  1.30
  @@ -985,10 +985,10 @@
   
   // Looking up directory /WEB-INF/lib in the context
   try {
  -NamingEnumeration enum = resources.listBindings(libPath);
  -while (enum.hasMoreElements()) {
  +NamingEnumeration enumeration = resources.listBindings(libPath);
  +while (enumeration.hasMoreElements()) {
   
  -Binding binding = (Binding) enum.nextElement();
  +Binding binding = (Binding) enumeration.nextElement();
   String filename = libPath + "/" + binding.getName();
   if (!filename.endsWith(".jar"))
   continue;
  @@ -1137,10 +1137,10 @@
   
   try {
   
  -NamingEnumeration enum = srcDir.list("");
  -while (enum.hasMoreElements()) {
  +NamingEnumeration enumeration = srcDir.list("");
  +while (enumeration.hasMoreElements()) {
   NameClassPair ncPair =
  -(NameClassPair) enum.nextElement();
  +(NameClassPair) enumeration.nextElement();
   String name = ncPair.getName();
   Object object = srcDir.lookup(name);
   File currentFile = new File(destDir, name);
  
  
  

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



RE: cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2004-07-03 Thread Mark Thomas
Sorry about the comment - finger trouble on my part ;)

Mark 

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, July 03, 2004 8:52 PM
> To: [EMAIL PROTECTED]
> Subject: cvs commit: 
> jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/load
> er WebappClassLoader.java
> 
> markt   2004/07/03 12:52:07
> 
>   Modified:catalina/src/share/org/apache/catalina/loader
> WebappClassLoader.java
>   Log:
>   CVS: 
> --
>   CVS: PR:
>   CVS:   If this change addresses a PR in the problem report tracking
>   CVS:   database, then enter the PR number(s) here.
>   CVS: Obtained from:
>   CVS:   If this change has been taken from another system, 
> such as NCSA,
>   CVS:   then name the system in this line, otherwise delete it.
>   CVS: Submitted by:
>   CVS:   If this code has been contributed to Apache by 
> someone else; i.e.,
>   CVS:   they sent us a patch or a new module, then include 
> their name/email
>   CVS:   address here. If this is your work then delete this line.
>   CVS: Reviewed by:
>   CVS:   If we are doing pre-commit code reviews and someone else has
>   CVS:   reviewed your changes, include their name(s) here.
>   CVS:   If you have not had it reviewed then delete this line.
>   
>   Revision  ChangesPath
>   1.53  +6 -10 
> jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/load
> er/WebappClassLoader.java
>   
>   Index: WebappClassLoader.java
>   ===
>   RCS file: 
> /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/cat
> alina/loader/WebappClassLoader.java,v
>   retrieving revision 1.52
>   retrieving revision 1.53
>   diff -u -r1.52 -r1.53
>   --- WebappClassLoader.java  3 Jul 2004 18:47:28 -   1.52
>   +++ WebappClassLoader.java  3 Jul 2004 19:52:06 -   1.53
>   @@ -1895,12 +1895,8 @@
> */
>protected boolean isPackageSealed(String name, Manifest man) {
>
>   -StringBuffer buf = new StringBuffer(name); 
>   -for (int i=0;i   -if (buf.charAt(i)=='.') buf.setCharAt(i,'/'); 
>   -} 
>   -buf.append('/'); 
>   -Attributes attr = man.getAttributes(buf.toString()); 
>   +String path = name.replace('.', '/') + '/';
>   +Attributes attr = man.getAttributes(path); 
>String sealed = null;
>if (attr != null) {
>sealed = attr.getValue(Name.SEALED);
>   
>   
>   
> 
> -
> 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-4.0/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2004-07-03 Thread markt
markt   2004/07/03 12:52:07

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  CVS: --
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  ChangesPath
  1.53  +6 -10 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- WebappClassLoader.java3 Jul 2004 18:47:28 -   1.52
  +++ WebappClassLoader.java3 Jul 2004 19:52:06 -   1.53
  @@ -1895,12 +1895,8 @@
*/
   protected boolean isPackageSealed(String name, Manifest man) {
   
  -StringBuffer buf = new StringBuffer(name); 
  -for (int i=0;i

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2004-07-03 Thread markt
markt   2004/07/03 12:51:14

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  Improve previous patch - thanks to Bill Barker
  
  Revision  ChangesPath
  1.38  +3 -7  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- WebappClassLoader.java3 Jul 2004 18:50:10 -   1.37
  +++ WebappClassLoader.java3 Jul 2004 19:51:14 -   1.38
  @@ -1886,12 +1886,8 @@
*/
   protected boolean isPackageSealed(String name, Manifest man) {
   
  -StringBuffer buf = new StringBuffer(name); 
  -for (int i=0;i

RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2004-07-03 Thread Mark Thomas
From: Bill Barker [mailto:[EMAIL PROTECTED] 
> From: <[EMAIL PROTECTED]>
> 
> ===
> >   RCS file:
> /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apach
e/catalina/loa
> der/WebappClassLoader.java,v
> >   retrieving revision 1.36
> >   retrieving revision 1.37
> >   diff -u -r1.36 -r1.37
> >   --- WebappClassLoader.java 25 Jun 2004 23:56:25 - 1.36
> >   +++ WebappClassLoader.java 3 Jul 2004 18:50:10 - 1.37
> >   @@ -1886,8 +1886,12 @@
> > */
> >protected boolean isPackageSealed(String name, 
> Manifest man) {
> >
> >   -String path = name + "/";
> >   -Attributes attr = man.getAttributes(path);
> >   +StringBuffer buf = new StringBuffer(name);
> >   +for (int i=0;i >   +if (buf.charAt(i)=='.') buf.setCharAt(i,'/');
> >   +}
> >   +buf.append('/');
> >   +Attributes attr = man.getAttributes(buf.toString());
> >String sealed = null;
> >if (attr != null) {
> >sealed = attr.getValue(Name.SEALED);
> 
> It's not a big deal, but wouldn't it be cleaner to do:
> String path = name.replace('.', '/') + "/";

Fair point. I'll make the change.



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



Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2004-07-03 Thread Bill Barker

- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 03, 2004 11:50 AM
Subject: cvs commit:
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java


===
>   RCS file:
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loa
der/WebappClassLoader.java,v
>   retrieving revision 1.36
>   retrieving revision 1.37
>   diff -u -r1.36 -r1.37
>   --- WebappClassLoader.java 25 Jun 2004 23:56:25 - 1.36
>   +++ WebappClassLoader.java 3 Jul 2004 18:50:10 - 1.37
>   @@ -1886,8 +1886,12 @@
> */
>protected boolean isPackageSealed(String name, Manifest man) {
>
>   -String path = name + "/";
>   -Attributes attr = man.getAttributes(path);
>   +StringBuffer buf = new StringBuffer(name);
>   +for (int i=0;i   +if (buf.charAt(i)=='.') buf.setCharAt(i,'/');
>   +}
>   +buf.append('/');
>   +Attributes attr = man.getAttributes(buf.toString());
>String sealed = null;
>if (attr != null) {
>sealed = attr.getValue(Name.SEALED);
>
>

It's not a big deal, but wouldn't it be cleaner to do:
String path = name.replace('.', '/') + "/";


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


This message is intended only for the use of the person(s) listed above as the 
intended recipient(s), and may contain information that is PRIVILEGED and 
CONFIDENTIAL.  If you are not an intended recipient, you may not read, copy, or 
distribute this message or any attachment. If you received this communication in 
error, please notify us immediately by e-mail and then delete all copies of this 
message and any attachments.

In addition you should be aware that ordinary (unencrypted) e-mail sent through the 
Internet is not secure. Do not send confidential or sensitive information, such as 
social security numbers, account numbers, personal identification numbers and 
passwords, to us via ordinary (unencrypted) e-mail.

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

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2004-07-03 Thread markt
markt   2004/07/03 11:50:10

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  Fix bug26375. Fix package sealing test for partially sealed jars.
- Patch provided by Mike Bremford
- Ported from TC4
  
  Revision  ChangesPath
  1.37  +7 -3  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- WebappClassLoader.java25 Jun 2004 23:56:25 -  1.36
  +++ WebappClassLoader.java3 Jul 2004 18:50:10 -   1.37
  @@ -1886,8 +1886,12 @@
*/
   protected boolean isPackageSealed(String name, Manifest man) {
   
  -String path = name + "/";
  -Attributes attr = man.getAttributes(path);
  +StringBuffer buf = new StringBuffer(name); 
  +for (int i=0;i

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2004-07-03 Thread markt
markt   2004/07/03 11:47:29

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  Fix bug26375. Fix package sealing test for partially sealed jars.
- Patch provided by Mike Bremford
  
  Revision  ChangesPath
  1.52  +10 -6 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- WebappClassLoader.java28 Jun 2004 22:25:24 -  1.51
  +++ WebappClassLoader.java3 Jul 2004 18:47:28 -   1.52
  @@ -1895,8 +1895,12 @@
*/
   protected boolean isPackageSealed(String name, Manifest man) {
   
  -String path = name + "/";
  -Attributes attr = man.getAttributes(path);
  +StringBuffer buf = new StringBuffer(name); 
  +for (int i=0;i

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2004-06-28 Thread markt
markt   2004/06/28 15:25:24

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  Port fix for bug 25528 - Poor performance with RMI
  
  Revision  ChangesPath
  1.51  +29 -7 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- WebappClassLoader.java22 Feb 2004 21:04:18 -  1.50
  +++ WebappClassLoader.java28 Jun 2004 22:25:24 -  1.51
  @@ -288,6 +288,12 @@
   
   
   /**
  + * Repositories URLs, used to cache the result of getURLs. 
  + */ 
  +protected URL[] repositoryURLs = null; 
  +
  +
  +/** 
* Repositories translated as path in the work directory (for Jasper
* originally), but which is used to generate fake URLs should getURLs be
* called.
  @@ -565,6 +571,7 @@
   URL url = new URL(repository);
   super.addURL(url);
   hasExternalRepositories = true;
  +repositoryURLs = null;
   } catch (MalformedURLException e) {
   throw new IllegalArgumentException(e.toString());
   }
  @@ -924,6 +931,15 @@
   
   
   /**
  + * Add the specified URL to the classloader.
  + */
  +protected void addURL(URL url) { 
  +super.addURL(url); 
  +hasExternalRepositories = true; 
  +repositoryURLs = null; 
  +} 
  +
  +/**
* Find the specified class in our local repositories, if possible.  If
* not found, throw ClassNotFoundException.
*
  @@ -1478,6 +1494,10 @@
*/
   public URL[] getURLs() {
   
  +if (repositoryURLs != null) {
  +return repositoryURLs;
  +}
  +
   URL[] external = super.getURLs();
   
   int filesLength = files.length;
  @@ -1498,12 +1518,13 @@
   }
   }
   
  -return urls;
  -
  +repositoryURLs = urls; 
  +
   } catch (MalformedURLException e) {
  -return (new URL[0]);
  +repositoryURLs = new URL[0];
   }
   
  +return repositoryURLs; 
   }
   
   
  @@ -1571,6 +1592,7 @@
   notFoundResources.clear();
   resourceEntries.clear();
   repositories = new String[0];
  +repositoryURLs = null;
   files = new File[0];
   jarFiles = new JarFile[0];
   jarRealFiles = new File[0];
  
  
  

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



cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml class-loader-howto.xml

2004-06-16 Thread yoavs
yoavs   2004/06/16 11:04:39

  Modified:catalina build.xml
   catalina/src/bin launcher.properties
   catalina/src/share/org/apache/catalina/startup
TldConfig.java
   tester   build.xml
   webapps/docs changelog.xml class-loader-howto.xml
  Log:
  Bugzilla 29368 done: replaced references to xmlParserAPIs.jar with xmls-apis.jar.
  
  Revision  ChangesPath
  1.61  +7 -7  jakarta-tomcat-catalina/catalina/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/build.xml,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- build.xml 27 Apr 2004 05:51:20 -  1.60
  +++ build.xml 16 Jun 2004 18:04:38 -  1.61
  @@ -72,7 +72,7 @@
   
   
   
  -
  +
   
 
   
  @@ -103,7 +103,7 @@
   
   
   
  -
  +
   
   
 
  @@ -167,9 +167,9 @@
   
 
   
  + classpath="${xml-apis.jar}" />
   
  + classpath="${xml-apis.jar}" />
 
   
   
  @@ -252,11 +252,11 @@
   
   
   
  -
  +
   
 
   
  -
  +
 
   
   
  @@ -523,7 +523,7 @@
 
 
   
  -
  +
 
   
   
  
  
  
  1.3   +1 -1  jakarta-tomcat-catalina/catalina/src/bin/launcher.properties
  
  Index: launcher.properties
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/bin/launcher.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- launcher.properties   26 May 2004 20:15:17 -  1.2
  +++ launcher.properties   16 Jun 2004 18:04:38 -  1.3
  @@ -20,4 +20,4 @@
   #   LauncherBootstrap class can properly resolve the files without regard to
   #   the current working directory.
   #
  
-ant.class.path=../common/lib/ant.jar:../common/lib/ant-launcher.jar:../common/endorsed/xercesImpl.jar:../common/endorsed/xmlParserAPIs.jar
  
+ant.class.path=../common/lib/ant.jar:../common/lib/ant-launcher.jar:../common/endorsed/xercesImpl.jar:../common/endorsed/xml-apis.jar
  
  
  
  1.39  +1 -0  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- TldConfig.java26 May 2004 16:16:56 -  1.38
  +++ TldConfig.java16 Jun 2004 18:04:38 -  1.39
  @@ -118,6 +118,7 @@
   noTldJars.add("tomcat-coyote.jar");
   noTldJars.add("xercesImpl.jar");
   noTldJars.add("xmlParserAPIs.jar");
  +noTldJars.add("xml-apis.jar");
   // JARs from J2SE runtime
   noTldJars.add("sunjce_provider.jar");
   noTldJars.add("ldapsec.jar");
  
  
  
  1.5   +1 -1  jakarta-tomcat-catalina/tester/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/tester/build.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- build.xml 20 Jul 2003 14:53:04 -  1.4
  +++ build.xml 16 Jun 2004 18:04:38 -  1.5
  @@ -92,7 +92,7 @@
   
   
   
  -
  +
   
   
   
  
  
  
  1.69  +3 -0  jakarta-tomcat-catalina/webapps/docs/changelog.xml
  
  Index: changelog.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- changelog.xml 16 Jun 2004 15:13:58 -  1.68
  +++ changelog.xml 16 Jun 2004 18:04:38 -  1.69
  @@ -19,6 +19,9 @@
   
 Updated dependencies on commons-dbcp (to 1.2.1), commons-pool (to 
1.2), and commons-logging (to 1.0.4). (yoavs)
 
  +  
  +29368: Replaced references to xmlParserAPIs.jar with 
xml-apis.jar, as the former is now deprecated in Xerces.  Users wishing to use old 
versions of Xerces that don't have xml-apis.jar can still do so without a problem.  
Users wishing to build tomcat using xmlParserAPIs.jar instead of xml-apis.jar can also 
do so with a trivial edit in the build.xml file.
  +  
   
 
   
  
  
  
  1.11  +0 -1  jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml
  
  Index: class-loader-howto.xml
  =======
  RCS file: /home/cvs/jakarta-to

cvs commit: jakarta-tomcat-catalina/webapps/docs class-loader-howto.xml

2004-06-16 Thread yoavs
yoavs   2004/06/16 08:50:30

  Modified:webapps/docs class-loader-howto.xml
  Log:
  Added clarifications per Bugzilla 29389.
  
  Revision  ChangesPath
  1.10  +5 -2  jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml
  
  Index: class-loader-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- class-loader-howto.xml2 Feb 2004 21:39:28 -   1.9
  +++ class-loader-howto.xml16 Jun 2004 15:50:30 -  1.10
  @@ -8,6 +8,7 @@
   
   
   Craig R. McClanahan
  +Yoav Shapira
   Class Loader HOW-TO
   
   
  @@ -103,6 +104,7 @@
   logging API.
   $CATALINA_HOME/bin/commons-daemon.jar - Jakarta commons 
   daemon API.
  +jmx.jar - The JMX 1.2 implementation.
   
   Common - This class loader contains additional classes
   that are made visible to both Tomcat internal classes and to all web
  @@ -124,7 +126,6 @@
   commons-pool.jar - Jakarta commons pool.
   jasper-compiler.jar - The JSP 2.0 compiler.
   jasper-runtime.jar - The JSP 2.0 runtime.
  -jmx.jar - The JMX 1.2 implementation.
   jsp-api.jar - The JSP 2.0 API.
   naming-common.jar - The JNDI implementation used by Tomcat 5
   to represent in-memory naming contexts.
  @@ -189,7 +190,8 @@
   
   As mentioned above, the web application class loader diverges from the
   default Java 2 delegation model (in accordance with the recommendations in the
  -Servlet Specification, version 2.3, section 9.6).  When a request to load a
  +Servlet Specification, version 2.3, section 9.7.2 Web Application Classloader).  
  +When a request to load a
   class from the web application's WebappX class loader is processed,
   this class loader will look in the local repositories first,
   instead of delegating before looking.  There are exceptions. Classes which are
  @@ -205,6 +207,7 @@
   org.w3c.dom.*
   org.apache.xerces.*
   org.apache.xalan.*
  +
   
   Last, any JAR containing servlet API classes will be ignored by the 
   classloader.
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2004-05-26 Thread yoavs
yoavs   2004/05/26 08:47:41

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  Minor JavaDoc fixes (Bugzilla 28335)
  
  Revision  ChangesPath
  1.34  +3 -3  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- WebappClassLoader.java15 Apr 2004 01:44:09 -  1.33
  +++ WebappClassLoader.java26 May 2004 15:47:40 -  1.34
  @@ -1348,7 +1348,7 @@
* directory (if unpacked),
* the context URL, and jar file resources.
*
  - * @param CodeSource where the code was loaded from
  + * @param codeSource where the code was loaded from
* @return PermissionCollection for CodeSource
*/
   protected PermissionCollection getPermissions(CodeSource codeSource) {
  @@ -2042,7 +2042,7 @@
* Check the specified JAR file, and return true if it does
* not contain any of the trigger classes.
*
  - * @param jarFile The JAR file to be checked
  + * @param jarfile The JAR file to be checked
*
* @exception IOException if an input/output error occurs
*/
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader StandardClassLoader.java

2004-05-26 Thread yoavs
yoavs   2004/05/26 08:47:34

  Modified:catalina/src/share/org/apache/catalina/loader
StandardClassLoader.java
  Log:
  Minor JavaDoc fixes (Bugzilla 28335)
  
  Revision  ChangesPath
  1.13  +2 -2  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java
  
  Index: StandardClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- StandardClassLoader.java  15 Apr 2004 22:13:32 -  1.12
  +++ StandardClassLoader.java  26 May 2004 15:47:34 -  1.13
  @@ -862,7 +862,7 @@
* add read FilePermissions for the base directory (if unpacked),
* the context URL, and jar file resources.
*
  - * @param CodeSource where the code was loaded from
  + * @param codeSource where the code was loaded from
* @return PermissionCollection for CodeSource
*/
   protected final PermissionCollection getPermissions(CodeSource codeSource) {
  
  
  

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



DO NOT REPLY [Bug 10627] - incorrect documentation for class-loader-howto.xml

2004-04-20 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=10627>.
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=10627

incorrect documentation for class-loader-howto.xml

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]



--- Additional Comments From [EMAIL PROTECTED]  2004-04-20 22:43 ---
*** Bug 20247 has been marked as a duplicate of this bug. ***

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



DO NOT REPLY [Bug 20247] - Possible error in website's class loader HOWTO

2004-04-20 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=20247>.
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=20247

Possible error in website's class loader HOWTO

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE



--- Additional Comments From [EMAIL PROTECTED]  2004-04-20 22:43 ---


*** This bug has been marked as a duplicate of 10627 ***

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



DO NOT REPLY [Bug 19800] - Class loader cannot locate javax.servlet.HttpServlet for SOAP webapp

2004-04-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=19800>.
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=19800

Class loader cannot locate javax.servlet.HttpServlet for SOAP webapp

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2004-04-18 16:57 ---
Without a test case I am unable to even start trying to fix this.

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader StandardClassLoader.java

2004-04-15 Thread luehe
luehe   2004/04/15 15:13:32

  Modified:catalina/src/share/org/apache/catalina/loader
StandardClassLoader.java
  Log:
  2nd attempt for avoiding
  
java.lang.NoClassDefFoundError: org/apache/tomcat/util/compat/JdkCompat
  
  in StandardClassLoader, by including above class in bootstrap.jar
  (undoing previous change)
  
  Revision  ChangesPath
  1.12  +11 -2 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java
  
  Index: StandardClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- StandardClassLoader.java  15 Apr 2004 21:39:48 -  1.11
  +++ StandardClassLoader.java  15 Apr 2004 22:13:32 -  1.12
  @@ -198,6 +198,15 @@
   }
   
   
  +// - Class Variables
  +
  +
  +/**
  + * JDK compatibility support
  + */
  +private static final JdkCompat jdkCompat = JdkCompat.getJdkCompat();
  +
  +
   // - Instance Variables
   
   
  @@ -372,7 +381,7 @@
   } catch (MalformedURLException e) {
   IllegalArgumentException iae = new IllegalArgumentException
   ("Invalid repository: " + repository);
  -JdkCompat.getJdkCompat().chainException(iae, e);
  +jdkCompat.chainException(iae, e);
   throw iae;
   }
   
  @@ -947,7 +956,7 @@
   } catch (Throwable t) {
   IllegalArgumentException iae = new IllegalArgumentException
   ("addRepositoryInternal");
  -JdkCompat.getJdkCompat().chainException(iae, t);
  +jdkCompat.chainException(iae, t);
   throw iae;
   } finally {
   if (jarFile != null) {
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader StandardClassLoader.java

2004-04-15 Thread luehe
luehe   2004/04/15 14:39:48

  Modified:catalina/src/share/org/apache/catalina/loader
StandardClassLoader.java
  Log:
  Avoid
java.lang.NoClassDefFoundError: org/apache/tomcat/util/compat/JdkCompat
  during startup.
  
  Revision  ChangesPath
  1.11  +3 -12 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java
  
  Index: StandardClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- StandardClassLoader.java  15 Apr 2004 01:44:09 -  1.10
  +++ StandardClassLoader.java  15 Apr 2004 21:39:48 -  1.11
  @@ -198,15 +198,6 @@
   }
   
   
  -// - Class Variables
  -
  -
  -/**
  - * JDK compatibility support
  - */
  -private static final JdkCompat jdkCompat = JdkCompat.getJdkCompat();
  -
  -
   // - Instance Variables
   
   
  @@ -381,7 +372,7 @@
   } catch (MalformedURLException e) {
   IllegalArgumentException iae = new IllegalArgumentException
   ("Invalid repository: " + repository);
  -jdkCompat.chainException(iae, e);
  +JdkCompat.getJdkCompat().chainException(iae, e);
   throw iae;
   }
   
  @@ -956,7 +947,7 @@
   } catch (Throwable t) {
   IllegalArgumentException iae = new IllegalArgumentException
   ("addRepositoryInternal");
  -jdkCompat.chainException(iae, t);
  +JdkCompat.getJdkCompat().chainException(iae, t);
   throw iae;
   } finally {
   if (jarFile != null) {
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader StandardClassLoader.java WebappClassLoader.java

2004-04-14 Thread luehe
luehe   2004/04/14 18:44:09

  Modified:catalina/src/share/org/apache/catalina/core
StandardContext.java StandardDefaultContext.java
   catalina/src/share/org/apache/catalina/valves
RequestFilterValve.java
   catalina/src/share/org/apache/catalina/mbeans
DefaultContextMBean.java GroupMBean.java
MemoryUserDatabaseMBean.java
NamingResourcesMBean.java StandardContextMBean.java
UserMBean.java
   catalina/src/share/org/apache/catalina/loader
StandardClassLoader.java WebappClassLoader.java
  Log:
  "Hide" Throwable.initCause() inside Jdk14Compat, in order to preserver BC with J2SE 
1.3
  
  Revision  ChangesPath
  1.127 +21 -11
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.126
  retrieving revision 1.127
  diff -u -r1.126 -r1.127
  --- StandardContext.java  13 Apr 2004 23:59:50 -  1.126
  +++ StandardContext.java  15 Apr 2004 01:44:08 -  1.127
  @@ -101,6 +101,7 @@
   import org.apache.naming.resources.FileDirContext;
   import org.apache.naming.resources.ProxyDirContext;
   import org.apache.naming.resources.WARDirContext;
  +import org.apache.tomcat.util.compat.JdkCompat;
   
   /**
* Standard implementation of the Context interface.  Each
  @@ -135,6 +136,22 @@
   }
   
   
  +// - Class Variables
  +
  +
  +/**
  + * The descriptive information string for this implementation.
  + */
  +private static final String info =
  +"org.apache.catalina.core.StandardContext/1.0";
  +
  +
  +/**
  + * JDK compatibility support
  + */
  +private static final JdkCompat jdkCompat = JdkCompat.getJdkCompat();
  +
  +
   // - Instance Variables
   
   
  @@ -305,13 +322,6 @@
   
   
   /**
  - * The descriptive information string for this implementation.
  - */
  -private static final String info =
  -"org.apache.catalina.core.StandardContext/1.0";
  -
  -
  -/**
* The set of classnames of InstanceListeners that will be added
* to each newly created Wrapper by createWrapper().
*/
  @@ -5066,7 +5076,7 @@
   } catch (MalformedObjectNameException e) {
   IllegalArgumentException iae = new IllegalArgumentException
   ("Cannot create object name for environment " + envs[i]);
  -iae.initCause(e);
  +jdkCompat.chainException(iae, e);
   throw iae;
   }
   }
  @@ -5091,7 +5101,7 @@
   } catch (MalformedObjectNameException e) {
   IllegalArgumentException iae = new IllegalArgumentException
   ("Cannot create object name for resource " + resources[i]);
  -iae.initCause(e);
  +jdkCompat.chainException(iae, e);
   throw iae;
   }
   }
  @@ -5116,7 +5126,7 @@
   } catch (MalformedObjectNameException e) {
   IllegalArgumentException iae = new IllegalArgumentException
   ("Cannot create object name for resource " + links[i]);
  -iae.initCause(e);
  +jdkCompat.chainException(iae, e);
   throw iae;
   }
   }
  
  
  
  1.14  +22 -12
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardDefaultContext.java
  
  Index: StandardDefaultContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardDefaultContext.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- StandardDefaultContext.java   13 Apr 2004 23:59:50 -  1.13
  +++ StandardDefaultContext.java   15 Apr 2004 01:44:09 -  1.14
  @@ -53,6 +53,7 @@
   import org.apache.commons.modeler.ManagedBean;
   import org.apache.commons.modeler.Registry;
   import org.apache.naming.ContextAccessController;
  +import org.apache.tomcat.util.compat.JdkCompat;
   
   /**
* Used to store the default configuration a Host will use
  @@ -81,6 +82,22 @@
   }
   
   
  +// - Class Variables
  +
  +
  +/**
  + * The string manager for this package.
  + */
  +protected static StringManage

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader StandardClassLoader.java WebappClassLoader.java

2004-04-14 Thread luehe
luehe   2004/04/14 10:35:41

  Modified:catalina/src/share/org/apache/catalina/loader
StandardClassLoader.java WebappClassLoader.java
  Log:
  Added support for exception chaining.
  
  Revision  ChangesPath
  1.9   +12 -10
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java
  
  Index: StandardClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- StandardClassLoader.java  2 Mar 2004 12:31:57 -   1.8
  +++ StandardClassLoader.java  14 Apr 2004 17:35:41 -  1.9
  @@ -370,7 +370,10 @@
   URL url = new URL(null, repository, streamHandler);
   super.addURL(url);
   } catch (MalformedURLException e) {
  -throw new IllegalArgumentException(e.toString());
  +IllegalArgumentException iae = new IllegalArgumentException
  +("Invalid repository: " + repository);
  +iae.initCause(e);
  +throw iae;
   }
   
   // Add this repository to our internal list
  @@ -454,7 +457,7 @@
   } catch (Exception se) {
   if (debug >= 4)
   log("  -->Exception-->ClassNotFoundException", se);
  -throw new ClassNotFoundException(name);
  +throw new ClassNotFoundException(name, se);
   }
   }
   }
  @@ -473,7 +476,7 @@
   clazz = super.findClass(name);
   }
   } catch(AccessControlException ace) {
  -throw new ClassNotFoundException(name);
  +throw new ClassNotFoundException(name, ace);
   } catch (RuntimeException e) {
   if (debug >= 4)
   log("  -->RuntimeException Rethrown", e);
  @@ -774,10 +777,8 @@
   } catch (SecurityException se) {
   String error = "Security Violation, attempt to use " +
   "Restricted Class: " + name;
  -System.out.println(error);
  -se.printStackTrace();
   log(error);
  -throw new ClassNotFoundException(error);
  +throw new ClassNotFoundException(error, se);
   }
   }
   }
  @@ -944,9 +945,10 @@
repository + "'");
   }
   } catch (Throwable t) {
  -t.printStackTrace();
  -throw new IllegalArgumentException
  -("addRepositoryInternal: " + t);
  +IllegalArgumentException iae = new IllegalArgumentException
  +("addRepositoryInternal");
  +iae.initCause(t);
  +throw iae;
   } finally {
   if (jarFile != null) {
   try {
  
  
  
  1.32  +9 -9  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  =======
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- WebappClassLoader.java27 Feb 2004 14:58:44 -  1.31
  +++ WebappClassLoader.java14 Apr 2004 17:35:41 -  1.32
  @@ -545,7 +545,10 @@
   hasExternalRepositories = true;
   repositoryURLs = null;
   } catch (MalformedURLException e) {
  -throw new IllegalArgumentException(e.toString());
  +IllegalArgumentException iae = new IllegalArgumentException
  +("Invalid repository: " + repository);
  +iae.initCause(e);
  +throw iae;
   }
   
   }
  @@ -842,7 +845,7 @@
   } catch (Exception se) {
   if (log.isTraceEnabled())
   log.trace("  -->Exception-->ClassNotFoundException", 
se);
  -throw new ClassNotFoundException(name);
  +throw new ClassNotFoundException(name, se);
   }
   }
   }
  @@ -860,8 +863,7 @@
   throw cnfe;
   }
   } catch(AccessControlException ace) {
  -ace.printStackTrace();
  -throw new ClassNotFoundException(name);
  +throw new ClassNotFoundException(name, ace

RE: [PATCH][Tomcat 4.1 docs] Class loader HOWTO

2004-04-02 Thread Mark Thomas
I have just fixed this in CVS. Thanks for the report.

Mark 

> -Original Message-
> From: Daniel Rall [mailto:[EMAIL PROTECTED] 
> Sent: Friday, April 02, 2004 12:26 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [PATCH][Tomcat 4.1 docs] Class loader HOWTO
> 
> The published Tomcat 4.1's class loader documentation 
> <http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-
> howto.html> says 
> that the directory used by the shared class loader is 
> relative to CATALINA_HOME. 
>   According to the source code in 
> catalina/src/share/org/apache/catalina/startup/Bootstrap.java'
> s main() method 
> and BootstrapService.java's init() method, the documentation 
> is incorrect (it 
> should be CATALINA_BASE).  Here's the corresponding code snippet:
> 
>  unpacked[0] = new File(getCatalinaBase(),
> "shared" + File.separator 
> + "classes");
>  packed[0] = new File(getCatalinaBase(),
>   "shared" + File.separator + "lib");
>  sharedLoader =
>  
> ClassLoaderFactory.createClassLoader(unpacked, packed,
>   commonLoader);
> 
> In CVS rev 1.13, half of this problem was corrected.  This 
> fix has not be 
> published to the web site.
> 
> 
> revision 1.13
> date: 2004/02/02 21:40:31;  author: markt;  state: Exp;  lines: +5 -5
> - Fix 13805. Update docs to show that the shared directory is 
> relative to 
> CATALINA_BASE not CATALINA_HOME.
> - Reported by Michael Eriksson.
> 
> 
> Here's the other half of the fix:
> 
> * webapps/tomcat-docs/class-loader-howto.xml
>    Quick Start: In a follow up to CVS rev 1.13, correct the 
> path to the
>lib directory used by Catalina's shared class loader (CATALINA_BASE
>rather than CATALINA_HOME).
> 
> 
> Index: class-loader-howto.xml
> ===
> RCS file: 
> /home/cvspublic/jakarta-tomcat-4.0/webapps/tomcat-docs/class-l
> oader-howto.xml,v
> retrieving revision 1.13
> diff -u -u -r1.13 class-loader-howto.xml
> --- class-loader-howto.xml  2 Feb 2004 21:40:31 -   1.13
> +++ class-loader-howto.xml  1 Apr 2004 23:14:02 -
> @@ -27,7 +27,7 @@
>   application archive.
>   For classes and resources that must be shared across 
> all web applications,
>   place unpacked classes and resources under
> -$CATALINA_HOME/shared/classes, or place JAR files
> +$CATALINA_BASE/shared/classes, and JAR files
>   containing those classes and resources under
>   $CATALINA_BASE/shared/lib.
>   
> 
> 



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



cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs class-loader-howto.xml

2004-04-02 Thread markt
markt   2004/04/02 09:42:46

  Modified:webapps/tomcat-docs class-loader-howto.xml
  Log:
  - Fix remaining incorrect reference to CATALINA_HOME rather than CATALINA_BASE
  - Reported by Daniel Rall
  
  Revision  ChangesPath
  1.14  +1 -1  jakarta-tomcat-4.0/webapps/tomcat-docs/class-loader-howto.xml
  
  Index: class-loader-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/class-loader-howto.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- class-loader-howto.xml2 Feb 2004 21:40:31 -   1.13
  +++ class-loader-howto.xml2 Apr 2004 17:42:45 -   1.14
  @@ -27,7 +27,7 @@
   application archive.
   For classes and resources that must be shared across all web applications,
   place unpacked classes and resources under
  -$CATALINA_HOME/shared/classes, or place JAR files
  +$CATALINA_BASE/shared/classes, or place JAR files
   containing those classes and resources under
   $CATALINA_BASE/shared/lib.
   
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader StandardClassLoaderMBean.java StandardClassLoader.java WebappLoader.java mbeans-descriptors.xml

2004-03-02 Thread remm
remm2004/03/02 04:31:57

  Modified:catalina/src/share/org/apache/catalina/loader
StandardClassLoader.java WebappLoader.java
mbeans-descriptors.xml
  Added:   catalina/src/share/org/apache/catalina/loader
StandardClassLoaderMBean.java
  Log:
  - Register all classloaders with JMX, so that Tomcat is actually manageable
through JMX remote (otherwise, instantiating a new MBean is not possible).
  
  Revision  ChangesPath
  1.8   +2 -2  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java
  
  Index: StandardClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- StandardClassLoader.java  27 Feb 2004 14:58:44 -  1.7
  +++ StandardClassLoader.java  2 Mar 2004 12:31:57 -   1.8
  @@ -70,7 +70,7 @@
   
   public class StandardClassLoader
   extends URLClassLoader
  -implements Reloader {
  +implements Reloader, StandardClassLoaderMBean {
   
   
   // --- Constructors
  
  
  
  1.27  +29 -1 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappLoader.java
  
  Index: WebappLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- WebappLoader.java 27 Feb 2004 14:58:44 -  1.26
  +++ WebappLoader.java 2 Mar 2004 12:31:57 -   1.27
  @@ -696,6 +696,18 @@
   DirContextURLStreamHandler.bind
   ((ClassLoader) classLoader, this.container.getResources());
   
  +StandardContext ctx=(StandardContext)container;
  +Engine eng=(Engine)ctx.getParent().getParent();
  +String path = ctx.getPath();
  +if (path.equals("")) {
  +path = "/";
  +}   
  +ObjectName cloname = new ObjectName
  +(ctx.getEngineName() + ":type=WebappClassLoader,path="
  + + path + ",host=" + ctx.getParent().getName());
  +Registry.getRegistry(null, null)
  +.registerComponent(classLoader, cloname, null);
  +
   } catch (Throwable t) {
   log.error( "LifecycleException ", t );
   throw new LifecycleException("start: ", t);
  @@ -731,6 +743,22 @@
   if (classLoader instanceof Lifecycle)
   ((Lifecycle) classLoader).stop();
   DirContextURLStreamHandler.unbind((ClassLoader) classLoader);
  +
  +try {
  +StandardContext ctx=(StandardContext)container;
  +Engine eng=(Engine)ctx.getParent().getParent();
  +String path = ctx.getPath();
  +if (path.equals("")) {
  +path = "/";
  +}
  +ObjectName cloname = new ObjectName
  +(ctx.getEngineName() + ":type=WebappClassLoader,path="
  + + path + ",host=" + ctx.getParent().getName());
  +Registry.getRegistry(null, null).unregisterComponent(cloname);
  +} catch (Throwable t) {
  +log.error( "LifecycleException ", t );
  +}
  +
   classLoader = null;
   
   destroy();
  
  
  
  1.3   +7 -0  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/mbeans-descriptors.xml
  
  Index: mbeans-descriptors.xml
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/mbeans-descriptors.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mbeans-descriptors.xml27 May 2003 23:15:06 -  1.2
  +++ mbeans-descriptors.xml2 Mar 2004 12:31:57 -   1.3
  @@ -53,4 +53,11 @@
 
   
   
  +  
  +
   
  
  
  
  1.1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/StandardClassLoaderMBean.java
  
  Index: StandardClassLoaderMBean.java
  ===
  /*
   * Copyright 1999,2004 The Apache Software Foundation.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   * 
   *  http://www.apache.org/licenses/LICENSE-2.0
   * 
   * Unless required by applicable law or agreed t

RE: cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2004-02-22 Thread Mark Thomas
I would be grateful if someone more knowledgeable than I in the area of class
loaders reviewed the URL encoding part of this patch.

Thanks,

Mark

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, February 22, 2004 9:04 PM
> To: [EMAIL PROTECTED]
> Subject: cvs commit: 
> jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/load
> er WebappClassLoader.java
> 
> markt   2004/02/22 13:04:18
> 
>   Modified:catalina/src/share/org/apache/catalina/loader
> WebappClassLoader.java
>   Log:
>   - Fix bug 10469. Inconsistent encoding of URLs.
>   - Remove missing imports (thanks to Eclipse).
>   - Access static method, Thread.dumpStack(), in a static way 
> (Eclipse again).
>   
>   Revision  ChangesPath
>   1.50  +20 -13
> jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/load
er/WebappClassLoader.java
>   
>   Index: WebappClassLoader.java
>   ===
>   RCS file: 
> /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/cat
alina/loader/WebappClassLoader.java,v
>   retrieving revision 1.49
>   retrieving revision 1.50
>   diff -u -r1.49 -r1.50
>   --- WebappClassLoader.java  29 Apr 2003 22:03:08 -  1.49
>   +++ WebappClassLoader.java  22 Feb 2004 21:04:18 -  1.50
>   @@ -69,13 +69,9 @@
>import java.io.InputStream;
>import java.io.ByteArrayInputStream;
>import java.io.IOException;
>   -import java.net.JarURLConnection;
>import java.net.MalformedURLException;
>import java.net.URL;
>import java.net.URLClassLoader;
>   -import java.net.URLConnection;
>   -import java.net.URLStreamHandlerFactory;
>   -import java.net.URLStreamHandler;
>import java.security.AccessControlException;
>import java.security.AccessController;
>import java.security.CodeSource;
>   @@ -83,7 +79,6 @@
>import java.security.PermissionCollection;
>import java.security.Policy;
>import java.security.PrivilegedAction;
>   -import java.security.cert.Certificate;
>import java.util.ArrayList;
>import java.util.Enumeration;
>import java.util.HashMap;
>   @@ -91,7 +86,6 @@
>import java.util.Vector;
>import java.util.jar.JarFile;
>import java.util.jar.JarEntry;
>   -import java.util.jar.JarInputStream;
>import java.util.jar.Manifest;
>import java.util.jar.Attributes;
>import java.util.jar.Attributes.Name;
>   @@ -102,9 +96,9 @@
>import javax.naming.NameClassPair;
>
>import org.apache.catalina.Lifecycle;
>   -import org.apache.catalina.LifecycleEvent;
>import org.apache.catalina.LifecycleException;
>import org.apache.catalina.LifecycleListener;
>   +import org.apache.catalina.util.URLEncoder;
>
>import org.apache.naming.JndiPermission;
>import org.apache.naming.resources.ResourceAttributes;
>   @@ -1326,7 +1320,7 @@
>// Don't load classes if class loader is stopped
>if (!started) {
>log("Lifecycle error : CL stopped");
>   -Thread.currentThread().dumpStack();
>   +Thread.dumpStack();
>throw new ClassNotFoundException(name);
>}
>
>   @@ -2062,8 +2056,21 @@
>}
>
>//return new URL("file:" + realFile.getPath());
>   -return realFile.toURL();
>   +URLEncoder urlEncoder = new URLEncoder();
>   +urlEncoder.addSafeCharacter(',');
>   +urlEncoder.addSafeCharacter(':');
>   +urlEncoder.addSafeCharacter('-');
>   +urlEncoder.addSafeCharacter('_');
>   +urlEncoder.addSafeCharacter('.');
>   +urlEncoder.addSafeCharacter('*');
>   +urlEncoder.addSafeCharacter('/');
>   +urlEncoder.addSafeCharacter('!');
>   +urlEncoder.addSafeCharacter('~');
>   +urlEncoder.addSafeCharacter('\'');
>   +urlEncoder.addSafeCharacter('(');
>   +urlEncoder.addSafeCharacter(')');
>
>   +return new 
> URL(urlEncoder.encode(realFile.toURL().toString()));
>}
>
>
>   
>   
>   
> 
> -
> 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-4.0/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2004-02-22 Thread markt
markt   2004/02/22 13:04:18

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  - Fix bug 10469. Inconsistent encoding of URLs.
  - Remove missing imports (thanks to Eclipse).
  - Access static method, Thread.dumpStack(), in a static way (Eclipse again).
  
  Revision  ChangesPath
  1.50  +20 -13
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- WebappClassLoader.java29 Apr 2003 22:03:08 -  1.49
  +++ WebappClassLoader.java22 Feb 2004 21:04:18 -  1.50
  @@ -69,13 +69,9 @@
   import java.io.InputStream;
   import java.io.ByteArrayInputStream;
   import java.io.IOException;
  -import java.net.JarURLConnection;
   import java.net.MalformedURLException;
   import java.net.URL;
   import java.net.URLClassLoader;
  -import java.net.URLConnection;
  -import java.net.URLStreamHandlerFactory;
  -import java.net.URLStreamHandler;
   import java.security.AccessControlException;
   import java.security.AccessController;
   import java.security.CodeSource;
  @@ -83,7 +79,6 @@
   import java.security.PermissionCollection;
   import java.security.Policy;
   import java.security.PrivilegedAction;
  -import java.security.cert.Certificate;
   import java.util.ArrayList;
   import java.util.Enumeration;
   import java.util.HashMap;
  @@ -91,7 +86,6 @@
   import java.util.Vector;
   import java.util.jar.JarFile;
   import java.util.jar.JarEntry;
  -import java.util.jar.JarInputStream;
   import java.util.jar.Manifest;
   import java.util.jar.Attributes;
   import java.util.jar.Attributes.Name;
  @@ -102,9 +96,9 @@
   import javax.naming.NameClassPair;
   
   import org.apache.catalina.Lifecycle;
  -import org.apache.catalina.LifecycleEvent;
   import org.apache.catalina.LifecycleException;
   import org.apache.catalina.LifecycleListener;
  +import org.apache.catalina.util.URLEncoder;
   
   import org.apache.naming.JndiPermission;
   import org.apache.naming.resources.ResourceAttributes;
  @@ -1326,7 +1320,7 @@
   // Don't load classes if class loader is stopped
   if (!started) {
   log("Lifecycle error : CL stopped");
  -Thread.currentThread().dumpStack();
  +Thread.dumpStack();
   throw new ClassNotFoundException(name);
   }
   
  @@ -2062,8 +2056,21 @@
   }
   
   //return new URL("file:" + realFile.getPath());
  -return realFile.toURL();
  +URLEncoder urlEncoder = new URLEncoder();
  +urlEncoder.addSafeCharacter(',');
  +urlEncoder.addSafeCharacter(':');
  +urlEncoder.addSafeCharacter('-');
  +urlEncoder.addSafeCharacter('_');
  +urlEncoder.addSafeCharacter('.');
  +urlEncoder.addSafeCharacter('*');
  +urlEncoder.addSafeCharacter('/');
  +urlEncoder.addSafeCharacter('!');
  +urlEncoder.addSafeCharacter('~');
  +urlEncoder.addSafeCharacter('\'');
  +urlEncoder.addSafeCharacter('(');
  +urlEncoder.addSafeCharacter(')');
   
  +return new URL(urlEncoder.encode(realFile.toURL().toString()));
   }
   
   
  
  
  

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



cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs class-loader-howto.xml

2004-02-02 Thread markt
markt   2004/02/02 13:40:31

  Modified:webapps/tomcat-docs class-loader-howto.xml
  Log:
  - Fix 13805. Update docs to show that the shared directory is relative to 
CATALINA_BASE not CATALINA_HOME.
  - Reported by Michael Eriksson.
  
  Revision  ChangesPath
  1.13  +5 -5  jakarta-tomcat-4.0/webapps/tomcat-docs/class-loader-howto.xml
  
  Index: class-loader-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/class-loader-howto.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- class-loader-howto.xml1 Feb 2004 22:43:59 -   1.12
  +++ class-loader-howto.xml2 Feb 2004 21:40:31 -   1.13
  @@ -29,7 +29,7 @@
   place unpacked classes and resources under
   $CATALINA_HOME/shared/classes, or place JAR files
   containing those classes and resources under
  -$CATALINA_HOME/shared/lib.
  +$CATALINA_BASE/shared/lib.
   
   
   
  @@ -166,8 +166,8 @@
   web applications (unless Tomcat internal classes also need access,
   in which case you should put them in the Common
   class loader instead).  All unpacked classes and resources in
  -$CATALINA_HOME/shared/classes, as well as classes and
  -resources in JAR files under $CATALINA_HOME/shared/lib,
  +$CATALINA_BASE/shared/classes, as well as classes and
  +resources in JAR files under $CATALINA_BASE/shared/lib,
   are made visible through this class loader.  By default, that includes
   the following:
   
  @@ -208,8 +208,8 @@
   $CATALINA_HOME/common/classes
   $CATALINA_HOME/common/endorsed/*.jar
   $CATALINA_HOME/common/lib/*.jar
  -$CATALINA_HOME/shared/classes
  -$CATALINA_HOME/shared/lib/*.jar
  +$CATALINA_BASE/shared/classes
  +$CATALINA_BASE/shared/lib/*.jar
   
   
   
  
  
  

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



cvs commit: jakarta-tomcat-catalina/webapps/docs class-loader-howto.xml

2004-02-02 Thread markt
markt   2004/02/02 13:39:28

  Modified:webapps/docs class-loader-howto.xml
  Log:
  - Fix 13805. Update docs to show that the shared directory is relative to 
CATALINA_BASE not CATALINA_HOME.
  - Reported by Michael Eriksson.
  
  Revision  ChangesPath
  1.9   +6 -6  jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml
  
  Index: class-loader-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- class-loader-howto.xml1 Feb 2004 22:43:21 -   1.8
  +++ class-loader-howto.xml2 Feb 2004 21:39:28 -   1.9
  @@ -27,9 +27,9 @@
   application archive.
   For classes and resources that must be shared across all web applications,
   place unpacked classes and resources under
  -$CATALINA_HOME/shared/classes, or place JAR files
  +$CATALINA_BASE/shared/classes, or place JAR files
   containing those classes and resources under
  -$CATALINA_HOME/shared/lib.
  +$CATALINA_BASE/shared/lib.
   
   
   
  @@ -172,8 +172,8 @@
   web applications (unless Tomcat internal classes also need access,
   in which case you should put them in the Common
   class loader instead).  All unpacked classes and resources in
  -$CATALINA_HOME/shared/classes, as well as classes and
  -resources in JAR files under $CATALINA_HOME/shared/lib, are
  +$CATALINA_BASE/shared/classes, as well as classes and
  +resources in JAR files under $CATALINA_BASE/shared/lib, are
   made visible through this class loader. If multiple Tomcat instances are
   run from the same binary using the $CATALINA_BASE environment variable,
   then this classloader repositories are relative to $CATALINA_BASE rather
  @@ -220,8 +220,8 @@
   $CATALINA_HOME/common/classes
   $CATALINA_HOME/common/endorsed/*.jar
   $CATALINA_HOME/common/lib/*.jar
  -$CATALINA_HOME/shared/classes
  -$CATALINA_HOME/shared/lib/*.jar
  +$CATALINA_BASE/shared/classes
  +$CATALINA_BASE/shared/lib/*.jar
   
   
   
  
  
  

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



DO NOT REPLY [Bug 13772] - Class loader HOWTO needs to href security HOWTO for WebappX

2004-02-01 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13772>.
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=13772

Class loader HOWTO needs to href security HOWTO for WebappX

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2004-02-01 22:44 ---
I have added a security manager section to the classloader how-to.

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



cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs class-loader-howto.xml

2004-02-01 Thread markt
markt   2004/02/01 14:43:59

  Modified:webapps/tomcat-docs class-loader-howto.xml
  Log:
  - Port fix for bug 13772. Add a link to the security manager how-to.
  - Reported by Greg Bullough.
  
  Revision  ChangesPath
  1.12  +9 -0  jakarta-tomcat-4.0/webapps/tomcat-docs/class-loader-howto.xml
  
  Index: class-loader-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/class-loader-howto.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- class-loader-howto.xml17 Dec 2003 22:28:19 -  1.11
  +++ class-loader-howto.xml1 Feb 2004 22:43:59 -   1.12
  @@ -259,6 +259,15 @@
   
   
   
  +
  +
  +When running under a security manager the locations from which classes
  +are permitted to be loaded will also depend on the contents of your policy
  +file. See Security Manager HOW-TO
  +for further information.
  +
  +
  +
   
   
   
  
  
  

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



cvs commit: jakarta-tomcat-catalina/webapps/docs class-loader-howto.xml

2004-02-01 Thread markt
markt   2004/02/01 14:43:21

  Modified:webapps/docs class-loader-howto.xml
  Log:
  - Fix bug 13772. Add a link to the security manager how-to.
  - Reported by Greg Bullough.
  
  Revision  ChangesPath
  1.8   +9 -0  jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml
  
  Index: class-loader-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- class-loader-howto.xml13 Sep 2003 14:58:09 -  1.7
  +++ class-loader-howto.xml1 Feb 2004 22:43:21 -   1.8
  @@ -256,6 +256,15 @@
   
   
   
  +
  +
  +When running under a security manager the locations from which classes
  +are permitted to be loaded will also depend on the contents of your policy
  +file. See Security Manager HOW-TO
  +for further information.
  +
  +
  +
   
   
   
  
  
  

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



DO NOT REPLY [Bug 11846] - Class loader problem

2004-01-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11846>.
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=11846

Class loader problem

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX



--- Additional Comments From [EMAIL PROTECTED]  2004-01-07 23:43 ---
In reponse to the first issue Bugzilla is NOT a support forum. Please use the 
tomcar-user mailing list if you can't find the information you need in the 
docmentation.

In response to the second issue this change will not be ported to the 4.0 
branch.

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2003-12-19 Thread remm
remm2003/12/19 08:44:13

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  - Reset the repositories array on certain methos calls.
  - Override addURL to set hasExternalRepositories to true.
  
  Revision  ChangesPath
  1.30  +12 -1 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- WebappClassLoader.java11 Dec 2003 16:41:28 -  1.29
  +++ WebappClassLoader.java19 Dec 2003 16:44:13 -  1.30
  @@ -586,6 +586,7 @@
   URL url = new URL(repository);
   super.addURL(url);
   hasExternalRepositories = true;
  +repositoryURLs = null;
   } catch (MalformedURLException e) {
   throw new IllegalArgumentException(e.toString());
   }
  @@ -848,6 +849,16 @@
   
   
   //  ClassLoader Methods
  +
  +
  + /**
  +  * Add the specified URL to the classloader.
  +  */
  + protected void addURL(URL url) {
  + super.addURL(url);
  + hasExternalRepositories = true;
  + repositoryURLs = null;
  + }
   
   
   /**
  
  
  

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



DO NOT REPLY [Bug 10627] - incorrect documentation for class-loader-howto.xml

2003-12-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10627>.
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=10627

incorrect documentation for class-loader-howto.xml

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-12-17 22:29 ---
You rpatch has been applied to CVS and will be included in the next release of 
TC4.
Many thanks.

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



cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs class-loader-howto.xml

2003-12-17 Thread markt
markt   2003/12/17 14:28:19

  Modified:webapps/tomcat-docs class-loader-howto.xml
  Log:
  - Bug 10627. Small path error in class loader how to.
  - Provided by Andrew Conrad.
  
  Revision  ChangesPath
  1.11  +2 -2  jakarta-tomcat-4.0/webapps/tomcat-docs/class-loader-howto.xml
  
  Index: class-loader-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/class-loader-howto.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- class-loader-howto.xml13 Sep 2003 14:57:54 -  1.10
  +++ class-loader-howto.xml17 Dec 2003 22:28:19 -  1.11
  @@ -167,8 +167,8 @@
   in which case you should put them in the Common
   class loader instead).  All unpacked classes and resources in
   $CATALINA_HOME/shared/classes, as well as classes and
  -resources in JAR files under $CATALINA_HOME/lib, are
  -made visible through this class loader.  By default, that includes
  +resources in JAR files under $CATALINA_HOME/shared/lib,
  +are made visible through this class loader.  By default, that includes
   the following:
   
   jasper-compiler.jar - The page compiler classes required
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2003-12-11 Thread jfarcand
jfarcand2003/12/11 08:41:28

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  Minor fix. Avoid creating two array.
  
  Revision  ChangesPath
  1.29  +3 -3  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- WebappClassLoader.java10 Dec 2003 23:45:39 -  1.28
  +++ WebappClassLoader.java11 Dec 2003 16:41:28 -  1.29
  @@ -1436,12 +1436,12 @@
   }
   
   repositoryURLs = urls;
  -return repositoryURLs;
   
   } catch (MalformedURLException e) {
   repositoryURLs = new URL[0];
  -return (new URL[0]);
   }
  +
  +return repositoryURLs;
   
   }
   
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2003-12-10 Thread remm
remm2003/12/10 15:45:40

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  - Cache the result of getURLs. Everything else is cached, but this wasn't.
  
  Revision  ChangesPath
  1.28  +15 -2 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- WebappClassLoader.java29 Nov 2003 09:08:16 -  1.27
  +++ WebappClassLoader.java10 Dec 2003 23:45:39 -  1.28
  @@ -297,6 +297,12 @@
   protected String[] repositories = new String[0];
   
   
  + /**
  +  * Repositories URLs, used to cache the result of getURLs.
  +  */
  + protected URL[] repositoryURLs = null;
  +
  +
   /**
* Repositories translated as path in the work directory (for Jasper
* originally), but which is used to generate fake URLs should getURLs be
  @@ -1405,6 +1411,10 @@
*/
   public URL[] getURLs() {
   
  +if (repositoryURLs != null) {
  +return repositoryURLs;
  +}
  +
   URL[] external = super.getURLs();
   
   int filesLength = files.length;
  @@ -1425,9 +1435,11 @@
   }
   }
   
  -return urls;
  +repositoryURLs = urls;
  +return repositoryURLs;
   
   } catch (MalformedURLException e) {
  +repositoryURLs = new URL[0];
   return (new URL[0]);
   }
   
  @@ -1506,6 +1518,7 @@
   resourceEntries.clear();
   resources = null;
   repositories = null;
  +repositoryURLs = null;
   files = null;
   jarFiles = null;
   jarRealFiles = null;
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2003-11-29 Thread remm
remm2003/11/29 01:08:16

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  - Fix 25079: Classes are still only in the JAR.
  
  Revision  ChangesPath
  1.27  +3 -2  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- WebappClassLoader.java12 Sep 2003 14:06:21 -  1.26
  +++ WebappClassLoader.java29 Nov 2003 09:08:16 -  1.27
  @@ -1082,7 +1082,8 @@
   ResourceEntry entry = (ResourceEntry) resourceEntries.get(name);
   try {
   String repository = entry.codeBase.toString();
  -if (repository.endsWith(".jar")) {
  +if ((repository.endsWith(".jar")) 
  +&& (!(name.endsWith(".class" {
   // Copy binary content to the work directory if not present
   File resourceFile = new File(loaderDir, name);
   url = resourceFile.toURL();
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappLoader.java

2003-11-26 Thread amyroh
amyroh  2003/11/26 10:46:02

  Modified:catalina/src/share/org/apache/catalina/loader
WebappLoader.java
  Log:
  Catch exception when there is an empty jar file.  Ignores the exception and continue 
loading other jar files in the dir - bugtraq 4670099.
  
  Revision  ChangesPath
  1.24  +10 -3 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappLoader.java
  
  Index: WebappLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- WebappLoader.java 22 Sep 2003 12:31:41 -  1.23
  +++ WebappLoader.java 26 Nov 2003 18:46:02 -  1.24
  @@ -1109,8 +1109,15 @@
   continue;
   }
   
  -JarFile jarFile = new JarFile(destFile);
  -classLoader.addJar(filename, jarFile, destFile);
  +try {
  +JarFile jarFile = new JarFile(destFile);
  +classLoader.addJar(filename, jarFile, destFile);
  +} catch (Exception ex) {
  +// Catch the exception if there is an empty jar file
  +// Should ignore and continute loading other jar files 
  +// in the dir
  +}
  +
   loaderRepositories.add( filename );
   
   }
  
  
  

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



DO NOT REPLY [Bug 24508] - Webapp class loader issue

2003-11-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24508>.
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=24508

Webapp class loader issue





--- Additional Comments From [EMAIL PROTECTED]  2003-11-07 19:20 ---
a) The Sun engineer is wrong
b) This has been discussed at length, and the current behavior will not be
changed, as it is the one which gives the best behavior
c) Please do not reopen the report

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



DO NOT REPLY [Bug 24508] - Webapp class loader issue

2003-11-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24508>.
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=24508

Webapp class loader issue

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX



--- Additional Comments From [EMAIL PROTECTED]  2003-11-07 19:19 ---
a) The Sun engineer is wrong
b) This has been discussed at length, and the current behavior will not be
changed, as it is the one which gives the best behavior
c) Please do not reopen the report

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



DO NOT REPLY [Bug 24508] New: - Webapp class loader issue

2003-11-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24508>.
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=24508

Webapp class loader issue

   Summary: Webapp class loader issue
   Product: Tomcat 4
   Version: 4.1.27
  Platform: All
OS/Version: All
Status: NEW
  Severity: Major
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The webapp class loading mechanism had been changed from 4.0.x to 4.1.x. In 
4.1.x all xerces and xalan classes will be skipped from the webapps directory 
(See WebappClassLoader.java).

The problem is that tomcat now forcing every webapps in the same tomcat to use 
the same version of xerces and xalan without any choice.

The engineer from Sun pointed out that servlet container should follows the 
recommendation defined in the 2.3 specification, and the "endorsed mechansim" 
used in JDK 1.4 has nothing to force the webapps to use the "endorsed" 
directory. However, after a long discussion in the tomcat developer forum 
still getting inconclusive.

Seems to me that a simple "configuration" property will solve all the issues. 
Tomcat/webapps should able to be configured to either use the "endorsed" 
files, or use the ones from its own "webapps"?

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



Re: Tomcat 5/4 DefaultContext Listener/Loader

2003-10-20 Thread Remy Maucherat
Glenn Nielsen wrote:

The docs for both Tomcat 4 and 5 imply that you can nest a Context 
Listener inside
the DefaultContext.  But this had not been implemented.

I had a need to implement a custom Context Listener and Custom Loader 
(WebappLoader)
which needed to be configurable using the DefaultContext.

I have patches for both Tomcat 4 and Tomcat 5 which implement the ability
to configure a nested Context Listener and a nested Webapp Loader inside
the DefaultContext.
Why not ?

When developing that patches I did not change any published interfaces, 
though
the internal catalina implementation had to be slightly modified.

I can commit this to Tomcat 5 first, then if everyone is ok with it,
commit the Tomcat 4 version of the patches.
If you are certain it is not going to cause any regression ;-)

Remy



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


Tomcat 5/4 DefaultContext Listener/Loader

2003-10-19 Thread Glenn Nielsen
The docs for both Tomcat 4 and 5 imply that you can nest a Context Listener inside
the DefaultContext.  But this had not been implemented.
I had a need to implement a custom Context Listener and Custom Loader (WebappLoader)
which needed to be configurable using the DefaultContext.
I have patches for both Tomcat 4 and Tomcat 5 which implement the ability
to configure a nested Context Listener and a nested Webapp Loader inside
the DefaultContext.
When developing that patches I did not change any published interfaces, though
the internal catalina implementation had to be slightly modified.
I can commit this to Tomcat 5 first, then if everyone is ok with it,
commit the Tomcat 4 version of the patches.
Regards,

Glenn

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


cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappLoader.java

2003-09-22 Thread remm
remm2003/09/22 05:31:41

  Modified:catalina/src/share/org/apache/catalina/loader
WebappLoader.java
  Log:
  - Fix destroy.
  
  Revision  ChangesPath
  1.23  +2 -2  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappLoader.java
  
  Index: WebappLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- WebappLoader.java 21 Sep 2003 23:11:01 -  1.22
  +++ WebappLoader.java 22 Sep 2003 12:31:41 -  1.23
  @@ -670,9 +670,9 @@
   
   public void destroy() {
   if( controller==oname ) {
  -oname = null;
   // Self-registration, undo it
   Registry.getRegistry().unregisterComponent(oname);
  +oname = null;
   }
   initialized = false;
   
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappLoader.java

2003-09-21 Thread amyroh
amyroh  2003/09/21 16:11:01

  Modified:catalina/src/share/org/apache/catalina/loader
WebappLoader.java
  Log:
  Fix to properly create Loader MBean at webapp restart - bugtraq 4924607.
  
  Revision  ChangesPath
  1.22  +3 -1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappLoader.java
  
  Index: WebappLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- WebappLoader.java 10 Sep 2003 15:40:27 -  1.21
  +++ WebappLoader.java 21 Sep 2003 23:11:01 -  1.22
  @@ -670,9 +670,11 @@
   
   public void destroy() {
   if( controller==oname ) {
  +oname = null;
   // Self-registration, undo it
   Registry.getRegistry().unregisterComponent(oname);
   }
  +initialized = false;
   
   }
   
  
  
  

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



DO NOT REPLY [Bug 9766] - Wrong directory in Class Loader HOW-TO

2003-09-13 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9766>.
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=9766

Wrong directory in Class Loader HOW-TO

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-09-13 15:01 ---
fixed in tomcat 4.1, tomcat5

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



cvs commit: jakarta-tomcat-catalina/webapps/docs class-loader-howto.xml

2003-09-13 Thread funkman
funkman 2003/09/13 07:58:09

  Modified:webapps/docs class-loader-howto.xml
  Log:
  typo fix per Per 9766
  
  Revision  ChangesPath
  1.7   +1 -1  jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml
  
  Index: class-loader-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- class-loader-howto.xml8 Sep 2003 22:03:32 -   1.6
  +++ class-loader-howto.xml13 Sep 2003 14:58:09 -  1.7
  @@ -21,7 +21,7 @@
   files to make them available to web applications:
   
   For classes and resources specific to a particular web application,
  -place unpacked classes and resources under /WEB-INF/classe
  +place unpacked classes and resources under /WEB-INF/classes
   of your web application archive, or place JAR files containing those
   classes and resources under /WEB-INF/lib of your web
   application archive.
  
  
  

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



  1   2   3   4   5   >