09:22:13,706 WARN org.hibernate.util.JDBCExceptionReporter:100 - SQL Error: 1064, SQLState: 42000
09:22:13,707 ERROR org.hibernate.util.JDBCExceptionReporter:101 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'index, name, nodeID) values (1, 'C:', 2)' at line 1
Exception in thread "AWT-EventQueue-0" org.hibernate.exception.SQLGrammarException: could not insert: [com.xiong.model.Leaf]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:64)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2176)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2656)
at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:71)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:321)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:130)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)
at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)
at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:563)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:551)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:547)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:342)
at $Proxy11.save(Unknown Source)
at com.xiong.test.TryTree.saveUser(TryTree.java:699)
at com.xiong.test.TryTree.insertValue(TryTree.java:711)
at com.xiong.test.TryTree$MyToolBarButtonListener.actionPerformed(TryTree.java:322)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6216)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at java.awt.Component.processEvent(Component.java:5981)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4583)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4413)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4556)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4220)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4150)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2475)
at java.awt.Component.dispatchEvent(Component.java:4413)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'index, name, nodeID) values (1, 'C:', 2)' at line 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2941)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3249)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1268)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1541)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1455)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1440)
at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:94)
at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:57)
... 49 more
上述原因是因为,数据库中不存在对应的表,那么原因就是未创建,什么情况下未创建呢。就是当语句不对或者你的创建表的语句中含有关键字,这样一来就创建不成功了。但我们是hibernate来创建的,那么语句的愈发应该没问题,那么只剩下关键字的问题了,或者某个字段的名起冲突,或者表名起冲突。反正自己试着改正就行了。
分享到:
相关推荐
check the manual that corresponds to your MySQL server version for the right syntax to use near ‘(0) NOT NULL, endTime datetime(0) NOT NULL,avaliableTime int(8) NOT N’ at line 5 今天帮一个朋友调试...
本文实例讲述了mysql报错:MySQL server version for the right ... check the manual that corresponds to your MySQL server version for the right syntax to use near ‘type=InnoDB’ at line 1 二、解决方案
存储在数据库中,用户通过指定存储过程的名字并给出参数,如果该存储过程带有参数来执行它, 在SQL Server 的系列版本中,存储过程分为两类:系统提供的存储过程和用户自定义存储过程 系统SP,主要存储master ...
check the manual that corresponds to your MySQL server version for the right syntax to use near ‘order’ at line 1 数据库报错如下: Error querying database. Cause: java.sql.SQLSyntaxErrorException: ...
You have an error in your SQL ... check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by 'password' with grant option' mysql 5和mysql 8都有这个问题
mysql_exporter消除了"Error 1064 (42000): You have an ... check the manual that corresponds to your MySQL server version for the right syntax to use near 'SLAVE STATUS' at line 1。最新代码个人编译版本
### The error occurred while setting parameters ### SQL: SELECT * FROM Domain_System WHERE domain = ? LIMIT 1 ### Cause: ...
前几天帮同事解决一个案例,在主从复制环境下,从库上的MySQL版本号是5.5.5,遇到下面的错误: #其他非相关信息我都隐藏掉了 ... check the manual that corresponds to your MySQL server version for t
check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysqltump -u root -p sa > D:/sa.sql' at line 1 原因:mysqldump是mysql用于转存储数据库的实用程序并不是...
1,使用mysqldump时报错(1064),这个是因为mysqldump版本太低与当前数据库版本不一致导致...corresponds to your MySQL server version for the right syntax to use near ‘OPTION SQL_QUOTE_SHOW_CREATE=1’ at line
check the manual that corresponds to your MySQL server version for the right syntax to use near '...' at line X",提示SQL语句中的语法错误,需要检查并修正语句。 7. 错误代码1452: "Cannot add or update...
check the manual that corresponds to your MySQL server version for the right syntax to use near ‘`company_id` int) RETURNS varchar(20) CHARSET utf8 BEGIN 本来的函数: CREATE DEFINER=`33323`@`%` ...
命令成功执行。操作发生错误,相关的信息为... Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘old_password(‘123456′)’ at line 1命令为:set password for
在搭建springmvc框架时,底层使用hibernate4.1.8,数据库使用mysql5.1,使用hibernate自动生成数据库表时,hibernate方言使用... check the manual that corresponds to your MySQL server version for the right synt
check the manual that corresponds to your MySQL server versio····这句话对于咱们并不陌生,无非就是多了“,”之类的问题。但是你如果无意之中添加了一个mysql中的保留字段作为数据库中存贮的字段名,悲剧...
check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1. 解决方法 解决该问题有两种方法:一种是使用替换法,另一种是使用 PreparedStatemenc 对象...
check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by "12345678"' at line 1 的错误,原因是新版本mysql版本把将创建账户和赋予权限分开了。 ...