[Exception Javaweb 1]-Cause:com.microsoft.sqlserver.jdbc.SQLServerException: There is a syntax error near ' @P2 '.

Source: Internet
Author: User

Critical: Servlet.service () for Servlets [SPRINGMVC] in context with path [/exceptionmanagesystem] threw exception [Request proce Ssing failed;  Nested exception is org.springframework.jdbc.UncategorizedSQLException: # # # Error querying database. Cause:com.microsoft.sqlserver.jdbc.SQLServerException: There is a syntax error near ' @P2 '. # # # The error may exist in file [D:\Installer_Program\apache-tomcat-7.0.67\webapps\ExceptionManageSystem\WEB-INF\ classes\com\tongyan\ems\mapper\exceptionmapper.xml]### the error may involve com.tongyan.ems.mapper.exceptionmapper.findallorderby-inline### The error occurred while setting parameters### SQL: SELECT * FROM Ems_exception where exception_id+customer_code+exception_type+exception_up_time+equipment_name+ Equipment_model+exception_degree+exception_state like? ORDER by? # # # Cause:com.microsoft.sqlserver.jdbc.SQLServerException: syntax error near ' @P2 '.; Uncategorized SQLException for SQL []; SQL state [S0001]; Error code [102]; There is a syntax error near ' @P2 '.; Nested exception is Com.microsoft.sqlservEr.jdbc.SQLServerException: There is a syntax error near ' @P2 '.    ] with root causecom.microsoft.sqlserver.jdbc.SQLServerException: There is a syntax error near ' @P2 '. At Com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError (sqlserverexception.java:216) at Com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult (sqlserverstatement.java:1515) at Com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement ( sqlserverpreparedstatement.java:404) at com.microsoft.sqlserver.jdbc.sqlserverpreparedstatement$ Prepstmtexeccmd.doexecute (sqlserverpreparedstatement.java:350) at Com.microsoft.sqlserver.jdbc.TDSCommand.execute (iobuffer.java:5696) at Com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand (sqlserverconnection.java:1715) at Com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand (sqlserverstatement.java:180) at Com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement (sqlserverstatement.java:155) at Com.microsoft.sqlserver.jdbc.SQLServerPreparEdstatement.execute (sqlserverpreparedstatement.java:332) at Org.apache.commons.dbcp.DelegatingPreparedStatement.execute (delegatingpreparedstatement.java:172) at Org.apache.commons.dbcp.DelegatingPreparedStatement.execute (delegatingpreparedstatement.java:172) at SUN.REFLECT.NATIVEMETHODACCESSORIMPL.INVOKE0 (Native Method) at Sun.reflect.NativeMethodAccessorImpl.invoke ( nativemethodaccessorimpl.java:57) at Sun.reflect.DelegatingMethodAccessorImpl.invoke ( delegatingmethodaccessorimpl.java:43) at Java.lang.reflect.Method.invoke (method.java:606) at Org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke (preparedstatementlogger.java:62) at Com.sun.proxy. $Proxy 55.execute (Unknown Source) at Org.apache.ibatis.executor.statement.PreparedStatementHandler.query ( preparedstatementhandler.java:59) at Org.apache.ibatis.executor.statement.RoutingStatementHandler.query ( routingstatementhandler.java:73) at Org.apache.ibatis.executor.SimpleExecutor.doQuery (simpleexecutor. java:60) at Org.apache.ibatis.executor.BaseExecutor.queryFromDatabase (baseexecutor.java:267) at Org.apache.ibatis . Executor. Baseexecutor.query (baseexecutor.java:137) at Org.apache.ibatis.executor.CachingExecutor.query ( cachingexecutor.java:96) at Org.apache.ibatis.executor.CachingExecutor.query (cachingexecutor.java:77) at Org.apache.ibatis.session.defaults.DefaultSqlSession.selectList (defaultsqlsession.java:108) at Org.apache.ibatis.session.defaults.DefaultSqlSession.selectList (defaultsqlsession.java:102) at SUN.REFLECT.NATIVEMETHODACCESSORIMPL.INVOKE0 (Native Method) at Sun.reflect.NativeMethodAccessorImpl.invoke ( nativemethodaccessorimpl.java:57) at Sun.reflect.DelegatingMethodAccessorImpl.invoke ( delegatingmethodaccessorimpl.java:43) at Java.lang.reflect.Method.invoke (method.java:606) at Org.mybatis.spring.sqlsessiontemplate$sqlsessioninterceptor.invoke (sqlsessiontemplate.java:386) at Com.sun.proxy . $Proxy 17.selectList (Unknown Source) at Org.mybatis. Spring. Sqlsessiontemplate.selectlist (sqlsessiontemplate.java:205) at Org.apache.ibatis.binding.MapperMethod.executeForMany (mappermethod.java:119) at Org.apache.ibatis.binding.MapperMethod.execute (mappermethod.java:63) at Org.apache.ibatis.binding.MapperProxy.invoke (mapperproxy.java:52) at Com.sun.proxy. $Proxy 22.findAllOrderBy ( Unknown Source) at Com.tongyan.ems.dao.impl.ExceptionDaoImpl.findAll (exceptiondaoimpl.java:83) at COM.TONGYAN.EMS.D ao.impl.exceptiondaoimpl$ $FastClassBySpringCGLIB $$1f8a23c9.invoke (<generated>) at Org.springframework.cglib.proxy.MethodProxy.invoke (methodproxy.java:204) at Org.springframework.aop.framework.cglibaopproxy$dynamicadvisedinterceptor.intercept (CglibAopProxy.java:649) at com.tongyan.ems.dao.impl.exceptiondaoimpl$ $EnhancerBySpringCGLIB $$36e72a5b.findall (<generated>) at Com.tongyan.ems.service.impl.ExceptionServiceImpl.getExceptions (exceptionserviceimpl.java:90) at Com.tongyan.ems.controller.web.ExceptionControLler.getallexceptions (exceptioncontroller.java:87) at Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) At Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:57) at Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:43) at Java.lang.reflect.Method.invoke (method.java:606) at Org.springframework.web.method.support.InvocableHandlerMethod.doInvoke (invocablehandlermethod.java:221) at Org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest (invocablehandlermethod.java:137 ) at Org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle ( SERVLETINVOCABLEHANDLERMETHOD.JAVA:110) at Org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod ( requestmappinghandleradapter.java:777) at Org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal ( Requestmappinghandleradapter.java:706) at Org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle ( abstracthandlermethodadapter.java:85) at Org.springframework.web.servlet.DispatcherServlet.doDispatch ( dispatcherservlet.java:943) at Org.springframework.web.servlet.DispatcherServlet.doService ( dispatcherservlet.java:877) at Org.springframework.web.servlet.FrameworkServlet.processRequest (    frameworkservlet.java:966) at Org.springframework.web.servlet.FrameworkServlet.doPost (frameworkservlet.java:868) At Javax.servlet.http.HttpServlet.service (httpservlet.java:650) at Org.springframework.web.servlet.FrameworkServlet.service (frameworkservlet.java:842) at Javax.servlet.http.HttpServlet.service (httpservlet.java:731) at Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (applicationfilterchain.java:303) at Org.apache.catalina.core.ApplicationFilterChain.doFilter (applicationfilterchain.java:208) at Org.apache.tomcat.websocket.server.WsFilter.doFilter (Wsfilter.java:52) at Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (applicationfilterchain.java:241) At Org.apache.catalina.core.ApplicationFilterChain.doFilter (applicationfilterchain.java:208) at Org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal (characterencodingfilter.java:88) at Org.springframework.web.filter.OncePerRequestFilter.doFilter (onceperrequestfilter.java:107) at Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (applicationfilterchain.java:241) at Org.apache.catalina.core.ApplicationFilterChain.doFilter (applicationfilterchain.java:208) at Org.apache.catalina.core.StandardWrapperValve.invoke (standardwrappervalve.java:220) at Org.apache.catalina.core.StandardContextValve.invoke (standardcontextvalve.java:122) at Org.apache.catalina.authenticator.AuthenticatorBase.invoke (authenticatorbase.java:505) at Org.apache.catalina.core.StandardHostValve.invoke (standardhostvalve.java:169) at Org.apache.cataliNa.valves.ErrorReportValve.invoke (errorreportvalve.java:103) at Org.apache.catalina.valves.AccessLogValve.invoke (accesslogvalve.java:956) at Org.apache.catalina.core.StandardEngineValve.invoke (standardenginevalve.java:116) at Org.apache.catalina.connector.CoyoteAdapter.service (coyoteadapter.java:423) at Org.apache.coyote.http11.AbstractHttp11Processor.process (abstracthttp11processor.java:1079) at Org.apache.coyote.abstractprotocol$abstractconnectionhandler.process (abstractprotocol.java:625) at Org.apache.tomcat.util.net.jioendpoint$socketprocessor.run (jioendpoint.java:318) at Java.util.concurrent.ThreadPoolExecutor.runWorker (threadpoolexecutor.java:1145) at Java.util.concurrent.threadpoolexecutor$worker.run (threadpoolexecutor.java:615) at Org.apache.tomcat.util.threads.taskthread$wrappingrunnable.run (taskthread.java:61) at Java.lang.Thread.run ( thread.java:744)

[Exception Javaweb 1]-Cause:com.microsoft.sqlserver.jdbc.SQLServerException: There is a syntax error near ' @P2 '.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.