CacheConfiguration, unnamed module, Java 21
- Dominant language
- Java
- Stars
- 5.1k
- Forks
- 1.9k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 46
Description
adding cache config with
```
CacheConfiguration cacheConfig = new CacheConfiguration<>();
new IgniteConfiguration()
.setCacheConfiguration(cacheConfig);
```
in Spring Boot 3.2.1, Java 21.
The result is
`Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'igniteConfiguration' defined in class path resource [server/base/IgniteConfig.class]: Failed to instantiate [org.apache.ignite.configuration.IgniteConfiguration]: Factory method 'igniteConfigurationProd' threw exception with message: class [Ljava.lang.Object; cannot be cast to class [Lorg.apache.ignite.configuration.CacheConfiguration; ([Ljava.lang.Object; is in module java.base of loader 'bootstrap'; [Lorg.apache.ignite.configuration.CacheConfiguration; is in unnamed module of loader org.springframework.boot.loader.launch.LaunchedClassLoader @49e4cb85)`
Any suggestions on how to resolve this (probably with --add-opens)?
Contributor guide
Research direction
Reproduce the CacheConfiguration setup with Spring Boot 3.2.1 and Java 21, starting from the IgniteConfiguration construction described in the issue and the server/base/IgniteConfig.class entry point in the exception. Investigate why the cache configuration array is treated as Object[] rather than CacheConfiguration[]; done means the application starts with the configuration and the reported ClassCastException no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100