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

camel-quarkus-aws-sns failing to compile image-native #870

Closed
brunotitata opened this issue Mar 11, 2020 · 5 comments
Closed

camel-quarkus-aws-sns failing to compile image-native #870

brunotitata opened this issue Mar 11, 2020 · 5 comments
Milestone

Comments

@brunotitata
Copy link

Describe the bug
I'm trying to compile an SMS sending project using the camel-quarkus-aws-sns dependencies, but when I compile the project for native image using the quarkus command ./mvnw clean package: dev -Pnative, there are some WARNING of java-sdk messages on the console and lock the terminal, even needing to restart the computer. Removing the camel-quarkus-aws-sns dependency, the project is successfully compiled without any errors!

I am using Java 11 with GraalVM CE 20.0.6

Actual behavior
I have the version of Quarkus 1.2.1.Final

	<properties>
		<compiler-plugin.version>3.8.1</compiler-plugin.version>
		<maven.compiler.parameters>true</maven.compiler.parameters>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<quarkus-plugin.version>1.2.1.Final</quarkus-plugin.version>
		<quarkus.platform.artifact-id>quarkus-universe-bom</quarkus.platform.artifact-id>
		<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
		<quarkus.platform.version>1.2.1.Final</quarkus.platform.version>
		<surefire-plugin.version>2.22.1</surefire-plugin.version>
	</properties>

with the dependency on the project

		<dependency>
			<groupId>org.apache.camel.quarkus</groupId>
			<artifactId>camel-quarkus-aws-sns</artifactId>
		</dependency>

To Reproduce
./mvnw clean package: dev -Pnative

image text

Configuration

quarkus.datasource.driver=org.postgresql.Driver
quarkus.datasource.url=jdbc:postgresql://localhost:5432/sms-quarkus?createDatabaseIfNotExist=true
quarkus.datasource.username=postgres
quarkus.datasource.password=postgres
quarkus.log.console.enable=true
quarkus.hibernate-orm.database.generation=update
quarkus.hibernate-orm.log.sql=false

quarkus.http.port=8080

aws.accesskey=-------
aws.secretkey=--------
aws.region=us-east-1

AWSConfiguration.java

@ApplicationScoped
public class AWSConfiguration {

    @ConfigProperty(name = "aws.accesskey")
    String accessKey;

    @ConfigProperty(name = "aws.secretkey")
    String secretKey;

    @ConfigProperty(name = "aws.region")
    String region;

    @Produces
    public AmazonSNS aws() {
        return AmazonSNSClientBuilder.standard().withRegion(Regions.fromName(region))
                .withCredentials(new AWSStaticCredentialsProvider(new BasicAWSCredentials(accessKey, secretKey)))
                .build();
    }

Environment (please complete the following information):

  • Output of uname -a or ver:
    Darwin MacBook-Pro-de-bruno-2.local 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan 9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64 x86_64

  • Output of java -version:

openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment GraalVM CE 20.0.0 (build 11.0.6+9-jvmci-20.0-b02)
OpenJDK 64-Bit Server VM GraalVM CE 20.0.0 (build 11.0.6+9-jvmci-20.0-b02, mixed mode, sharing)
  • GraalVM version (if different from Java):
    GraalVM CE 20.0.0

  • Quarkus version or git rev:
    1.2.1.Final

  • Build tool (ie. output of mvnw --version or gradlew --version):
    Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 2019-04-04T16:00:29-03:00)

Additional context
A friend also tried to compile for image-native and also failed ...

In his case it was with Java 8 with GraalVM 19.3.1

image text

@lburgazzoli
Copy link
Contributor

Can you try with GraalVM 19.2.1 and Java 8 ?
As far as I remember that is the recommended version for Quarkus 1.2.x

@oscerd
Copy link
Contributor

oscerd commented Mar 11, 2020

I'll have a look but it looks like you're mixing version

@brunotitata
Copy link
Author

Can you try with GraalVM 19.2.1 and Java 8 ?
As far as I remember that is the recommended version for Quarkus 1.2.x

@lburgazzoli @oscerd I'll try it later with GraalVM 19.2.1 and come back here to post the result.

can I try with Java 11 tbm, or just with Java 8 ??

@ppalaga
Copy link
Contributor

ppalaga commented Mar 25, 2020

Any update @brunotitata ?

@ppalaga
Copy link
Contributor

ppalaga commented Jun 17, 2020

@brunotitata feel free to reopen if the issue still occurs.

@ppalaga ppalaga closed this as completed Jun 17, 2020
@ppalaga ppalaga added this to the 1.0.0-CR3 milestone Jul 3, 2020
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

4 participants