logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Darren Hunter" <darren.hun...@all-hotels.com>
Subject Log4j problems with multiple applications in Tomcat
Date Mon, 09 Feb 2004 16:22:11 GMT
Hi,

I am having a problem with log4j when deploying two applications in Tomcat
on our Linux boxes. The problem does not occur with the same configuration
on a windows 2000 box, or with one application deployed on either platform.

What follows is the setup,

JAVA VERSION as printed out from java -version
  Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta3-b84)
  Java HotSpot(TM) Client VM (build 1.4.0-beta3-b84, mixed mode)

LINUX VERSION as printed out from cat /etc/issue
  Welcome to SuSE Linux 8.0 (i386) - Kernel \r (\l)

TOMCAT VERSION
  version 4.1.29

And here is the error on startup of the second application. The first
applications logging configures fine. When I get to the second application I
get the following error,
log4j:WARN Failed to set property [conversionPattern] to value "%-5p %d OUR
APPLICATION NAME %c [%t] %m%n". java.lang.IllegalArgumentException:
java.lang.ClassCastException@718242
        at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:28)
        at java.lang.reflect.Method.invoke(Method.java:327)
        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.java:120
)
        at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:87)
        at
org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.jav
a:640)
        at
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.jav
a:603)
        at
org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigur
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(OptionConverter.
java:460)
        at org.apache.log4j.LogManager.<clinit>(LogManager.java:113)
        at org.apache.log4j.Logger.getLogger(Logger.java:94)
        at servlets.utils.Init.init(Init.java:80)
        at javax.servlet.GenericServlet.init(GenericServlet.java:256)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93
5)
        at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
        at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3422)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3623)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8
21)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
        at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j
ava:307)
        at
org.apache.catalina.core.StandardHost.install(StandardHost.java:788)
        at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:492)
        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:400)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:718)
        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:358)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:166)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:754)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:497)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
        at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
        at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42
)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:28)
        at java.lang.reflect.Method.invoke(Method.java:327)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

I have tried all of the suggestions in the application container
document(ie. custom logger repositories for multiple applications in a
container environment) but I still get the same error on the linux setup.

Any ideas?

Thanks for your suggestions,

Darren.


_____________________________________________________________________
This message from All-Hotels has been checked for all known viruses
by the MessageLabs Virus Scanning Service. For further information visit:
http://www.messagelabs.com/stats.asp


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


Mime
View raw message