Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Log step throws IllegalArgumentException when message is null/empty #338

Closed
syndesis-bot opened this issue Nov 15, 2017 · 2 comments
Closed
Assignees
Labels
group/integration Library used in the the integration runtimes

Comments

@syndesis-bot
Copy link
Collaborator

@dsimansk 2017-08-08

If I create Integration with log step, but for some reason omit the log message itself. Runtime fails to start with exception.

I can't make up my mind if syndesis-rest should sanitize the message or s-i-r (syndesis-integration-runtime) should handle it with generic log message for null/empty message input.

---
flows:
- steps:
  - kind: endpoint
    uri: twitter-mention
  - kind: log
    loggingLevel: INFO
  - kind: endpoint
    uri: salesforce-upsert-contact
org.apache.camel.spring.boot.CamelSpringBootInitializationException: org.apache.camel.FailedToCreateRouteException: Failed to create route flow1 at: >>> Log[null] <<< in route: Route(flow1)[[From[twitter-mention]] -> [Log[null], To[sales... because of message must be specified and not empty on: Log[null]
	at org.apache.camel.spring.boot.RoutesCollector.onApplicationEvent(RoutesCollector.java:186)
	at org.apache.camel.spring.boot.RoutesCollector.onApplicationEvent(RoutesCollector.java:50)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:167)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:383)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:337)
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:882)
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:144)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:545)
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:314)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151)
	at io.syndesis.example.Application.main(Application.java:13)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route flow1 at: >>> Log[null] <<< in route: Route(flow1)[[From[twitter-mention]] -> [Log[null], To[sales... because of message must be specified and not empty on: Log[null]
	at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1298)
	at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:204)
	at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:1041)
	at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:3497)
	at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3228)
	at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:201)
	at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:3046)
	at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:3042)
	at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:3065)
	at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:3042)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
	at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2980)
	at org.apache.camel.spring.boot.RoutesCollector.maybeStart(RoutesCollector.java:203)
	at org.apache.camel.spring.boot.RoutesCollector.onApplicationEvent(RoutesCollector.java:178)
	... 23 common frames omitted
Caused by: java.lang.IllegalArgumentException: message must be specified and not empty on: Log[null]
	at org.apache.camel.util.StringHelper.notEmpty(StringHelper.java:339)
	at org.apache.camel.util.ObjectHelper.notEmpty(ObjectHelper.java:366)
	at org.apache.camel.model.LogDefinition.createProcessor(LogDefinition.java:85)
	at org.apache.camel.model.ProcessorDefinition.makeProcessorImpl(ProcessorDefinition.java:549)
	at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:510)
	at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:226)
	at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1295)
	... 36 common frames omitted
@chirino chirino self-assigned this Jan 16, 2018
@chirino chirino assigned iocanel and unassigned chirino Jan 31, 2018
@rhuss rhuss added group/integration Library used in the the integration runtimes and removed module/runtime labels Feb 4, 2018
@paoloantinori
Copy link
Contributor

@iocanel do you know if this is still valid?

@iocanel
Copy link
Contributor

iocanel commented Feb 15, 2018

Well, it can't be valid, because the log step is not currently present in the master.
So, I think that it makes sense to close it for now.

paoloantinori pushed a commit that referenced this issue May 23, 2019
TTOOLS-597 Adds view edit page
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
group/integration Library used in the the integration runtimes
Projects
None yet
Development

No branches or pull requests

5 participants