com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column ‘price‘ in ‘field list‘

本文主要是介绍com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column ‘price‘ in ‘field list‘,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

错误是字段错误,其实我这里是以为我修改人家代码的时候没注意看,其实是表名忘记修改了!!

反正的意思就是【表 - 字段】不匹配的意思。

 

 

 

 

 

sql : com.mysql.jdbc.JDBC4PreparedStatement@4a3f7866:  UPDATE type SET code = '1', name = '2', price = 333888.0, author = 'aaa', pic = 'asda', publish = '1231', type = '12321'  WHERE id = '33433aff-c68c-4219-88f8-6310711a61bb' 
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'price' in 'field list'at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)at java.lang.reflect.Constructor.newInstance(Constructor.java:422)at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)at com.mysql.jdbc.Util.getInstance(Util.java:386)at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3609)at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3541)at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2002)at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624)at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127)at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2427)at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2345)at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2330)at ce.core.BaseDao.addUpdateDelete(BaseDao.java:104)at ce.dao.BookDaoImpl.update(BookDaoImpl.java:159)at ce.dao.BookDaoImpl.save(BookDaoImpl.java:200)at ce.service.BookServiceImpl.save(BookServiceImpl.java:53)at org.apache.jsp.book_005fsave_005faction_jsp._jspService(book_005fsave_005faction_jsp.java:119)at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:439)at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)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.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:316)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)
一月 06, 2021 11:44:10 上午 org.apache.catalina.core.StandardContext reload
信息: Reloading Context with name [/PrjBookMgrSys] has started
一月 06, 2021 11:44:10 上午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
严重: The web application [/PrjBookMgrSys] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
一月 06, 2021 11:44:10 上午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
一月 06, 2021 11:44:10 上午 org.apache.catalina.core.StandardContext reload
信息: Reloading Context with name [/PrjBookMgrSys] is completed
一月 06, 2021 11:44:10 上午 org.apache.catalina.loader.WebappClassLoaderBase loadClass
信息: Illegal access: this web application instance has been stopped already.  Could not load java.net.BindException.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateExceptionat org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1747)at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1705)at com.mysql.jdbc.SQLError.createLinkFailureMessageBasedOnHeuristics(SQLError.java:1276)at com.mysql.jdbc.exceptions.jdbc4.CommunicationsException.<init>(CommunicationsException.java:58)at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)at java.lang.reflect.Constructor.newInstance(Constructor.java:422)at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3364)at com.mysql.jdbc.MysqlIO.quit(MysqlIO.java:1708)at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4371)at com.mysql.jdbc.ConnectionImpl.cleanup(ConnectionImpl.java:1360)at com.mysql.jdbc.ConnectionImpl.finalize(ConnectionImpl.java:2728)at java.lang.System$2.invokeFinalize(System.java:1270)at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:98)at java.lang.ref.Finalizer.access$100(Finalizer.java:34)at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:210)一月 06, 2021 11:44:10 上午 org.apache.catalina.loader.WebappClassLoaderBase loadClass
信息: Illegal access: this web application instance has been stopped already.  Could not load com.mysql.jdbc.ProfilerEventHandlerFactory.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateExceptionat org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1747)at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1705)at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4395)at com.mysql.jdbc.ConnectionImpl.cleanup(ConnectionImpl.java:1360)at com.mysql.jdbc.ConnectionImpl.finalize(ConnectionImpl.java:2728)at java.lang.System$2.invokeFinalize(System.java:1270)at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:98)at java.lang.ref.Finalizer.access$100(Finalizer.java:34)at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:210)

 

这篇关于com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column ‘price‘ in ‘field list‘的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/644767

相关文章

Java中List的contains()方法的使用小结

《Java中List的contains()方法的使用小结》List的contains()方法用于检查列表中是否包含指定的元素,借助equals()方法进行判断,下面就来介绍Java中List的c... 目录详细展开1. 方法签名2. 工作原理3. 使用示例4. 注意事项总结结论:List 的 contain

MySQL双主搭建+keepalived高可用的实现

《MySQL双主搭建+keepalived高可用的实现》本文主要介绍了MySQL双主搭建+keepalived高可用的实现,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,... 目录一、测试环境准备二、主从搭建1.创建复制用户2.创建复制关系3.开启复制,确认复制是否成功4.同

MyBatis 动态 SQL 优化之标签的实战与技巧(常见用法)

《MyBatis动态SQL优化之标签的实战与技巧(常见用法)》本文通过详细的示例和实际应用场景,介绍了如何有效利用这些标签来优化MyBatis配置,提升开发效率,确保SQL的高效执行和安全性,感... 目录动态SQL详解一、动态SQL的核心概念1.1 什么是动态SQL?1.2 动态SQL的优点1.3 动态S

Mysql表的简单操作(基本技能)

《Mysql表的简单操作(基本技能)》在数据库中,表的操作主要包括表的创建、查看、修改、删除等,了解如何操作这些表是数据库管理和开发的基本技能,本文给大家介绍Mysql表的简单操作,感兴趣的朋友一起看... 目录3.1 创建表 3.2 查看表结构3.3 修改表3.4 实践案例:修改表在数据库中,表的操作主要

mysql出现ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘localhost‘ (10061)的解决方法

《mysql出现ERROR2003(HY000):Can‘tconnecttoMySQLserveron‘localhost‘(10061)的解决方法》本文主要介绍了mysql出现... 目录前言:第一步:第二步:第三步:总结:前言:当你想通过命令窗口想打开mysql时候发现提http://www.cpp

MySQL大表数据的分区与分库分表的实现

《MySQL大表数据的分区与分库分表的实现》数据库的分区和分库分表是两种常用的技术方案,本文主要介绍了MySQL大表数据的分区与分库分表的实现,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有... 目录1. mysql大表数据的分区1.1 什么是分区?1.2 分区的类型1.3 分区的优点1.4 分

MySQL错误代码2058和2059的解决办法

《MySQL错误代码2058和2059的解决办法》:本文主要介绍MySQL错误代码2058和2059的解决办法,2058和2059的错误码核心都是你用的客户端工具和mysql版本的密码插件不匹配,... 目录1. 前置理解2.报错现象3.解决办法(敲重点!!!)1. php前置理解2058和2059的错误

Mysql删除几亿条数据表中的部分数据的方法实现

《Mysql删除几亿条数据表中的部分数据的方法实现》在MySQL中删除一个大表中的数据时,需要特别注意操作的性能和对系统的影响,本文主要介绍了Mysql删除几亿条数据表中的部分数据的方法实现,具有一定... 目录1、需求2、方案1. 使用 DELETE 语句分批删除2. 使用 INPLACE ALTER T

MySQL INSERT语句实现当记录不存在时插入的几种方法

《MySQLINSERT语句实现当记录不存在时插入的几种方法》MySQL的INSERT语句是用于向数据库表中插入新记录的关键命令,下面:本文主要介绍MySQLINSERT语句实现当记录不存在时... 目录使用 INSERT IGNORE使用 ON DUPLICATE KEY UPDATE使用 REPLACE

MySQL Workbench 安装教程(保姆级)

《MySQLWorkbench安装教程(保姆级)》MySQLWorkbench是一款强大的数据库设计和管理工具,本文主要介绍了MySQLWorkbench安装教程,文中通过图文介绍的非常详细,对大... 目录前言:详细步骤:一、检查安装的数据库版本二、在官网下载对应的mysql Workbench版本,要是