Ceki,

The problem I reported about is still occurring with nlog4j 1.2.16. I will devote some more time to tracking it down ASAP but, for now, the problem remains.

My original email probably didn't explain the problem very clearly. I'm typically seeing the NoSuchMethodError occur when I am using IDEA, and have several projects modules open in the same frame. In this environment, there are several copies of log4j lying around and one of nlog4j - the ClassLoader could be confused about which Log4j implementation to use.

If I open one project module, which uses log4j and ApacheDS (which uses nlog4j) the logging works. If I open several more projects, each with their own log4j dependency, the same log statements do not.

I will follow up on this - it's just an issue of finding the time.

I think it is a problematic issue but hopefully it can be isolated to a specific problem related to IDE usage or the like.

Cheers,
Nick


Ceki Gülcü wrote:

Nick,

This problem has been already reported a few days ago. Nevertheless, thank you for reporting it.

As you observe, nlog4j admits a String instead of an object in its printing methods.

There is a known method for fixing this problem. You can expect it to be fixed in a few hours.

At 07:08 AM 8/16/2005, Nick Faiz wrote:

Hi,

We recently added nlog4j-1.2.14 as the logging mechanism for Apache Directory Server.

I've been developing another library, called Atlassian User, which includes ApacheDS, and all of its dependencies. I have recently begun to integrate Atlassian User with another application, which uses log4j-1.2.8 .

When working on the integration within IDEA I encounter NoSuchMethodError(s) on simple logging statements which *only* use a String as an argument to the logger (e.g. log.debug("example message" + exception.getMessage()):

java.lang.NoSuchMethodError: org.apache.log4j.Logger.debug(Ljava/lang/String;)V

I've looked at the source of nlog4j and log4j and I can see the slight difference in Category - nlog4j specifies a String, instead of an object, for methods such as debug(..), info(..), etc..

I've also written a quick test application which uses two classes - one dependent on log4j and one dependent on nlog4j. A runtime IncompatibleClassChangeError occurs:

Exception in thread "main" java.lang.IncompatibleClassChangeError

Can you please advise me as to how to overcome this problem? If nlog4j cannot work alongside log4j libraries then many pre-existing applications will not be able to use ApacheDS.

Cheers,
Nick

--
ATLASSIAN - http://www.atlassian.com/

Confluence - the enterprise wiki - tried it yet?
http://www.atlassian.com/confluence/
--
_______________________________________________
nlog4j-dev mailing list
[email protected]
http://slf4j.org/mailman/listinfo/nlog4j-dev




--
ATLASSIAN - http://www.atlassian.com/

Confluence - the enterprise wiki - tried it yet?
http://www.atlassian.com/confluence/
--
_______________________________________________
nlog4j-dev mailing list
[email protected]
http://slf4j.org/mailman/listinfo/nlog4j-dev

Reply via email to