Failed to convert value of type [java.lang.String] to required type [java.lang.Long]

落落酱 发布于 2016/09/19 10:23
阅读 3K+
收藏 0
2016-09-19 10:14:54.157 [http-nio-8080-exec-5] [DEBUG]  org.springframework.web.servlet.DispatcherServlet {DispatcherServlet.java:845} - DispatcherServlet with name 'spring-servlet' processing GET request for [/index]
2016-09-19 10:14:54.161 [http-nio-8080-exec-5] [DEBUG]  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping {AbstractHandlerMethodMapping.java:297} - Looking up handler method for path /index
2016-09-19 10:14:54.161 [http-nio-8080-exec-5] [DEBUG]  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping {AbstractHandlerMethodMapping.java:302} - Returning handler method [public java.lang.String com.xiangshi.wzc.devloper.pc.modules.index.IndexController.index()]
2016-09-19 10:14:54.162 [http-nio-8080-exec-5] [DEBUG]  org.springframework.beans.factory.support.DefaultListableBeanFactory {AbstractBeanFactory.java:248} - Returning cached instance of singleton bean 'indexController'
2016-09-19 10:14:54.162 [http-nio-8080-exec-5] [DEBUG]  org.springframework.web.servlet.DispatcherServlet {DispatcherServlet.java:931} - Last-Modified value for [/index] is: -1
2016-09-19 10:14:54.163 [http-nio-8080-exec-5] [DEBUG]  org.springframework.web.servlet.DispatcherServlet {DispatcherServlet.java:1225} - Rendering view [org.springframework.web.servlet.view.JstlView: name 'index'; URL [/WEB-INF/views/index.jsp]] in DispatcherServlet with name 'spring-servlet'
2016-09-19 10:14:54.165 [http-nio-8080-exec-5] [DEBUG]  org.springframework.web.servlet.view.JstlView {InternalResourceView.java:166} - Forwarding to resource [/WEB-INF/views/index.jsp] in InternalResourceView 'index'
2016-09-19 10:14:54.330 [http-nio-8080-exec-5] [DEBUG]  org.springframework.web.servlet.DispatcherServlet {FrameworkServlet.java:996} - Successfully completed request
2016-09-19 10:14:54.332 [http-nio-8080-exec-5] [DEBUG]  org.springframework.beans.factory.support.DefaultListableBeanFactory {AbstractBeanFactory.java:248} - Returning cached instance of singleton bean 'sqlSessionFactory'
2016-09-19 10:14:54.514 [http-nio-8080-exec-6] [DEBUG]  org.springframework.web.servlet.DispatcherServlet {DispatcherServlet.java:845} - DispatcherServlet with name 'spring-servlet' processing GET request for [/order/ExportAll]
2016-09-19 10:14:54.516 [http-nio-8080-exec-6] [DEBUG]  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping {AbstractHandlerMethodMapping.java:297} - Looking up handler method for path /order/ExportAll
2016-09-19 10:14:54.533 [http-nio-8080-exec-6] [DEBUG]  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping {AbstractHandlerMethodMapping.java:302} - Returning handler method [public org.springframework.web.servlet.ModelAndView com.xiangshi.wzc.basecore.web.controller.BaseControllerImpl.viewOne(java.lang.Long)]
2016-09-19 10:14:54.533 [http-nio-8080-exec-6] [DEBUG]  org.springframework.beans.factory.support.DefaultListableBeanFactory {AbstractBeanFactory.java:248} - Returning cached instance of singleton bean 'orderController'
2016-09-19 10:14:54.533 [http-nio-8080-exec-6] [DEBUG]  org.springframework.web.servlet.DispatcherServlet {DispatcherServlet.java:931} - Last-Modified value for [/order/ExportAll] is: -1
2016-09-19 10:14:54.538 [http-nio-8080-exec-6] [DEBUG]  org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver {AbstractHandlerExceptionResolver.java:134} - Resolving exception from handler [public org.springframework.web.servlet.ModelAndView com.xiangshi.wzc.basecore.web.controller.BaseControllerImpl.viewOne(java.lang.Long)]: org.springframework.beans.TypeMismatchException: Failed to convert value of type [java.lang.String] to required type [java.lang.Long]; nested exception is java.lang.NumberFormatException: For input string: "ExportAll"
2016-09-19 10:14:54.538 [http-nio-8080-exec-6] [DEBUG]  org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver {AbstractHandlerExceptionResolver.java:134} - Resolving exception from handler [public org.springframework.web.servlet.ModelAndView com.xiangshi.wzc.basecore.web.controller.BaseControllerImpl.viewOne(java.lang.Long)]: org.springframework.beans.TypeMismatchException: Failed to convert value of type [java.lang.String] to required type [java.lang.Long]; nested exception is java.lang.NumberFormatException: For input string: "ExportAll"
2016-09-19 10:14:54.539 [http-nio-8080-exec-6] [DEBUG]  org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver {AbstractHandlerExceptionResolver.java:134} - Resolving exception from handler [public org.springframework.web.servlet.ModelAndView com.xiangshi.wzc.basecore.web.controller.BaseControllerImpl.viewOne(java.lang.Long)]: org.springframework.beans.TypeMismatchException: Failed to convert value of type [java.lang.String] to required type [java.lang.Long]; nested exception is java.lang.NumberFormatException: For input string: "ExportAll"
2016-09-19 10:14:54.539 [http-nio-8080-exec-6] [DEBUG]  org.springframework.web.servlet.DispatcherServlet {DispatcherServlet.java:1018} - Null ModelAndView returned to DispatcherServlet with name 'spring-servlet': assuming HandlerAdapter completed request handling
2016-09-19 10:14:54.539 [http-nio-8080-exec-6] [DEBUG]  org.springframework.web.servlet.DispatcherServlet {FrameworkServlet.java:996} - Successfully completed request
2016-09-19 10:14:54.541 [http-nio-8080-exec-6] [DEBUG]  org.springframework.beans.factory.support.DefaultListableBeanFactory {AbstractBeanFactory.java:248} - Returning cached instance of singleton bean 'sqlSessionFactory'
2016-09-19 10:14:59.673 [http-nio-8080-exec-8] [DEBUG]  org.springframework.web.servlet.DispatcherServlet {DispatcherServlet.java:845} - DispatcherServlet with name 'spring-servlet' processing GET request for [/index]
2016-09-19 10:14:59.676 [http-nio-8080-exec-8] [DEBUG]  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping {AbstractHandlerMethodMapping.java:297} - Looking up handler method for path /index
2016-09-19 10:14:59.676 [http-nio-8080-exec-8] [DEBUG]  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping {AbstractHandlerMethodMapping.java:302} - Returning handler method [public java.lang.String com.xiangshi.wzc.devloper.pc.modules.index.IndexController.index()]
2016-09-19 10:14:59.676 [http-nio-8080-exec-8] [DEBUG]  org.springframework.beans.factory.support.DefaultListableBeanFactory {AbstractBeanFactory.java:248} - Returning cached instance of singleton bean 'indexController'
2016-09-19 10:14:59.677 [http-nio-8080-exec-8] [DEBUG]  org.springframework.web.servlet.DispatcherServlet {DispatcherServlet.java:931} - Last-Modified value for [/index] is: -1
2016-09-19 10:14:59.677 [http-nio-8080-exec-8] [DEBUG]  org.springframework.web.servlet.DispatcherServlet {DispatcherServlet.java:1225} - Rendering view [org.springframework.web.servlet.view.JstlView: name 'index'; URL [/WEB-INF/views/index.jsp]] in DispatcherServlet with name 'spring-servlet'
2016-09-19 10:14:59.679 [http-nio-8080-exec-8] [DEBUG]  org.springframework.web.servlet.view.JstlView {InternalResourceView.java:166} - Forwarding to resource [/WEB-INF/views/index.jsp] in InternalResourceView 'index'
2016-09-19 10:14:59.840 [http-nio-8080-exec-8] [DEBUG]  org.springframework.web.servlet.DispatcherServlet {FrameworkServlet.java:996} - Successfully completed request
2016-09-19 10:14:59.843 [http-nio-8080-exec-8] [DEBUG]  org.springframework.beans.factory.support.DefaultListableBeanFactory {AbstractBeanFactory.java:248} - Returning cached instance of singleton bean 'sqlSessionFactory'

以下是问题补充:

@落落酱:上面的报错行数,在实际文件里面是不存在的,求解。。。 (2016/09/19 10:41)
加载中
0
留给明天
留给明天
不存在,编译器怎么可能给你报错,仔细查查吧
落落酱
落落酱
我找到原因了。。。。我只是不会删帖子而已
0
刘意

楼主是怎么解决的啊?

落落酱
落落酱
好像是数据库跟自己的mapper里面类型不符合~时间有点久了,都忘了
返回顶部
顶部