oracle / graalvm-reachability-metadata Goto Github PK
View Code? Open in Web Editor NEWRepository which contains community-driven collection of GraalVM reachability metadata for open-source libraries.
License: Creative Commons Zero v1.0 Universal
Repository which contains community-driven collection of GraalVM reachability metadata for open-source libraries.
License: Creative Commons Zero v1.0 Universal
This issue is about adding an override
boolean flag to mention that the provided reachability metadata should override the one provided by the original dependency by excluding the builtin one. This is required for Netty 4.1 for example in order to avoid using the builtin build-time class initialized configuration, see netty/netty#12601 (comment) related detail about why this can't be merged in Netty 4.1 but only Netty 5.
I will also create the related https://github.com/graalvm/native-build-tools issue.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Warning: Properties file at 'jar:file:///home/runner/.m2/repository/io/netty/netty-codec-http2/4.1.84.Final/netty-codec-http2-4.1.84.Final.jar!/META-INF/native-image/io.netty/codec-http2/native-image.properties' does not match the recommended 'META-INF/native-image/io.netty/netty-codec-http2/native-image.properties' layout.
Warning: Properties file at 'jar:file:///home/runner/.m2/repository/io/netty/netty-resolver-dns/4.1.84.Final/netty-resolver-dns-4.1.84.Final.jar!/META-INF/native-image/io.netty/resolver-dns/native-image.properties' does not match the recommended 'META-INF/native-image/io.netty/netty-resolver-dns/native-image.properties' layout.
Warning: Properties file at 'jar:file:///home/runner/.m2/repository/io/netty/netty-transport/4.1.84.Final/netty-transport-4.1.84.Final.jar!/META-INF/native-image/io.netty/transport/native-image.properties' does not match the recommended 'META-INF/native-image/io.netty/netty-transport/native-image.properties' layout.
Warning: Properties file at 'jar:file:///home/runner/.m2/repository/io/netty/netty-common/4.1.84.Final/netty-common-4.1.84.Final.jar!/META-INF/native-image/io.netty/common/native-image.properties' does not match the recommended 'META-INF/native-image/io.netty/netty-common/native-image.properties' layout.
Warning: Properties file at 'jar:file:///home/runner/.m2/repository/io/netty/netty-codec/4.1.84.Final/netty-codec-4.1.84.Final.jar!/META-INF/native-image/codec-handlers/native-image.properties' does not match the recommended 'META-INF/native-image/io.netty/netty-codec/native-image.properties' layout.
Warning: Properties file at 'jar:file:///home/runner/.m2/repository/io/netty/netty-handler/4.1.84.Final/netty-handler-4.1.84.Final.jar!/META-INF/native-image/io.netty/handler/native-image.properties' does not match the recommended 'META-INF/native-image/io.netty/netty-handler/native-image.properties' layout.
Warning: Properties file at 'jar:file:///home/runner/.m2/repository/io/netty/netty-codec-http/4.1.84.Final/netty-codec-http-4.1.84.Final.jar!/META-INF/native-image/io.netty/codec-http/native-image.properties' does not match the recommended 'META-INF/native-image/io.netty/netty-codec-http/native-image.properties' layout.
Warning: Properties file at 'jar:file:///home/runner/.m2/repository/io/netty/netty-buffer/4.1.84.Final/netty-buffer-4.1.84.Final.jar!/META-INF/native-image/io.netty/buffer/native-image.properties' does not match the recommended 'META-INF/native-image/io.netty/netty-buffer/native-image.properties' layout.
Warning: Could not register io.netty.handler.codec.compression.Lz4FrameDecoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: net/jpountz/lz4/LZ4Exception.
Warning: Could not register io.netty.handler.codec.compression.Lz4FrameEncoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: net/jpountz/lz4/LZ4Exception.
Warning: Could not register io.netty.handler.codec.marshalling.CompatibleMarshallingDecoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: org/jboss/marshalling/ByteInput.
Warning: Could not register io.netty.handler.codec.marshalling.CompatibleMarshallingEncoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: org/jboss/marshalling/ByteOutput.
Warning: Could not register io.netty.handler.codec.marshalling.MarshallingDecoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: org/jboss/marshalling/ByteInput.
Warning: Could not register io.netty.handler.codec.marshalling.MarshallingEncoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: org/jboss/marshalling/ByteOutput.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
I think it's a good idea to increase the project's Java language level to 17, and https://github.com/oracle/graalvm-reachability-metadata/blob/master/tests/tck-build-logic/src/main/groovy/org.graalvm.internal.tck.gradle#L23 is still Java 11.
The main reason I came up with this idea is that in https://github.com/oracle/graalvm-reachability-metadata/tree/master/.github/workflows , in this case, all CI/CD tasks only test JDK 17. I was confused by checkstyle restrictions when I first touched the project.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Add metadata for org.quartz-scheduler:quartz:2.3.2
. Spring Boot uses the SQL files embedded as resources, too.
I was having a quick look into the Hibernate ORM metadata, and found some strange things such as valid blocks with valid conditionals, but pointing to empty lists of type to be made reachable.
{
"condition": {
"typeReachable": "org.hibernate.bytecode.internal.bytebuddy.ByteBuddyState$ProxyDefinitionHelpers$1"
},
"interfaces": []
},
I suppose these are harmless, but tracking here as something that should be looked at.
Netty 4.1.80 requires additional metadata for all of the ChannelHandler
implementations it provides, see netty/netty#12725 and netty/netty#12738
We use org.eclipse.jetty:jetty-webapp:11.0.12
and it would be great to have support for it.
Is your feature request related to a problem? Please describe.
Metadata for hibernate-envers is missing causing trouble for applications.
java.lang.NoSuchMethodException: org.hibernate.envers.boot.internal.LegacyModifiedColumnNamingStrategy.<init>()
at java.lang.Class.getConstructor0(DynamicHub.java:3585) ~[demo.exe:na]
at java.lang
Describe the solution you'd like
Metadata extracted by running hibernate-envers tests with the agent attached should be added to this repo.
Describe alternatives you've considered
Everyone has to do it own their own.
Additional context
See: spring-projects/spring-data-jpa#2662
Describe the bug
When using Postgres, Hibernate logs a warnings due to some reflection failing.
To Reproduce
spring-projects/spring-boot#33400 contains a link to a sample that reproduces the problem.
Expected behavior
Hibernate can bootstrap itself without warnings.
Logs
2022-11-28T10:14:33.953-05:00 WARN 62921 --- [ main] o.h.dialect.PostgreSQLPGObjectJdbcType : PostgreSQL JDBC driver classes are inaccessible and thus, certain DDL types like JSONB, JSON, GEOMETRY can not be used!
java.lang.NoSuchMethodException: org.postgresql.util.PGobject.<init>()
at [email protected]/java.lang.Class.getConstructor0(DynamicHub.java:3585) ~[chapter-4-spring-data-jpa:na]
at [email protected]/java.lang.Class.getConstructor(DynamicHub.java:2271) ~[chapter-4-spring-data-jpa:na]
at org.hibernate.dialect.PostgreSQLPGObjectJdbcType.<clinit>(PostgreSQLPGObjectJdbcType.java:50) ~[chapter-4-spring-data-jpa:6.1.5.Final]
at org.hibernate.dialect.PostgreSQLDialect.registerColumnTypes(PostgreSQLDialect.java:231) ~[chapter-4-spring-data-jpa:6.1.5.Final]
at org.hibernate.dialect.Dialect.contributeTypes(Dialect.java:1341) ~[chapter-4-spring-data-jpa:6.1.5.Final]
at org.hibernate.dialect.PostgreSQLDialect.contributeTypes(PostgreSQLDialect.java:1229) ~[chapter-4-spring-data-jpa:6.1.5.Final]
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.handleTypes(MetadataBuildingProcess.java:386) ~[na:na]
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:143) ~[na:na]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1350) ~[chapter-4-spring-data-jpa:6.1.5.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1421) ~[chapter-4-spring-data-jpa:6.1.5.Final]
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:66) ~[na:na]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:376) ~[chapter-4-spring-data-jpa:6.0.2]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) ~[chapter-4-spring-data-jpa:6.0.2]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) ~[chapter-4-spring-data-jpa:6.0.2]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:352) ~[chapter-4-spring-data-jpa:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1797) ~[chapter-4-spring-data-jpa:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1747) ~[chapter-4-spring-data-jpa:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:599) ~[chapter-4-spring-data-jpa:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) ~[chapter-4-spring-data-jpa:6.0.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[chapter-4-spring-data-jpa:6.0.2]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[chapter-4-spring-data-jpa:6.0.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[chapter-4-spring-data-jpa:6.0.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[chapter-4-spring-data-jpa:6.0.2]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1130) ~[chapter-4-spring-data-jpa:6.0.2]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:905) ~[chapter-4-spring-data-jpa:6.0.2]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:584) ~[chapter-4-spring-data-jpa:6.0.2]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[chapter-4-spring-data-jpa:3.0.0]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730) ~[chapter-4-spring-data-jpa:3.0.0]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:432) ~[chapter-4-spring-data-jpa:3.0.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[chapter-4-spring-data-jpa:3.0.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302) ~[chapter-4-spring-data-jpa:3.0.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1291) ~[chapter-4-spring-data-jpa:3.0.0]
at org.acme.Chapter4SpringDataJpaApplication.main(Chapter4SpringDataJpaApplication.java:10) ~[chapter-4-spring-data-jpa:na]
System Info (please complete the following information):
Is your feature request related to a problem? Please describe.
The current reflection metadata contains some invalid configuration causing warnings during native image creation.
Describe the solution you'd like
Remove/Update invalid entries based on warnings produced.
Describe alternatives you've considered
Stick with the warnings.
Additional context
Warning: Method jakarta.persistence.AttributeOverride.<init>() not found.
Warning: Method jakarta.persistence.AttributeOverrides.<init>() not found.
Warning: Method jakarta.persistence.Basic.<init>() not found.
Warning: Method jakarta.persistence.Cacheable.<init>() not found.
Warning: Method jakarta.persistence.Column.<init>() not found.
Warning: Method jakarta.persistence.Embeddable.<init>() not found.
Warning: Method jakarta.persistence.Embeddable.<init>() not found.
Warning: Method jakarta.persistence.Embedded.<init>() not found.
Warning: Method jakarta.persistence.Entity.<init>() not found.
Warning: Method jakarta.persistence.Entity.<init>() not found.
Warning: Method jakarta.persistence.EntityListeners.<init>() not found.
Warning: Method jakarta.persistence.GeneratedValue.<init>() not found.
Warning: Method jakarta.persistence.GeneratedValue.<init>() not found.
Warning: Method jakarta.persistence.Id.<init>() not found.
Warning: Method jakarta.persistence.Id.<init>() not found.
Warning: Method jakarta.persistence.PrePersist.<init>() not found.
Warning: Method jakarta.persistence.PrePersist.<init>() not found.
Warning: Could not resolve jakarta.servlet.Servlet for reflection configuration. Reason: java.lang.ClassNotFoundException: jakarta.servlet.Servlet.
Warning: Method jakarta.xml.bind.annotation.XmlAccessorType.<init>() not found.
Warning: Method jakarta.xml.bind.annotation.XmlAccessorType.<init>() not found.
Warning: Method jakarta.xml.bind.annotation.XmlAttribute.<init>() not found.
Warning: Method jakarta.xml.bind.annotation.XmlAttribute.<init>() not found.
Warning: Method jakarta.xml.bind.annotation.XmlElement.<init>() not found.
Warning: Method jakarta.xml.bind.annotation.XmlElement.<init>() not found.
Warning: Method jakarta.xml.bind.annotation.XmlElementDecl.<init>() not found.
Warning: Method jakarta.xml.bind.annotation.XmlElementDecl.<init>() not found.
Warning: Method jakarta.xml.bind.annotation.XmlElementRef.<init>() not found.
Warning: Method jakarta.xml.bind.annotation.XmlElementRef.<init>() not found.
Warning: Method jakarta.xml.bind.annotation.XmlElementRefs.<init>() not found.
Warning: Method jakarta.xml.bind.annotation.XmlElementRefs.<init>() not found.
Warning: Method jakarta.xml.bind.annotation.XmlElements.<init>() not found.
Warning: Method jakarta.xml.bind.annotation.XmlEnum.<init>() not found.
arning: Method jdk.internal.ValueBased.<init>() not found.
Warning: Could not resolve jdk.internal.reflect.GeneratedConstructorAccessor10 for reflection configuration. Reason: java.lang.ClassNotFoundException: jdk.internal.reflect.GeneratedConstructorAccessor10.
Warning: Could not resolve jdk.internal.reflect.GeneratedConstructorAccessor11 for reflection configuration. Reason: java.lang.ClassNotFoundException: jdk.internal.reflect.GeneratedConstructorAccessor11.
Warning: Could not resolve jdk.internal.reflect.GeneratedConstructorAccessor12 for reflection configuration. Reason: java.lang.ClassNotFoundException: jdk.internal.reflect.GeneratedConstructorAccessor12.
Warning: Could not resolve jdk.internal.reflect.GeneratedConstructorAccessor13 for reflection configuration. Reason: java.lang.ClassNotFoundException: jdk.internal.reflect.GeneratedConstructorAccessor13.
Warning: Method jdk.internal.vm.annotation.IntrinsicCandidate.<init>() not found.
Warning: Method org.glassfish.jaxb.runtime.v2.ContextFactory.createContext() not found.
Warning: Method org.hibernate.Internal.<init>() not found.
Warning: Method org.hibernate.annotations.Columns.<init>() not found.
Warning: Method org.hibernate.id.enhanced.PooledOptimizer.<init>(int) not found.
Warning: Method org.hibernate.id.enhanced.NoopOptimizer.<init>(int) not found.
Warning: Method org.hibernate.id.enhanced.NoopOptimizer.<init>(int) not found.
Warning: Method org.hibernate.id.uuid.UuidGenerator.<init>(UuidGenerator, CustomIdGeneratorCreationContext) not found.
...
See netty/netty#12601 (comment) for more context on why that's needed and how to generate the related config.
Coordinates: org.jboss.logging:jboss-logging:3.5.0.Final
Currently gh actions only use linux to run tests and it'd be beneficial to enable macos and windows getting better test coverage.
I experimented enabling tests on macos/windows are here's some notes.
On windows there's some things to change
On both macos and windows
@EnabledOnOs(OS.LINUX)
on those tests which doesn't work on native tests due toError: Classes that should be initialized at run time got initialized during image building: org.junit.jupiter.api.condition.OS was unintentionally initialized at build time.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
io.vertx:vertx-core:4.3.5
.Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Jline itself has incomplete metadata and additional metadata in this repo only added some new stuff together with jansi. On windows you need to use either jansi or jna. Jna config with windows is complicated as it requires additional jni-config
and some dll's as resources. In spring-shell
we've managed to get jline working well with both cmd
and powershell
.
It is a bit of a struggle create good tests due to a nature of how jline can be used and gets more cumbersome with macos/windows.
We're using org.mariadb.jdbc:mariadb-java-client:3.0.6
and when we try to connect to a database it fails with:
java.lang.NullPointerException: inStream parameter is null
at java.util.Objects.requireNonNull(Objects.java:233) ~[na:na]
at java.util.Properties.load(Properties.java:407) ~[jdbc-mariadb:na]
at org.mariadb.jdbc.util.VersionFactory.getInstance(VersionFactory.java:26) ~[na:na]
at org.mariadb.jdbc.message.client.HandshakeResponse.writeConnectAttributes(HandshakeResponse.java:96) ~[na:na]
at org.mariadb.jdbc.message.client.HandshakeResponse.encode(HandshakeResponse.java:179) ~[na:na]
at org.mariadb.jdbc.client.impl.StandardClient.<init>(StandardClient.java:185) ~[jdbc-mariadb:na]
at org.mariadb.jdbc.Driver.connect(Driver.java:70) ~[jdbc-mariadb:na]
at org.mariadb.jdbc.Driver.connect(Driver.java:101) ~[jdbc-mariadb:na]
at org.mariadb.jdbc.Driver.connect(Driver.java:27) ~[jdbc-mariadb:na]
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) ~[na:na]
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) ~[jdbc-mariadb:na]
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) ~[jdbc-mariadb:na]
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) ~[na:na]
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) ~[na:na]
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:100) ~[na:na]
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) ~[jdbc-mariadb:na]
at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:159) ~[na:na]
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:117) ~[na:na]
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80) ~[na:na]
at org.springframework.jdbc.datasource.init.DatabasePopulatorUtils.execute(DatabasePopulatorUtils.java:52) ~[na:na]
at org.springframework.boot.jdbc.init.DataSourceScriptDatabaseInitializer.runScripts(DataSourceScriptDatabaseInitializer.java:90) ~[jdbc-mariadb:3.0.0-SNAPSHOT]
at org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer.runScripts(AbstractScriptDatabaseInitializer.java:145) ~[jdbc-mariadb:3.0.0-SNAPSHOT]
at org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer.applyScripts(AbstractScriptDatabaseInitializer.java:107) ~[jdbc-mariadb:3.0.0-SNAPSHOT]
at org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer.applySchemaScripts(AbstractScriptDatabaseInitializer.java:97) ~[jdbc-mariadb:3.0.0-SNAPSHOT]
at org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer.initializeDatabase(AbstractScriptDatabaseInitializer.java:75) ~[jdbc-mariadb:3.0.0-SNAPSHOT]
at org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer.afterPropertiesSet(AbstractScriptDatabaseInitializer.java:65) ~[jdbc-mariadb:3.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1800) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1750) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:605) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:527) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:313) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1374) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1294) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.aot.BeanInstanceSupplier.resolveArgument(BeanInstanceSupplier.java:332) ~[na:na]
at org.springframework.beans.factory.aot.BeanInstanceSupplier.resolveArguments(BeanInstanceSupplier.java:265) ~[na:na]
at org.springframework.beans.factory.aot.BeanInstanceSupplier.get(BeanInstanceSupplier.java:208) ~[na:na]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainInstanceFromSupplier(AbstractAutowireCapableBeanFactory.java:1225) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1210) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1157) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:567) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:527) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:930) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:926) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:592) ~[jdbc-mariadb:6.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731) ~[jdbc-mariadb:3.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:430) ~[jdbc-mariadb:3.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) ~[jdbc-mariadb:3.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) ~[jdbc-mariadb:3.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) ~[jdbc-mariadb:3.0.0-SNAPSHOT]
at com.example.jdbc.mariadb.JdbcMariaDBApplication.main(JdbcMariaDBApplication.java:13) ~[jdbc-mariadb:na]
With MySql connector 8.0.31
, when using Maven we see a message The artifact mysql:mysql-connector-java:jar:8.0.31 has been relocated to com.mysql:mysql-connector-j:jar:8.0.31
and the related metadata are not registered likely because mysql:mysql-connector-java
does not match with com.mysql:mysql-connector-j
. We should probably introduce metadata for com.mysql:mysql-connector-j:jar:8.0.31
and check in the test there is no regression.
Used version:
| +--- io.rsocket:rsocket-core:1.1.2 (c)
| +--- io.rsocket:rsocket-transport-netty:1.1.2 (c)
Our sample fails with:
java.lang.NoClassDefFoundError: Could not initialize class io.rsocket.internal.jctools.queues.MpscUnboundedArrayQueue
at io.rsocket.internal.UnboundedProcessor.<init>(UnboundedProcessor.java:102) ~[rsocket:na]
at io.rsocket.internal.UnboundedProcessor.<init>(UnboundedProcessor.java:97) ~[rsocket:na]
at io.rsocket.internal.BaseDuplexConnection.<init>(BaseDuplexConnection.java:27) ~[rsocket:na]
at io.rsocket.transport.netty.TcpDuplexConnection.<init>(TcpDuplexConnection.java:41) ~[na:na]
at io.rsocket.transport.netty.server.TcpServerTransport.lambda$start$0(TcpServerTransport.java:116) ~[na:na]
at reactor.netty.transport.ServerTransportConfig$ServerTransportDoOnConnection.onStateChange(ServerTransportConfig.java:253) ~[na:na]
at reactor.netty.transport.ServerTransport$ChildObserver.onStateChange(ServerTransport.java:478) ~[na:na]
at reactor.netty.channel.ChannelOperationsHandler.channelActive(ChannelOperationsHandler.java:62) ~[na:na]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:230) ~[rsocket:4.1.79.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:216) ~[rsocket:4.1.79.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:209) ~[rsocket:4.1.79.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelActive(DefaultChannelPipeline.java:1398) ~[na:na]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:230) ~[rsocket:4.1.79.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:216) ~[rsocket:4.1.79.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelActive(DefaultChannelPipeline.java:895) ~[rsocket:4.1.79.Final]
at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:522) ~[rsocket:4.1.79.Final]
at io.netty.channel.AbstractChannel$AbstractUnsafe.access$200(AbstractChannel.java:429) ~[rsocket:4.1.79.Final]
at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:486) ~[na:na]
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[rsocket:4.1.79.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[rsocket:4.1.79.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[rsocket:4.1.79.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:503) ~[na:na]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[na:na]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[na:na]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[na:na]
at java.lang.Thread.run(Thread.java:833) ~[rsocket:na]
at com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:704) ~[rsocket:na]
at com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:202) ~[na:na]
latest
attribute seems not robust enough since it does not manage any notion of semantic versioning.
For example, I am going to add metadata for ch.qos.logback:logback-classic 1.4.1
with the latest
flag set to true
. Once Logback 1.2.12
will be out and used by somebody, native compilation will be broken due to the default to the latest if we just have metadata for 1.2.11
.
As discussed with @melix, we could introduce a default-for
attribute with a regexp value used to match the version of the dependency. latest
would translate to "default-for": ".*"
, and we could document and use regexp for matching the same major + major version, which would be the most common use case.
kotlin-reflect
doesn't work on GraalVM native-image. We have these hints in Spring, which need to be contributed to this repo.
We use org.freemarker:freemarker:2.3.31
and this doesn't work in native-image:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'freeMarkerConfigurer': null
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1754) ~[freemarker-webmvc:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:599) ~[freemarker-webmvc:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) ~[freemarker-webmvc:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[freemarker-webmvc:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[freemarker-webmvc:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[freemarker-webmvc:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[freemarker-webmvc:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:931) ~[freemarker-webmvc:6.0.0-SNAPSHOT]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:926) ~[freemarker-webmvc:6.0.0-SNAPSHOT]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:592) ~[freemarker-webmvc:6.0.0-SNAPSHOT]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[freemarker-webmvc:3.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731) ~[freemarker-webmvc:3.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:430) ~[freemarker-webmvc:3.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) ~[freemarker-webmvc:3.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) ~[freemarker-webmvc:3.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) ~[freemarker-webmvc:3.0.0-SNAPSHOT]
at com.example.freemarker.webmvc.FreemarkerWebMvcApplication.main(FreemarkerWebMvcApplication.java:10) ~[freemarker-webmvc:na]
Caused by: java.lang.ExceptionInInitializerError: null
at freemarker.ext.beans.ClassIntrospectorBuilder.<init>(ClassIntrospectorBuilder.java:73) ~[na:na]
at freemarker.ext.beans.BeansWrapperConfiguration.<init>(BeansWrapperConfiguration.java:94) ~[freemarker-webmvc:2.3.31]
at freemarker.template.DefaultObjectWrapperConfiguration.<init>(DefaultObjectWrapperConfiguration.java:42) ~[freemarker-webmvc:2.3.31]
at freemarker.template.DefaultObjectWrapper$1.<init>(DefaultObjectWrapper.java:120) ~[na:na]
at freemarker.template.DefaultObjectWrapper.<init>(DefaultObjectWrapper.java:120) ~[freemarker-webmvc:2.3.31]
at freemarker.template.DefaultObjectWrapper.<init>(DefaultObjectWrapper.java:89) ~[freemarker-webmvc:2.3.31]
at freemarker.template.DefaultObjectWrapper.<clinit>(DefaultObjectWrapper.java:67) ~[freemarker-webmvc:2.3.31]
at java.lang.Class.ensureInitialized(DynamicHub.java:525) ~[freemarker-webmvc:na]
at freemarker.template._TemplateAPI.<clinit>(_TemplateAPI.java:83) ~[na:na]
at freemarker.core.Configurable.<init>(Configurable.java:420) ~[freemarker-webmvc:2.3.31]
at freemarker.template.Configuration.<init>(Configuration.java:954) ~[freemarker-webmvc:2.3.31]
at org.springframework.ui.freemarker.FreeMarkerConfigurationFactory.newConfiguration(FreeMarkerConfigurationFactory.java:327) ~[freemarker-webmvc:6.0.0-SNAPSHOT]
at org.springframework.ui.freemarker.FreeMarkerConfigurationFactory.createConfiguration(FreeMarkerConfigurationFactory.java:257) ~[freemarker-webmvc:6.0.0-SNAPSHOT]
at org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer.afterPropertiesSet(FreeMarkerConfigurer.java:105) ~[freemarker-webmvc:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1800) ~[freemarker-webmvc:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1750) ~[freemarker-webmvc:6.0.0-SNAPSHOT]
... 16 common frames omitted
Caused by: java.lang.IllegalStateException: Couldn't init freemarker.ext.beans.DefaultMemberAccessPolicy instance
at freemarker.ext.beans.DefaultMemberAccessPolicy.<init>(DefaultMemberAccessPolicy.java:156) ~[na:na]
at freemarker.ext.beans.DefaultMemberAccessPolicy.<clinit>(DefaultMemberAccessPolicy.java:47) ~[na:na]
... 32 common frames omitted
Caused by: java.lang.NullPointerException: null
at java.io.Reader.<init>(Reader.java:168) ~[freemarker-webmvc:na]
at java.io.InputStreamReader.<init>(InputStreamReader.java:97) ~[freemarker-webmvc:na]
at freemarker.ext.beans.DefaultMemberAccessPolicy.loadMemberSelectorFileLines(DefaultMemberAccessPolicy.java:164) ~[na:na]
at freemarker.ext.beans.DefaultMemberAccessPolicy.<init>(DefaultMemberAccessPolicy.java:73) ~[na:na]
... 33 common frames omitted
Is your feature request related to a problem? Please describe.
Using hibernate validator along with hibernate-orm the following reflection hint is missing.
{
"name": "org.hibernate.cfg.beanvalidation.TypeSafeActivator",
"allDeclaredMethods":true,
"condition": {
"typeReachable": "jakarta.validation.ValidatorFactory"
}
}
Describe the solution you'd like
Add hint to existing /metadata/org.hibernate.orm/hibernate-core/6.1.1.Final/reflect-config.json
Describe alternatives you've considered
Users need to add the hint on their own (not desired)
Additional context
Without the hint users face the following error at runtime.
Caused by: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [org.hibernate.cfg.beanvalidation.TypeSafeActivator]
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:123) ~[na:na]
at org.hibernate.cfg.beanvalidation.BeanValidationIntegrator.loadTypeSafeActivatorClass(BeanValidationIntegrator.java:191) ~[na:na]
... 27 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.hibernate.cfg.beanvalidation.TypeSafeActivator
at java.lang.Class.forName(DynamicHub.java:1136) ~[restbucks:na]
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:120) ~[na:na]
... 28 common frames omitted
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
io.jsonwebtoken:jjwt-impl:0.11.5
.Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
It looks like on Mac io.netty.resolver.dns.DnsServerAddressStreamProviders
require a hint on MacOSDnsServerAddressStreamProvider
default constructor, and maybe other ones.
@joshlong Since I am on Linux, could you please provide the required *.json
files that make it work (including with the reachableType
entries)?
We use org.flywaydb:flyway-core:9.0.1
and it doesn't work in native-image:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer': null
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1754) ~[flyway:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:599) ~[flyway:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) ~[flyway:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[flyway:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[flyway:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[flyway:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[flyway:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:313) ~[flyway:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[flyway:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:931) ~[flyway:6.0.0-SNAPSHOT]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:926) ~[flyway:6.0.0-SNAPSHOT]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:592) ~[flyway:6.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731) ~[flyway:3.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:430) ~[flyway:3.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) ~[flyway:3.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) ~[flyway:3.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) ~[flyway:3.0.0-SNAPSHOT]
at com.example.flyway.FlywayApplication.main(FlywayApplication.java:10) ~[flyway:na]
Caused by: java.lang.ExceptionInInitializerError: null
at org.flywaydb.core.api.logging.LogFactory.autoDetectLogCreator(LogFactory.java:129) ~[na:na]
at org.flywaydb.core.api.logging.LogFactory.getLogCreator(LogFactory.java:104) ~[na:na]
at org.flywaydb.core.api.logging.LogFactory.getLog(LogFactory.java:86) ~[na:na]
at org.flywaydb.core.internal.license.VersionPrinter.<clinit>(VersionPrinter.java:27) ~[na:na]
at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:121) ~[flyway:na]
at org.flywaydb.core.Flyway.migrate(Flyway.java:126) ~[flyway:na]
at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:66) ~[flyway:na]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1800) ~[flyway:6.0.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1750) ~[flyway:6.0.0-SNAPSHOT]
... 17 common frames omitted
Caused by: org.flywaydb.core.api.FlywayException: Unable to instantiate class org.flywaydb.core.internal.logging.log4j2.Log4j2LogCreator : org.flywaydb.core.internal.logging.log4j2.Log4j2LogCreator
at org.flywaydb.core.internal.util.ClassUtils.instantiate(ClassUtils.java:50) ~[na:na]
at org.flywaydb.core.api.logging.LogFactory.autoDetectLogCreator(LogFactory.java:134) ~[na:na]
at org.flywaydb.core.api.logging.LogFactory.getLogCreator(LogFactory.java:104) ~[na:na]
at org.flywaydb.core.api.logging.LogFactory.getLog(LogFactory.java:86) ~[na:na]
at org.flywaydb.core.internal.util.FeatureDetector.<clinit>(FeatureDetector.java:20) ~[na:na]
... 26 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.flywaydb.core.internal.logging.log4j2.Log4j2LogCreator
at java.lang.Class.forName(DynamicHub.java:1136) ~[flyway:na]
at org.flywaydb.core.internal.util.ClassUtils.instantiate(ClassUtils.java:48) ~[na:na]
... 30 common frames omitted
Please add metadata for io.lettuce:lettuce-core:6.2.0.RELEASE
, Spring uses this as a Redis client.
Please add support for org.testcontainers:testcontainers:1.17.6
.
Depends on #128.
We're using org.cache2k:cache2k-core:2.6.1.Final
and it seems that hints are missing. There's a possible build-init problem in there too, I get this error while compiling:
2 fatal errors detected:
Fatal error: org.graalvm.compiler.debug.GraalError: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: No instances of ch.qos.logback.classic.Logger are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use --trace-object-instantiation=ch.qos.logback.classic.Logger.
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.AnalysisFuture.setException(AnalysisFuture.java:49)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:269)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.AnalysisFuture.ensureDone(AnalysisFuture.java:63)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.heap.ImageHeapScanner.lambda$postTask$9(ImageHeapScanner.java:611)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:193)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:177)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: No instances of ch.qos.logback.classic.Logger are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use --trace-object-instantiation=ch.qos.logback.classic.Logger.
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationFeature.checkImageHeapInstance(ClassInitializationFeature.java:140)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.replaceObject(AnalysisUniverse.java:583)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.ameta.AnalysisConstantReflectionProvider.replaceObject(AnalysisConstantReflectionProvider.java:257)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.ameta.AnalysisConstantReflectionProvider.interceptValue(AnalysisConstantReflectionProvider.java:228)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.heap.SVMImageHeapScanner.transformFieldValue(SVMImageHeapScanner.java:126)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.heap.ImageHeapScanner.onFieldValueReachable(ImageHeapScanner.java:331)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.heap.ImageHeapScanner.lambda$createImageHeapObject$3(ImageHeapScanner.java:272)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
... 10 more
Fatal error: org.graalvm.compiler.debug.GraalError: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: No instances of ch.qos.logback.classic.Logger are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use --trace-object-instantiation=ch.qos.logback.classic.Logger.
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.AnalysisFuture.setException(AnalysisFuture.java:49)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:269)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.AnalysisFuture.ensureDone(AnalysisFuture.java:63)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.heap.ImageHeapScanner.lambda$postTask$9(ImageHeapScanner.java:611)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:193)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:177)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: No instances of ch.qos.logback.classic.Logger are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use --trace-object-instantiation=ch.qos.logback.classic.Logger.
------------------------------------------------------------------------------------------------------------------------
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationFeature.checkImageHeapInstance(ClassInitializationFeature.java:140)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.replaceObject(AnalysisUniverse.java:583)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.ameta.AnalysisConstantReflectionProvider.replaceObject(AnalysisConstantReflectionProvider.java:257)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.ameta.AnalysisConstantReflectionProvider.interceptValue(AnalysisConstantReflectionProvider.java:228)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.heap.SVMImageHeapScanner.transformFieldValue(SVMImageHeapScanner.java:126)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.heap.ImageHeapScanner.onFieldValueReachable(ImageHeapScanner.java:331)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.heap.ImageHeapScanner.lambda$createImageHeapObject$3(ImageHeapScanner.java:272)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
... 10 more
@christophstrobl Hibernate dialect metadata needs to be refined:
org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.lambda$constructDialect$0(DialectFactoryImpl.java:112)
.Is your feature request related to a problem? Please describe.*
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
com.github.luben:zstd-jni:1.5.2-5
.Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Reproducer
git clone [email protected]:nkonev/web-jdbc-flyway-native.git # Don't take on account repository name, it's Liquibase
cd web-jdbc-flyway-native
git checkout liquibase
./gradlew clean bootBuildImage
docker-compose up -d
docker run --network=host --rm -p 8080:8080 docker.io/library/web-jdbc-native:0.0.1-SNAPSHOT
2022-11-25T11:38:17.811Z WARN 1 --- [ main] w.s.c.ServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'appRunner': Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'subjectRepository': Unsatisfied dependency expressed through method 'setMappingContext' parameter 0: Error creating bean with name 'jdbcMappingContext': Unsatisfied dependency expressed through method 'jdbcMappingContext' parameter 1: Error creating bean with name 'jdbcDialect': Unsatisfied dependency expressed through method 'jdbcDialect' parameter 0: Error creating bean with name 'liquibase': Runtime reflection is not supported for public void liquibase.change.core.SQLFileChange.setPath(java.lang.String)
2022-11-25T11:38:17.811Z INFO 1 --- [ main] com.zaxxer.hikari.HikariDataSource : web_jdbc_ds - Shutdown initiated...
2022-11-25T11:38:17.811Z INFO 1 --- [ main] com.zaxxer.hikari.HikariDataSource : web_jdbc_ds - Shutdown completed.
2022-11-25T11:38:17.812Z INFO 1 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2022-11-25T11:38:17.813Z ERROR 1 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'appRunner': Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'subjectRepository': Unsatisfied dependency expressed through method 'setMappingContext' parameter 0: Error creating bean with name 'jdbcMappingContext': Unsatisfied dependency expressed through method 'jdbcMappingContext' parameter 1: Error creating bean with name 'jdbcDialect': Unsatisfied dependency expressed through method 'jdbcDialect' parameter 0: Error creating bean with name 'liquibase': Runtime reflection is not supported for public void liquibase.change.core.SQLFileChange.setPath(java.lang.String)
at org.springframework.beans.factory.aot.BeanInstanceSupplier.resolveArgument(BeanInstanceSupplier.java:351) ~[na:na]
at org.springframework.beans.factory.aot.BeanInstanceSupplier.resolveArguments(BeanInstanceSupplier.java:271) ~[na:na]
at org.springframework.beans.factory.aot.BeanInstanceSupplier.get(BeanInstanceSupplier.java:206) ~[na:na]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainInstanceFromSupplier(AbstractAutowireCapableBeanFactory.java:1225) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1210) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1157) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:561) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:961) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:915) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:584) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:3.0.0]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:3.0.0]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:432) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:3.0.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:3.0.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:3.0.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1291) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:3.0.0]
at name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt.main(WebJdbcNativeApplication.kt:72) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:na]
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'subjectRepository': Unsatisfied dependency expressed through method 'setMappingContext' parameter 0: Error creating bean with name 'jdbcMappingContext': Unsatisfied dependency expressed through method 'jdbcMappingContext' parameter 1: Error creating bean with name 'jdbcDialect': Unsatisfied dependency expressed through method 'jdbcDialect' parameter 0: Error creating bean with name 'liquibase': Runtime reflection is not supported for public void liquibase.change.core.SQLFileChange.setPath(java.lang.String)
at org.springframework.beans.factory.aot.AutowiredMethodArgumentsResolver.resolveArguments(AutowiredMethodArgumentsResolver.java:197) ~[na:na]
at org.springframework.beans.factory.aot.AutowiredMethodArgumentsResolver.resolve(AutowiredMethodArgumentsResolver.java:145) ~[na:na]
at org.springframework.beans.factory.aot.AutowiredMethodArgumentsResolver.resolve(AutowiredMethodArgumentsResolver.java:131) ~[na:na]
at org.springframework.data.jdbc.repository.support.JdbcRepositoryFactoryBean__Autowiring.apply(JdbcRepositoryFactoryBean__Autowiring.java:20) ~[na:na]
at org.springframework.beans.factory.support.InstanceSupplier$1.get(InstanceSupplier.java:82) ~[na:na]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainInstanceFromSupplier(AbstractAutowireCapableBeanFactory.java:1225) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1210) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1157) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:561) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1405) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1325) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.aot.BeanInstanceSupplier.resolveArgument(BeanInstanceSupplier.java:334) ~[na:na]
... 21 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jdbcMappingContext': Unsatisfied dependency expressed through method 'jdbcMappingContext' parameter 1: Error creating bean with name 'jdbcDialect': Unsatisfied dependency expressed through method 'jdbcDialect' parameter 0: Error creating bean with name 'liquibase': Runtime reflection is not supported for public void liquibase.change.core.SQLFileChange.setPath(java.lang.String)
at org.springframework.beans.factory.aot.BeanInstanceSupplier.resolveArgument(BeanInstanceSupplier.java:351) ~[na:na]
at org.springframework.beans.factory.aot.BeanInstanceSupplier.resolveArguments(BeanInstanceSupplier.java:271) ~[na:na]
at org.springframework.beans.factory.aot.BeanInstanceSupplier.get(BeanInstanceSupplier.java:206) ~[na:na]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainInstanceFromSupplier(AbstractAutowireCapableBeanFactory.java:1225) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1210) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1157) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:561) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1405) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1325) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.aot.AutowiredMethodArgumentsResolver.resolveArguments(AutowiredMethodArgumentsResolver.java:189) ~[na:na]
... 38 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jdbcDialect': Unsatisfied dependency expressed through method 'jdbcDialect' parameter 0: Error creating bean with name 'liquibase': Runtime reflection is not supported for public void liquibase.change.core.SQLFileChange.setPath(java.lang.String)
at org.springframework.beans.factory.aot.BeanInstanceSupplier.resolveArgument(BeanInstanceSupplier.java:351) ~[na:na]
at org.springframework.beans.factory.aot.BeanInstanceSupplier.resolveArguments(BeanInstanceSupplier.java:271) ~[na:na]
at org.springframework.beans.factory.aot.BeanInstanceSupplier.get(BeanInstanceSupplier.java:206) ~[na:na]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainInstanceFromSupplier(AbstractAutowireCapableBeanFactory.java:1225) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1210) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1157) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:561) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:225) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1298) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1259) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveBean(DefaultListableBeanFactory.java:483) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:338) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:331) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1148) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.data.jdbc.repository.config.AbstractJdbcConfiguration.jdbcCustomConversions(AbstractJdbcConfiguration.java:154) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:3.0.0]
at org.springframework.boot.autoconfigure.data.jdbc.JdbcRepositoriesAutoConfiguration$SpringBootJdbcConfiguration.jdbcCustomConversions(JdbcRepositoriesAutoConfiguration.java:121) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:3.0.0]
at org.springframework.boot.autoconfigure.data.jdbc.JdbcRepositoriesAutoConfiguration__BeanDefinitions$SpringBootJdbcConfiguration__BeanDefinitions.lambda$getJdbcCustomConversionsInstanceSupplier$4(JdbcRepositoriesAutoConfiguration__BeanDefinitions.java:124) ~[na:na]
at org.springframework.util.function.ThrowingFunction.apply(ThrowingFunction.java:63) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.util.function.ThrowingFunction.apply(ThrowingFunction.java:51) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.aot.BeanInstanceSupplier.lambda$withGenerator$0(BeanInstanceSupplier.java:173) ~[na:na]
at org.springframework.util.function.ThrowingBiFunction.apply(ThrowingBiFunction.java:68) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.util.function.ThrowingBiFunction.apply(ThrowingBiFunction.java:54) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.aot.BeanInstanceSupplier.lambda$get$2(BeanInstanceSupplier.java:208) ~[na:na]
at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:59) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:47) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.aot.BeanInstanceSupplier.invokeBeanSupplier(BeanInstanceSupplier.java:220) ~[na:na]
at org.springframework.beans.factory.aot.BeanInstanceSupplier.get(BeanInstanceSupplier.java:208) ~[na:na]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainInstanceFromSupplier(AbstractAutowireCapableBeanFactory.java:1225) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1210) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1157) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:561) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1405) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1325) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.aot.BeanInstanceSupplier.resolveArgument(BeanInstanceSupplier.java:334) ~[na:na]
... 53 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase': Runtime reflection is not supported for public void liquibase.change.core.SQLFileChange.setPath(java.lang.String)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1751) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:599) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:313) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1405) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1325) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.aot.BeanInstanceSupplier.resolveArgument(BeanInstanceSupplier.java:334) ~[na:na]
... 96 common frames omitted
Caused by: com.oracle.svm.core.jdk.UnsupportedFeatureError: Runtime reflection is not supported for public void liquibase.change.core.SQLFileChange.setPath(java.lang.String)
at com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:89) ~[na:na]
at [email protected]/java.lang.reflect.Method.acquireMethodAccessor(Method.java:71) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:na]
at [email protected]/java.lang.reflect.Method.invoke(Method.java:566) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:na]
at liquibase.change.ChangeParameterMetaData.setValue(ChangeParameterMetaData.java:350) ~[na:na]
at liquibase.change.AbstractChange.load(AbstractChange.java:712) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:na]
at liquibase.changelog.ChangeSet.toChange(ChangeSet.java:535) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:na]
at liquibase.changelog.ChangeSet.handleChildNode(ChangeSet.java:460) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:na]
at liquibase.changelog.ChangeSet.handleChildNode(ChangeSet.java:456) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:na]
at liquibase.changelog.ChangeSet.load(ChangeSet.java:384) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:na]
at liquibase.changelog.DatabaseChangeLog.createChangeSet(DatabaseChangeLog.java:761) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:na]
at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:395) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:na]
at liquibase.changelog.DatabaseChangeLog.load(DatabaseChangeLog.java:364) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:na]
at liquibase.parser.core.yaml.YamlChangeLogParser.parse(YamlChangeLogParser.java:84) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:na]
at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:408) ~[na:na]
at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:393) ~[na:na]
at liquibase.Liquibase.lambda$update$1(Liquibase.java:249) ~[na:na]
at liquibase.Scope.lambda$child$0(Scope.java:180) ~[na:na]
at liquibase.Scope.child(Scope.java:189) ~[na:na]
at liquibase.Scope.child(Scope.java:179) ~[na:na]
at liquibase.Scope.child(Scope.java:158) ~[na:na]
at liquibase.Liquibase.runInScope(Liquibase.java:2447) ~[na:na]
at liquibase.Liquibase.update(Liquibase.java:236) ~[na:na]
at liquibase.Liquibase.update(Liquibase.java:221) ~[na:na]
at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:328) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:na]
at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:283) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:na]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1797) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1747) ~[name.nkonev.example.webjdbcnative.WebJdbcNativeApplicationKt:6.0.2]
... 108 common frames omitted
Originally reported here spring-projects/spring-boot#33358
Currently one needs to create a lot of JSON files with duplicate information. Take for example the undertow tests. The version is in:
metadata/io.undertow/undertow-core/index.json
twicetests/src/index.json
twicetests/src/io.undertow/undertow-core/2.2.19.Final/gradle.properties
twiceThe coordinates without the version are in even more files (in addition to the files mentioned above):
metadata/index.json
Could we find a way to not duplicate this information all over the place? If that's not possible, we should create a Gradle task which takes the coordinates (io.undertow:undertow-core:2.2.19.Final
in this case) and creates all the necessary JSON entries. As it is right now it's quite a chore to setup the metadata for a new dependency.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
org.ehcache:ehcache-jakarta
.Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
There is only doc howto enable support in gradle I have found.
We use io.undertow:undertow-core:2.2.19.Final
and it would be great to have metadata for it.
right now there's some metadata required to make it work that isn't there yet. for example, reflective hints around Instant[].class
and ZonedDateTime[].class
Our mail
smoketest fails because metadata for com.sun.mail:jakarta.mail:2.0.1
is missing:
Caused by: org.springframework.mail.MailSendException: Mail server connection failed. Failed messages: jakarta.mail.NoSuchProviderException: smtp
at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:448) ~[mail:6.0.0-SNAPSHOT]
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:323) ~[mail:6.0.0-SNAPSHOT]
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:312) ~[mail:6.0.0-SNAPSHOT]
at com.example.mail.CLR.run(CLR.java:23) ~[mail:na]
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:768) ~[mail:3.0.0-SNAPSHOT]
... 5 common frames omitted
Caused by: jakarta.mail.NoSuchProviderException: smtp
at jakarta.mail.Session.getService(Session.java:856) ~[na:na]
at jakarta.mail.Session.getTransport(Session.java:772) ~[na:na]
at jakarta.mail.Session.getTransport(Session.java:713) ~[na:na]
at jakarta.mail.Session.getTransport(Session.java:693) ~[na:na]
at org.springframework.mail.javamail.JavaMailSenderImpl.getTransport(JavaMailSenderImpl.java:538) ~[mail:6.0.0-SNAPSHOT]
at org.springframework.mail.javamail.JavaMailSenderImpl.connectTransport(JavaMailSenderImpl.java:517) ~[mail:6.0.0-SNAPSHOT]
at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:437) ~[mail:6.0.0-SNAPSHOT]
... 9 common frames omitted
We're using com.hazelcast:hazelcast:5.1.2
, and there are hints missing.
Liquibase is currently not usable in native-image. We use org.liquibase:liquibase-core:4.13.0
in Spring Boot.
Add metadata for org.thymeleaf:thymeleaf:3.1.0.M2
and org.thymeleaf:thymeleaf-spring6:3.1.0.M2
. We have these hints in our smoke tests to make the sample work, but I guess we missed some.
The format should match what native-build-tools expect, e.g., graalvm-reachability-metadata-0.1.0.zip
.
Currently, it outputs repository.zip
.
I currently see a java.lang.NoSuchMethodException: org.apache.logging.log4j.message.DefaultFlowMessageFactory.<init>()
error in Spring smoke tests log4j2-native-tests.zip sample.
Flyway (and a lot of other libraries) are detecting if SLF4J is on the classpath by checking if some classes are there. See for example org.flywaydb.core.internal.util.FeatureDetector#isSlf4jAvailable
:
public boolean isSlf4jAvailable() {
if (slf4jAvailable == null) {
// We need to ensure there's an actual implementation; AWS SDK pulls in the Logger interface but doesn't
// provide any implementation, causing SLF4J to drop what we want to be console output on the floor.
// Versions up to 1.7 have a StaticLoggerBinder
slf4jAvailable = ClassUtils.isPresent("org.slf4j.Logger", classLoader)
&& ClassUtils.isPresent("org.slf4j.impl.StaticLoggerBinder", classLoader);
// Versions 1.8 and later use a ServiceLocator to bind to the implementation
slf4jAvailable |= ClassUtils.isImplementationPresent("org.slf4j.spi.SLF4JServiceProvider", classLoader);
}
return slf4jAvailable;
}
In a Spring Boot application, this returns false (even if SLF4J and Logback is on the classpath):
org.slf4j.Logger: true
org.slf4j.impl.StaticLoggerBinder: false
org.slf4j.spi.SLF4JServiceProvider: false
featureDetector.isSlf4jAvailable(): false
Should we add metadata for org.slf4j:slf4j-api
to include those types so that the feature detection of libraries work?
Describe the bug
All settings.gradle
files in tests uses wrong relative path(one directory off) to tck-build-logic
.
To Reproduce
Steps to reproduce the behavior:
~/repos/jvalkeal/graalvm-reachability-metadata/tests/src/org.example/library/0.0.1
$ ../../../../../gradlew projects
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.4.1/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
FAILURE: Build failed with an exception.
* Where:
Settings file '/home/jvalkealahti/repos/jvalkeal/graalvm-reachability-metadata/tests/src/org.example/library/0.0.1/settings.gradle' line: 17
* What went wrong:
Error resolving plugin [id: 'org.graalvm.internal.tck-settings', version: '1.0.0-SNAPSHOT']
> Included build '/home/jvalkealahti/repos/jvalkeal/graalvm-reachability-metadata/tck-build-logic' does not exist.
Expected behavior
Should be able to run project without setting GVM_TCK_TCKDIR
.
System Info (please complete the following information):
Ubuntu
22.1 CE
17
See oracle/graal#4911.
Hi,
I'm trying to understand where I can get more information about the error that's coming up. where is that colon <:> an issue. Please let me know if you need me to provide any further information.
Describe the bug
I took my latest spring boot service that runs on version 2.7.3 and upgraded it to 3.0 M4. The service is using spring-webflux, R2DBC (postgresql) and I use Java 17.
When I run mvn -X -DskipTests -Pnative clean package
I get the following error:
Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 188: C:\Users\ACL\Documents\code\Reference Data\reference-data-locations\target\graalvm-reachability-metadata\a462ca59324c82ddb3350ceb29960f1ac311e442\ch.qos.logback\logback-classic\1.2.11,C:\Users\ACL\Documents\code\Reference Data\reference-data-locations\ta
rget\graalvm-reachability-metadata\a462ca59324c82ddb3350ceb29960f1ac311e442\io.netty\netty-transport\4.1.76.Final,C:\Users\ACL\Documents\code\Reference Data\reference-data-locations\target\graalvm-reachability-metadata\a462ca59324c82ddb3350ceb29960f1ac311e442\org.hdrhistogram\HdrHistogram\2.1.12,C:\Users\ACL\Documents\code\Referen
ce Data\reference-data-locations\target\graalvm-reachability-metadata\a462ca59324c82ddb3350ceb29960f1ac311e442\org.postgresql\postgresql\42.3.4
at sun.nio.fs.WindowsPathParser.normalize (WindowsPathParser.java:182)
at sun.nio.fs.WindowsPathParser.parse (WindowsPathParser.java:153)
at sun.nio.fs.WindowsPathParser.parse (WindowsPathParser.java:77)
at sun.nio.fs.WindowsPath.parse (WindowsPath.java:92)
at sun.nio.fs.WindowsFileSystem.getPath (WindowsFileSystem.java:232)
at java.nio.file.Path.of (Path.java:147)
at java.nio.file.Paths.get (Paths.java:69)
at org.graalvm.buildtools.maven.AbstractNativeMojo.lambda$getBuildArgs$2 (AbstractNativeMojo.java:256)
at java.util.stream.ReferencePipeline$3$1.accept (ReferencePipeline.java:197)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining (ArrayList.java:1625)
at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:509)
at java.util.stream.AbstractPipeline.wrapAndCopyInto (AbstractPipeline.java:499)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential (ReduceOps.java:921)
at java.util.stream.AbstractPipeline.evaluate (AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect (ReferencePipeline.java:682)
at org.graalvm.buildtools.maven.AbstractNativeMojo.getBuildArgs (AbstractNativeMojo.java:259)
at org.graalvm.buildtools.maven.AbstractNativeMojo.buildImage (AbstractNativeMojo.java:393)
at org.graalvm.buildtools.maven.NativeBuildMojo.execute (NativeBuildMojo.java:91)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:301)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:211)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:165)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:157)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:121)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:127)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:568)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
To Reproduce
Steps to reproduce the behavior:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.0-M4</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example.referencedata</groupId>
<artifactId>locations</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>reference-data-locations-v4</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>17</java.version>
<io-grpc-netty.version>1.48.1</io-grpc-netty.version>
<jacoco.version>0.8.8</jacoco.version>
<logstash-logback-encoder.version>7.2</logstash-logback-encoder.version>
<spring-cloud-sleuth-otel.version>1.1.0-M6</spring-cloud-sleuth-otel.version>
<spring-cloud.version>2021.0.3</spring-cloud.version>
<spring-native.version>0.12.1</spring-native.version>
<testcontainers.version>1.17.3</testcontainers.version>
<versions-plugin.version>2.11.0</versions-plugin.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-bom</artifactId>
<version>${testcontainers.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-otel-dependencies</artifactId>
<version>${spring-cloud-sleuth-otel.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-brave</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-otel-autoconfigure</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-exporter-otlp</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
<version>${io-grpc-netty.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-r2dbc</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>r2dbc-postgresql</artifactId>
<exclusions>
<exclusion>
<groupId>io.projectreactor.netty</groupId>
<artifactId>reactor-netty-http-brave</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.r2dbc</groupId>
<artifactId>r2dbc-proxy</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.experimental</groupId>
<artifactId>spring-native</artifactId>
<version>${spring-native.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>${logstash-logback-encoder.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>default-report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>${versions-plugin.version}</version>
<configuration>
<rulesUri>file:///${basedir}//versions-rules.xml</rulesUri>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<profiles>
<profile>
<id>native</id>
<build>
<plugins>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<extensions>true</extensions>
<executions>
<execution>
<id>build-native</id>
<goals>
<goal>build</goal>
</goals>
<phase>package</phase>
</execution>
<execution>
<id>test-native</id>
<goals>
<goal>test</goal>
</goals>
<phase>test</phase>
</execution>
</executions>
<configuration>
<fallback>false</fallback>
<buildArgs>
<arg>-H:DashboardDump=fortune -H:+DashboardAll</arg>
</buildArgs>
<agent>
<enabled>true</enabled>
<options>
<option>experimental-class-loader-support</option>
</options>
</agent>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Expected behavior
I'm expecting a native image to be created
System Info (please complete the following information):
Windows 10 Enterprise
22.2.0
(graalvm-ce-17)17
native-maven-plugin:0.9.13
Any help would be much appreciated, as I don't know how to progress from here. Thank you!
Using JAXB in a Spring Boot WebFlux application leads to the following problem:
Caused by: jakarta.xml.bind.JAXBException: null
at jakarta.xml.bind.ContextFinder.newInstance(ContextFinder.java:282) ~[na:na]
at jakarta.xml.bind.ContextFinder.newInstance(ContextFinder.java:263) ~[na:na]
at jakarta.xml.bind.ContextFinder.find(ContextFinder.java:395) ~[na:na]
at jakarta.xml.bind.JAXBContext.newInstance(JAXBContext.java:691) ~[na:na]
at jakarta.xml.bind.JAXBContext.newInstance(JAXBContext.java:632) ~[na:na]
at org.springframework.http.codec.xml.JaxbContextContainer.lambda$getJaxbContext$0(JaxbContextContainer.java:54) ~[na:na]
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708) ~[webflux-netty:na]
at org.springframework.http.codec.xml.JaxbContextContainer.getJaxbContext(JaxbContextContainer.java:52) ~[na:na]
at org.springframework.http.codec.xml.JaxbContextContainer.createUnmarshaller(JaxbContextContainer.java:47) ~[na:na]
at org.springframework.http.codec.xml.Jaxb2XmlDecoder.initUnmarshaller(Jaxb2XmlDecoder.java:249) ~[na:na]
at org.springframework.http.codec.xml.Jaxb2XmlDecoder.unmarshal(Jaxb2XmlDecoder.java:230) ~[na:na]
at org.springframework.http.codec.xml.Jaxb2XmlDecoder.decode(Jaxb2XmlDecoder.java:195) ~[na:na]
at org.springframework.http.codec.xml.Jaxb2XmlDecoder.lambda$decodeToMono$2(Jaxb2XmlDecoder.java:183) ~[na:na]
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:113) ~[na:na]
at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onNext(FluxContextWrite.java:107) ~[na:na]
at reactor.core.publisher.FluxMapFuseable$MapFuseableConditionalSubscriber.onNext(FluxMapFuseable.java:299) ~[na:na]
at reactor.core.publisher.FluxFilterFuseable$FilterFuseableConditionalSubscriber.onNext(FluxFilterFuseable.java:337) ~[na:na]
at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816) ~[webflux-netty:3.5.0-M4]
at reactor.core.publisher.MonoCollect$CollectSubscriber.onComplete(MonoCollect.java:160) ~[na:na]
at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:144) ~[na:na]
at reactor.core.publisher.FluxPeek$PeekSubscriber.onComplete(FluxPeek.java:260) ~[na:na]
at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:144) ~[na:na]
at reactor.netty.channel.FluxReceive.onInboundComplete(FluxReceive.java:400) ~[webflux-netty:1.1.0-M4]
at reactor.netty.channel.ChannelOperations.onInboundComplete(ChannelOperations.java:426) ~[webflux-netty:1.1.0-M4]
at reactor.netty.http.server.HttpServerOperations.onInboundNext(HttpServerOperations.java:600) ~[webflux-netty:1.1.0-M4]
at reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:93) ~[na:na]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[webflux-netty:4.1.79.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[webflux-netty:4.1.79.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[webflux-netty:4.1.79.Final]
at reactor.netty.http.server.HttpTrafficHandler.channelRead(HttpTrafficHandler.java:266) ~[na:na]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[webflux-netty:4.1.79.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[webflux-netty:4.1.79.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[webflux-netty:4.1.79.Final]
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436) ~[webflux-netty:4.1.79.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:327) ~[webflux-netty:4.1.79.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:299) ~[webflux-netty:4.1.79.Final]
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) ~[webflux-netty:4.1.79.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[webflux-netty:4.1.79.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[webflux-netty:4.1.79.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[webflux-netty:4.1.79.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[webflux-netty:4.1.79.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[webflux-netty:4.1.79.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[webflux-netty:4.1.79.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[webflux-netty:4.1.79.Final]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) ~[webflux-netty:4.1.79.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722) ~[na:na]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658) ~[na:na]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584) ~[na:na]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496) ~[na:na]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[na:na]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[na:na]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[na:na]
at java.lang.Thread.run(Thread.java:833) ~[webflux-netty:na]
at com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:705) ~[webflux-netty:na]
at com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:202) ~[na:na]
Caused by: java.lang.NoSuchMethodException: org.glassfish.jaxb.runtime.v2.ContextFactory.createContext([Ljava.lang.Class;, java.util.Map)
at java.lang.Class.getMethod(DynamicHub.java:2227) ~[webflux-netty:na]
at jakarta.xml.bind.ContextFinder.newInstance(ContextFinder.java:272) ~[na:na]
... 54 common frames omitted
which is triggered by JAXBContext.newInstance(clazz)
.
We use org.glassfish.jaxb:jaxb-runtime:3.0.2
Please add support for net.java.dev.jna:jna:5.8.0
.
I will work on this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.