Open Hooghof opened 2 weeks ago
@Hooghof said:
Concerning the enrich-ftp issue: I created this flow to prove that the ftp component gets one text file ForceInboundSFTP
The file is not moved. The same settings in the FTP component are used in the flow EnrichArchiveWithTextBody
that gives the error. Both flows are in the tenant Regression Tests.
{
"code": 500,
"error": "org.apache.camel.CamelExchangeException: Error occurred during aggregation. Exchange[5CD6AF881DCE704-0000000000001FA1]. Caused by: [org.apache.camel.TypeConversionException - Error during type conversion from type: org.apache.camel.component.file.remote.RemoteFile to the required type: byte[] with value RemoteFile[enrich3.txt] due to com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class org.apache.camel.component.file.GenericFileDefaultBinding and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: org.apache.camel.component.file.remote.RemoteFile[\"binding\"])]",
"info": "Something went wrong calling the HTTP service. Please refer to the logs for more information."
}
We saw that it works if you put a log component between the lower route of the enrich component and the ftp component
So version 19 of EnrichArchiveWithTextBody
gives the error, version 18 works as expected
Using version 18 on development, there are 2 files in the zip file: enrich1.zip and enrich1.txt. Expected was enrich1.txt and enrich3.txt, like we have on acceptance
In version 20 on development I tested it with another first message body. It turns out that enricht1.txt has the right content and enrich1.zip has also the right content, but the name of the file had to be enricht3.txt
The output of the test case is as expected now:
One finding concerning the tracing: the steps in the bottom route of the enrich component are missing
Enriching via FTP goes well. I did a test with enriching a body, but that fails now. See version 33 of the test flow
PR (https://github.com/assimbly/runtime/pull/317) created for this specific issue:
Enriching via FTP goes well. I did a test with enriching a body, but that fails now. See version 33 of the test flow
VERSION 37 still has errors, this is the error message:
or (MessageId: queue_672b994ec6210718c600033e_test_ca15b37b-2c12-413a-9a47-2b71d0600d20_ID_development-assimbly-test-42057-1732697230591-1_25_3_1_1 on ExchangeId: 8735EDCCCDE97E0-0000000000000B39). Exhausted after delivery attempt: 1 caught: org.apache.camel.CamelExchangeException: Error occurred during aggregation. Exchange[8735EDCCCDE97E0-0000000000000B39]. Caused by: [java.lang.NullPointerException - null]. Processed by failure processor: FatalFallbackErrorHandler[null] Message History --------------------------------------------------------------------------------------------------------------------------------------- Source ID Processor Elapsed (ms) route_a2219739-bc65-4945-9602-3f693baf51 672b994ec6210718c600033e-1d6f5 from[activemq://672b994ec6210718c600033e_test_ca15 232 route_a2219739-bc65-4945-9602-3f693baf51 672b994ec6210718c600033e-1d6f5 step 0 route_a2219739-bc65-4945-9602-3f693baf51 672b994ec6210718c600033e-1d6f5 setProperty[Enrich-Type] 0 route_a2219739-bc65-4945-9602-3f693baf51 672b994ec6210718c600033e-1d6f5 setProperty[Error-Route] 0 route_a2219739-bc65-4945-9602-3f693baf51 672b994ec6210718c600033e-1d6f5 enrich[simple{activemq:672b994ec6210718c600033e_te 0 route_852fe153-79d8-4c6e-a440-2679aef801 onException593/setExchangePatt setExchangePattern[InOnly] 0 route_852fe153-79d8-4c6e-a440-2679aef801 onException593/to4922 direct:672b994ec6210718c600033e_test_0965cc9a-0fec 12 route_0f24e78b-f69a-4d3b-9c2b-d740183fa6 672b994ec6210718c600033e-ffc1b step 12 route_0f24e78b-f69a-4d3b-9c2b-d740183fa6 672b994ec6210718c600033e-ffc1b setBody[simple{${exception.message}}] 0 route_0f24e78b-f69a-4d3b-9c2b-d740183fa6 672b994ec6210718c600033e-ffc1b direct:672b994ec6210718c600033e_test_ffc1ba20-38d5 9 route_4c9437a0-d62b-4d56-ac75-85c003f34b 672b994ec6210718c600033e-9689f step 9 route_4c9437a0-d62b-4d56-ac75-85c003f34b 672b994ec6210718c600033e-9689f log:org.assimbly.runtime.672b994ec6210718c600033e? 0 route_4c9437a0-d62b-4d56-ac75-85c003f34b 672b994ec6210718c600033e-9689f direct:672b994ec6210718c600033e_test_9689f294-0031 5 route_fae29186-4a94-455d-a7f9-0ae113c542 672b994ec6210718c600033e-42213 step 5 route_fae29186-4a94-455d-a7f9-0ae113c542 672b994ec6210718c600033e-42213 log:org.assimbly.runtime.672b994ec6210718c600033e? 0 Exchange --------------------------------------------------------------------------------------------------------------------------------------- Exchange[ Id 8735EDCCCDE97E0-0000000000000B39 Headers {breadcrumbId=8735EDCCCDE97E0-0000000000000B2C, CamelFileName=enrich1.zip, CamelMessageTimestamp=1732701199028, CamelRedelivered=false, CamelRedeliveryCounter=0, ComponentInitTime=1732701199254, DOVETAIL_FlowId=672b994ec6210718c600033e, DOVETAIL_FlowVersion=37, JMSCorrelationID=Camel-8735EDCCCDE97E0-0000000000000B38, JMSCorrelationIDAsBytes=[B@4d586f42, JMSDeliveryMode=2, JMSDestination=queue://672b994ec6210718c600033e_test_ca15b37b-2c12-413a-9a47-2b71d0600d20, JMSExpiration=1732787599028, JMSMessageID=ID:development-assimbly-test-42057-1732697230591-1:25:3:1:1, JMSPriority=4, JMSRedelivered=false, JMSReplyTo=temp-queue://ID:development-assimbly-test-42057-1732697230591-1:43:1, JMSTimestamp=1732701199028, JMSType=null, JMSXGroupID=null, JMSXUserID=null, Position=After 1st archive} BodyType String Body Error occurred during aggregation. Exchange[8735EDCCCDE97E0-0000000000000B39]. Caused by: [java.lang.NullPointerException - null] ]
There are 3 test cases (development, Regression Tests):
Number 1 works as expected, 2 and 3 give the error.
Error occurred during enrichment:
Exchange[66DE602F1F209FA-0000000000024ACC]. Caused by: [java.lang.NullPointerException - Cannot invoke "org.apache.camel.Exchange.getIn()" because "newExchange" is null]
Acceptance gives the expected response. Development gives the error above. Note this error only occurs with the combination of the Enrich component and FTP components. When the FTP component is replaced by another component (setBody, File, HTTP etc) it works normally.
Test cases on Acceptance and Development Tenant: Regression Tests Flow: EnrichArchiveWithTextBody
To test this locally a VPN needs to be active to reach the FTP Server.