Hibernate 5.4.17 with Resin 4.0.64

I’m trying to use Hibernate with Resin but am receiving errors because Resin uses an older version of JPA internally. I’ve found documents that suggest using the class loader hack, downloading a different JPA API, and editing the Resin XML and properties files. I have tried these and they are not working.

Does anyone use a similar version of the packages and can give me a hand? The error message and my jar files are below.

Thanks!

[20-06-07 08:54:58.920] {resin-port-8080-42} java.lang.IllegalStateException: java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/persistence/Index;
at com.caucho.server.webapp.WebApp$StartupTask.run(WebApp.java:5486)
at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173)
at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118)
Caused by: java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/persistence/Index;
at org.hibernate.cfg.annotations.EntityBinder.processComplementaryTableDefinitions(EntityBinder.java:1236)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:836)
at org.hibernate.boot.model.source.internal.annotations.AnnotationMetadataSourceProcessorImpl.processEntityHierarchies(AnnotationMetadataSourceProcessorImpl.java:254)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess$1.processEntityHierarchies(MetadataBuildingProcess.java:230)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:273)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1224)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1255)
at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:141)
at com.caucho.env.jpa.PersistenceUnitManager.createDelegate(PersistenceUnitManager.java:425)
at com.caucho.env.jpa.PersistenceUnitManager.start(PersistenceUnitManager.java:386)
at com.caucho.env.jpa.PersistenceManager.startPersistenceUnits(PersistenceManager.java:367)
at com.caucho.env.jpa.PersistenceManager.environmentConfigureEnhancer(PersistenceManager.java:638)
at com.caucho.loader.EnvironmentClassLoader.config(EnvironmentClassLoader.java:933)
at com.caucho.loader.EnvironmentClassLoader.bind(EnvironmentClassLoader.java:951)
at com.caucho.loader.EnvironmentClassLoader.start(EnvironmentClassLoader.java:978)
at com.caucho.server.webapp.WebApp.startImpl(WebApp.java:3871)
at com.caucho.server.webapp.WebApp.access$700(WebApp.java:209)
at com.caucho.server.webapp.WebApp$StartupTask.run(WebApp.java:5476)
… 2 more

antlr-2.7.7.jar
byte-buddy-1.10.10.jar
classmate-1.5.1.jar
commons-beanutils-1.9.4.jar
commons-collections-3.2.2.jar
commons-digester-2.1.jar
commons-fileupload-1.4.jar
commons-io-2.6.jar
commons-lang-2.4.jar
commons-lang3-3.8.1.jar
commons-logging-1.2.jar
dom4j-2.1.3.jar
FastInfoset-1.2.15.jar
freemarker-2.3.28.jar
hibernate-commons-annotations-5.1.0.Final.jar
hibernate-core-5.4.17.Final.jar
istack-commons-runtime-3.0.7.jar
jandex-2.1.3.Final.jar
javassist-3.20.0-GA.jar
javassist-3.24.0-GA.jar
javax.activation-api-1.2.0.jar
javax.persistence-api-2.2.jar
jaxb-api-2.3.1.jar
jaxb-runtime-2.3.1.jar
jboss-logging-3.3.2.Final.jar
jboss-transaction-api_1.2_spec-1.1.1.Final.jar
log4j-api-2.13.3.jar
log4j-core-2.13.3.jar
log4j-slf4j-impl-2.9.1.jar
log4j-web-2.13.3.jar
ognl-3.1.26.jar
postgresql-42.2.12.jar
slf4j-api-1.7.12.jar
stax-ex-1.8.jar
struts2-core-2.5.22.jar
struts2-tiles-plugin-2.5.22.jar
tiles-api-3.0.8.jar
tiles-autotag-core-runtime-1.2.jar
tiles-core-3.0.8.jar
tiles-el-3.0.8.jar
tiles-freemarker-3.0.8.jar
tiles-jsp-3.0.8.jar
tiles-ognl-3.0.8.jar
tiles-request-api-1.0.7.jar
tiles-request-freemarker-1.0.7.jar
tiles-request-jsp-1.0.7.jar
tiles-request-servlet-1.0.7.jar
tiles-servlet-3.0.8.jar
tiles-template-3.0.8.jar
txw2-2.3.1.jar