camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [camel-quarkus] JiriOndrusek commented on a change in pull request #1984: Fixing core build because of recent changes in camel master
Date Wed, 04 Nov 2020 13:47:01 GMT

JiriOndrusek commented on a change in pull request #1984:
URL: https://github.com/apache/camel-quarkus/pull/1984#discussion_r517353349



##########
File path: extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java
##########
@@ -344,10 +345,11 @@ protected HeadersMapFactory createHeadersMapFactory() {
 
     @Override
     protected BeanProxyFactory createBeanProxyFactory() {
-        return new BaseServiceResolver<>(BeanProxyFactory.FACTORY, BeanProxyFactory.class)
-                .resolve(getCamelContextReference())
-                .orElseThrow(() -> new IllegalArgumentException("Cannot find BeanProxyFactory
on classpath. "
-                        + "Add camel-bean to classpath."));
+        return new BaseServiceResolver<>(BeanProxyFactory.FACTORY, BeanProxyFactory.class,
+                getFactoryFinder(FactoryFinder.DEFAULT_PATH))

Review comment:
       @davsclaus I've tried to use `getBootstrapFactoryFinder` but it caused failures like:
   >
   >Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route3
at: >>> Bean[org.apache.camel.quarkus.component.bean.CamelRoute$MyBean] <<<
in route: Route(route3)[From[direct:method] -> [Bean[org.apache.camel.... because of Cannot
find BeanProcessorFactory on classpath. Add camel-bean to classpath.
   	at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:222)
   	at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:66)
   	at org.apache.camel.quarkus.core.FastCamelContext.startRouteDefinitions(FastCamelContext.java:882)
   	at org.apache.camel.quarkus.core.FastCamelContext.startRouteDefinitions(FastCamelContext.java:619)
   	at org.apache.camel.impl.engine.AbstractCamelContext.doInit(AbstractCamelContext.java:2633)
   	at org.apache.camel.quarkus.core.FastCamelContext.doInit(FastCamelContext.java:505)
   	at org.apache.camel.support.service.BaseService.init(BaseService.java:83)
   	at org.apache.camel.impl.engine.AbstractCamelContext.init(AbstractCamelContext.java:2405)
   	at org.apache.camel.support.service.BaseService.start(BaseService.java:111)
   	at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2422)
   	at org.apache.camel.quarkus.core.CamelContextRuntime.start(CamelContextRuntime.java:57)
   	at org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:45)
   	... 9 more
   Caused by: java.lang.IllegalArgumentException: Cannot find BeanProcessorFactory on classpath.
Add camel-bean to classpath.
   	at org.apache.camel.quarkus.core.FastCamelContext.lambda$createBeanProcessorFactory$2(FastCamelContext.java:369)
   	at java.util.Optional.orElseThrow(Optional.java:408)
   	at org.apache.camel.quarkus.core.FastCamelContext.createBeanProcessorFactory(FastCamelContext.java:369)
   	at org.apache.camel.impl.engine.AbstractCamelContext.getBeanProcessorFactory(AbstractCamelContext.java:4290)
   	at org.apache.camel.reifier.BeanReifier.createProcessor(BeanReifier.java:41)
   	at org.apache.camel.reifier.ProcessorReifier.makeProcessor(ProcessorReifier.java:756)
   	at org.apache.camel.reifier.ProcessorReifier.addRoutes(ProcessorReifier.java:494)
   	at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:220)
   	... 20 more
   
   Original value (` getFactoryFinder(FactoryFinder.DEFAULT_PATH)`) works. 
   
   So for now I've kept ` getFactoryFinder(FactoryFinder.DEFAULT_PATH)` 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message