Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover the Trends Shaping AI in 2026: Register Here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[ESB Studio] RouteBuilder support for dataset?

Hi,
Trying to use the dataset component, but I get the following error?
log4j:WARN No appenders could be found for logger (org.apache.camel.impl.MainSupport).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Failed to create route cMessagingEndpoint_3: Route] -> [To[jetty:http://www.google.com... because of Failed to resolve endpoint: dataset://foo due to: registry entry called foo of type org.apache.camel.component.dataset.DataSet must be specified

I want to create 10 dumby messages to send to "jetty".

Thanks

Labels (1)
  • Other

2 Replies
Anonymous
Not applicable
Author

Hi
As the dataset component in Camel, a data set instance must be specified.
In your MessageEndpoint from("dataset:foo"), the dataset "foo" must be declared. Otherwise it will come out with an exception.
According to camel help document online, http://camel.apache.org/dataset.html, the dataset with name "foo" shoule be found at DataSet instance in the Registry. Here is a simple about registry in spring XML.
<bean id="foo" class="org.apache.camel.component.dataset.SimpleDataSet">
<property name="size" value="100"/>
</bean>
Or you can try to register it using java codes, create a Registry and pass it to the CamelContext.
SimpleRegistry registry = new SimpleRegistry();
registry.put("foo",
new org.apache.camel.component.dataset.SimpleDataSet());
CamelContext context = new DefaultCamelContext(registry);
In one word, the dataset component need dataset instance registry, and sorry that currently the cMessageEndpoint doesn't support.

Anonymous
Not applicable
Author

Good news that we can support the dataset endpoint in our 5.0M4. There is a new Component "cContextConfig" in Studio that can be used to manipulate the CamelContext. For the dataset, just need to register some dataset bean into the CamelContext.

1, Drag a cContextConfig from palette into create Route
2, Write codes to register a dataset bean in cContextConfig
org.apache.camel.impl.SimpleRegistry registry = new org.apache.camel.impl.SimpleRegistry();
registry.put("foo", new org.apache.camel.component.dataset.SimpleDataSet());
camelContext.setRegistry(registry);
3, Start route, Route will work!