总结原因如下: 1 目录webapp下没有web.xml文件

2 在serviceImpl层 或者 Controller层注解没写对或者没有写

3 导错包

4 比如 在Maven项目中 有一个拦截器(jar项目)  在另一个项目中要使用这个拦截器并且在(war)springmvc.xml 中也配置了拦截器,此时报错,原因是你没有把拦截器(jar项目)依赖进来,就像你说了有这个东西 没有说东西在哪

5 maven中被依赖的项目没有启动 比如A依赖B ,但是启动的时候你启动了A后启动了B ,会出现找不到依赖

<!-- 配置拦截器 --><mvc:interceptors><mvc:interceptor><!-- 需要拦截器的请求路径 --><mvc:mapping path="/**"/><!-- 实例化拦截器对象 --><bean class="com.e.ego.interceptor.UserInterceptor"></bean></mvc:interceptor></mvc:interceptors>

下图是:没有写@Autowired注解 和 没有web.xml

ServiceImpl层:

import java.util.List;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;import com.e.ego.manager.service.ManagerItemCatService;
import com.e.ego.rpc.service.TbItemCatService;
import com.e.entity.Tree;@Service
public class MnaagerItemCatServiceImpl implements ManagerItemCatService {//注入远程代理对象@Autowiredprivate TbItemCatService tbItemCatServiceProxy;public List<Tree> loadManagerItemCatListService(Long id) {return tbItemCatServiceProxy.loadTbItemCatListService(id);}}

Controller 层:

import java.util.List;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;import com.e.ego.manager.service.ManagerItemCatService;
import com.e.entity.Tree;@Controller
public class ManagerItemCatController {@Autowiredprivate ManagerItemCatService managerItemCatService;@RequestMapping("/item/cat/list")@ResponseBodypublic List<Tree> itemCatList(@RequestParam(defaultValue="0")Long id){return managerItemCatService.loadManagerItemCatListService(id);}}

                                                

出现这个错误 :严重Servlet.service() for servlet [springMVC] in context with path [/ssm] threw exception相关推荐

  1. 严重: Servlet.service() for servlet [springmvc] in context with path [/ssm02] threw exception

    希望有大佬帮忙解决!! 严重: Servlet.service() for servlet [springmvc] in context with path [/ssm02] threw except ...

  2. 严重: Servlet.service() for servlet [jsp] in context with path [/maven_test7] threw exception [Unable

    严重: Servlet.service() for servlet [jsp] in context with path [/maven_test7] threw exception [Unable ...

  3. Servlet.service() for servlet [jsp] in context with path [/loginWeb_mvc] threw exception

    这个错误,一般是jsp页面中的某个对象没获取到后台传来值,导致空指针,注意下判空后使用等.其他的问题遇到了再总结到这里. 三月 06, 2020 3:36:27 下午 org.apache.catal ...

  4. Servlet.service() for servlet jsp threw exception

    十月 15, 2022 3:26:36 下午 org.apache.catalina.core.ApplicationDispatcher invoke 严重: Servlet.service() f ...

  5. Java项目运行报异:严重: Servlet.service() for servlet [e3-manager] in context with path [] threw exception [R

    Java项目中运行报错,错误如下: 严重: Servlet.service() for servlet [e3-manager] in context with path [] threw excep ...

  6. 严重: Servlet.service() for servlet [springmvc] in context with path [] threw exception [Request proce

    报错信息: 严重: Servlet.service() for servlet [springmvc] in context with path [] threw exception [Request ...

  7. 严重: Servlet.service() for servlet jsp threw exception java.lang.NullPointerException

    在用maven管理的项目开发过程中,服务器我们用的是tomcat,有时候我们依赖的jar包会和tomcat自带的jar包起冲突,但是不加呢,jsp页面的<script>标签又会报红,虽然不 ...

  8. Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Filtered

    首先报错内容 2021-11-27 17:28:54.955 ERROR 6668 --- [nio-7399-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet ...

  9. SSH异常——严重:Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException

    严重: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: /userAdd.js ...

最新文章

  1. Koa 本地搭建 HTTPS 环境
  2. 产品定义到产品推广的思路
  3. JavaScript--jquery.min.js文件
  4. java中正则表达式并集_对Java中正则表达式的一些理解
  5. 模拟实现单链表(三级)
  6. global.php,global.php
  7. vanilla_如何在Vanilla JavaScript中操作DOM
  8. Python的multiprocessing多进程
  9. bzoj 1675: [Usaco2005 Feb]Rigging the Bovine Election 竞选划区(暴力)
  10. python正则表达式应用
  11. 2005/2006/2007/2008/2009/2010/2012/2013/2014/2015/2016/2017/2018/2019/2020高德poi 一级类别 二级类别
  12. PDF中加入HTML,将PDF导入/嵌入到HTML中(For PDF)
  13. 宿主机支持avx2指令集,为什么虚拟机cpu就不支持avx2指令集了
  14. Blender程序化建模简明教程【PCG】
  15. 街景影像分析入门(二)无需秘钥,抓取百度街景影像
  16. 旋转变换,变换后改变图片大小
  17. Mifare UltraLight
  18. mysql的乐观锁,悲观锁(共享锁,排斥锁)
  19. oracle 错误代码
  20. 双休和单休区别大吗?

热门文章

  1. 能耗监测系统在淼泉卫生院项目的应用
  2. uni-app之全局变量globalData的使用
  3. Groovy 操作符
  4. FD_SET,FD_ISSET这些函数意思
  5. JJWT 0.11.2使用,工具类
  6. 周慧敏如果不是玉女掌门 绝对是美女画家(图)
  7. graphviz可视化决策树安装配置
  8. 想学lammps不知如何下手——往这里看!!!
  9. KEIL工程报错问题解决记录
  10. Infraworks 使用问题总结