java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z错误

008-8-21 13:22:26 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet jsp threw exception
java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z
 at org.slf4j.impl.Log4jLoggerAdapter.isTraceEnabled(Log4jLoggerAdapter.java:81)
 at org.apache.commons.logging.impl.SLF4JLocationAwareLog.isTraceEnabled(SLF4JLocationAwareLog.java:61)
 at org.hibernate.type.NullableType.(NullableType.java:31)
 at org.hibernate.Hibernate.(Hibernate.java:78)
 at org.hibernate.type.TypeFactory.(TypeFactory.java:47)
 at org.hibernate.mapping.ManyToOne.getType(ManyToOne.java:26)
 at org.hibernate.mapping.ManyToOne.createForeignKey(ManyToOne.java:39)
 at org.hibernate.cfg.HbmBinder.createProperty(HbmBinder.java:2158)
 at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2115)
 at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2005)
 at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:368)
 at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:282)
 at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:153)
 at org.hibernate.cfg.Configuration.add(Configuration.java:386)
 at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:427)
 at org.hibernate.cfg.Configuration.addResource(Configuration.java:482)
 at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1465)
 at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1433)
 at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1414)
 at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1390)
 at org.hibernate.cfg.Configuration.configure(Configuration.java:1310)
 at com.util.HibernateSessionFactory.(HibernateSessionFactory.java:30)
 at com.util.BaseHibernateDAO.getSession(BaseHibernateDAO.java:13)
 at com.dao.SortpDAO.getAllSort(SortpDAO.java:39)
 at org.apache.jsp.index_jsp._jspService(index_jsp.java:96)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 at java.lang.Thread.run(Thread.java:619)

解决方案:

log4j包有冲突,删去了一个低版本的就可以了!!!

你可能感兴趣的:(Java_Web)