你好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 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
这是我正在使用的jar文件
adapter4gwt-1.2.3.823.jar
适配器核-1.2.3.823.jar
ANTLR-2.7.6.jar
ASM-3.2.jar
beanlib-休眠-3.2.1.jar
CGLIB-2.2.jar
公地集合-3.1.jar
公地琅2.4.jar
共享记录-1.1.1.jar
DOM4J-1.6.1.jar
冬眠核-3.3.1.GA.jar
冬眠-JPA-2.0-API-1.0.0.Final.jar
冬眠-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-简单1.5.2.jar
宝库-2.0.4.jar
请帮我解决这个问题,告诉我哪里错了, 提前致谢
答案 0 :(得分:1)
好吧,对于GWT的“更新”版本(我认为比新版本更新),你需要使用更新版本的Gilead。 AFAIK,你描述的问题很久以前就已经解决了。最后一个版本是2010-05-22的version 1.3.2。
是的,这个版本已经过时了,Gilead不再更新了。但是,只要您使用的是Hibernate< = 3.5.x,它仍然有效,即使使用最新的GWT版本(目前为2.5 rc)。
我不建议现在开始与Gilead合作,请参阅http://sourceforge.net/projects/gilead/forums/forum/868076/topic/4525959