ssm项目报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found),求教

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ssm项目报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found),求教相关的知识,希望对你有一定的参考价值。

ssm项目报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)在服务器端执行,the cube是Microsoft公司开发的服务器端脚本环境,可用来创建动态交互式网页并建立强大的web应用程序。

当服务器收到对ASP文件的请求时,它会处理包含在用于构建发送给浏览器的html网页文件中的服务器端脚本代码。除服务器端脚本代码外,ASP文件也可以包含文本、HTML和com组件调用。

扩展资料:

浏览器中显示的网页仅是静态的图文组合而已,浏览者可以在网页上阅读信息,但无法进一步地发表意见、查询信息或进行在线购物等商务活动。为此,人们提出了动态网页或交互网页的概念和解决方案。

所谓“动态网页”,是指客户端浏览器和Web服务器端可以互动,也就是服务器端可以实时处理浏览器端的请求,然后再将处理的结果作为对浏览器请求的响应(Response)传送给浏览器。

由于Web程序开发十分复杂,以至于要制作一个简单的动态页面也需要编写大量的C代码才能完成。于是Microsoft公司于1996年推出一种Web应用开发技术ASP,用于取代对Web服务器进行可编程扩展的CGI标准。

参考技术A mapper.xml文件可能有问题。配置要小心。看看你mapper中的名称和包中的名称一致吗

记录一些遇见的bug——项目启动报错org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.e

记录一些遇见的bug——项目启动报错org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.ExecutorException: Error preparing statement. Cause: java.lang.NullPointerException


)

一、问题描述

报错截图:


错误代码:

line 1:32 no viable alternative at input 'desc'
line 1:32 mismatched input 'desc' expecting '!', '~', '+', '-', '.', '(', '', '?', '@', TRUNCATE, POSITION, VIEW, VALUES, CASE, CAST, TRIM, SUBSTRING, LEFT, RIGHT, IF, NOT, NULL, TRUE, FALSE, EXISTS, ANY, OFFSET, BEGIN, COMMIT, ROLLBACK, SAVEPOINT, BOOLEAN, CHAR, INTERVAL, DATE, TIME, TIMESTAMP, LOCALTIME, LOCALTIMESTAMP, YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, SECOND, MICROSECOND, MAX, MIN, SUM, COUNT, AVG, CURRENT, ENABLE, DISABLE, INSTANCE, DO, DEFINER, CASCADED, LOCAL, CLOSE, OPEN, NEXT, NAME, TYPE, DATABASE, TABLES, TABLESPACE, COLUMNS, FIELDS, INDEXES, STATUS, REPLACE, MODIFY, VALUE, DUPLICATE, FIRST, LAST, AFTER, OJ, MOD, ACCOUNT, USER, ROLE, START, TRANSACTION, ROW, WITHOUT, BINARY, ESCAPE, SUBPARTITION, STORAGE, SUPER, SUBSTR, TEMPORARY, THAN, UNBOUNDED, SIGNED, UPGRADE, VALIDATION, ROLLUP, SOUNDS, UNKNOWN, OFF, ALWAYS, COMMITTED, LEVEL, NO, PASSWORD, PRIVILEGES, ACTION, ALGORITHM, AUTOCOMMIT, BTREE, CHAIN, CHARSET, CHECKSUM, CIPHER, CLIENT, COALESCE, COMMENT, COMPACT, COMPRESSED, COMPRESSION, CONNECTION, CONSISTENT, CONVERT, DATA, DISCARD, DISK, ENCRYPTION, END, ENGINE, EVENT, EXCHANGE, EXECUTE, EXTRACT, FILE, FIXED, FOLLOWING, GLOBAL, HASH, IMPORT_, LESS, MATCH, MEMORY, NONE, NOW, PARSER, PARTIAL, PARTITIONING, PERSIST, PRECEDING, PROCESS, PROXY, QUICK, REBUILD, REDUNDANT, RELOAD, REMOVE, REORGANIZE, REPAIR, REVERSE, SESSION, SHUTDOWN, SIMPLE, SLAVE, VISIBLE, INVISIBLE, ENFORCED, AGAINST, LANGUAGE, MODE, QUERY, EXTENDED, EXPANSION, VARIANCE, MAX_ROWS, MIN_ROWS, SQL_BIG_RESULT, SQL_BUFFER_RESULT, SQL_CACHE, SQL_NO_CACHE, STATS_AUTO_RECALC, STATS_PERSISTENT, STATS_SAMPLE_PAGES, ROW_FORMAT, WEIGHT_STRING, COLUMN_FORMAT, INSERT_METHOD, KEY_BLOCK_SIZE, PACK_KEYS, PERSIST_ONLY, BIT_AND, BIT_OR, BIT_XOR, GROUP_CONCAT, JSON_ARRAYAGG, JSON_OBJECTAGG, STD, STDDEV, STDDEV_POP, STDDEV_SAMP, VAR_POP, VAR_SAMP, AUTO_INCREMENT, AVG_ROW_LENGTH, DELAY_KEY_WRITE, CURRENT_TIMESTAMP, ROTATE, MASTER, BINLOG, ERROR, SCHEDULE, COMPLETION, EVERY, HOST, SOCKET, PORT, SERVER, WRAPPER, OPTIONS, OWNER, RETURNS, CONTAINS, SECURITY, INVOKER, TEMPTABLE, MERGE, UNDEFINED, DATAFILE, FILE_BLOCK_SIZE, EXTENT_SIZE, INITIAL_SIZE, AUTOEXTEND_SIZE, MAX_SIZE, NODEGROUP, WAIT, LOGFILE, UNDOFILE, UNDO_BUFFER_SIZE, REDO_BUFFER_SIZE, HANDLER, PREV, ORGANIZATION, DEFINITION, DESCRIPTION, REFERENCE, FOLLOWS, PRECEDES, IMPORT, CONCURRENT, XML, DUMPFILE, SHARE, CODE, CONTEXT, SOURCE, CHANNEL, CLONE, AGGREGATE, INSTALL, COMPONENT, UNINSTALL, RESOURCE, EXPIRE, NEVER, HISTORY, OPTIONAL, REUSE, MAX_QUERIES_PER_HOUR, MAX_UPDATES_PER_HOUR, MAX_CONNECTIONS_PER_HOUR, MAX_USER_CONNECTIONS, RETAIN, RANDOM, OLD, ISSUER, SUBJECT, CACHE, GENERAL, SLOW, USER_RESOURCES, EXPORT, RELAY, HOSTS, FLUSH, RESET, RESTART, UNIX_TIMESTAMP, LOWER, UPPER, ADDDATE, ADDTIME, DATE_ADD, DATE_SUB, DATEDIFF, DATE_FORMAT, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, STR_TO_DATE, TIMEDIFF, TIMESTAMPADD, TIMESTAMPDIFF, TIME_FORMAT, TIME_TO_SEC, AES_DECRYPT, AES_ENCRYPT, FROM_BASE64, TO_BASE64, GEOMCOLLECTION, GEOMETRYCOLLECTION, LINESTRING, MULTILINESTRING, MULTIPOINT, MULTIPOLYGON, POINT, POLYGON, ST_AREA, ST_ASBINARY, ST_ASGEOJSON, ST_ASTEXT, ST_ASWKB, ST_ASWKT, ST_BUFFER, ST_BUFFER_STRATEGY, ST_CENTROID, ST_CONTAINS, ST_CONVEXHULL, ST_CROSSES, ST_DIFFERENCE, ST_DIMENSION, ST_DISJOINT, ST_DISTANCE, ST_DISTANCE_SPHERE, ST_ENDPOINT, ST_ENVELOPE, ST_EQUALS, ST_EXTERIORRING, ST_GEOHASH, ST_GEOMCOLLFROMTEXT, ST_GEOMCOLLFROMTXT, ST_GEOMCOLLFROMWKB, ST_GEOMETRYCOLLECTIONFROMTEXT, ST_GEOMETRYCOLLECTIONFROMWKB, ST_GEOMETRYFROMTEXT, ST_GEOMETRYFROMWKB, ST_GEOMETRYN, ST_GEOMETRYTYPE, ST_GEOMFROMGEOJSON, ST_GEOMFROMTEXT, ST_GEOMFROMWKB, ST_INTERIORRINGN, ST_INTERSECTION, ST_INTERSECTS, ST_ISCLOSED, ST_ISEMPTY, ST_ISSIMPLE, ST_ISVALID, ST_LATFROMGEOHASH, ST_LATITUDE, ST_LENGTH, ST_LINEFROMTEXT, ST_LINEFROMWKB, ST_LINESTRINGFROMTEXT, ST_LINESTRINGFROMWKB, ST_LONGFROMGEOHASH, ST_LONGITUDE, ST_MAKEENVELOPE, ST_MLINEFROMTEXT, ST_MLINEFROMWKB, ST_MULTILINESTRINGFROMTEXT, ST_MULTILINESTRINGFROMWKB, ST_MPOINTFROMTEXT, ST_MPOINTFROMWKB, ST_MULTIPOINTFROMTEXT, ST_MULTIPOINTFROMWKB, ST_MPOLYFROMTEXT, ST_MPOLYFROMWKB, ST_MULTIPOLYGONFROMTEXT, ST_MULTIPOLYGONFROMWKB, ST_NUMGEOMETRIES, ST_NUMINTERIORRING, ST_NUMINTERIORRINGS, ST_NUMPOINTS, ST_OVERLAPS, ST_POINTFROMGEOHASH, ST_POINTFROMTEXT, ST_POINTFROMWKB, ST_POINTN, ST_POLYFROMTEXT, ST_POLYFROMWKB, ST_POLYGONFROMTEXT, ST_POLYGONFROMWKB, ST_SIMPLIFY, ST_SRID, ST_STARTPOINT, ST_SWAPXY, ST_SYMDIFFERENCE, ST_TOUCHES, ST_TRANSFORM, ST_UNION, ST_VALIDATE, ST_WITHIN, ST_X, ST_Y, IO_THREAD, SQL_THREAD, SQL_BEFORE_GTIDS, SQL_AFTER_GTIDS, MASTER_LOG_FILE, MASTER_LOG_POS, RELAY_LOG_FILE, RELAY_LOG_POS, SQL_AFTER_MTS_GAPS, UNTIL, DEFAULT_AUTH, PLUGIN_DIR, STOP, IDENTIFIER_, STRING_, NUMBER_, HEX_DIGIT_, BIT_NUM_
2022-09-17 10:44:03.005  INFO 19464 --- [           main] ConditionEvaluationReportLoggingListener : 
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-09-17 10:44:03.275  INFO 19464 --- [           main] c.a.c.n.registry.NacosServiceRegistry    : De-registering from Nacos Server now...
2022-09-17 10:44:03.282  INFO 19464 --- [           main] c.a.c.n.registry.NacosServiceRegistry    : De-registration finished.
2022-09-17 10:44:15.381  INFO 19464 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Shutting down ExecutorService 'applicationTaskExecutor'
2022-09-17 10:44:15.384  INFO 19464 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
2022-09-17 10:44:15.389  INFO 19464 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.
2022-09-17 10:44:15.390  INFO 19464 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-2 - Shutdown initiated...
2022-09-17 10:44:15.391  INFO 19464 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-2 - Shutdown completed.
2022-09-17 10:44:15.420 ERROR 19464 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.ExecutorException: Error preparing statement.  Cause: java.lang.NullPointerException
	at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:92) ~[mybatis-spring-2.0.5.jar:2.0.5]
	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440) ~[mybatis-spring-2.0.5.jar:2.0.5]
	at com.sun.proxy.$Proxy89.selectList(Unknown Source) ~[na:na]
	at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:223) ~[mybatis-spring-2.0.5.jar:2.0.5]
	at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.executeForMany(MybatisMapperMethod.java:173) ~[mybatis-plus-core-3.4.0.jar:3.4.0]
	at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:78) ~[mybatis-plus-core-3.4.0.jar:3.4.0]
	at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148) ~[mybatis-plus-core-3.4.0.jar:3.4.0]
	at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89) ~[mybatis-plus-core-3.4.0.jar:3.4.0]
	at com.sun.proxy.$Proxy92.selectList(Unknown Source) ~[na:na]
	at com.example.config.SimpleApplicationStartedEventListener.onApplicationEvent(SimpleApplicationStartedEventListener.java:25) ~[classes/:na]
	at com.example.config.SimpleApplicationStartedEventListener.onApplicationEvent(SimpleApplicationStartedEventListener.java:14) ~[classes/:na]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.2.12.RELEASE.jar:5.2.12.RELEASE]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.2.12.RELEASE.jar:5.2.12.RELEASE]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.2.12.RELEASE.jar:5.2.12.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:404) ~[spring-context-5.2.12.RELEASE.jar:5.2.12.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:361) ~[spring-context-5.2.12.RELEASE.jar:5.2.12.RELEASE]
	at org.springframework.boot.context.event.EventPublishingRunListener.started(EventPublishingRunListener.java:102) ~[spring-boot-2.3.7.RELEASE.jar:2.3.7.RELEASE]
	at org.springframework.boot.SpringApplicationRunListeners.started(SpringApplicationRunListeners.java:71) ~[spring-boot-2.3.7.RELEASE.jar:2.3.7.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:321) [spring-boot-2.3.7.RELEASE.jar:2.3.7.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) [spring-boot-2.3.7.RELEASE.jar:2.3.7.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.3.7.RELEASE.jar:2.3.7.RELEASE]
	at com.example.AuthServiceApplication.main(AuthServiceApplication.java:14) [classes/:na]
Caused by: org.apache.ibatis.executor.ExecutorException: Error preparing statement.  Cause: java.lang.NullPointerException
	at org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:97) ~[mybatis-3.5.5.jar:3.5.5]
	at org.apache.ibatis.executor.statement.RoutingStatementHandler.prepare(RoutingStatementHandler.java:59) ~[mybatis-3.5.5.jar:3.5.5]
	at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.prepareStatement(MybatisSimpleExecutor.java:94) ~[mybatis-plus-core-3.4.0.jar:3.4.0]
	at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doQuery(MybatisSimpleExecutor.java:68) ~[mybatis-plus-core-3.4.0.jar:3.4.0]
	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325) ~[mybatis-3.5.5.jar:3.5.5]
	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156) ~[mybatis-3.5.5.jar:3.5.5]
	at com.baomidou.mybatisplus.core.executor.MybatisCachingExecutor.query(MybatisCachingExecutor.java:165) ~[mybatis-plus-core-3.4.0.jar:3.4.0]
	at com.baomidou.mybatisplus.core.executor.MybatisCachingExecutor.query(MybatisCachingExecutor记录一些遇见的bug——项目启动报错org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.e

记录一些遇见的bug——项目启动报错org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.e

SSM整合junit单元测试之org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):(示例代码

ssm 出现 Method threw 'org.apache.ibatis.binding.BindingException' exception.Invalid bound sta

项目依赖问题导致No qualifying bean of type 'org.apache.ibatis.session.SqlSessionFactory' available:

项目依赖问题导致No qualifying bean of type 'org.apache.ibatis.session.SqlSessionFactory' available: