Spring 常见错误记录!

常见错误

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0' defined in class path resource [spring-mybatis.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/ibatis/session/SqlSession

不用看了,去配置你的pom文件吧
看是否有如下配置,并且加载成功了!



org.mybatis
mybatis
3.4.2

IDEA 2016 新建Spring找不到 Create project from template?如何新建Spring工程

java.lang.NullPointerException
org.apache.jsp.WEB_002dINF.jsp.hello_jsp._jspInit(hello_jsp.java:22)
org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:164)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:340)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:321)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:168)
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1243)
org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1027)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:971)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:969)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:860)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:845)
javax.servlet.http.HttpServlet.service(HttpServlet.java:723)

这个错误的原因参考
http://stackoverflow.com/questions/4886196/java-lang-nullpointerexception-at-org-apache-jsp-foo-jsp-jspinitfoo-jsp-java2
http://stackoverflow.com/questions/4886196/java-lang-nullpointerexception-at-org-apache-jsp-foo-jsp-jspinitfoo-jsp-java2/4886595#4886595

我的解决方法很简单:把Tomcat 6 缓存tomcat 7或者8 就好了!!!

你可能感兴趣的:(Spring 常见错误记录!)