• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting Log4J working in RAD 7.0

 
Vidula Mishra
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34860
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Vidula Mishra
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic