1 Reply Latest reply on Jun 7, 2011 10:23 AM by Ales Justin

    Log4 Exception

    Darko Hojnik Newbie

      Hi there,

       

      I'm new with Jboss 5. And I got an Exception. The file log4.xml exists inside the WAR-File. Could anybody give me a suggestion how I could solve this issue?

       

      Part of my web.xml inside the WAR-File

       

      <!-- Spring Log4j Web Configuration Init Parameters -->

        <context-param>

          <param-name>log4jConfigLocation</param-name>

          <param-value>classpath:log4j.xml</param-value>

        </context-param>

       

      15:54:03,602 INFO  [[/site]] Initializing log4j from [classpath:log4j.xml]

      15:54:03,653 ERROR [[/site]] Exception sending context initialized event to listener instance of class org.springframework.web.util.Log4jConfigListener

      java.lang.IllegalArgumentException: Invalid 'log4jConfigLocation' parameter: class path resource [log4j.xml] cannot be resolved to absolute file path because it does not reside in the file system: vfszip:/home/darko/JAVA/Project_Hippo/Appserver/jboss-5.1.0.GA/server/default/deploy/site.war/WEB-INF/classes/log4j.xml

      at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:155)

      at org.springframework.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:45)

      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)

      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)

      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)

      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)

      at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)

      at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)

      at org.jboss.web.deployers.WebModule.start(WebModule.java:97)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:616)

      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

      at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)

      at $Proxy38.start(Unknown Source)

      at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)

      at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)

      at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

      at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

      at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

      at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)

      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

      at org.jboss.system.ServiceController.doChange(ServiceController.java:688)

      at org.jboss.system.ServiceController.start(ServiceController.java:460)

      at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)

      at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)

      at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)

      at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

      at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)

      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

      at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)

      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

      at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

      at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

      at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

      at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)

      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

      at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)

      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)

      at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

      at org.jboss.Main.boot(Main.java:221)

      at org.jboss.Main$1.run(Main.java:556)

      at java.lang.Thread.run(Thread.java:636)

      15:54:03,654 INFO  [[/site]] Initializing Spring root WebApplicationContext

      15:54:03,655 INFO  [ContextLoader] Root WebApplicationContext: initialization started

      15:54:03,732 INFO  [XmlWebApplicationContext] Refreshing Root WebApplicationContext: startup date [Tue Jun 07 15:54:03 CEST 2011]; root of context hierarchy

      15:54:03,859 INFO  [XmlBeanDefinitionReader] Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]

      15:54:04,171 INFO  [DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1560ddda: defining beans [messageSource,org.springframework.web.servlet.view.InternalResourceViewResolver#0,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0,contactViewController,contactBean,templateMessage,mailSender,contactFormController]; root of factory hierarchy

      15:54:04,218 INFO  [SimpleUrlHandlerMapping] Mapped URL path [/spring/contactspring.do] onto handler 'contactViewController'

      15:54:04,314 INFO  [SimpleUrlHandlerMapping] Mapped URL path [/spring/contactspringmvc.do] onto handler 'contactFormController'

      15:54:04,398 INFO  [ContextLoader] Root WebApplicationContext: initialization completed in 743 ms

      15:54:04,398 ERROR [StandardContext] Error listenerStart

      15:54:04,400 ERROR [StandardContext] Context [/site] startup failed due to previous errors

      15:54:04,400 INFO  [[/site]] Closing Spring root WebApplicationContext

      15:54:04,400 INFO  [XmlWebApplicationContext] Closing Root WebApplicationContext: startup date [Tue Jun 07 15:54:03 CEST 2011]; root of context hierarchy

      15:54:04,401 INFO  [DefaultListableBeanFactory] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1560ddda: defining beans [messageSource,org.springframework.web.servlet.view.InternalResourceViewResolver#0,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0,contactViewController,contactBean,templateMessage,mailSender,contactFormController]; root of factory hierarchy

      15:54:04,403 INFO  [[/site]] Shutting down log4j