我将 Appfuse 与 struts2 一起使用,并尝试在 Jboss EAP 6.1 中进行部署。我试过的东西:在WEB-INF/中添加:jboss-deployment-structure.xml:
<jboss-deployment-structure>
<deployment>
<exclusions>
<module name="org.hibernate" />
</exclusions>
</deployment>
并在 Persistant.xml 中添加属性:
<properties>
<property name="hibernate.show_sql" value="false" />
<property name="jboss.as.jpa.providerModule" value="application" />
</properties>
之后,我收到有关 ClassCastException 的错误:
05:13:07,640 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 48) MSC000001: Failed to start service jboss.persistenceunit."claim.war#ApplicationEntityManager": org.jboss.msc.service.StartException in service jboss.persistenceunit."claim.war#ApplicationEntityManager": java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.search.hcore.impl.HibernateSearchIntegrator could not be instantiated: java.lang.ClassCastException