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

Processing classes failed when XML configuration file contains properties placeholders #611

Open
jurakp opened this issue Aug 1, 2022 · 0 comments

Comments

@jurakp
Copy link

jurakp commented Aug 1, 2022

In the config XML we use properties placeholders to define the streaming:

<http:request doc:name="Request to server" url="https://localhost:9090/api"
					config-ref="HTTP_Request_configuration" method="GET">
					<repeatable-in-memory-stream initialBufferSize="${http.streaming.mem.init.size}"
						bufferSizeIncrement="${http.streaming.mem.inc.size}" maxBufferSize="${http.streaming.mem.max.size}" bufferUnit="MB" />
					<http:headers>#[attributes.headers -- ['host','content-length']]</http:headers>
					<http:query-params>#[attributes.queryParams]</http:query-params>
				</http:request>

Simply run mvn clean package results in:

[ERROR] Failed to execute goal org.mule.tools.maven:mule-maven-plugin:3.6.3:process-classes (default-process-classes) on project test-project: Execution default-process-classes of goal org.mule.tools.maven:mule-maven-plugin:3.6.3:process-classes failed: Exception resolving param 'bufferSizeIncrement' with value '${http.streaming.mem.inc.size}' at 'api.xml:199:6' (java.lang.NumberFormatException: For input string: "${http.streaming.mem.inc.size}") -> [Help 1]

Which is wrong, since the placeholder gets resolved once the runtime deploys the application.
Any idea how to fix this? Replacing the placeholder manually by some number is one option, but not good. Reverting Mule Maven plugin back to 3.5.4 is another option, but Studio is always complaining about the project is not upgraded.

I think this issue should be fixed by relaxing validations in cases where there is a placeholder instead of the right value.

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

1 participant