Skip to content

ActiveMQ Artemis Connection Factory creation fails in native image #42414

Closed
@krezovic

Description

@krezovic

See reproducer: https://github.com/krezovic/artemis-native-demo

./mvnw clean package -P native
./mvnw native:compile-no-fork
target/artemis-native-demo

Results in

Caused by: java.lang.NoSuchMethodException: org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.<init>(java.lang.String)
        at java.base@21.0.4/java.lang.Class.checkMethod(DynamicHub.java:1078)
        at java.base@21.0.4/java.lang.Class.getConstructor0(DynamicHub.java:1241)
        at java.base@21.0.4/java.lang.Class.getConstructor(DynamicHub.java:2442)
        at org.springframework.boot.autoconfigure.jms.artemis.ArtemisConnectionFactoryFactory.newNativeConnectionFactory(ArtemisConnectionFactoryFactory.java:146)
        at org.springframework.boot.autoconfigure.jms.artemis.ArtemisConnectionFactoryFactory.createNativeConnectionFactory(ArtemisConnectionFactoryFactory.java:134)
        at org.springframework.boot.autoconfigure.jms.artemis.ArtemisConnectionFactoryFactory.doCreateConnectionFactory(ArtemisConnectionFactoryFactory.java:95)
        at org.springframework.boot.autoconfigure.jms.artemis.ArtemisConnectionFactoryFactory.createConnectionFactory(ArtemisConnectionFactoryFactory.java:67)

Short guess, reflection hints are missing for factory creation.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions