Skip to content
This repository has been archived by the owner on Nov 27, 2017. It is now read-only.

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

Open
dsimansk opened this issue Aug 8, 2017 · 0 comments
Open

Comments

@dsimansk
Copy link
Member

dsimansk commented Aug 8, 2017

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
@dsimansk dsimansk changed the title Log step throws IllegalArgumentException when message is empty Log step throws IllegalArgumentException when message is null/empty Aug 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant