Glad you found it :-)
Lesson learned: compiler classloader behavior is different than runtime
classloader behavior. I wonder if this difference in behavior is intentional
or accidental? Anyone know if there's a Java spec that defines this?
Jake
On Wed, 13 Feb 2008 09:06:46 -0800
"Eric Kolotyluk" <[EMAIL PROTECTED]> wrote:
Problem solved!
Thanks Jake, you got me thinking I found an earlier release of log4j in
my classpath. It seems when I upgraded to log4j 1.2.15 recently it got
sent to the end of my classpath without me noticing that. The older
log4j JAR is included from another project my main project is dependent
on and was previously later in my classpath so there was no problem
then.
What's curious is that even though the older JAR file came before the
newer jar file in the classpath, the compiler was still able to find the
right version which supports trace.
Phew! I thought I was going insane.
Cheers, Eric
-----Original Message-----
From: Jacob Kjome [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 13, 2008 8:03 AM
To: Log4J Users List
Subject: Re: trace doesn't work
Try running outside Eclipse where you have full control over the
environment.
Eclipse is a complex environment and you are almost certainly missing
something. I think we can both agree that if Log4j-1.2.15 were in the
classpath properly, you wouldn't be getting a NoSuchMethodError because
trace() clearly exists in said version of Log4j. Somehow, some way, an
older
version of Log4j is sneaking into your runtime classpath. Either that,
or
it's a classloader hierarchy issue, but then I would expect stuff like
NoClassDefFoundError and the like.
Jake
On Tue, 12 Feb 2008 15:46:10 -0800
"Eric Kolotyluk" <[EMAIL PROTECTED]> wrote:
I'm using Eclipse and compilation and execution both use the same
classpath as set in the project properties.
I've double-checked both the compilation and execution classpaths
explicitly and they both match log4j-1.2.15.jar
Any other ideas?
Cheers, Eric
-----Original Message-----
From: Jacob Kjome [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 12, 2008 3:10 PM
To: Log4J Users List
Subject: Re: trace doesn't work
Clearly you've compiled against a Log4j version with trace(), but are
running
against an old version of Log4j that doesn't include trace(). Check
your
runtime classpath.
Jake
On Tue, 12 Feb 2008 13:57:41 -0800
"Eric Kolotyluk" <[EMAIL PROTECTED]> wrote:
I have the following code:
private static final Logger LOG =
Logger.getLogger(CalibrationWizardMediator.class);
. . .
LOG.trace("windowClosed: our view has closed");
Which throws
Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError:
org.apache.log4j.Logger.trace(Ljava/lang/Object;)V
at
com.kodak.kps.wizard.CalibrationWizardMediator$WindowListener.windowClos
ed(CalibrationWizardMediator.java:870)
The code compiles, so why doesn't it run?
I'm using jog4j 1.2.15
I've used trace before with log4j 1.3, but now I can't get it to work
with 1.3b8 either.
What's going on?
Cheers, Eric
Eric Kolotyluk | Software Developer, Enterprise Solutions | Graphic
Communications Group |
Kodak Graphics Communications Company, Canada | 4225 Kincaid Street |
Burnaby, BC V5G 4P5 | Canada |
+1.604.451.2700 x 6471 tel | +1.604.437.9891 fax | +1.604.834.0129
mobile
www.graphics.kodak.com <http://www.graphics.kodak.com/>
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]