单个SSM框架
1、报LifecycleException,再配置一下jdk即可,然后再手动添加maven
解决方法:
然后,手动添加jar包
2、maven 项目,右键maven build启动项目的时候,报下面错误,没有在pom配置tomcat7插件
3、报找不到beans插件:更新一下项目就好
4、也许你运行的是jre而不是jdk ,并且报MojoExCeption,这时候就要配置jdk了,步骤如下
5、ClassNotFoundException,类找不到异常,通常是mapper.xml里,返回值数据类型或参数类型映射的实体类不对,还有就是tomcat下WEB-INF里少了jar包,右键项目properties,Deployment Assembly ,add,然后把Maven Dependencies添加,下步在eclipse部署项目,部署完后clean一下即可解决
解决方法:
6.报Unsupported major.minor version 52.0 (unable to load class com.platform.framework.web.SessionListener),先检查本地的JDK环境变量配了没有,输入java -version ,然后重启项目即可
7.报 org.apache.jasper.JasperException , /index,jsp not found 错误。
解决方法
(1)右键点击项目 build path---Add Libraries--Myeclipse Library 相当于把jstl的jar包加上了,点击finish
(2) 或者找到tomcat下的 webapps,把原来部署的项目删掉,从新部署再启动项目即可正常运行
8.报错提示:The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files;
就是当你在myeclipse引用了不同版本的JDK,解决方法是修改myeclipse工具prefenence的jdk版本为1.6即可
9.报找不到beans,或者无法读取文档,原因为 1) 无法找到文档; 2) 无法读取文档; 3) 文档的根元素不是,就是网络不好,在网络好的情况下重新启动项目即可
10.smm框架,调用mapper接口插入方法报空指针
解决办法:把接口的方法copy到另一个正常的mapper,xml中也对应sql也copy
11. 报XX属性在string没有getter属性,
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'business' in 'class java.lang.String'
解决办法:
检查,mapper.xml 条件入参是否有误,如 下,
select '${value}' || yycgdbm${business}.nextval bm from dual
12 报错 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): yycg.business.dao.mapper
经过查找为mapper.xml的id前面多了一个空格
13.ssm ,service业务实现类impl调用mapper接口报空指针,因为在业务实现类注入rmappe时没有加@Autowired 或其他注解
14ssm,查询报无效的列索引,模糊查询那应该用$符号而不是#号
15.报java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: Root WebApplicationContext: startup date [Sat Sep 26 11:19:55 CST 2020]; root of context hierarchy
解决办法;把pom里配置的内置tomcat去掉
16.报result Maps collection already contains value for yycg.base.dao.mapper.SysuserMapperCustom.mapper_resultMap[findMenuByroleidResultMap]_collection[menus]