You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@SpringBootApplication
@EnableMapRepositories
classDemoApplicationfunmain(args:Array<String>) {
val context = runApplication<DemoApplication>(*args)
}
interfaceWebsiteRepository : CrudRepository<Website, String>
@KeySpace("website")
data classWebsite(
@Id
valid:String,
valurl:URL,
)
Output:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'websiteRepository' defined in com.example.demo.WebsiteRepository defined in @EnableMapRepositories declared on DemoApplication: Unable to make field private java.lang.String java.net.URL.protocol accessible: module java.base does not "opens java.net" to unnamed module @139982de
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1786) ~[spring-beans-6.1.5.jar:6.1.5]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) ~[spring-beans-6.1.5.jar:6.1.5]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) ~[spring-beans-6.1.5.jar:6.1.5]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.1.5.jar:6.1.5]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.5.jar:6.1.5]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.1.5.jar:6.1.5]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.1.5.jar:6.1.5]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:969) ~[spring-beans-6.1.5.jar:6.1.5]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:962) ~[spring-context-6.1.5.jar:6.1.5]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624) ~[spring-context-6.1.5.jar:6.1.5]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) ~[spring-boot-3.2.4.jar:3.2.4]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) ~[spring-boot-3.2.4.jar:3.2.4]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) ~[spring-boot-3.2.4.jar:3.2.4]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) ~[spring-boot-3.2.4.jar:3.2.4]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) ~[spring-boot-3.2.4.jar:3.2.4]
at com.example.demo.DemoApplicationKt.main(DemoApplication.kt:27) ~[main/:na]
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private java.lang.String java.net.URL.protocol accessible: module java.base does not "opens java.net" to unnamed module @139982de
at java.base/java.lang.reflect.AccessibleObject.throwInaccessibleObjectException(AccessibleObject.java:391) ~[na:na]
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:367) ~[na:na]
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:315) ~[na:na]
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:183) ~[na:na]
at java.base/java.lang.reflect.Field.setAccessible(Field.java:177) ~[na:na]
at org.springframework.util.ReflectionUtils.makeAccessible(ReflectionUtils.java:804) ~[spring-core-6.1.5.jar:6.1.5]
at org.springframework.data.mapping.context.AbstractMappingContext$PersistentPropertyCreator.doWith(AbstractMappingContext.java:572) ~[spring-data-commons-3.2.4.jar:3.2.4]
at org.springframework.util.ReflectionUtils.doWithFields(ReflectionUtils.java:728) ~[spring-core-6.1.5.jar:6.1.5]
at org.springframework.data.mapping.context.AbstractMappingContext.doAddPersistentEntity(AbstractMappingContext.java:427) ~[spring-data-commons-3.2.4.jar:3.2.4]
at org.springframework.data.mapping.context.AbstractMappingContext.addPersistentEntity(AbstractMappingContext.java:383) ~[spring-data-commons-3.2.4.jar:3.2.4]
at org.springframework.data.mapping.context.AbstractMappingContext$PersistentPropertyCreator.lambda$createAndRegisterProperty$3(AbstractMappingContext.java:627) ~[spring-data-commons-3.2.4.jar:3.2.4]
at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[na:na]
at org.springframework.data.mapping.context.AbstractMappingContext$PersistentPropertyCreator.createAndRegisterProperty(AbstractMappingContext.java:624) ~[spring-data-commons-3.2.4.jar:3.2.4]
at org.springframework.data.mapping.context.AbstractMappingContext$PersistentPropertyCreator.doWith(AbstractMappingContext.java:578) ~[spring-data-commons-3.2.4.jar:3.2.4]
at org.springframework.util.ReflectionUtils.doWithFields(ReflectionUtils.java:728) ~[spring-core-6.1.5.jar:6.1.5]
at org.springframework.data.mapping.context.AbstractMappingContext.doAddPersistentEntity(AbstractMappingContext.java:427) ~[spring-data-commons-3.2.4.jar:3.2.4]
at org.springframework.data.mapping.context.AbstractMappingContext.addPersistentEntity(AbstractMappingContext.java:383) ~[spring-data-commons-3.2.4.jar:3.2.4]
at org.springframework.data.mapping.context.AbstractMappingContext.getPersistentEntity(AbstractMappingContext.java:279) ~[spring-data-commons-3.2.4.jar:3.2.4]
at org.springframework.data.mapping.context.AbstractMappingContext.getPersistentEntity(AbstractMappingContext.java:205) ~[spring-data-commons-3.2.4.jar:3.2.4]
at org.springframework.data.mapping.context.AbstractMappingContext.getPersistentEntity(AbstractMappingContext.java:92) ~[spring-data-commons-3.2.4.jar:3.2.4]
at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.lambda$afterPropertiesSet$6(RepositoryFactoryBeanSupport.java:282) ~[spring-data-commons-3.2.4.jar:3.2.4]
at java.base/java.util.Optional.ifPresent(Optional.java:178) ~[na:na]
at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:282) ~[spring-data-commons-3.2.4.jar:3.2.4]
at org.springframework.data.keyvalue.repository.support.KeyValueRepositoryFactoryBean.afterPropertiesSet(KeyValueRepositoryFactoryBean.java:123) ~[spring-data-keyvalue-3.2.4.jar:3.2.4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1833) ~[spring-beans-6.1.5.jar:6.1.5]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782) ~[spring-beans-6.1.5.jar:6.1.5]
... 15 common frames omitted
The text was updated successfully, but these errors were encountered:
Same issue as in: spring-projects/spring-data-mongodb#4237
Reproducer: https://github.com/micheljung/spring-data-keyvalue-569
Output:
The text was updated successfully, but these errors were encountered: