NoSuchMethod Error
m4ttr opened this issue · 2 comments
in my log4j.xml when I configure the layout I get
ERROR [AbstractKernelController] Error installing to Create: name=jboss:service=WebService state=Configured mode=Manual requiredState=Create
java.lang.NoSuchMethodError: org.apache.log4j.spi.LoggingEvent.getTimeStamp()J
at net.logstash.log4j.JSONEventLayout.format(JSONEventLayout.java:50)
at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:301)
at org.apache.log4j.DailyRollingFileAppender.subAppend(DailyRollingFileAppender.java:358)
Upon startup.
Im using log4j 1.2
I got the recent clone and using openjdk 7, mvn install; this is the recent stack trace
ERROR [AbstractKernelController] Error installing to Create: name=j
boss.system:service=Logging,type=Log4jService state=Configured mode=Manual requi
redState=Create
java.lang.NoClassDefFoundError: org/apache/commons/lang/time/FastDateFormat
at net.logstash.log4j.JSONEventLayout.(JSONEventLayout.java:33)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:357)
at java.lang.Class.newInstance(Class.java:310)
at org.apache.log4j.xml.DOMConfigurator.parseLayout(DOMConfigurator.java
:455)
EDIT: Closing
Jboss uses a old version of Log4j. in addition I was able to resolve the org/apache/commons problem by loading the org.apache.lang.time classes. Users in JBoss might have issues with newer version where as Tomcat users will not
I am seeing the same issue right now :
2015-02-18 15:37:59,498 ERROR [localhost-startStop-1] [org.apache.tomcat.util.digester.Digester] [ ()@] -
java.lang.NoSuchMethodError: org.apache.commons.lang.time.FastDateFormat.format(J)Ljava/lang/String;
at net.logstash.log4j.JSONEventLayoutV1.dateFormat(JSONEventLayoutV1.java:42)
at net.logstash.log4j.JSONEventLayoutV1.format(JSONEventLayoutV1.java:78)
at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:310)
at biz.minaret.log4j.DatedFileAppender.append(DatedFileAppender.java:324)
at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
at org.apache.log4j.Category.callAppenders(Category.java:206)
at org.apache.log4j.Category.forcedLog(Category.java:391)
at org.apache.log4j.Category.log(Category.java:856)
at org.apache.juli.logging.impl.Log4JLogger.info(Log4JLogger.java:176)
at org.apache.catalina.startup.TaglibUriRule.body(TldRuleSet.java:149)
at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1030)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLNSDTDValidator.endNamespaceScope(XMLNSDTDValidator.java:266)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.java:2005)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:879)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1781)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2957)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
at org.apache.catalina.startup.TldConfig.tldScanStream(TldConfig.java:537)
at org.apache.catalina.startup.TldConfig.tldScanJar(TldConfig.java:492)
at org.apache.catalina.startup.TldConfig.access$100(TldConfig.java:61)
at org.apache.catalina.startup.TldConfig$TldJarScannerCallback.scan(TldConfig.java:293)
at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:259)
at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:178)
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:266)
at org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:562)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5343)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Look like some kind of "common-lang" library conflict?