- This topic has 8 replies, 4 voices, and was last updated 17 years, 10 months ago by Scott Anderson.
-
AuthorPosts
-
Larry D. WilsonMemberI know this probably isn’t a MyEclipseIDE specific issue – and hoping someone can point me in a direction to resolve this.
Ever since upgrading (at the same time unfortunately, god how dumb) to MyEclipseIDE 5.1 and JBoss 4.0.5GA, I’ve been having issues with logging:
09:53:59,242 ERROR [STDERR] log4j:ERROR A "org.jboss.logging.util.OnlyOnceErrorHandler" object is not assignable to a "org.apache.log4j.spi.ErrorHandler" variable. 09:53:59,243 ERROR [STDERR] log4j:ERROR The class "org.apache.log4j.spi.ErrorHandler" was loaded by 09:53:59,244 ERROR [STDERR] log4j:ERROR [WebappClassLoader delegate: false repositories: /WEB-INF/classes/ ----------> Parent Classloader: java.net.FactoryURLClassLoader@df6322 ] whereas object of type 09:53:59,245 ERROR [STDERR] log4j:ERROR "org.jboss.logging.util.OnlyOnceErrorHandler" was loaded by [org.jboss.system.server.NoAnnotationURLClassLoader@7471e0]. 09:53:59,723 ERROR [STDERR] log4j:ERROR Could not create an Appender. Reported error follows. 09:53:59,724 ERROR [STDERR] java.lang.ClassCastException: org.jboss.logging.appender.DailyRollingFil eAppender
There are several posts on the net about this exact issue, with a variety of responses, none of which work for me.
I have even tried several versions of Log4J, just in case, with no change in behavior.
I’ve been using JBoss and MyEclipseIDS for years, but with after the upgrade I’m having this problem with all of my applications.
I’ve tried everything I can think of.
Running:
MacOSX 10.4.8
Java 1.5_06
MyEclipseIDE 5.1.0GA
Eclipse 3.2.1Anyone have any thoughts about how to proceed? I hate to roll back to the previous JBoss and MyEclipseIDE.
Larry
Scott AndersonParticipantLarry,
To help isolate the problem, can you try starting JBoss from outside MyEclipse and seeing if the error persists? How about if you don’t have any applications deployed? Those tests will help us work through the issue and hopefully see what’s up.
Larry D. WilsonMemberIf I start JBoss outside of MyEclipseIDE, with no custom applications, it works fine. When I stop the JBoss server, and deploy my application, outside of MyEclipseIDE, I get the error.
The application .classpath is:
<?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="com.genuitec.eclipse.j2eedt.core.J2EE14_CONTAINER"/> <classpathentry kind="lib" path="/Applications/Java/jtds-1.2-dist/jtds-1.2.jar"/> <classpathentry kind="lib" path="/Applications/Java/javamail-1.4/mail.jar"/> <classpathentry kind="lib" path="/Applications/Java/jaf-1.1/activation.jar"/> <classpathentry kind="lib" path="/Applications/Java/quartz-1.5.2/quartz-1.5.2.jar"/> <classpathentry kind="lib" path="/Applications/Java/commons-lang-2.1/commons-lang-2.1.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3.8.1"/> <classpathentry kind="lib" path="/Applications/Java/logging-log4j-1.2.14/dist/lib/log4j-1.2.14.jar"/> <classpathentry kind="output" path="WebRoot/WEB-INF/classes"/> </classpath>
(I’ve tried several Log4J distros – all with the same error).
Thanks.
lancedolanMember*listens intently*
I have the same issue, no solution tho
Larry D. WilsonMemberFor what it’s worth, I removed and reinstalled JBoss 4.0.5GA, eclipse 3.2.1, and MyEclipseIDE 5.1.0GA. I created a simple application, TestLog4J, with only an index.jsp page, and deployed it:
<%@ page language="java" import="java.util.*" import="org.apache.log4j.Logger" pageEncoding="ISO-8859-1"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>My JSP 'index.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> </head> <body> Hello!<br /> <% System.out.println("hello from the page"); Logger log = Logger.getLogger(this.getClass().getName()); log.info("hello from the logger!"); %> </body> </html>
With this (applicationdir).classpath:
<?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="com.genuitec.eclipse.j2eedt.core.J2EE14_CONTAINER"/> <classpathentry kind="lib" path="/Applications/Java/jboss-4.0.5.GA/server/default/lib/log4j.jar"/> <classpathentry kind="output" path="WebRoot/WEB-INF/classes"/> </classpath>
Without the Log4J import, the Logger line, and the log.info line, everything works fine.
But add that log stuff, and you get this:
18:06:53,528 INFO [TomcatDeployer] deploy, ctxPath=/TestLog4J, warUrl=.../deploy/TestLog4J.war/ 18:06:53,954 ERROR [STDERR] log4j:ERROR A "org.jboss.logging.util.OnlyOnceErrorHandler" object is not assignable to a "org.apache.log4j.spi.ErrorHandler" variable. 18:06:53,956 ERROR [STDERR] log4j:ERROR The class "org.apache.log4j.spi.ErrorHandler" was loaded by 18:06:53,956 ERROR [STDERR] log4j:ERROR [WebappClassLoader delegate: false repositories: /WEB-INF/classes/ ----------> Parent Classloader: java.net.FactoryURLClassLoader@3b101d ] whereas object of type 18:06:53,957 ERROR [STDERR] log4j:ERROR "org.jboss.logging.util.OnlyOnceErrorHandler" was loaded by [org.jboss.system.server.NoAnnotationURLClassLoader@cec0c5]. 18:06:54,266 ERROR [STDERR] log4j:ERROR Could not create an Appender. Reported error follows. 18:06:54,268 ERROR [STDERR] java.lang.ClassCastException: org.jboss.logging.appender.DailyRollingFileAppender 18:06:54,270 ERROR [STDERR] at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:165) 18:06:54,270 ERROR [STDERR] at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:140) 18:06:54,271 ERROR [STDERR] at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:153) 18:06:54,271 ERROR [STDERR] at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:415) 18:06:54,271 ERROR [STDERR] at org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:384) 18:06:54,272 ERROR [STDERR] at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:783) 18:06:54,272 ERROR [STDERR] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:666) 18:06:54,274 ERROR [STDERR] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:616) 18:06:54,274 ERROR [STDERR] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:602) 18:06:54,275 ERROR [STDERR] at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:460) 18:06:54,276 ERROR [STDERR] at org.apache.log4j.LogManager.<clinit>(LogManager.java:113) 18:06:54,276 ERROR [STDERR] at org.apache.log4j.Logger.getLogger(Logger.java:85) 18:06:54,277 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 18:06:54,277 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 18:06:54,277 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 18:06:54,278 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585) 18:06:54,278 ERROR [STDERR] at org.apache.commons.logging.impl.Log4jProxy.<init>(Log4jProxy.java:132) 18:06:54,279 ERROR [STDERR] at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:39) 18:06:54,279 ERROR [STDERR] at sun.reflect.GeneratedConstructorAccessor23.newInstance(Unknown Source) 18:06:54,279 ERROR [STDERR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) 18:06:54,280 ERROR [STDERR] at java.lang.reflect.Constructor.newInstance(Constructor.java:494) 18:06:54,280 ERROR [STDERR] at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529) 18:06:54,281 ERROR [STDERR] at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235) 18:06:54,281 ERROR [STDERR] at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:372) 18:06:54,281 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.getLogger(ContainerBase.java:380) 18:06:54,282 ERROR [STDERR] at org.apache.catalina.core.StandardContext.start(StandardContext.java:4114) 18:06:54,283 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) 18:06:54,283 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) 18:06:54,283 ERROR [STDERR] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) 18:06:54,284 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 18:06:54,284 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 18:06:54,285 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 18:06:54,285 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585) 18:06:54,286 ERROR [STDERR] at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503) 18:06:54,286 ERROR [STDERR] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164) 18:06:54,286 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) 18:06:54,287 ERROR [STDERR] at org.apache.catalina.core.StandardContext.init(StandardContext.java:5052) 18:06:54,287 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 18:06:54,288 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 18:06:54,288 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 18:06:54,288 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585) 18:06:54,289 ERROR [STDERR] at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503) 18:06:54,289 ERROR [STDERR] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164) 18:06:54,289 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) 18:06:54,290 ERROR [STDERR] at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:297) 18:06:54,291 ERROR [STDERR] at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103) 18:06:54,291 ERROR [STDERR] at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371) 18:06:54,291 ERROR [STDERR] at org.jboss.web.WebModule.startModule(WebModule.java:83) 18:06:54,292 ERROR [STDERR] at org.jboss.web.WebModule.startService(WebModule.java:61) 18:06:54,292 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289) 18:06:54,292 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245) 18:06:54,293 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) 18:06:54,293 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 18:06:54,294 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585) 18:06:54,294 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) 18:06:54,294 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) 18:06:54,295 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) 18:06:54,295 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) 18:06:54,296 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) 18:06:54,296 ERROR [STDERR] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978) 18:06:54,296 ERROR [STDERR] at $Proxy0.start(Unknown Source) 18:06:54,297 ERROR [STDERR] at org.jboss.system.ServiceController.start(ServiceController.java:417) 18:06:54,297 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) 18:06:54,298 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 18:06:54,298 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585) 18:06:54,298 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) 18:06:54,299 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) 18:06:54,299 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) 18:06:54,299 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) 18:06:54,300 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) 18:06:54,300 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) 18:06:54,300 ERROR [STDERR] at $Proxy37.start(Unknown Source) 18:06:54,301 ERROR [STDERR] at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466) 18:06:54,301 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 18:06:54,302 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 18:06:54,302 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 18:06:54,302 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585) 18:06:54,303 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) 18:06:54,303 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) 18:06:54,304 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133) 18:06:54,304 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) 18:06:54,305 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142) 18:06:54,305 ERROR [STDERR] at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97) 18:06:54,306 ERROR [STDERR] at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238) 18:06:54,306 ERROR [STDERR] at org.jboss.ws.integration.jboss.DeployerInterceptor.start(DeployerInterceptor.java:92) 18:06:54,306 ERROR [STDERR] at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188) 18:06:54,307 ERROR [STDERR] at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95) 18:06:54,307 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) 18:06:54,308 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) 18:06:54,308 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) 18:06:54,309 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) 18:06:54,309 ERROR [STDERR] at $Proxy38.start(Unknown Source) 18:06:54,310 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025) 18:06:54,310 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819) 18:06:54,310 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782) 18:06:54,311 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source) 18:06:54,311 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 18:06:54,312 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585) 18:06:54,312 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) 18:06:54,313 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) 18:06:54,313 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133) 18:06:54,313 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) 18:06:54,314 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142) 18:06:54,314 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) 18:06:54,314 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) 18:06:54,315 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) 18:06:54,315 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) 18:06:54,316 ERROR [STDERR] at $Proxy8.deploy(Unknown Source) 18:06:54,316 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421) 18:06:54,316 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610) 18:06:54,317 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263) 18:06:54,317 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274) 18:06:54,317 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225) 18:06:54,320 ERROR [STDERR] log4j:ERROR Could not parse input source [org.xml.sax.InputSource@c40b8c]. 18:06:54,321 ERROR [STDERR] java.lang.NullPointerException 18:06:54,322 ERROR [STDERR] at java.util.Hashtable.put(Hashtable.java:396) 18:06:54,323 ERROR [STDERR] at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:141) 18:06:54,323 ERROR [STDERR] at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:153) 18:06:54,323 ERROR [STDERR] at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:415) 18:06:54,324 ERROR [STDERR] at org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:384) 18:06:54,324 ERROR [STDERR] at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:783) 18:06:54,325 ERROR [STDERR] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:666) 18:06:54,325 ERROR [STDERR] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:616) 18:06:54,326 ERROR [STDERR] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:602) 18:06:54,326 ERROR [STDERR] at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:460) 18:06:54,326 ERROR [STDERR] at org.apache.log4j.LogManager.<clinit>(LogManager.java:113) 18:06:54,327 ERROR [STDERR] at org.apache.log4j.Logger.getLogger(Logger.java:85) 18:06:54,327 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 18:06:54,327 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 18:06:54,328 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 18:06:54,328 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585) 18:06:54,328 ERROR [STDERR] at org.apache.commons.logging.impl.Log4jProxy.<init>(Log4jProxy.java:132) 18:06:54,329 ERROR [STDERR] at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:39) 18:06:54,329 ERROR [STDERR] at sun.reflect.GeneratedConstructorAccessor23.newInstance(Unknown Source) 18:06:54,330 ERROR [STDERR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) 18:06:54,330 ERROR [STDERR] at java.lang.reflect.Constructor.newInstance(Constructor.java:494) 18:06:54,331 ERROR [STDERR] at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529) 18:06:54,331 ERROR [STDERR] at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235) 18:06:54,332 ERROR [STDERR] at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:372) 18:06:54,332 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.getLogger(ContainerBase.java:380) 18:06:54,333 ERROR [STDERR] at org.apache.catalina.core.StandardContext.start(StandardContext.java:4114) 18:06:54,333 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) 18:06:54,333 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) 18:06:54,334 ERROR [STDERR] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) 18:06:54,334 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 18:06:54,334 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 18:06:54,335 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 18:06:54,335 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585) 18:06:54,337 ERROR [STDERR] at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503) 18:06:54,337 ERROR [STDERR] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164) 18:06:54,338 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) 18:06:54,338 ERROR [STDERR] at org.apache.catalina.core.StandardContext.init(StandardContext.java:5052) 18:06:54,339 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 18:06:54,339 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 18:06:54,339 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 18:06:54,340 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585) 18:06:54,340 ERROR [STDERR] at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503) 18:06:54,340 ERROR [STDERR] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164) 18:06:54,341 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) 18:06:54,341 ERROR [STDERR] at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:297) 18:06:54,342 ERROR [STDERR] at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103) 18:06:54,343 ERROR [STDERR] at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371) 18:06:54,343 ERROR [STDERR] at org.jboss.web.WebModule.startModule(WebModule.java:83) 18:06:54,344 ERROR [STDERR] at org.jboss.web.WebModule.startService(WebModule.java:61) 18:06:54,344 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289) 18:06:54,344 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245) 18:06:54,345 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) 18:06:54,345 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 18:06:54,345 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585) 18:06:54,346 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) 18:06:54,346 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) 18:06:54,347 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) 18:06:54,347 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) 18:06:54,347 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) 18:06:54,348 ERROR [STDERR] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978) 18:06:54,348 ERROR [STDERR] at $Proxy0.start(Unknown Source) 18:06:54,348 ERROR [STDERR] at org.jboss.system.ServiceController.start(ServiceController.java:417) 18:06:54,349 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) 18:06:54,349 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 18:06:54,349 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585) 18:06:54,350 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) 18:06:54,350 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) 18:06:54,350 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) 18:06:54,351 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) 18:06:54,351 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) 18:06:54,351 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) 18:06:54,352 ERROR [STDERR] at $Proxy37.start(Unknown Source) 18:06:54,352 ERROR [STDERR] at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466) 18:06:54,353 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 18:06:54,353 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 18:06:54,353 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 18:06:54,354 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585) 18:06:54,354 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) 18:06:54,355 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) 18:06:54,355 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133) 18:06:54,355 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) 18:06:54,356 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142) 18:06:54,356 ERROR [STDERR] at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97) 18:06:54,356 ERROR [STDERR] at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238) 18:06:54,357 ERROR [STDERR] at org.jboss.ws.integration.jboss.DeployerInterceptor.start(DeployerInterceptor.java:92) 18:06:54,357 ERROR [STDERR] at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188) 18:06:54,358 ERROR [STDERR] at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95) 18:06:54,358 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) 18:06:54,358 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) 18:06:54,359 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) 18:06:54,359 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) 18:06:54,360 ERROR [STDERR] at $Proxy38.start(Unknown Source) 18:06:54,360 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025) 18:06:54,361 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819) 18:06:54,361 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782) 18:06:54,362 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source) 18:06:54,362 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 18:06:54,363 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585) 18:06:54,363 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) 18:06:54,363 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) 18:06:54,364 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133) 18:06:54,364 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) 18:06:54,364 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142) 18:06:54,365 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) 18:06:54,365 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) 18:06:54,365 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) 18:06:54,366 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) 18:06:54,366 ERROR [STDERR] at $Proxy8.deploy(Unknown Source) 18:06:54,366 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421) 18:06:54,367 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610) 18:06:54,367 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263) 18:06:54,367 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274) 18:06:54,426 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
Still open for any ideas. I’m totally stuck.
Larry D. WilsonMemberInteresting update: I deployed my TestLog4J small application as exploded – not packaged, and deleted ../WEB-INF/lib/log4j.jar. That works fine – no errors:
08:51:14,210 INFO [STDOUT] hello from the page 08:51:14,212 INFO [index_jsp] hello from the logger!
Which implies it’s a jar conflict. What’s the “proper” way to add Log4J logging to JBoss? If I don’t specify Log4J in my build path, the application won’t compile. And, we have to deploy in production a package.
Thanks,
Larry
Scott AndersonParticipantLarry,
That’s good work running it down. So, it appears that JBoss “exports” a log4j library for your use in your web application (whether you want it or not, apparently). Good news though! Now that you’ve found the issue I think I have a solution. You’ll just need to move your log4j.jar file out of your WEB-INF/lib folder and into some other folder (or top-level) of your project. Then, add it back to the Java build path manually. Since it’s not in the WEB-INF/lib folder it won’t be deployed. So, compiling should work with the jar on the build path and logging should work at deployment since the jar won’t be included in the deployment.
More information on advanced deployment topics is in the Advanced section of the Working with web projects tutorial. If you have questions or problems about what can or can’t be deployed and how, it’s a really good read to find out what all your options are.
cgrudeckiMemberTo get this to work, you may have to change the settings for the MyEclipse-Web properties Deployment tab. Under Library Deployment Policies, “Jars on Web Project build-path” needs to be deselected to get this to work. If it’s selected, all jars in the build path will be deployed in the war, no matter where the location. If it’s deselected, only jars in the lib will be deployed to the war.
Where to change this option depends on your unique situation. You can change it right in this tab, and it will only apply to this project. There’s also an option to use the workbench default settings. If you click the hyperlink, you can modify the option for all projects. You’ll have to decide if it’s best to change the option for one project only, or at the workbench default level (for all projects).
Christine 😉
Scott AndersonParticipantChristine,
Excellent clarification! Thank you very much for the assistance. User help on the support forums is always greatly appreciated, especially when it’s both correct and well written like yours is. 🙂
If you want a part-time job answering questions here, just let us know. Seriously.
-
AuthorPosts