You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ian van der Neut <iv...@gmail.com> on 2004/11/30 11:35:51 UTC

struts 1.2.2 to 1.2.4 upgrade conflict log4j

Hello all,

I downloaded struts 1.2.4 yesterday to replace the 1.2.2 version that
I am developping against. However, testing my application with the new
jars (I copied all of the jars in the 1.2.4 tarball to the WEB-INF/lib
directory of my webapp) generates an exception:

[snipped]

root cause

javax.servlet.ServletException:
org.apache.log4j.Category.log(Ljava/lang/String;Lorg/apache/log4j/Level;Ljava/lang/Object;Ljava/lang/Throwable;)V
	at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:497)
	at org.apache.jsp.index_jsp._jspService(index_jsp.java:70)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

[snipped]

Is there something special I must do to make this work? I have log4j
version 1.2.8 installed. The problem goes away if I replace the
commons-logging jar with the one from the struts 1.2.2 distribution.

Thanks for any input,

Ian.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: struts 1.2.2 to 1.2.4 upgrade conflict log4j

Posted by Ian van der Neut <iv...@gmail.com>.
On Tue, 30 Nov 2004 08:37:23 -0600, Joe Germuska <jo...@germuska.com> wrote:
>  
> The Category class in log4j has been deprecated for a long time, and I
> recall some recent discussions on the commons-dev list about bringing
> commons-logging "up-to-date" with that.  I don't remember the details, but
> basically you just need to have compatible versions of commons-logging and
> log4j.  The project site for commons-logging or the commons-dev or
> commons-user mailing list archives may have more details. 

My log4j and commons-logging versions are apparently compatible, so it
was not that, however, you put me on the right track to fixing it. I
had in commons-logging.properties the string:

org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JCategoryLog

Changing that to:

org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger

Solved the problem, thank you. :)

Ian.

>  
> At 11:35 AM +0100 11/30/04, Ian van der Neut wrote: 
> 
> 
> Hello all,
>  
>  I downloaded struts 1.2.4 yesterday to replace the 1.2.2 version that
>  I am developping against. However, testing my application with the new
>  jars (I copied all of the jars in the 1.2.4 tarball to the WEB-INF/lib
>  directory of my webapp) generates an exception:
>  
>  [snipped]
>  
>  root cause
>  
>  javax.servlet.ServletException:
> org.apache.log4j.Category.log(Ljava/lang/String;Lorg/apache/log4j/Level;Ljava/lang/Object;Ljava/lang/Throwable;)V
>     at
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:497)
>        at org.apache.jsp.index_jsp._jspService(index_jsp.java:70)
>        at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
>        at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
>       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
>      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
>      at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
>  
>  [snipped]
>  
>  Is there something special I must do to make this work? I have log4j
>  version 1.2.8 installed. The problem goes away if I replace the
>  commons-logging jar with the one from the struts 1.2.2 distribution.
>  
>  Thanks for any input,
>  
>  Ian.
>  
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>  For additional commands, e-mail: user-help@struts.apache.org 
> 
>  
> 
>  
> -- 
> Joe Germuska            
>  Joe@Germuska.com  
>  http://blog.germuska.com    
> "Narrow minds are weapons made for mass destruction"  -The Ex

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: struts 1.2.2 to 1.2.4 upgrade conflict log4j

Posted by Joe Germuska <Jo...@Germuska.com>.
The Category class in log4j has been deprecated for a long time, and 
I recall some recent discussions on the commons-dev list about 
bringing commons-logging "up-to-date" with that.  I don't remember 
the details, but basically you just need to have compatible versions 
of commons-logging and log4j.  The project site for commons-logging 
or the commons-dev or commons-user mailing list archives may have 
more details.

Joe


At 11:35 AM +0100 11/30/04, Ian van der Neut wrote:
>Hello all,
>
>I downloaded struts 1.2.4 yesterday to replace the 1.2.2 version that
>I am developping against. However, testing my application with the new
>jars (I copied all of the jars in the 1.2.4 tarball to the WEB-INF/lib
>directory of my webapp) generates an exception:
>
>[snipped]
>
>root cause
>
>javax.servlet.ServletException:
>org.apache.log4j.Category.log(Ljava/lang/String;Lorg/apache/log4j/Level;Ljava/lang/Object;Ljava/lang/Throwable;)V
>	at 
>org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:497)
>	at org.apache.jsp.index_jsp._jspService(index_jsp.java:70)
>	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>	at 
>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
>	at 
>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
>	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>	at 
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
>	at 
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
>
>[snipped]
>
>Is there something special I must do to make this work? I have log4j
>version 1.2.8 installed. The problem goes away if I replace the
>commons-logging jar with the one from the struts 1.2.2 distribution.
>
>Thanks for any input,
>
>Ian.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org


-- 
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex