HTTP Status 500 - Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: StatementCallback; SQL [SELECT ENO,ENAME,JOB,SALARY FROM SPRING.EMPLOYEE]; Cannot determine value type from string 'adarsh'; nested exception is java.sql.SQLDataException: Cannot determine value type from string 'adarsh'
我正在使用mysql数据库而且我收到此错误
414 Jun 10, 2017 9:48:40 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
Jun 10, 2017 9:48:40 AM org.springframework.jdbc.support.SQLErrorCodesFactory <init>
INFO: SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase, Hana]
Jun 10, 2017 9:48:40 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [dispatcher] in context with path [/MVC2Containers] threw exception [Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: StatementCallback; SQL [SELECT ENO,ENAME,JOB,SALARY FROM SPRING.EMPLOYEE]; Cannot determine value type from string 'adarsh'; nested exception is java.sql.SQLDataException: Cannot determine value type from string 'adarsh'] with root cause
com.mysql.cj.core.exceptions.DataConversionException: Cannot determine value type from string 'adarsh'
at com.mysql.cj.core.io.StringConverter.createFromBytes(StringConverter.java:121)
at com.mysql.cj.core.io.MysqlTextValueDecoder.decodeByteArray(MysqlTextValueDecoder.java:233)
at com.mysql.cj.mysqla.result.ResultSetRow.decodeAndCreateReturnValue(ResultSetRow.java:128)
at com.mysql.cj.mysqla.result.ResultSetRow.getValueFromBytes(ResultSetRow.java:229)
at com.mysql.cj.mysqla.result.ByteArrayRow.getValue(ByteArrayRow.java:78)
at com.mysql.cj.jdbc.result.ResultSetImpl.getNonStringValueFromRow(ResultSetImpl.java:704)
at com.mysql.cj.jdbc.result.ResultSetImpl.getInt(ResultSetImpl.java:903)
at com.nt.dao.ListEmployeeDAOImpl$EmpRowMapper.extractData(ListEmployeeDAOImpl.java:53)
at com.nt.dao.ListEmployeeDAOImpl$EmpRowMapper.extractData(ListEmployeeDAOImpl.java:1)
at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:459)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:404)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:470)
at com.nt.dao.ListEmployeeDAOImpl.retrieveEmployee(ListEmployeeDAOImpl.java:41)
at com.nt.service.ListEmployeeServiceImpl.getAllEmployee(ListEmployeeServiceImpl.java:36)
at com.nt.controller.EmployeeController.handleRequestInternal(EmployeeController.java:29)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:147)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:50)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
nested exception is java.sql.SQLDataException: Cannot determine value type from string 'adarsh'
如何解决此错误?