• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 490
  • Last Modified:

log4j conflict in struts

Dear experts

I am using crystal reports with struts and i have the following problem here

I have commons-logging.jar file in my application and crystal reports uses its own version of log4j.properties file and log4j.jar file. Now when i run the application its giving an error

java.lang.NoClassDefFoundError: org/apache/struts/taglib/bean/MessageTag


I am pretty sure that the log4j jar file of crystal reports is conflicting with commons-logging.jar file of my appliaction.

any ideas how i could resolve this problem

thanks
J
0
jaggernat
Asked:
jaggernat
  • 3
  • 2
  • 2
2 Solutions
 
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
I think you need to put in all the struts jars in the web-inf/lib folder and re try.

and i don't think its due the conlict of log4j.

Thank You.
0
 
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
put

commons-digester.jar
commons-beanutils.jar

files into the "/WEB-INF/lib" folder of you context root.

and its simple that you put all the jars provided by struts that are present in struts lib folder.

0
 
fargoCommented:
this is NOT related to log4j and commons-logging or any other commons package. The core issue is struts.jar is not available. This class org/apache/struts/taglib/bean/MessageTag is directly in struts.jar.

Please check do u have "struts.jar" in WEB-INF/lib folder?
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
jaggernatAuthor Commented:
the problem is if i put in log4j.jar file in web-inf\lib directory its giving the  org/apache/struts/taglib/bean/MessageTag error

and when i remove log4j.jar from lib , there is no error and everything works fine

0
 
jaggernatAuthor Commented:
yes , i do have    struts.jar ,commons-digester.jar,commons-beanutils.jar
in web-inf\lib
0
 
fargoCommented:
humm.. strange. Seems you have jars issue. Ok.

Could you please try rebuilding your project and do keep single vesion of jars (no duplication) file either in tomcat/common/lib OR in your application WEB-INF/lib.


0
 
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
check multiple struts jars have been included.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now