You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Wi...@alltel.com on 2002/04/01 23:15:22 UTC

Jonas 2.4.4 and log4j 1.2beta incompatibility

We downloaded the latest version of Jonas 2.4.4 that uses log4j v1.0.4
set of API's.

We are using the log4j 1.2 beta exclusively and when I put the log4j 1.2
beta jar file in front of the class path, Jonas throws a
java.lang.NoSuchMethodError at
org.objectweb.monolog.wrapper.log4j.MonologCategory.getInstance(MonologC
ategory.java:25).

Turns out that the method
  Category getInstance(String name, CategoryFactory factory)
that the Jonas log4j wrapper uses has been deprecated in the beta
version of log4j.

I guess I can decompile all of the Jonas's log4j wrapper classes and
rewrite but that sounds a bit extreme for such a global problem.

I thought that log4j beta was supposed to be backwards compatible.

Has anyone else experienced this or have a solution to the problem?

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Jonas 2.4.4 and log4j 1.2beta incompatibility

Posted by Ray Thomas <rt...@liveintellect.org>.
The new version of the Servlet spec provides for Classloader
differentiation between versioned jars (as a result of similar conflicts
between the XML parser included in most servlet engines and different
parsers included in web applications.) See the "Rules for class loading"
section of
http://developer.java.sun.com/developer/technicalArticles/Servlets/servl
etapi2.3/

The Jonas team might need to consider adding similar infrastructure to
their server so you might want to drop a note in their suggestion box.

In the meantime, you might be able to write and register a custom
ClassLoader in your app that accomplishes the same sort of class
namespace partitioning.  See an article on writing custom classloaders
at http://www.javaworld.com/javaworld/jw-03-2000/jw-03-classload.html

-R
----- Original Message -----
From: <Wi...@alltel.com>
To: <lo...@jakarta.apache.org>
Sent: Monday, April 01, 2002 2:15 PM
Subject: Jonas 2.4.4 and log4j 1.2beta incompatibility


> We downloaded the latest version of Jonas 2.4.4 that uses log4j v1.0.4
> set of API's.
>
> We are using the log4j 1.2 beta exclusively and when I put the log4j
1.2
> beta jar file in front of the class path, Jonas throws a
> java.lang.NoSuchMethodError at
>
org.objectweb.monolog.wrapper.log4j.MonologCategory.getInstance(MonologC
> ategory.java:25).
>
> Turns out that the method
>   Category getInstance(String name, CategoryFactory factory)
> that the Jonas log4j wrapper uses has been deprecated in the beta
> version of log4j.
>
> I guess I can decompile all of the Jonas's log4j wrapper classes and
> rewrite but that sounds a bit extreme for such a global problem.
>
> I thought that log4j beta was supposed to be backwards compatible.
>
> Has anyone else experienced this or have a solution to the problem?
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>