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 Ceki Gülcü <ce...@qos.ch> on 2002/11/01 00:24:14 UTC

Re: Weblogic - Log4J config problem

At 11:40 31.10.2002 -0800, you wrote:
>I'm having trouble a few problems with settup up log4j
>
>
>
>The environment is a sun machine 5.8 running weblogic 6.1.  I have a 
>single Ear file with some ejb and a war file
>
>casesync.ear
>         user.jar (ejb file)
>         group.jar (ejb file)
>         casesync.war
>
> From the documentation is appears that I should add a lib directory with 
> the log4j.jar file in it,  However, when I do that weblogic tries to 
> autodeploy the jar and throws an exception.

Which exception is that?

>   I need to have wl in development mode so that I can redeploy the ear 
> when I make changes.
>To remedy this I've placed log4j in the wl classpath.  This gets me around 
>the log4j.jar problem.  However, it is uncear as to where to put the 
>log4j.properties file so that it will be read.  Could you please clarify

You have seen this in the book?

There is a better and quite elegant approach. Version 1.2 of the Java 
platform, added support for bundled extensions 
(http://java.sun.com/products/jdk/1.2/docs/guide/extensions/spec.html)for 
jar files. A jar file can specify the relative URLs of extensions and 
libraries that it requires via the "Class-Path" manifest attribute. 
Relative URLs ending with '/' are assumed to refer to directories.

For example, adding the line
Class-Path: lib/log4j-VERSION.jar lib/

to the manifest file of your application's ear file or your EJB jar files 
will allow log4j classes to be loaded from lib/log4j-VERSION.jar relative 
to the ear or jar file. Placing log4j.xml or log4j.properties in the lib/ 
directory will let log4j find the properties configuration file and 
auto-initialize.


>Also, I've noticed a minor spelliing error on page 123 JMSAppender is 
>misspelled JMSAppedner

Thanks. I fixed it.

>Please let me know if you have any ideas
>
>J.R. Warmkessel
>Wheels of Zeus 408 358 6030 x 2001
>jr@woz.com
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>

--
Ceki

TCP implementations will follow a general principle of robustness: be
conservative in what you do, be liberal in what you accept from
others. -- Jon Postel, RFC 793



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