- 浏览: 709307 次
- 性别:
- 来自: 广州
-
文章分类
最新评论
-
shappy1978:
自己踩死自己了,我还是有远见的嘛
该死的微软,该死的IE -
calosteward:
I know Zxing and shopsavvy, bot ...
[trans]COMPARISON OF MOBILE BARCODE SCANNERS -
qq690388648:
唉……四年前的Bug,现在还没改,Apache也有不足的地方啊 ...
POI解析Word表格备忘 -
shappy1978:
Now I get to say that every met ...
Jailbreak Detection on iOS -
hebeixiaolei:
你好,我想问一下,用poi如何往word文档里插入超链接呀!
POI读取Word文档总结
- <property name="name"></property>
- <property name="birthday"></property>
- <property name="from"></property>
- 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 'from) values ('name', '2009-04-02 14:23:59', null)' at line 1
- at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1026)
- at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
- at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)
- at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)
- at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)
- at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
- at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2554)
- at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1761)
- at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2046)
- at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1964)
- at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1949)
- at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:94)
- at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:57)
- # The default storage engine that will be used when create new tables when
- default-storage-engine=INNODB
- Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'test.hzhu_user' doesn't exist
- at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1026)
- at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
- at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)
- at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)
- at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)
- at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
- at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2554)
- at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1761)
- at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2046)
- at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1964)
- at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1949)
- at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:94)
- at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:57)
代码中含有"from"关键字,创建表时抛错如下代码:
2.错误原因:配置文件中使用了create-drop属性,数据库表其实已经创建,只是又被删除了
只要把create-drop替换为create即可
3.错误原因:默认的数据库类型错误。
把mysql中my.ini文件中配置的 MyISAM 变成 INNODB,代码如下,
4.错误原因;hbm文件中未写错,但是在myeclipse中开发的
myeclipse不能自动识别如下语句,需要在Configuration中手动重新配置一下即可运行;
也可能hbm2dll的相对位置在配置文件中过低,导致无法识别(参考其他人提出的原因)
错误代码
数据库
hibernate方言
DB2org.hibernate.dialect.DB2DialectDB2 AS/400org.hibernate.dialect.DB2400DialectDB2 OS390org.hibernate.dialect.DB2390DialectPostgreSQLorg.hibernate.dialect.PostgreSQLDialectMySQLorg.hibernate.dialect.MySQLDialectMySQL with InnoDBorg.hibernate.dialect.MySQLInnoDBDialectMySQL with MyISAMorg.hibernate.dialect.MySQLMyISAMDialectOracle (any version)org.hibernate.dialect.OracleDialectOracle 9i/10gorg.hibernate.dialect.Oracle9DialectSybaseorg.hibernate.dialect.SybaseDialectSybase Anywhereorg.hibernate.dialect.SybaseAnywhereDialectMicrosoft SQL Serverorg.hibernate.dialect.SQLServerDialectSAP DBorg.hibernate.dialect.SAPDBDialectInformixorg.hibernate.dialect.InformixDialectHypersonicSQLorg.hibernate.dialect.HSQLDialectIngresorg.hibernate.dialect.IngresDialectProgressorg.hibernate.dialect.ProgressDialectMckoi SQLorg.hibernate.dialect.MckoiDialectInterbaseorg.hibernate.dialect.InterbaseDialectPointbaseorg.hibernate.dialect.PointbaseDialectFrontBaseorg.hibernate.dialect.FrontbaseDialectFirebirdorg.hibernate.dialect.FirebirdDialecthibernate.properties
######################
### Query Language ###
######################
## define query language constants / function names
hibernate.query.substitutions yes 'Y', no 'N'
## select the classic query parser
#hibernate.query.factory_class org.hibernate.hql.classic.ClassicQueryTranslatorFactory
#################
### Platforms ###
#################
## JNDI Datasource
#hibernate.connection.datasource jdbc/test
#hibernate.connection.username db2
#hibernate.connection.password db2
## HypersonicSQL
hibernate.dialect org.hibernate.dialect.HSQLDialect
hibernate.connection.driver_class org.hsqldb.jdbcDriver
hibernate.connection.username sa
hibernate.connection.password
hibernate.connection.url jdbc:hsqldb:./build/db/hsqldb/hibernate
#hibernate.connection.url jdbc:hsqldb:hsql://localhost
#hibernate.connection.url jdbc:hsqldb:test
## H2 (www.h2database.com)
#hibernate.dialect org.hibernate.dialect.H2Dialect
#hibernate.connection.driver_class org.h2.Driver
#hibernate.connection.username sa
#hibernate.connection.password
#hibernate.connection.url jdbc:h2:mem:./build/db/h2/hibernate
#hibernate.connection.url jdbc:h2:testdb/h2test
#hibernate.connection.url jdbc:h2:mem:imdb1
#hibernate.connection.url jdbc:h2:tcp://dbserv:8084/sample;
#hibernate.connection.url jdbc:h2:ssl://secureserv:8085/sample;
#hibernate.connection.url jdbc:h2:ssl://secureserv/testdb;cipher=AES
## MySQL
#hibernate.dialect org.hibernate.dialect.MySQLDialect
#hibernate.dialect org.hibernate.dialect.MySQLInnoDBDialect
#hibernate.dialect org.hibernate.dialect.MySQLMyISAMDialect
#hibernate.connection.driver_class com.mysql.jdbc.Driver
#hibernate.connection.url jdbc:mysql:///test
#hibernate.connection.username gavin
#hibernate.connection.password
## Oracle
#hibernate.dialect org.hibernate.dialect.OracleDialect
#hibernate.dialect org.hibernate.dialect.Oracle9Dialect
#hibernate.connection.driver_class oracle.jdbc.driver.OracleDriver
#hibernate.connection.username ora
#hibernate.connection.password ora
#hibernate.connection.url jdbc:oracle:thin:@localhost:1521:orcl
#hibernate.connection.url jdbc:oracle:thin:@localhost:1522:XE
## PostgreSQL
#hibernate.dialect org.hibernate.dialect.PostgreSQLDialect
#hibernate.connection.driver_class org.postgresql.Driver
#hibernate.connection.url jdbc:postgresql:template1
#hibernate.connection.username pg
#hibernate.connection.password
## DB2
#hibernate.dialect org.hibernate.dialect.DB2Dialect
#hibernate.connection.driver_class com.ibm.db2.jcc.DB2Driver
#hibernate.connection.driver_class COM.ibm.db2.jdbc.app.DB2Driver
#hibernate.connection.url jdbc:db2://localhost:50000/somename
#hibernate.connection.url jdbc:db2:somename
#hibernate.connection.username db2
#hibernate.connection.password db2
## TimesTen
#hibernate.dialect org.hibernate.dialect.TimesTenDialect
#hibernate.connection.driver_class com.timesten.jdbc.TimesTenDriver
#hibernate.connection.url jdbc:timesten:direct:test
#hibernate.connection.username
#hibernate.connection.password
## DB2/400
#hibernate.dialect org.hibernate.dialect.DB2400Dialect
#hibernate.connection.username user
#hibernate.connection.password password
## Native driver
#hibernate.connection.driver_class COM.ibm.db2.jdbc.app.DB2Driver
#hibernate.connection.url jdbc:db2://systemname
## Toolbox driver
#hibernate.connection.driver_class com.ibm.as400.access.AS400JDBCDriver
#hibernate.connection.url jdbc:as400://systemname
## Derby (not supported!)
#hibernate.dialect org.hibernate.dialect.DerbyDialect
#hibernate.connection.driver_class org.apache.derby.jdbc.EmbeddedDriver
#hibernate.connection.username
#hibernate.connection.password
#hibernate.connection.url jdbc:derby:build/db/derby/hibernate;create=true
## Sybase
#hibernate.dialect org.hibernate.dialect.SybaseDialect
#hibernate.connection.driver_class com.sybase.jdbc2.jdbc.SybDriver
#hibernate.connection.username sa
#hibernate.connection.password sasasa
#hibernate.connection.url jdbc:sybase:Tds:co3061835-a:5000/tempdb
## Mckoi SQL
#hibernate.dialect org.hibernate.dialect.MckoiDialect
#hibernate.connection.driver_class com.mckoi.JDBCDriver
#hibernate.connection.url jdbc:mckoi:///
#hibernate.connection.url jdbc:mckoi:local://C:/mckoi1.0.3/db.conf
#hibernate.connection.username admin
#hibernate.connection.password nimda
## SAP DB
#hibernate.dialect org.hibernate.dialect.SAPDBDialect
#hibernate.connection.driver_class com.sap.dbtech.jdbc.DriverSapDB
#hibernate.connection.url jdbc:sapdb://localhost/TST
#hibernate.connection.username TEST
#hibernate.connection.password TEST
#hibernate.query.substitutions yes 'Y', no 'N'
## MS SQL Server
发表评论
-
Image Filter on Java
2016-08-25 15:24 344Image Filter on Java: http:// ... -
SMB protocol in Java
2016-08-24 16:19 372http://www.du52.com/text.php?i ... -
Image Process in Java
2016-07-29 17:46 0http://www.javaworld.com/artic ... -
Source Tree - ssl certificate problem unable to get local issuer certificate
2016-05-23 14:23 1298Meet error while iput url htt ... -
[Trans]java实现RSA加密 .
2015-03-03 10:22 787http://blog.csdn.net/wxyfighti ... -
"algid parse error, not a sequence" on initialize private key of RSA
2015-03-02 14:52 1022You get this error because yo ... -
Verify Signature(iText)
2015-03-02 10:54 592http://www.berthou.com/us/2009 ... -
Sample of iText
2015-01-26 17:59 656http://rensanning.iteye.com/ ... -
PDF Password
2015-01-26 16:24 664In Acrobat if the PDF is set ... -
iText - Chinese Font
2015-01-26 15:39 1683iText中输出中文,有三种方式: 1、使用iTextAs ... -
iText Relative jar
2015-01-26 15:39 758链接 说明 iT ... -
[trans] Integrate Tomcate with Appach
2013-03-28 12:07 832http://www.ibm.com/developerw ... -
SSH+mysql中文乱码问题
2012-03-03 21:56 1161网上讨论上述问题的有很多,这次其实我项目的配置都对,但是con ... -
MyEclipse8.5 for Mac installation log
2012-02-28 15:15 2349重操旧业了啊 //****************** ... -
mysql odbc不认192.168.1.22
2011-07-14 15:45 1606今天用power designer反向mysql数据库,发现m ... -
[trans]修改webRoot目录
2011-07-13 15:48 1630已经存在的项目,必须删除.setting目录并重新配置,测 ... -
[trans]在CentOS 5上安装FFMPEG
2011-07-13 15:34 993接手一个前期的Web项目,当时是用MyEclipse建立的,用 ... -
调用Runtime.getRuntime().exec后等待命令处理完毕的问题
2011-07-06 11:36 1822try{ String command = ... -
[转]Runtime.getRuntime().exec执行阻塞问题解决
2011-06-28 15:11 2769上篇博文中CallMaxentThreadPoolTask ... -
tomcat for mac start fail
2011-06-03 17:52 1175在执行./startup.sh,或者./shutdown. ...
相关推荐
然而,对于不常使用的列、数据量小的列、text、image和bit类型列以及在修改性能至关重要的场景下,不应创建索引。联合索引可以提升特定查询的效率,但要注意,若查询条件不完全匹配索引前列,将无法充分利用联合索引...
#### 四、小结 通过上述步骤,用户不仅可以使用PowerDesigner连接MySQL数据库,还能轻松地将数据库表结构导出至Word文档中。这一过程不仅简化了数据库设计工作,还提高了工作效率。对于那些需要经常处理数据库设计...
7.4.1创建表格 112 7.4.2创建 HibernateDemo Java Project 113 7.4.3添加 Hibernate Capabilities 到现有项目 114 7.4.4 使用Hibernate配置文件编辑器修改文件 118 7.4.5 使用反向工程快速生成Java POJO类,映射文件...
创建好数据库后,接下来就是设计并创建表格来存储数据。以动物园为例,我们可能需要创建一个名为`animals`的表来记录每只宠物的信息,如名字、种类、年龄等。 ```sql CREATE TABLE animals ( id INT AUTO_...
Hibernate是一个基于Java的持久层ORM(对象关系映射)框架,它致力于解决Java应用程序与关系数据库之间的“阻抗不匹配”问题。在面向对象编程的世界里,我们使用对象、属性和关联来表示数据,而在关系型数据库中,...
1.5 小结 11 第2章 基本数据类型——构建Java 大厦的基础 12 2.1 源代码注释 12 2.1.1 单行注释 12 2.1.2 区域注释 12 2.1.3 文档注释 13 2.2 基本数据类型 14 2.2.1 整型 15 2.2.2 浮点型 17 ...
9.9.11 表格小结 192 9.10 树(Tree) 192 9.10.1 不同样式的树 193 9.10.2 为树添加图标 193 9.10.3 可编辑的树 196 9.10.4 表格树 197 9.10.5 树小结 198 9.11 格式化文本(StyleText) 198 ...
1.9 本章小结 22 本章练习 22 第2章 理解面向对象 23 2.1 面向对象 24 2.1.1 结构化程序设计简介 24 2.1.2 程序的三种基本结构 25 2.1.3 面向对象程序设计简介 27 2.1.4 面向对象的基本特征 28 2.2 UML...
#### 五、小结 通过上述步骤,我们可以高效地利用PowerDesigner进行MySQL数据库的反向工程,从而获得清晰的物理数据模型。这不仅有助于我们更好地理解现有数据库的结构,还能够在此基础上进行优化和扩展。 #### 六...
22.4 小结 本章的重点在于数据库设计,特别强调了在MySQL数据库中的应用。在设计过程中,不仅考虑了表结构和字段定义,还引入了索引、视图和触发器等高级特性,以提升系统的整体性能。在性能优化方面,通过冗余字段...
小结 本篇文章通过一个具体的Wicket应用案例,详细介绍了如何利用Wicket框架构建具有查询、列表展示、分页等功能的Java Web应用。通过实际编码演示了项目结构设计、数据库连接配置、页面逻辑编写等关键步骤,为...
### 小结 以上章节介绍了如何使用Perl结合DBI模块操作MySQL数据库,以及如何使用Perl与操作系统进行交互。通过这些知识点的学习,读者可以更加熟练地使用Perl进行实际开发工作,特别是在处理数据库和文件系统方面。...