tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Class clash error with log4j?
Date Mon, 13 Jan 2003 13:49:53 GMT
Howdy,
Try having a hard copy of the commons jars, not a symlink...

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Holger Wiechert [mailto:holger.wiechert@web.de]
>Sent: Sunday, January 12, 2003 10:04 AM
>To: Tomcat-user
>Subject: Class clash error with log4j?
>
>I've got a problem with log4j on Linux and maybe the reason is
>Tomcat-related. I post it to this list too since it's hard to tell,
>what causes this error.
>
>The errors are:
>log4j:WARN Failed to set property [maxFileSize] to value "200KB".
>java.lang.IllegalArgumentException: object is not an instance of
declaring
>class
>	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>	at
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
va:3
>9
>)
>	at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
rImp
>l
>.java:25)
>	at java.lang.reflect.Method.invoke(Method.java:324)
>	at
>org.apache.log4j.config.PropertySetter.setProperty(PropertySetter.java:
196)
>	at
>org.apache.log4j.config.PropertySetter.setProperty(PropertySetter.java:
155)
>	at
>org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.jav
a:12
>0
>)
>	at
>org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.jav
a:87
>)
>	at
>org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurato
r.ja
>v
>a:645)
>	at
>org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurato
r.ja
>v
>a:603)
>	at
>org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyCon
figu
>r
>ator.java:500)
>	at
>org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.
java
>:
>406)
>	at
>org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.
java
>:
>432)
>	at
>org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConve
rter
>.
>java:460)
>	at org.apache.log4j.LogManager.<clinit>(LogManager.java:113)
>	at org.apache.log4j.Logger.getLogger(Logger.java:94)
>	at
de.myclasses.strutsstuff.BaseAction.<clinit>(BaseAction.java:26)
>	--- truncated ---
>log4j:WARN Failed to set property [append] to value "true".
>java.lang.IllegalArgumentException: object is not an instance of
declaring
>class
>	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>	at
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
va:3
>9
>)
>	at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
rImp
>l
>.java:25)
>	at java.lang.reflect.Method.invoke(Method.java:324)
>	at
>org.apache.log4j.config.PropertySetter.setProperty(PropertySetter.java:
196)
>	at
>org.apache.log4j.config.PropertySetter.setProperty(PropertySetter.java:
155)
>	at
>org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.jav
a:12
>0
>)
>	at
>org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.jav
a:87
>)
>	at
>org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurato
r.ja
>v
>a:645)
>	at
>org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurato
r.ja
>v
>a:603)
>	at
>org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyCon
figu
>r
>ator.java:500)
>	at
>org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.
java
>:
>406)
>	at
>org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.
java
>:
>432)
>	at
>org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConve
rter
>.
>java:460)
>	at org.apache.log4j.LogManager.<clinit>(LogManager.java:113)
>	at org.apache.log4j.Logger.getLogger(Logger.java:94)
>	at
de.myclasses.strutsstuff.BaseAction.<clinit>(BaseAction.java:26)
>	--- truncated ---
>log4j:WARN Failed to set property [file] to value "/logs/my.log".
>java.lang.IllegalArgumentException: object is not an instance of
declaring
>class
>	--- truncated ---
>log4j:WARN Failed to set property [maxBackupIndex] to value "10".
>java.lang.IllegalArgumentException: object is not an instance of
declaring
>class	--- truncated ---
>	--- truncated ---
>log4j:WARN File option not set for appender [RFA].
>log4j:WARN Are you using FileAppender instead of ConsoleAppender?
>
>The environment is as follows:
>
>- Debian Linux Woody
>- Sun JDK 1.4.1_01-b01
>- log4j 1.2.7
>- Tomcat 4.1.12-3
>- Web-app uses struts1.1b2 (which itself uses commons-logging)
>
>Tomcat's lib folders contain those jars:
>
>shared/lib:
>lrwxrwxrwx    1 root     root           36 Dec  4 14:55
>jasper-compiler.jar -> ../../common/lib/jasper-compiler.jar
>lrwxrwxrwx    1 root     root           35 Dec  4 14:55
>jasper-runtime.jar -> ../../common/lib/jasper-runtime.jar
>
>common/lib:
>lrwxrwxrwx    1 root     root           21 Dec  4 14:55 ant.jar ->
>../../../java/ant.jar
>lrwxrwxrwx    1 root     root           37 Dec  4 14:55
>commons-collections.jar -> ../../../java/commons-collections.jar
>lrwxrwxrwx    1 root     root           37 Dec  4 14:55
>commons-logging-api.jar -> ../../../java/commons-logging-api.jar
>-rw-r--r--    1 root     root       182290 Oct 23 15:19
jasper-compiler.jar
>-rw-r--r--    1 root     root        69249 Oct 23 15:19
jasper-runtime.jar
>-rw-r--r--    1 root     root        28644 Oct 23 15:19
naming-common.jar
>-rw-r--r--    1 root     root         9584 Oct 23 15:19
naming-factory.jar
>-rw-r--r--    1 root     root        37584 Oct 23 15:19 naming-
>resources.jar
>lrwxrwxrwx    1 root     root           29 Dec  4 14:55 servlet.jar ->
>../../../java/servlet-2.3.jar
>-rw-r--r--    1 root     root       972027 Dec 18 22:54 xercesImpl.jar
>lrwxrwxrwx    1 root     root           31 Dec  4 14:55
xmlParserAPIs.jar -
>>
>../../../java/xmlParserAPIs.jar
>
>
>
>The web app contains the following jars:
>
>commons-dbcp.jar
>commons-digester.jar
>commons-fileupload.jar
>commons-lang.jar
>commons-pool.jar
>commons-resources.jar
>commons-services.jar
>commons-validator.jar
>commons-logging.jar
>jakarta-oro.jar
>jdbc2_0-stdext.jar
>log4j-1.2.7.jar
>mm.mysql-2.0.6.jar
>struts.jar
>
>Here's the log4j config, but I don't think that this is the problem:
>
># Attach appender stdout to root. Set root level to Level.DEBUG.
>log4j.rootLogger=DEBUG, stdout, RFA
>
># The fact that the root level is set to Prority.DEBUG only influences
># log requests made to the root logger. It has no influence on the
># *appenders* attached to root.
>
>log4j.appender.stdout=org.apache.log4j.ConsoleAppender
>log4j.appender.stdout.Threshold=DEBUG
>
>log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
>log4j.appender.stdout.layout.ConversionPattern=%5p: [%d] %c{1} - %m%n
>
># Appender RFA writes to the file "my.log" in tomcat's logs dir
>log4j.appender.RFA=org.apache.log4j.RollingFileAppender
>log4j.appender.RFA.File=${CATALINA_HOME}/logs/my.log
>log4j.appender.RFA.MaxFileSize=200KB
># Keep one backup file
>log4j.appender.RFA.MaxBackupIndex=10
>
># Don't truncate if log file aleady exists.
>log4j.appender.RFA.Append=true
>
># Appender RFA uses the PatternLayout.
>log4j.appender.RFA.layout=org.apache.log4j.PatternLayout
>log4j.appender.RFA.layout.ConversionPattern=%5p: [%d] %c{1} - %m%n
>
>
>The whole app works fine on Win2k using the same Tomcat version.
>Any ideas on how to solve it greatly appreciated!
>Thanks in advance for your time,
>Holger
>
>
>
>
>____________
>Virus checked by G DATA AntiVirusKit
>Virus news: www.antiviruslab.com
>
>
>--
>To unsubscribe, e-mail:   <mailto:tomcat-user-
>unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:tomcat-user-
>help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message