信息: Not binding factory to JNDI, no JNDI name configured
org.hibernate.impl.SessionFactoryImpl@d81784
Hibernate:
insert
into
order (name
, cost)
values
(?, ?)
2011-12-5 18:15:39 org.hibernate.util.JDBCExceptionReporter logExceptions
警告: SQL Error: 1064, SQLState: 42000
2011-12-5 18:15:39 org.hibernate.util.JDBCExceptionReporter logExceptions
严重: 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 'order (name, cost) values ('22', 30.0)' at line 1
------解决方案--------------------
严重: 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 'order (name, cost) values ('22', 30.0)' at line 1
这俩个单引号可疑,检查写的sql语句格式。