Error- Unable to find BeanManager. Please ensure that you configured the CDI
implementation of your choice properly. I am getting this error while
running one of the job route name TestAccount job. On start up.. CDI manager
is getting loaded and DI context is added to route, snipped as follows,

CreationalContext createCtx = beanManager.createCreationalContext(bean);
                JobRouter job = (JobRouter) beanManager.getReference(bean,
JobRouter.class, createCtx);
                RouteBuilder routeToAdd = (RouteBuilder)
beanManager.getReference(bean, RouteBuilder.class, createCtx);
                log.info("jobName: "+job.getJobName());
Server is restarted 30 days before.. TestAccount job is scheduled every 2 hr
to run. But the issue is happening since two day.. and its happening only
for few occurrences.. say e.g. out of last 4 jobs.. 3 are not-successful and
1 is successful.

Complete stack trace as follows,

-

 org.apache.camel.RuntimeCamelException:
   java.lang.IllegalStateException: Unable to find BeanManager. Please
   ensure that you configured the CDI implementation of your choice
   properly.  at
  
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1363)
   at
  
org.apache.camel.impl.PropertyPlaceholderDelegateRegistry.lookupByNameAndType(PropertyPlaceholderDelegateRegistry.java:65)
   at
  
org.apache.camel.component.bean.BeanInfo.createParameterMappingStrategy(BeanInfo.java:169)
   at org.apache.camel.component.bean.BeanInfo.<init>(BeanInfo.java:92) 
   at
  
org.apache.camel.component.bean.ConstantBeanHolder.<init>(ConstantBeanHolder.java:44)
   at
  
org.apache.camel.model.language.MethodCallExpression.createExpression(MethodCallExpression.java:177)
   at
  
org.apache.camel.model.language.ExpressionDefinition.evaluate(ExpressionDefinition.java:118)

   Caused by: java.lang.IllegalStateException: Unable to find
   BeanManager. Please ensure that you configured the CDI implementation
   of your choice properly.
Please let me know if you need any other help. Any kind of help is
appreciated



--
View this message in context: 
http://camel.465427.n5.nabble.com/RuntimeCamelException-IllegalStateException-Unablefind-BeanManager-Please-ensure-config-CDI-tp5784059.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to