File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Websphere and the fly likes Getting Log4J working in RAD 7.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Getting Log4J working in RAD 7.0" Watch "Getting Log4J working in RAD 7.0" New topic
Author

Getting Log4J working in RAD 7.0

Vidula Mishra
Greenhorn

Joined: Jun 26, 2009
Posts: 2
Hi,

We are trying to get an EAR running on WAS 6.1 in RAD 7.0.
The application has a EJB and a WEB module.

The log4j-1.2.9.jar is a part of both these modules.

When installed on WAS 6.1, it throws an error as below:

Caused by: java.lang.Throwable: java.lang.NoClassDefFoundError: org.apache.log4j.Logger

The Class Loader policy is set to PARENT_FIRST.

I have tried to create the Service folder with the org.apache.commons.logging.LogFactory with the following content into the file:
org.apache.commons.logging.impl.Log4jFactory

I am not getting a clue to resolve this one.

Please help.
Thanks in advance.

Regards,
Vidula
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29233
    
136

Vidula Mishra wrote:The log4j-1.2.9.jar is a part of both these modules.

Both? It's traditional to put a jar in the EAR or Web project, but not both. If it used by both, it would go in the EAR and be referred to from both projects in the manifest.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Vidula Mishra
Greenhorn

Joined: Jun 26, 2009
Posts: 2
Its an existing application. Hence have retained it as is. It has been working like that in WAS 5.1 for years now.

I have tried to create the META-INF\services folder.
Also added the commons-logging.properties to the WEB-INF of the Web Module.
Changed the Class Loader to the PARENT_LAST.

Nothing seem to be working for me.

Please help.
 
wood burning stoves
 
subject: Getting Log4J working in RAD 7.0
 
Similar Threads
Migrating Enterprise Application project from WAS 6.1 to RAD 7.0- Urgent
problem while was 6.1 startup
RAD 7.0 Version -- Please Help
WP 6.1 Test Environment unavailable in RAD 7.5.0 iFix001
Websphere 6.1 - Apache commons logging with log4j does not work