The Integration generated by Unit Test Case can not start
See original GitHub issueThe Integration generated by Unit Test Case can not start
[×] Feature request
[x] Regression (a behavior that used to work and stopped working in a new release)
[√] Bug report
[x] Documentation issue or request
Description
I run the Junit test function: testGenerateApplicationWithRestDSL in ProjectGeneratorTest and get a spring boot application structure in my desk but when I run the Application I get an error saying:
org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route(route1)[[From[rest:get:/openapi.json?routeId=route1&de... because of Failed to resolve endpoint: servlet:///openapi.json?headerFilterStrategy=syndesisHeaderStrategy&httpMethodRestrict=GET due to: No bean could be found in the registry for: syndesisHeaderStrategy of type: org.apache.camel.spi.HeaderFilterStrategy
at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1830) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:136) ~[camel-spring-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:174) ~[camel-spring-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-4.3.19.RELEASE.jar:4.3.19.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-4.3.19.RELEASE.jar:4.3.19.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-4.3.19.RELEASE.jar:4.3.19.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:393) ~[spring-context-4.3.19.RELEASE.jar:4.3.19.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:399) ~[spring-context-4.3.19.RELEASE.jar:4.3.19.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:347) ~[spring-context-4.3.19.RELEASE.jar:4.3.19.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:883) ~[spring-context-4.3.19.RELEASE.jar:4.3.19.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:144) ~[spring-boot-1.5.16.RELEASE.jar:1.5.16.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) ~[spring-context-4.3.19.RELEASE.jar:4.3.19.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.16.RELEASE.jar:1.5.16.RELEASE]
at org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration.createChildManagementContext(EndpointWebMvcAutoConfiguration.java:193) ~[spring-boot-actuator-1.5.16.RELEASE.jar:1.5.16.RELEASE]
at org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration.afterSingletonsInstantiated(EndpointWebMvcAutoConfiguration.java:156) ~[spring-boot-actuator-1.5.16.RELEASE.jar:1.5.16.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:781) ~[spring-beans-4.3.19.RELEASE.jar:4.3.19.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-4.3.19.RELEASE.jar:4.3.19.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-4.3.19.RELEASE.jar:4.3.19.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.16.RELEASE.jar:1.5.16.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.16.RELEASE.jar:1.5.16.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.16.RELEASE.jar:1.5.16.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.16.RELEASE.jar:1.5.16.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.16.RELEASE.jar:1.5.16.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.16.RELEASE.jar:1.5.16.RELEASE]
at io.syndesis.example.Application.main(Application.java:13) [classes/:na]
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route(route1)[[From[rest:get:/openapi.json?routeId=route1&de... because of Failed to resolve endpoint: servlet:///openapi.json?headerFilterStrategy=syndesisHeaderStrategy&httpMethodRestrict=GET due to: No bean could be found in the registry for: syndesisHeaderStrategy of type: org.apache.camel.spi.HeaderFilterStrategy
at org.apache.camel.impl.RouteService.warmUp(RouteService.java:147) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:3947) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3854) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:3640) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3492) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:209) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:3251) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:3247) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:3270) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:3247) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:3163) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:133) ~[camel-spring-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
... 23 common frames omitted
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: servlet:///openapi.json?headerFilterStrategy=syndesisHeaderStrategy&httpMethodRestrict=GET due to: No bean could be found in the registry for: syndesisHeaderStrategy of type: org.apache.camel.spi.HeaderFilterStrategy
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:758) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:771) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.component.servlet.ServletComponent.doCreateConsumer(ServletComponent.java:296) ~[camel-servlet-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.component.servlet.ServletComponent.createConsumer(ServletComponent.java:228) ~[camel-servlet-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.component.rest.RestEndpoint.createConsumer(RestEndpoint.java:517) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:69) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:103) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.impl.RouteService.doWarmUp(RouteService.java:172) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.impl.RouteService.warmUp(RouteService.java:145) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
... 35 common frames omitted
Caused by: org.apache.camel.NoSuchBeanException: No bean could be found in the registry for: syndesisHeaderStrategy of type: org.apache.camel.spi.HeaderFilterStrategy
at org.apache.camel.util.CamelContextHelper.mandatoryLookupAndConvert(CamelContextHelper.java:201) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.util.EndpointHelper.resolveReferenceParameter(EndpointHelper.java:324) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.util.EndpointHelper.resolveReferenceParameter(EndpointHelper.java:306) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.impl.DefaultComponent.resolveAndRemoveReferenceParameter(DefaultComponent.java:429) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.impl.DefaultComponent.resolveAndRemoveReferenceParameter(DefaultComponent.java:408) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.component.servlet.ServletComponent.createEndpoint(ServletComponent.java:69) ~[camel-servlet-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:130) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:711) ~[camel-core-2.21.0.fuse-750029.jar:2.21.0.fuse-750029]
... 43 common frames omitted
Is it a bug or I just did the wrong way? Please help my with this issue, thanks very much
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Visual Studio - suddenly cannot debug tests - Stack Overflow
I tried to debug tests using Resharper 8 Unit Test Session window. The message in the result window ... Only one unit test...
Read more >Unit Tests, How to Write Testable Code, and Why It Matters
In this article, I will show that unit testing itself is quite easy; the real problems that complicate unit testing, and introduce expensive...
Read more >Problems with .NET unit testing - Rider Support | JetBrains
NET 2.2x just in case. The .NET app was working fine, but unit tests would fail to start. Every project is based on...
Read more >Integration tests in ASP.NET Core | Microsoft Learn
NET Core supports integration tests using a unit test framework with a ... Create open SqliteConnection so EF won't automatically close it.
Read more >What is Integration Testing (Tutorial ... - Software Testing Help
We normally do Integration testing after “Unit testing”. Once all the individual units are created and tested, we start combining those “Unit ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, Thank you for your help and patience 😃
I think this is now resolved (explained). @ashenp feel free to reopen if you think it’s not.