Actually, the standard is to delegate to the parent class loader except in the case of the web-app classloader which fist performs a local search before delegating to the parent. Every app server has a different approach to this problem which is why I recommend the use of the ContextJNDISelector.


At 09:58 AM 8/27/2004, you wrote:
In the Weblogic console (or equivalently, somewhere in the weblogic.xml descriptor) there is a "Prefer Web-Inf Classes" option, which I believe reverses (should that be "standardizes"?) the classloader preference. Maybe this would help?

Keith


-----Original Message----- From: Jacob Kjome [mailto:[EMAIL PROTECTED] Sent: 26 August 2004 19:49 To: Log4J Users List Subject: RE: Class loading issues using WLS 8.1?


Weblogic doesn't seem to follow the servlet spec recommended classloading behavior that Tomcat implements, and I'm not sure how one would turn it on. A repository selector is pretty much requried under Weblogic.

As Yoav suggested, you can use the ContextJNDISelector in logging-log4j-sandbox.
Note, however, that Ceki removed this from the HEAD. This is because it has
been moved into the Log4j-1.3 CVS (and modified significantly). If you check
out the tagged 0_3_ALPHA tag (or something like that) from
logging-log4j-sandbox, you'll get a version that will work with Log4j-1.2.8
(along with the initializer which will install the selector is one hasn't
already been installed).


Note that Log4j-1.3 has, what is supposed to be, a much more robust repository
selector configuration mechanism.  You'll have to look at the Javadoc or ask
Ceki where the docs are on this.  I haven't had the chance to try it yet,
although I've been meaning to.

BTW, Ceki came up with the the whole repository selector stuff. I just took the
initiative to actually write it up so people could use it. I can't take credit
for the idea as Yoav's post seems to imply.



Jake

Quoting "Shapira, Yoav" <[EMAIL PROTECTED]>:

>
> Hola,
> I bet your hunch is correct. You'd need to either ask the weblogic
> folks how to isolate the startup classloader from the EAR classloaders,
> or alternatively use explicit LoggerRepositories in your log4j
> configuration within your EARs. Check our Jake Kjome's
> JNDIRepositorySelector (or a similar name) in the log4j-sandbox servlet
> package. (You can see it first at cvs.apache.org).
>
> Yoav Shapira
> Millennium Research Informatics
>
>
> >-----Original Message-----
> >From: White, Joshua A (HTSC, CASD) [mailto:[EMAIL PROTECTED]
> >Sent: Thursday, August 26, 2004 10:26 AM
> >To: '[EMAIL PROTECTED]'
> >Subject: Class loading issues using WLS 8.1?
> >
> >All,
> >
> >I have several wars/ears running on a single instance of WLS 8.1 Each
> of
> >these applications has its own log4j jar file and log4j configuration
> file.
> >All of them work as expected. Recently, I had the need to configure a
> >weblogic startup class that also requires log4j. I needed to put the
> >startup class and log4j on the system/weblogic classpath.
> >
> >Once the WLS is started, I no longer receive logging messages for any
> other
> >app installed on the server. This behavior seems to suggest that the
> log4j
> >jar that has been loaded on the system classpath is taking precedence
> over
> >the different instances that should be loaded and by the different
> class
> >loaders (war/ear).
> >
> >Any idea how to fix this problem?
> >
> >Regards,
> >
> >Joshua White
> >
> >
> >This communication, including attachments, is for the exclusive use of
> >addressee and may contain proprietary, confidential or privileged
> >information. If you are not the intended recipient, any use, copying,
> >disclosure, dissemination or distribution is strictly prohibited. If
> >you are not the intended recipient, please notify the sender
> >immediately by return email and delete this communication and destroy
> all
> >copies.
>
>
>
>
> This e-mail, including any attachments, is a confidential business
> communication, and may contain information that is confidential, proprietary
> and/or privileged. This e-mail is intended only for the individual(s) to
> whom it is addressed, and may not be saved, copied, printed, disclosed or
> used by anyone else. If you are not the(an) intended recipient, please
> immediately delete this e-mail from your computer system and notify the
> sender. Thank you.
>
>
> ---------------------------------------------------------------------
> 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]

-- Ceki G�lc�

For log4j documentation consider "The complete log4j manual"
ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to