HTTP Status 500 - Requestprocessing failed; nested exception isorg.mybatis.spring.MyBatisSystemException: nested exception isorg.apache.ibatis.builder.BuilderException: Error evaluating expression'condition.bumen.Bid != null and condition.bumen.Bid !=-1 '. Cause:org.apache.ibatis.ognl.OgnlException: source is null for getProperty(null,"Bid")
type Exception report
message Request processing failed; nestedexception is org.mybatis.spring.MyBatisSystemException: nested exception isorg.apache.ibatis.builder.BuilderException: Error evaluating expression'condition.bumen.Bid != null and condition.bumen.Bid !=-1 '. Cause: org.apache.ibatis.ognl.OgnlException:source is null for getProperty(null, "Bid")
description The server encountered aninternal error that prevented it from fulfilling this request.
exception
org.springframework.web.util.NestedServletException:Request processing failed; nested exception isorg.mybatis.spring.MyBatisSystemException: nested exception isorg.apache.ibatis.builder.BuilderException: Error evaluating expression'condition.bumen.Bid != null and condition.bumen.Bid !=-1 '. Cause: org.apache.ibatis.ognl.OgnlException:source is null for getProperty(null, "Bid")
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:965)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
root cause
org.mybatis.spring.MyBatisSystemException:nested exception is org.apache.ibatis.builder.BuilderException: Errorevaluating expression 'condition.bumen.Bid != null and condition.bumen.Bid !=-1'. Cause: org.apache.ibatis.ognl.OgnlException: source is null forgetProperty(null, "Bid")
org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:79)
org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:447)
com.sun.proxy.$Proxy7.selectOne(UnknownSource)
org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:167)
org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:82)
org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53)
com.sun.proxy.$Proxy16.getConditionCount(UnknownSource)
org.HR.biz.impl.perdonnelsBizImpl.getConditionCount(perdonnelsBizImpl.java:85)
org.HR.controller.perdonnelsController.getAll(perdonnelsController.java:210)
sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:606)
org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:743)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:672)
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:82)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:919)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
该题的解决方案为:
1.在实体类中看intager int ,intager允许为空,int不能为空 (可能会出现的情况 查询全部时出来页面不出数据,必须点击查询 才出数据)
2.实体类中没有new 一个实体类
Eg: public bumen bumen; 错
Publicbumen bumen =new bumen(); 对
Requestprocessing failed; nested exception isorg.mybatis.spring.MyBatisSystemException
最新推荐文章于 2024-10-10 14:31:33 发布