是什么原因导致这个 org.hibernate.MappingException ?
我正在尝试配置一个 ejb3 示例应用程序,它是映射到 postgres 的实体,现在我希望该应用程序使用 JPA 在 Jboss4.3 和 Informix 上运行。
如果 DDL 创建
处于活动状态,则会出现此错误,
> WARN [ServiceController] Problem
> starting service
> persistence.units:ear=weblog.ear,jar=weblog.jar,unitName=weblog
> javax.persistence.PersistenceException:
> [PersistenceUnit: weblog] Unable to
> build EntityManagerFactory
> at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677)
> at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)
> at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:246)
后跟
Caused by: org.hibernate.MappingException: No Dialect mapping for JDBC type: 2005
at org.hibernate.dialect.TypeNames.get(TypeNames.java:56)
at org.hibernate.dialect.TypeNames.get(TypeNames.java:81)
at org.hibernate.dialect.Dialect.getTypeName(Dialect.java:291)
at org.hibernate.mapping.Column.getSqlType(Column.java:182)
at org.hibernate.mapping.Table.sqlCreateString(Table.java:394)
at org.hibernate.cfg.Configuration.generateSchemaCreationScript(Configuration.java:854)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:74)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:311)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:874)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
What does JDBC type: 2005meaning? 知道如何追踪导致问题的实体/列吗?
谢谢
I'm trying to configure an ejb3 sample application, it's entities where mapped to postgres now I want the app run on Jboss4.3 and Informix using JPA.
If the DDL creation <property name="hibernate.hbm2ddl.auto" value="create"/>
is active this error appears
> WARN [ServiceController] Problem
> starting service
> persistence.units:ear=weblog.ear,jar=weblog.jar,unitName=weblog
> javax.persistence.PersistenceException:
> [PersistenceUnit: weblog] Unable to
> build EntityManagerFactory
> at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677)
> at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)
> at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:246)
followed by
Caused by: org.hibernate.MappingException: No Dialect mapping for JDBC type: 2005
at org.hibernate.dialect.TypeNames.get(TypeNames.java:56)
at org.hibernate.dialect.TypeNames.get(TypeNames.java:81)
at org.hibernate.dialect.Dialect.getTypeName(Dialect.java:291)
at org.hibernate.mapping.Column.getSqlType(Column.java:182)
at org.hibernate.mapping.Table.sqlCreateString(Table.java:394)
at org.hibernate.cfg.Configuration.generateSchemaCreationScript(Configuration.java:854)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:74)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:311)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:874)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
What does JDBC type: 2005 mean?
Any idea how I can track down the entity/column causes the problem?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有关您尝试映射的数据类型的更多信息会很好。
看看这个 Hibernate 论坛帖子 -> https://forum.hibernate.org/viewtopic。 php?f=1&t=950692&start=0
More info on the data types that you try to map would be nice.
Take a look at this Hibernate Forum thread -> https://forum.hibernate.org/viewtopic.php?f=1&t=950692&start=0
请注意,有一个新的(截至 2010 年 4 月 26 日)网页 http://www.iiug。 org/opensource,其中包含有关将 Informix 软件与各种开源软件包(包括 Hibernate)一起使用的信息。特别是,有可下载的代码可以改进 Hibernate 和 Informix 的交互。
Note that there is a new (as of 2010-04-26) web page, http://www.iiug.org/opensource, that has information about using Informix software with various open source packages, including Hibernate. In particular, there is downloadable code that improves the interaction of Hibernate and Informix.