You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Keith Naas <kn...@netjets.com> on 2005/11/09 22:15:57 UTC
RE: logging: more then one versionof 'org.apache.commons.logging.Log'
Thanks Robert,
We are currently using 1.0.4. This morning I downloaded the src for
1.0.5alpha1 to see if the issue was addressed. The exact same scenario
would occur since the Thread's ClassLoader is in a different EAR than
the LogFactory's ClassLoader. It is possible that the root cause is
really with WebLogic or with Hibernate.
-----Original Message-----
From: robert burrell donkin
[mailto:robertburrelldonkin@blueyonder.co.uk]
Sent: Wednesday, November 09, 2005 4:26 PM
To: Jakarta Commons Users List
Subject: Re: logging: more then one versionof
'org.apache.commons.logging.Log'
On Wed, 2005-11-09 at 09:17 -0500, Keith Naas wrote:
<snip>
> Question:
>
> The LogFactoryImpl loads the interface on the ClassLoader from
> LogFactoryImpl.getClass().getClassLoader(). However, it loads the
> implementation on the Thread.currentThread().getClassLoader(). Why
> does it use two different ClassLoaders instead of loading both the
> interface & implementation on the same ClassLoader?
if it's education you're looking for...
for a short answer, it's because years ago this was considered the
correct way to behave according to the specifications released at that
time.
for a long answer, consult
http://jakarta.apache.org/commons/logging/tech.html and search the mail
archives.
if it's a fix you're looking for...
the trunk contains code that copes more gracefully with some common use
cases and is backwards compatible. there's a good chance that your
problem will go away if you upgrade.
- robert
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
**********
This message contains information which may be confidential and privileged. Unless you are the addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone the message or any information contained in the message. If you have received the message in error, please advise the sender by reply e-mail and delete the message.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
RE: logging: more then one
versionof 'org.apache.commons.logging.Log'
Posted by Simon Kitching <sk...@apache.org>.
On Wed, 2005-11-09 at 16:15 -0500, Keith Naas wrote:
> Thanks Robert,
>
> We are currently using 1.0.4. This morning I downloaded the src for
> 1.0.5alpha1 to see if the issue was addressed. The exact same scenario
> would occur since the Thread's ClassLoader is in a different EAR than
> the LogFactory's ClassLoader. It is possible that the root cause is
> really with WebLogic or with Hibernate.
1.0.5alpha1 is much different from what is in the subversion head.
I expect your problem is really due to the use of parent-first
classloading (I *hate* parent-first classloading). There is quite a lot
of info on the apache wiki about JCL and classloaders that you may find
useful.
Regards,
Simon
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org