• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Getting Log4J working in RAD 7.0

 
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
 
author & internet detective
Posts: 39664
785
Eclipse IDE VI Editor Java
  • 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.
 
Any sufficiently advanced technology will be used as a cat toy. And this tiny ad contains a very small cat:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!