GWT + HIBERNATE + GILEAD不起作用 [英] GWT+HIBERNATE+GILEAD is not working

查看:99
本文介绍了GWT + HIBERNATE + GILEAD不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello GWT + Hibernate + Gilead无法正常工作我已经从此链接下载示例代码
https://developers.google.com/web-toolkit/articles/using_gwt_with_hibernate


我不知道什么是错误的我马不断得到这个错误
参数0是一个未知类型的'com.google.musicstore.domain.Account / 3669536145'




  [java] 16 [btpool0-0] INFO org.hibernate.cfg.Environment  -  Hibernate 3.3.1.GA 
[java ] 20 [btpool0-0] INFO org.hibernate.cfg.Environment - 未找到hibernate.properties
[java] 24 [btpool0-0] INFO org.hibernate.cfg.Environment - 字节码提供程序名称:javassist
[java] 30 [btpool0-0] INFO org.hibernate.cfg.Environment - 使用JDK 1.4 java.sql.Timestamp处理
[java] 105 [btpool0-0] INFO org.hibernate.cfg.Configuration - 配置from资源:/hibernate.cfg.xml
[java] 105 [btpool0-0] INFO org.hibernate.cfg.Configuration - 配置资源:/hibernate.cfg.xml
[java] 192 [btpool0 -0] INFO org.hibernate.cfg.Configuration - 从资源读取映射:com / google / musicstore / domain / Record.hbm.xml
[java] 286 [btpool0-0] INFO org.hibernate.cfg。 HbmBinder - 映射类:com.google.musicstore.domain.Record - > PUBLIC.RECORD
[java] 359 [btpool0-0] INFO org.hibernate.cfg.Configuration - 从资源读取映射:com / google / musicstore / domain / Account.hbm.xml
[java] 391 [btpool0-0] INFO org.hibernate.cfg.HbmBinder - 映射类:com.google.musicstore.domain.Account - > PUBLIC.ACCOUNT
[java] 468 [btpool0-0] INFO org.hibernate.cfg.HbmBinder - 映射集合:com.google.musicstore.domain.Account.records - > PUBLIC.ACCOUNT_RECORD
[java] 490 [btpool0-0] INFO org.hibernate.cfg.Configuration - 配置的SessionFactory:null
[java] 569 [btpool0-0] INFO org.hibernate.connection.DriverManagerConnectionProvider - 使用Hibernate内置连接池(不用于生产使用!)
[java] 569 [btpool0-0] INFO org.hibernate.connection.DriverManagerConnectionProvider - Hibernate连接池大小:2
[java] 569 [btpool0-0] INFO org.hibernate.connection.DriverManagerConnectionProvider - 自动提交模式:false
[java] 577 [btpool0-0] INFO org.hibernate.connection.DriverManagerConnectionProvider - 使用驱动程序:org.hsqldb.jdbcDriver at URL:jdbc:hsqldb:hsql:// localhost /
[java] 578 [btpool0-0] INFO org.hibernate.connection.DriverManagerConnectionProvider - 连接属性:{user = sa,password = ****}
[java] 866 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - RDBMS:HSQL数据库引擎,版本:2.2.8
[java] 866 [btpool0-0] INFO org.hibernate。 cfg.S ettingsFactory - JDBC驱动程序:HSQL数据库引擎驱动程序,版本:2.2.8
[java] 886 [btpool0-0] INFO org.hibernate.dialect.Dialect - 使用方言:org.hibernate.dialect.HSQLDialect
[java] 899 [btpool0-0] INFO org.hibernate.transaction.TransactionFactoryFactory - 使用默认事务策略(直接JDBC事务)
[java] 903 [btpool0-0] INFO org.hibernate.transaction.TransactionManagerLookupFactory - 没有配置TransactionManagerLookup(在JTA环境中,不建议使用读写或事务性二级缓存)
[java] 903 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - beforeCompletion期间的自动刷新):禁用
[java] 903 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - 在事务结束时自动关闭会话:disabled
[java] 903 [btpool0-0] INFO org.hibernate .cfg.SettingsFactory - JDBC批处理大小:15
[java] 903 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - JDBC的批处理更新sioned data:disabled
[java] 904 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - 可滚动结果集:已启用
[java] 904 [btpool0-0] INFO org.hibernate.cfg .SettingsFactory - JDBC3 getGeneratedKeys():enabled
[java] 905 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - 连接释放模式:auto
[java] 906 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - 默认架构:PUBLIC
[java] 906 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - 默认批量提取大小:1
[java] 906 [btpool0 -0] INFO org.hibernate.cfg.SettingsFactory - 生成带注释的SQL:禁用
[java] 906 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - 按主键排序SQL更新:disabled
[java] 906 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - 用于批处理的订单SQL插入:已禁用
[java] 906 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - Query翻译器:org.hibernate.hql.ast.ASTQueryTranslatorFactory
[java] 9 10 [btpool0-0] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - 使用ASTQueryTranslatorFactory
[java] 910 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - 查询语言替换:{
[java] 910 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - JPA-QL严格遵从性:disabled
[java] 910 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - Second-级别缓存:已启用
[java] 910 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - 查询缓存:已禁用
[java] 944 [btpool0-0] INFO org.hibernate.cfg。 SettingsFactory - 缓存区域工厂:org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge
[java] 945 [btpool0-0] INFO org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge - 缓存提供程序:org.hibernate。 cache.NoCacheProvider
[java] 945 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - 优化缓存以减少最小投入:禁用
[java] 945 [btpool0-0] INFO org.hibernate。 cfg.SettingsFactory - 结构编辑二级高速缓存条目:已禁用
[java] 951 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - 将所有SQL回送到标准输出
[java] 952 [btpool0-0] INFO org .hibernate.cfg.SettingsFactory - 统计:禁用
[java] 952 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - 删除的实体综合标识符rollback:disabled
[java] 952 [btpool0- 0] INFO org.hibernate.cfg.SettingsFactory - 默认实体模式:pojo
[java] 952 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - 命名查询检查:已启用
[java ] 1067 [btpool0-0] INFO org.hibernate.impl.SessionFactoryImpl - 构建会话工厂
[java] 1500 [btpool0-0] INFO org.hibernate.impl.SessionFactoryObjectFactory - 不绑定工厂到JNDI,没有JNDI名称配置
[java] 1510 [btpool0-0] INFO org.hibernate.tool.hbm2ddl.SchemaExport - 运行hbm2ddl模式导出
[java] 1511 [btpool0-0] INFO org.hibernate.tool.hbm2ddl .SchemaExport - 将生成的模式导出到数据库
[java] GWT15
[java] 1583 [btpool0-0] INFO org.hibernate.tool.hbm2ddl.SchemaExport - 模式导出完成

以下是我正在使用的jar文件


adapter4gwt-1.2.3.823 .jar

adapter-core-1.2.3.823.jar

antlr-2.7.6.jar p>

asm-3.2.jar

beanlib-hibernate-3.2.1.jar

cglib-2.2.jar

commons-collections-3.1.jar

常见-lang-2.4.jar

commons-logging-1.1.1.jar

dom4j-1.6.1 .jar


hibernate-core-3.3.1.GA.jar


hibernate-jpa-2.0-api -1.0.0.Final.jar

hibernate-util-1.2.3.823.jar



hsqldb.jar



javassist-3.4.GA.jar



jboss-serialization.jar

jta-1.1.jar

log4j-1.2.15.ja r

slf4j-api-1.5.2.jar

slf4j-simple-1.5.2.jar



trove-2.0.4.jar


请帮我解决这个,告诉我我错在哪里,
在此先感谢

解决方案

好吧,使用更新版本的GWT (即比我想象中的1.7更新),你需要使用更新版本的Gilead。 AFAIK,你所描述的问题早已解决。最后一个版本是2010-05-22 1.3.2版

是的,这个版本是旧的,并且Gilead不再被更新。然而,即使使用最新的GWT版本(目前为2.5rc),它仍然可以工作,只要你使用Hibernate <= 3.5.x。



我wouldn真的不推荐现在用Gilead开始一个项目,请参阅 http:// sourceforge .net / projects / gilead / forums / forum / 868076 / topic / 4525959


Hello the GWT+Hibernate+Gilead is not working i have downloaded the sample code from this link https://developers.google.com/web-toolkit/articles/using_gwt_with_hibernate.

I don't know what is wrong i ma continuously getting this error Parameter 0 of is of an unknown type 'com.google.musicstore.domain.Account/3669536145'

 [java] 16 [btpool0-0] INFO org.hibernate.cfg.Environment - Hibernate 3.3.1.GA
 [java] 20 [btpool0-0] INFO org.hibernate.cfg.Environment - hibernate.properties not found
 [java] 24 [btpool0-0] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
 [java] 30 [btpool0-0] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
 [java] 105 [btpool0-0] INFO org.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml
 [java] 105 [btpool0-0] INFO org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
 [java] 192 [btpool0-0] INFO org.hibernate.cfg.Configuration - Reading mappings from resource :com/google/musicstore/domain/Record.hbm.xml
 [java] 286 [btpool0-0] INFO org.hibernate.cfg.HbmBinder - Mapping class: com.google.musicstore.domain.Record -> PUBLIC.RECORD
 [java] 359 [btpool0-0] INFO org.hibernate.cfg.Configuration - Reading mappings from resource :com/google/musicstore/domain/Account.hbm.xml
 [java] 391 [btpool0-0] INFO org.hibernate.cfg.HbmBinder - Mapping class: com.google.musicstore.domain.Account -> PUBLIC.ACCOUNT
 [java] 468 [btpool0-0] INFO org.hibernate.cfg.HbmBinder - Mapping collection: com.google.musicstore.domain.Account.records -> PUBLIC.ACCOUNT_RECORD
 [java] 490 [btpool0-0] INFO org.hibernate.cfg.Configuration - Configured SessionFactory: null
 [java] 569 [btpool0-0] INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
 [java] 569 [btpool0-0] INFO org.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 2
 [java] 569 [btpool0-0] INFO org.hibernate.connection.DriverManagerConnectionProvider - autocommit mode: false
 [java] 577 [btpool0-0] INFO org.hibernate.connection.DriverManagerConnectionProvider - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:hsql://localhost/
 [java] 578 [btpool0-0] INFO org.hibernate.connection.DriverManagerConnectionProvider - connection properties: {user=sa, password=****}
 [java] 866 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - RDBMS: HSQL Database Engine, version: 2.2.8
 [java] 866 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - JDBC driver: HSQL Database Engine Driver, version: 2.2.8
 [java] 886 [btpool0-0] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.HSQLDialect
 [java] 899 [btpool0-0] INFO org.hibernate.transaction.TransactionFactoryFactory - Using default transaction strategy (direct JDBC transactions)
 [java] 903 [btpool0-0] INFO org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
 [java] 903 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
 [java] 903 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - Automatic session close at endof transaction: disabled
 [java] 903 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - JDBC batch size: 15
 [java] 903 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - JDBC batch updates for versioned data: disabled
 [java] 904 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
 [java] 904 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): enabled
 [java] 905 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - Connection release mode: auto
 [java] 906 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - Default schema: PUBLIC
 [java] 906 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
 [java] 906 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
 [java] 906 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
 [java] 906 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - Order SQL inserts for batching: disabled
 [java] 906 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
 [java] 910 [btpool0-0] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
 [java] 910 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
 [java] 910 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - JPA-QL strict compliance: disabled
 [java] 910 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
 [java] 910 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - Query cache: disabled
 [java] 944 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge
 [java] 945 [btpool0-0] INFO org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge -Cache provider: org.hibernate.cache.NoCacheProvider
 [java] 945 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
 [java] 945 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
 [java] 951 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - Echoing all SQL to stdout
 [java] 952 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - Statistics: disabled
 [java] 952 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
 [java] 952 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
 [java] 952 [btpool0-0] INFO org.hibernate.cfg.SettingsFactory - Named query checking : enabled
 [java] 1067 [btpool0-0] INFO org.hibernate.impl.SessionFactoryImpl - building session factory
 [java] 1500 [btpool0-0] INFO org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
 [java] 1510 [btpool0-0] INFO org.hibernate.tool.hbm2ddl.SchemaExport - Running hbm2ddl schema export
 [java] 1511 [btpool0-0] INFO org.hibernate.tool.hbm2ddl.SchemaExport - exporting generated schema to database
 [java] GWT15
 [java] 1583 [btpool0-0] INFO org.hibernate.tool.hbm2ddl.SchemaExport - schema export complete 

Here is the jar file i am using

adapter4gwt-1.2.3.823.jar

adapter-core-1.2.3.823.jar

antlr-2.7.6.jar

asm-3.2.jar

beanlib-hibernate-3.2.1.jar

cglib-2.2.jar

commons-collections-3.1.jar

commons-lang-2.4.jar

commons-logging-1.1.1.jar

dom4j-1.6.1.jar

hibernate-core-3.3.1.GA.jar

hibernate-jpa-2.0-api-1.0.0.Final.jar

hibernate-util-1.2.3.823.jar

hsqldb.jar

javassist-3.4.GA.jar

jboss-serialization.jar

jta-1.1.jar

log4j-1.2.15.jar

slf4j-api-1.5.2.jar

slf4j-simple-1.5.2.jar

trove-2.0.4.jar

Please please help me out of this , inform me where i am wrong, Thanks in advance

解决方案

Well, with "newer" versions of GWT (i.e. newer than 1.7 I think), you'll need to use a more recent version of Gilead. AFAIK, the problem you describe has been solved long ago. The last release was version 1.3.2 on 2010-05-22.

Yes, this release is old, and Gilead isn't updated anymore. However, it still works, even with the latest GWT versions (currently 2.5 rc), as long as you're using Hibernate <= 3.5.x.

I wouldn't really recommend starting a project with Gilead now, see http://sourceforge.net/projects/gilead/forums/forum/868076/topic/4525959

这篇关于GWT + HIBERNATE + GILEAD不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆