Closed tidemyr closed 3 years ago
Thanks for the report, let me try to reproduce.
Could you please give a hint what your setHeaders
method is doing?
It's just sets the Azure blob name (which overrides the required 'blobName' (?blobName=blob&...) option in the Azure URL):
` private final Processor setHeaders = new Processor() { @Override public void process(Exchange exchange) throws Exception {
Message message = exchange.getIn();
String datetime = OffsetDateTime.now(ZoneOffset.UTC).format(dtf);
message.setHeader(BlobConstants.BLOB_NAME, "missingName-" + datetime + ".csv");
Map<String, Object> headers = message.getHeaders();
Iterator iterator = headers.entrySet().iterator();
while (iterator.hasNext()) {
Map.Entry pair = (Map.Entry)iterator.next();
if (pair.getKey().equals("CamelFileNameOnly")) {
message.setHeader(BlobConstants.BLOB_NAME, pair.getValue().toString());
break;
}
}
}
};
`
I adapted our SFTP test to send to a file to Azure blob service https://github.com/apache/camel-quarkus/pull/2320 and it is passing on the current Camel Quarkus master and GraalVM 21.0.0. The issue might have been fixed by various tweaks in Azure extensions we have done recently.
Anyway, please check whether I have not omitted some important detail in my reproducer.
Let my try to reproduce with CQ 1.6.0 and GraalVM 20.2.0.
OK, I can confirm, the issue is reproduce with the following combinations:
But it works with CQ 1.6.0 and GraalVM 21.0.0. Is GraalVM 21.0.0 an option for you @tidemyr?
Thanks for the report, BTW!
Thank you very much for looking at the problem. This can definitely be a solution. :)
Description: We intend to use Quarkus Camel for some integration patterns. One of these needs is to be able to upload files to Azure from different types of incoming endpoints. In this specific microservice by moving files from an SFTP-server to Azure. The code is limited to include only Quarkus supported methods for native builds and of course runs perfectly when using normal Java. But as native build there are runtime errors during the Azure upload, the SFPT and the mail-relay sending is working fine in both native and normal Java runtime.
Expected behavior This limited code working exactly the same way running as native build as with normal Java. Can be limited to just the Azure upload functionality to recreate the problem.
Actual behavior Got runtime error (see additional context)
Configuration Java 11.0.8.j9-adpt (as for normal Java-runtime) GraalVM 20.2.0 Quarkus 1.11.1.Final Camel Quarkus: 1.6.0 Maven 3.6.3
Additional context
Camel DSL code: `` @Override public void configure() throws Exception {
pom.xml extract:
Runtime error as native build: