Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No SSL in Native Build #205

Open
deeperunderstanding opened this issue Jan 21, 2022 · 1 comment
Open

No SSL in Native Build #205

deeperunderstanding opened this issue Jan 21, 2022 · 1 comment
Assignees

Comments

@deeperunderstanding
Copy link

deeperunderstanding commented Jan 21, 2022

Expected Behavior

Configuring a connection string like follows should resolve the correct transport mechanism.

micronaut:
  jms:
    activemq:
      classic:
        enabled: true
        connection-string: 'ssl://localhost:61616'

Actual Behaviour

When building a native docker image with the "dockerBuildNative" gradle task the following error occurs on application startup, when attempting to create the AMQConnectionFactory: Transport scheme NOT recognized: [ssl]
The problem does not occur in JVM builds.

Steps To Reproduce

No response

Environment Information

No response

Example Application

No response

Version

3.2.4

@agorges
Copy link

agorges commented Mar 23, 2022

You need to include the META-INF activemq services in the native Build (build.gradle):

graalvmNative{
    binaries {
        main {
            buildArgs.add('-H:IncludeResources="META-INF/services/org/apache/activemq/transport/ssl"')
        }
    }
}

Maybe you may also make the Factories available per reflection:

import org.apache.activemq.util.FactoryFinder;
import org.apache.activemq.transport.tcp.SslTransportFactory;

@TypeHint(
        value = {
               FactoryFinder.class,
               SslTransportFactory.class,
        },
        accessType = TypeHint.AccessType.ALL_PUBLIC
)
public class GraalVmHelper {
}

I hope that helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants