Hi

The other log4j file is the log4j-sandbox-0.1alpha.jar. This contains
the InitContextListener for Log4J amongst other things.

I added the log4j jar file to the struts-shale-usecases webapps lib
directory and it started ok.

So conclusion is that if log4j is in the common/lib directory it won't
start, while it will start with the same jar file in the web-inf/lib
directory.

I suspect that this has to do with the way Shale (i.e commons-logging)
initializes the logging. When running in any container, you need to
handle logging specially to avoid log intermixing (which is why I use
InitContextListener and place it in common/lib).

Hermod

-----Opprinnelig melding-----
Fra: Wendy Smoak [mailto:[EMAIL PROTECTED]
Sendt: 20. september 2005 08:22
Til: Struts Users Mailing List
Emne: Re: [Shale] NullpointerException when running struts-shale-usecas
es


From: <[EMAIL PROTECTED]>

> I downloaded and installed a clean Tomcat 5.0.30, and now it started
Ok.
> So I went back and looked at my other Tomcat 5 install, and found that
I
> had some commons-xxx jars and log4J among other things in the
common/lib
> directory. Since we have been suspecious of digester, I removed that
one
> first - No cigar. I then readded that one and remove the next until I
> finally figured out what causes the problem.
>
> There is a compatibility issue between log4j (1.2.8) and Shale. When I
> removed my two log4j jars, Shale started ok.

I just added a dependency on log4j-1.2.8 to the use-cases, added 
commons-logging.properties and log4j.properties to WEB-INF/classes,
built 
and deployed it.  It starts up normally.  That's with the log4j .jar
file in 
WEB-INF/lib, however.

You mention _two_ log4j jars, which could be a problem.  Where were
they? 
If you have multiple copies of the same class(es) available on the 
classpath, strange things can happen.

-- 
Wendy Smoak




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



* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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

Reply via email to