You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
This issue is similar to #562, there seems to be some calculation over the address field of endpoints which does not account for the fact that the value could be a property. So, it is likely that this issue affects all transports and all components relying on this address parsing to identify components.
Expected Behavior
If the value cannot be analyzed, there should be a report entry explaining the situation and a best effort to migrate the component regardless.
Actual Behavior
The component is partially migrated but leaving invalid fields and further occurrences of the component are left without migrating them, creating an invalid Mule 4 application.
Relevant logs
Migrator: Executing migrator 1.2.1-SNAPSHOT...
Migrator: ERROR 2021-11-26 17:35:04,242 [main] com.mulesoft.tools.migration.engine.MigrationJob: Failed to apply task, rolling back and continuing with the next one.
Migrator: com.mulesoft.tools.migration.exception.MigrationTaskException: Task execution exception. Task execution exception (named capturing group is missing trailing '}') migrating node:
Migrator: <http:listener xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:migration="migration" address="${http.address}" exchange-pattern="request-response" doc:name="Profile API" migration:isMessageSource="true" />
Migrator: at com.mulesoft.tools.migration.task.AbstractMigrationTask.execute(AbstractMigrationTask.java:94) ~[mule-migration-tool-api-1.2.1-SNAPSHOT.jar:?]
Migrator: at com.mulesoft.tools.migration.engine.MigrationJob.execute(MigrationJob.java:98) [mule-migration-tool-engine-1.2.1-SNAPSHOT.jar:1.2.1-SNAPSHOT]
Migrator: at com.mulesoft.tools.migration.MigrationRunner.main(MigrationRunner.java:79) [mule-migration-assistant-runner-1.2.1-SNAPSHOT.jar:1.2.1-SNAPSHOT]
Migrator: Caused by: com.mulesoft.tools.migration.exception.MigrationStepException: Task execution exception (named capturing group is missing trailing '}') migrating node:
Migrator: <http:listener xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:migration="migration" address="${http.address}" exchange-pattern="request-response" doc:name="Profile API" migration:isMessageSource="true" />
Migrator: at com.mulesoft.tools.migration.task.AbstractMigrationTask.lambda$fetchAndProcessNodes$7(AbstractMigrationTask.java:108) ~[mule-migration-tool-api-1.2.1-SNAPSHOT.jar:?]
Migrator: at com.mulesoft.tools.migration.task.AbstractMigrationTask$$Lambda$143/0x0000000000000000.accept(Unknown Source) ~[?:?]
Migrator: at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
Migrator: at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) ~[?:?]
Migrator: at java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1239) ~[?:?]
Migrator: at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:497) ~[?:?]
Migrator: at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:487) ~[?:?]
Migrator: at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
Migrator: at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
Migrator: at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:239) ~[?:?]
Migrator: at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497) ~[?:?]
Migrator: at com.mulesoft.tools.migration.task.AbstractMigrationTask.fetchAndProcessNodes(AbstractMigrationTask.java:102) ~[mule-migration-tool-api-1.2.1-SNAPSHOT.jar:?]
Migrator: at com.mulesoft.tools.migration.task.AbstractMigrationTask.lambda$execute$3(AbstractMigrationTask.java:73) ~[mule-migration-tool-api-1.2.1-SNAPSHOT.jar:?]
Migrator: at com.mulesoft.tools.migration.task.AbstractMigrationTask$$Lambda$118/0x0000000000000000.accept(Unknown Source) ~[?:?]
Migrator: at java.util.ArrayList.forEach(ArrayList.java:1541) ~[?:?]
Migrator: at com.mulesoft.tools.migration.task.AbstractMigrationTask.execute(AbstractMigrationTask.java:71) ~[mule-migration-tool-api-1.2.1-SNAPSHOT.jar:?]
Migrator: ... 2 more
Migrator: Caused by: java.lang.IllegalArgumentException: named capturing group is missing trailing '}'
Migrator: at java.util.regex.Matcher.appendExpandedReplacement(Matcher.java:1052) ~[?:?]
Migrator: at java.util.regex.Matcher.appendReplacement(Matcher.java:998) ~[?:?]
Migrator: at java.util.regex.Matcher.replaceFirst(Matcher.java:1408) ~[?:?]
Migrator: at java.lang.String.replaceFirst(String.java:3160) ~[?:?]
Migrator: at com.mulesoft.tools.migration.report.DefaultMigrationReport.report(DefaultMigrationReport.java:83) ~[mule-migration-tool-engine-1.2.1-SNAPSHOT.jar:1.2.1-SNAPSHOT]
Migrator: at com.mulesoft.tools.migration.step.util.TransportsUtils.processAddress(TransportsUtils.java:88) ~[mule-migration-tool-api-1.2.1-SNAPSHOT.jar:?]
Migrator: at com.mulesoft.tools.migration.library.mule.steps.http.HttpInboundEndpoint.execute(HttpInboundEndpoint.java:84) ~[mule-migration-tool-library-1.2.1-SNAPSHOT.jar:?]
Migrator: at com.mulesoft.tools.migration.library.mule.steps.http.HttpInboundEndpoint.execute(HttpInboundEndpoint.java:50) ~[mule-migration-tool-library-1.2.1-SNAPSHOT.jar:?]
Migrator: at com.mulesoft.tools.migration.task.AbstractMigrationTask.lambda$fetchAndProcessNodes$7(AbstractMigrationTask.java:105) ~[mule-migration-tool-api-1.2.1-SNAPSHOT.jar:?]
Migrator: at com.mulesoft.tools.migration.task.AbstractMigrationTask$$Lambda$143/0x0000000000000000.accept(Unknown Source) ~[?:?]
Migrator: at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
Migrator: at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) ~[?:?]
Migrator: at java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1239) ~[?:?]
Migrator: at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:497) ~[?:?]
Migrator: at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:487) ~[?:?]
Migrator: at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
Migrator: at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
Migrator: at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:239) ~[?:?]
Migrator: at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497) ~[?:?]
Migrator: at com.mulesoft.tools.migration.task.AbstractMigrationTask.fetchAndProcessNodes(AbstractMigrationTask.java:102) ~[mule-migration-tool-api-1.2.1-SNAPSHOT.jar:?]
Migrator: at com.mulesoft.tools.migration.task.AbstractMigrationTask.lambda$execute$3(AbstractMigrationTask.java:73) ~[mule-migration-tool-api-1.2.1-SNAPSHOT.jar:?]
Migrator: at com.mulesoft.tools.migration.task.AbstractMigrationTask$$Lambda$118/0x0000000000000000.accept(Unknown Source) ~[?:?]
Migrator: at java.util.ArrayList.forEach(ArrayList.java:1541) ~[?:?]
Migrator: at com.mulesoft.tools.migration.task.AbstractMigrationTask.execute(AbstractMigrationTask.java:71) ~[mule-migration-tool-api-1.2.1-SNAPSHOT.jar:?]
Migrator: ... 2 more
Migrator: ===============================================================================
Migrator: MIGRATION ASSIST
Reproducible Test Case
There's an E2E featuring an HTTP inbound endpoint were this can be reproduced: OAuth2ProviderMigrationTestCase. Add a mule arg to the test with a property value and replace the first endpoint with:
- Added error handler to provide more information about the message and message param being processed in case of failure when generating a report message.
- Added message parameter escaping to handle values corresponding to property placeholders (replace operation fails when the replacement contains special characters such as $, { or }).
Version used
1.2.0
Describe the bug
This issue is similar to #562, there seems to be some calculation over the
address
field of endpoints which does not account for the fact that the value could be a property. So, it is likely that this issue affects all transports and all components relying on this address parsing to identify components.Expected Behavior
If the value cannot be analyzed, there should be a report entry explaining the situation and a best effort to migrate the component regardless.
Actual Behavior
The component is partially migrated but leaving invalid fields and further occurrences of the component are left without migrating them, creating an invalid Mule 4 application.
Relevant logs
Reproducible Test Case
There's an E2E featuring an HTTP inbound endpoint were this can be reproduced:
OAuth2ProviderMigrationTestCase
. Add a mule arg to the test with a property value and replace the first endpoint with:The text was updated successfully, but these errors were encountered: