[jboss-user] [Installation, Configuration & Deployment] - question about log4j
computer8080
do-not-reply at jboss.com
Mon Jan 15 21:08:45 EST 2007
I got 2 question about log4j, i using eclips lomboz as development environment.
1) i using the log4j inside jboss currently and when i change the threshold param to DEBUG in log4j.xml inside jboss as below;
<!-- The default pattern: Date Priority [Category] Message\n -->
<!--param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/-->
<!--param name="ConversionPattern" value="%d %-5p %x [%c{1}][%M][%L] %m%n" /-->
i will get the following error when i start the server,
2007-01-16 09:48:51,390 DEBUG [PersistenceManager] Could not create table with SQL: CREATE CACHED TABLE JMS_MESSAGES ( MESSAGEID INTEGER NOT NULL, DESTINATION VARCHAR(255) NOT NULL, TXID INTEGER, TXOP CHAR(1), MESSAGEBLOB OBJECT, PRIMARY KEY (MESSAGEID, DESTINATION) )
java.sql.SQLException: Table already exists: JMS_MESSAGES in statement [CREATE CACHED TABLE JMS_MESSAGES]
at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.executeUpdate(Unknown Source)
at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:227)
at org.jboss.mq.pm.jdbc2.PersistenceManager.createSchema(PersistenceManager.java:240)
at org.jboss.mq.pm.jdbc2.PersistenceManager.startService(PersistenceManager.java:1491)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:428)
at org.jboss.system.ServiceController.start(ServiceController.java:446)
at org.jboss.system.ServiceController.start(ServiceController.java:446)
at org.jboss.system.ServiceController.start(ServiceController.java:446)
at org.jboss.system.ServiceController.start(ServiceController.java:446)
at org.jboss.system.ServiceController.start(ServiceController.java:446)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.JMXInvocationHandler.invoke(JMXInvocationHandler.java:273)
at $Proxy38.start(Unknown Source)
at org.jboss.deployment.XSLSubDeployer.start(XSLSubDeployer.java:185)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:265)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:428)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:453)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:330)
at org.jboss.Main.boot(Main.java:187)
at org.jboss.Main$1.run(Main.java:438)
at java.lang.Thread.run(Thread.java:534)
2) Can i use log4j.jar in my own application instead of using log4j.jar in the jboss? Because my application always point to the log4j in jboss even though i import my own log4j inside the application (put the jar inside WEB-INF\lib). And it will throw the error as below
2007-01-16 10:06:03,109 INFO [STDOUT] log4j:ERROR A "org.jboss.logging.util.OnlyOnceErrorHandler" object is not assignable to a "org.apache.log4j.spi.ErrorHandler" variable.
2007-01-16 10:06:03,109 INFO [STDOUT] log4j:ERROR The class "org.apache.log4j.spi.ErrorHandler" was loaded by
2007-01-16 10:06:03,109 INFO [STDOUT] log4j:ERROR [WebappClassLoader
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
java.net.FactoryURLClassLoader at 7b5617
] whereas object of type
2007-01-16 10:06:03,109 INFO [STDOUT] log4j:ERROR "org.jboss.logging.util.OnlyOnceErrorHandler" was loaded by [org.jboss.system.server.NoAnnotationURLClassLoader at 6e1408].
2007-01-16 10:06:03,156 INFO [STDOUT] log4j:ERROR Could not create an Appender. Reported error follows.
2007-01-16 10:06:03,156 INFO [STDOUT] java.lang.ClassCastException
2007-01-16 10:06:03,156 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:165)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:140)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:153)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:415)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:384)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:783)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:666)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:616)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:602)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:460)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.apache.log4j.LogManager.(LogManager.java:113)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.apache.log4j.Logger.getLogger(Logger.java:94)
2007-01-16 10:06:03,156 INFO [STDOUT] at rms.common.util.WebAppListener.(WebAppListener.java:12)
2007-01-16 10:06:03,156 INFO [STDOUT] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
2007-01-16 10:06:03,156 INFO [STDOUT] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
2007-01-16 10:06:03,156 INFO [STDOUT] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
2007-01-16 10:06:03,156 INFO [STDOUT] at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
2007-01-16 10:06:03,156 INFO [STDOUT] at java.lang.Class.newInstance0(Class.java:308)
2007-01-16 10:06:03,156 INFO [STDOUT] at java.lang.Class.newInstance(Class.java:261)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3618)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
2007-01-16 10:06:03,156 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2007-01-16 10:06:03,156 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2007-01-16 10:06:03,156 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2007-01-16 10:06:03,156 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.apache.catalina.core.StandardContext.init(StandardContext.java:5005)
2007-01-16 10:06:03,156 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2007-01-16 10:06:03,156 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2007-01-16 10:06:03,156 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2007-01-16 10:06:03,156 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:280)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:88)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:357)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.web.WebModule.startModule(WebModule.java:68)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.web.WebModule.startService(WebModule.java:46)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
2007-01-16 10:06:03,156 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
2007-01-16 10:06:03,156 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2007-01-16 10:06:03,156 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
2007-01-16 10:06:03,156 INFO [STDOUT] at $Proxy0.start(Unknown Source)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.system.ServiceController.start(ServiceController.java:428)
2007-01-16 10:06:03,156 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
2007-01-16 10:06:03,156 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2007-01-16 10:06:03,156 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
2007-01-16 10:06:03,156 INFO [STDOUT] at $Proxy30.start(Unknown Source)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:400)
2007-01-16 10:06:03,156 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2007-01-16 10:06:03,156 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2007-01-16 10:06:03,156 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2007-01-16 10:06:03,156 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
2007-01-16 10:06:03,156 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
Anyone can help on this? Thanks you very much.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4002055#4002055
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4002055
More information about the jboss-user
mailing list