SSH框架搭建的问题---- java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z

rg.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.<clinit>(NullableType.java:31)
 at org.hibernate.Hibernate.<clinit>(Hibernate.java:78)
 at org.hibernate.type.TypeFactory.<clinit>(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.<clinit>(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)


jar包冲突

 

log4j.jar

log4j-1.2.15.jar

log4j-1.2.11.jar

 

删掉低版本的

删掉log4j-1.2.11.jar之后Ok

你可能感兴趣的:(log4j,ssh)