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

Autodetect camel-bean #1236

Closed
nicolaferraro opened this issue Jan 29, 2020 · 0 comments · Fixed by #1294
Closed

Autodetect camel-bean #1236

nicolaferraro opened this issue Jan 29, 2020 · 0 comments · Fixed by #1294
Labels
good first issue Does not require full understanding of the codebase kind/bug Something isn't working
Milestone

Comments

@nicolaferraro
Copy link
Member

I though this was solved.

 from("timer:java?period=1s")
        .bean(this, "generateRandomItem({{items:-}})")
        .to("log:info");

Result:

[1] Exception in thread "main" org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: >>> Bean[Routing] <<< in route: Route(route1)[From[timer:java?period=1s] -> [Bean[Routing], ... because of Cannot find BeanProcessorFactory. Make sure camel-bean is on the classpath.
[1]     at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:386)
[1]     at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:108)
[1]     at org.apache.camel.impl.DefaultModel.start(DefaultModel.java:356)
[1]     at org.apache.camel.impl.DefaultModel.startRoute(DefaultModel.java:330)
[1]     at org.apache.camel.impl.DefaultModel.startRouteDefinitions(DefaultModel.java:323)
[1]     at org.apache.camel.impl.DefaultModel.startRouteDefinitions(DefaultModel.java:302)
[1]     at org.apache.camel.impl.AbstractModelCamelContext.startRouteDefinitions(AbstractModelCamelContext.java:342)
[1]     at org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(AbstractCamelContext.java:2597)
[1]     at org.apache.camel.impl.engine.AbstractCamelContext.lambda$doStart$2(AbstractCamelContext.java:2445)
[1]     at org.apache.camel.impl.engine.AbstractCamelContext.doWithDefinedClassLoader(AbstractCamelContext.java:2462)
[1]     at org.apache.camel.impl.engine.AbstractCamelContext.doStart(AbstractCamelContext.java:2443)
[1]     at org.apache.camel.support.service.ServiceSupport.start(ServiceSupport.java:117)
[1]     at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2352)
[1]     at org.apache.camel.k.main.ApplicationRuntime$MainAdapter.doStart(ApplicationRuntime.java:189)
[1]     at org.apache.camel.support.service.ServiceSupport.start(ServiceSupport.java:117)
[1]     at org.apache.camel.main.MainSupport.run(MainSupport.java:77)
[1]     at org.apache.camel.k.main.ApplicationRuntime.run(ApplicationRuntime.java:76)
[1]     at org.apache.camel.k.main.Application.main(Application.java:42)
[1] Caused by: java.lang.IllegalStateException: Cannot find BeanProcessorFactory. Make sure camel-bean is on the classpath.
[1]     at org.apache.camel.reifier.BeanReifier.createProcessor(BeanReifier.java:45)
[1]     at org.apache.camel.reifier.ProcessorReifier.makeProcessorImpl(ProcessorReifier.java:571)
[1]     at org.apache.camel.reifier.ProcessorReifier.makeProcessor(ProcessorReifier.java:537)
[1]     at org.apache.camel.reifier.ProcessorReifier.addRoutes(ProcessorReifier.java:250)
[1]     at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:384)
[1]     ... 17 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Does not require full understanding of the codebase kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant