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

DataFormat endpoints ignore camel.dataformat.* configuration properties #6771

Open
jamesnetherton opened this issue Nov 12, 2024 · 0 comments
Labels
area/dataformat bug Something isn't working

Comments

@jamesnetherton
Copy link
Contributor

Bug description

For example, if you were to configure beanio like:

camel.dataformat.beanio.stream-name = my-stream
camel.dataformat.beanio.mapping = mapping.xml

Then in a Camel route do:

from("direct:start")
    .to("dataformat:beanio:marshal")

You get:

Caused by: java.lang.IllegalArgumentException: Stream name not configured. must be specified
	at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:152)
	at org.apache.camel.dataformat.beanio.BeanIODataFormat.doInit(BeanIODataFormat.java:88)

It seems to work on Spring Boot due to this ComponentCustomizer:

https://github.com/apache/camel-spring-boot/blob/33ff5c946a9b20491c46b0d0ec07d662240a5e20/components-starter/camel-dataformat-starter/src/main/java/org/apache/camel/component/dataformat/springboot/DataFormatComponentAutoConfiguration.java#L59-L76

We could investigate implementing something similar in our DataFormat extension. Or perhaps modify the Camel component to reuse an existing configured DataFormat instance if one exists.

@jamesnetherton jamesnetherton added the bug Something isn't working label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dataformat bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant