本文主要是介绍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‘的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!