我想使用hibernate-types库通过JPA和Hibernate将JSON集合映射到Postgres JSONB数据库列,但是当我部署应用程序时,出现以下错误:
Caused by: java.lang.NoClassDefFoundError: org/hibernate/annotations/common/reflection/XProperty
at com.vladmihalcea.hibernate.type.json.internal.JsonTypeDescriptor.setParameterValues(JsonTypeDescriptor.java:58)
at com.vladmihalcea.hibernate.type.json.JsonBinaryType.setParameterValues(JsonBinaryType.java:66)
at org.hibernate.type.TypeFactory.injectParameters(TypeFactory.java:142)`
该类确实存在于JBoss提供的jar中,但是看起来ModuleModuleLoader无法找到它。 JBoss提供的Hibernate版本是 5.1.10.Final-redhat-1 ,定义XProperty类的hibernate-commons-annotations版本是 5.0.1.Final-redhat -2 。关于使工作正常运行所缺少的任何想法?非常感谢
答案 0 :(得分:2)
这也可以在<div class="col-md-12 FAQBox mt-3 mb-2">
<div class="Collapsible justify-content-end">
<span class="panel-header mt-2 is-closed">
<div>
<div class="d-flex justify-content-between">
<h3 class="FAQBoxHeader mt-1">At vero eos et accusamus et iusto odio?</h3>
<img class="align-self-center" src="https://www.direct-carexcess.co.uk/dist/ClientApp/Images/Arrow2.png">
</div>
</div>
</span>
<div class="panel-slide collapse" style="height: auto; transition: height 400ms linear 0s; display: none;">
<div class="Collapsible__contentInner">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.</div>
</div>
</div>
</div>
<div class="col-md-12 FAQBox mt-3 mb-2">
<div class="Collapsible justify-content-end">
<span class="panel-header mt-2 is-closed">
<div>
<div class="d-flex justify-content-between">
<h3 class="FAQBoxHeader mt-1">At vero eos et ?</h3>
<img class="align-self-center" src="https://www.direct-carexcess.co.uk/dist/ClientApp/Images/Arrow2.png">
</div>
</div>
</span>
<div class="panel-slide collapse" style="height: auto; transition: height 400ms linear 0s; display: none;">
<div class="Collapsible__contentInner">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. </div>
</div>
</div>
</div>
文件中配置为:
WEB-INF/jboss-deployment-structure.xml
答案 1 :(得分:0)
Wildfly提供了休眠状态,并且在耳朵中搜索了该类。我这样改变了耳朵的绒球:
path:“ maven-ear-plugin” .configuration.archive
<manifestEntries>
<Dependencies>org.hibernate.commons-annotations</Dependencies>
</manifestEntries>
因此找到XProperty类。
H。