You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Gary L Peskin <ga...@firstech.com> on 2000/12/07 18:10:32 UTC

Re: [C2][Xalan2J] Extension Handler Error with Fix (waz Re: [C2]: Namespace bug in XalanTransformer)

Davanum Srinivas wrote:
> 
> Scott,
> 
> There was a change in org\apache\xalan\extensions\ExtensionHandler.java which is affecting
> Cocoon2. Extension Handler now tries to use getContextClassLoader to load the class. This is
> failing for the classes that we need for some reason. Here's a patch which helps. Basically if the
> class is not found by getContextClassLoader then just use Class.forName() as it was earlier
> (Java1).
> 
> Thanks,
> dims
> 

Dims --

The reason for this is that we now look to the ContextClassLoader, if it
exists, to actually do the load.  This requires that your extensions
move from the Xalan directory or .jar (or elsewhere in the CLASSPATH)
into the appropriate directory for that ContextClassLoader.  I think in
Tomcat this is called a Context.  Any extensions then, must be in the
appropriate Tomcat Context.

With your change, if the extension is not found in the Context, we fall
back to getting it from the Xalan .jar or system CLASSPATH.  Is this
what you want or should we force users to move the extensions into the
appropriate Context(s).  If this is truly what you want, I'll commit the
change forthwith.

Gary