休眠默认 tuplizer
我收到错误:
Initial SessionFactory creation failed.org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.EntityTuplizer].
我尝试更改 tuplizer,但没有帮助。
我的类路径中已经有 javassist.jar 。 这是我的映射文件:
<hibernate-mapping>
<class name="vertical.model.filter.FilterOption" table="OPTION">
<tuplizer entity-mode="dynamic-map" class="org.hibernate.tuple.entity.EntityTuplizer"/>
<id name="id" type="long"/>
<discriminator column="TYPE" type="string"/>
<subclass name="vertical.impl.filter.options.AbstractFilterOption">
<property name="name"/>
<subclass name="vertical.impl.filter.options.Checkbox" discriminator-value="Checkbox">
<property name="value" type="string"/>
</subclass>
<subclass name="vertical.impl.filter.options.Radio" discriminator-value="Radio">
<property name="value" type="string"/>
</subclass>
<subclass name="vertical.impl.filter.options.CityInput" discriminator-value="CityInput">
<property name="value" type="string"/>
</subclass>
<subclass name="vertical.impl.filter.options.Select" discriminator-value="Select">
<property name="value" type="string"/>
</subclass>
</subclass>
</class>
映射可能有一些错误吗?我这里有二级继承权。
I'm recieving an error:
Initial SessionFactory creation failed.org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.EntityTuplizer].
I tried to change the tuplizer, but it did not help.
I already have javassist.jar in my classpath.
Here is my mapping file:
<hibernate-mapping>
<class name="vertical.model.filter.FilterOption" table="OPTION">
<tuplizer entity-mode="dynamic-map" class="org.hibernate.tuple.entity.EntityTuplizer"/>
<id name="id" type="long"/>
<discriminator column="TYPE" type="string"/>
<subclass name="vertical.impl.filter.options.AbstractFilterOption">
<property name="name"/>
<subclass name="vertical.impl.filter.options.Checkbox" discriminator-value="Checkbox">
<property name="value" type="string"/>
</subclass>
<subclass name="vertical.impl.filter.options.Radio" discriminator-value="Radio">
<property name="value" type="string"/>
</subclass>
<subclass name="vertical.impl.filter.options.CityInput" discriminator-value="CityInput">
<property name="value" type="string"/>
</subclass>
<subclass name="vertical.impl.filter.options.Select" discriminator-value="Select">
<property name="value" type="string"/>
</subclass>
</subclass>
</class>
May it be some mistakes with mapping? I have a two-level inheritance here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论