Marko Bekhta (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *updated* an issue
Hibernate Search (
https://hibernate.atlassian.net/browse/HSEARCH?atlOrigin=eyJpIjoiYzcyYTJl...
) / Bug (
https://hibernate.atlassian.net/browse/HSEARCH-4703?atlOrigin=eyJpIjoiYzc...
) HSEARCH-4703 (
https://hibernate.atlassian.net/browse/HSEARCH-4703?atlOrigin=eyJpIjoiYzc...
) HSearch Outbox table module -> inaccesible private field error using Java 9 modules (
https://hibernate.atlassian.net/browse/HSEARCH-4703?atlOrigin=eyJpIjoiYzc...
)
Change By: Marko Bekhta (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
Hi,
I am having some issues with certain fields not being able to be accessed when using Java
9 modules in my project.
{noformat} 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
|http://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)
{noformat}
I had a similar issue with Java 9 modules which was fixed earlier.
(
https://hibernate.atlassian.net/browse/HSEARCH-4703#add-comment?atlOrigin...
) Add Comment (
https://hibernate.atlassian.net/browse/HSEARCH-4703#add-comment?atlOrigin...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100208- sha1:38b2e23 )