Hi, I am having some issues with certain fields not being able to be accessed when using Java 9 modules in my project. Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private java.lang.Long org.hibernate.search.mapper.orm.coordination.outboxpolling.cluster.impl.Agent.id accessible: module org.hibernate.search.mapper.orm.coordination.outboxpolling does not "opens org.hibernate.search.mapper.orm.coordination.outboxpolling.cluster.impl" to module org.hibernate.orm.core at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178) at java.base/java.lang.reflect.Field.setAccessible(Field.java:172) at org.hibernate.orm.core@5.6.10.Final/org.hibernate.internal.util.ReflectHelper.ensureAccessibility(ReflectHelper.java:418) at org.hibernate.orm.core@5.6.10.Final/org.hibernate.internal.util.ReflectHelper.findField(ReflectHelper.java:408) at org.hibernate.orm.core@5.6.10.Final/org.hibernate.property.access.internal.PropertyAccessMixedImpl.fieldOrNull(PropertyAccessMixedImpl.java:84) at org.hibernate.orm.core@5.6.10.Final/org.hibernate.property.access.internal.PropertyAccessMixedImpl.getAccessType(PropertyAccessMixedImpl.java:92) at org.hibernate.orm.core@5.6.10.Final/org.hibernate.property.access.internal.PropertyAccessMixedImpl.<init>(PropertyAccessMixedImpl.java:47) at org.hibernate.orm.core@5.6.10.Final/org.hibernate.property.access.internal.PropertyAccessStrategyMixedImpl.buildPropertyAccess(PropertyAccessStrategyMixedImpl.java:25) at org.hibernate.orm.core@5.6.10.Final/org.hibernate.internal.util.ReflectHelper.getter(ReflectHelper.java:238) at org.hibernate.orm.core@5.6.10.Final/org.hibernate.internal.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:218) at org.hibernate.orm.core@5.6.10.Final/org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:542) at org.hibernate.orm.core@5.6.10.Final/org.hibernate.boot.model.source.internal.hbm.ModelBinder.bindSimpleEntityIdentifier(ModelBinder.java:732) at org.hibernate.orm.core@5.6.10.Final/org.hibernate.boot.model.source.internal.hbm.ModelBinder.bindEntityIdentifier(ModelBinder.java:351) at org.hibernate.orm.core@5.6.10.Final/org.hibernate.boot.model.source.internal.hbm.ModelBinder.bindRootEntity(ModelBinder.java:246) at org.hibernate.orm.core@5.6.10.Final/org.hibernate.boot.model.source.internal.hbm.ModelBinder.bindEntityHierarchy(ModelBinder.java:193) at org.hibernate.orm.core@5.6.10.Final/org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:319) at org.hibernate.orm.core@5.6.10.Final/org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1460) at org.hibernate.orm.core@5.6.10.Final/org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1494) at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58) at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) at spring.beans@5.3.22/org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) at spring.beans@5.3.22/org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) I had a similar issue with Java 9 modules which was fixed earlier. |