Avatar of jaggernat
jaggernat

asked on 

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
JSP

Avatar of undefined
Last Comment
Siva Prasanna Kumar
SOLUTION
Avatar of Siva Prasanna Kumar
Siva Prasanna Kumar
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
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.

ASKER CERTIFIED SOLUTION
Avatar of fargo
fargo

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of jaggernat
jaggernat

ASKER

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

Avatar of jaggernat
jaggernat

ASKER

yes , i do have    struts.jar ,commons-digester.jar,commons-beanutils.jar
in web-inf\lib
Avatar of fargo
fargo

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.


check multiple struts jars have been included.
JSP
JSP

JavaServer Pages (JSP) allow the development of dynamically generated web pages. It uses the Java programming language; JSP pages are translated into servlets at runtime, with each servlet being cached and reused until the JSP is modified. JSP allows Java code to be interleaved with static web markup content, so the resulting page can be compiled and executed on the server to deliver the content.

16K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo