You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While the integrations generally work in Camel-K 1.0.0.-RC2 , the 'context' object is not available: const amq = context.getComponent('activemq');
causes:
[1] Exception in thread "main" ReferenceError: context is not defined
[1] at <js> :program(Unnamed:3:142-148)
[1] at org.graalvm.polyglot.Context.eval(Context.java:370)
[1] at org.apache.camel.k.loader.js.JavaScriptSourceLoader$1.configure(JavaScriptSourceLoader.java:62)
[1] at org.apache.camel.builder.RouteBuilder.checkInitialized(RouteBuilder.java:471)
[1] at org.apache.camel.builder.RouteBuilder.configureRoutes(RouteBuilder.java:438)
[1] at org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:418)
[1] at org.apache.camel.impl.engine.AbstractCamelContext.lambda$addRoutes$0(AbstractCamelContext.java:1119)
[1] at org.apache.camel.impl.engine.AbstractCamelContext.doWithDefinedClassLoader(AbstractCamelContext.java:2460)
[1] at org.apache.camel.impl.engine.AbstractCamelContext.addRoutes(AbstractCamelContext.java:1119)
[1] at org.apache.camel.main.RoutesConfigurer.configureRoutes(RoutesConfigurer.java:84)
[1] at org.apache.camel.main.BaseMainSupport.postProcessCamelContext(BaseMainSupport.java:570)
[1] at org.apache.camel.main.BaseMainSupport.initCamelContext(BaseMainSupport.java:422)
[1] at org.apache.camel.k.main.ApplicationRuntime$MainAdapter.doInit(ApplicationRuntime.java:180)
[1] at org.apache.camel.support.service.ServiceSupport.init(ServiceSupport.java:80)
[1] at org.apache.camel.support.service.ServiceSupport.start(ServiceSupport.java:108)
[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] 2020-03-15 21:38:05.926 INFO [Camel Thread #0 - CamelHangupInterceptor] MainSupport$HangupInterceptor - Received hang up - stopping the main instance.
The text was updated successfully, but these errors were encountered:
lmorandini
changed the title
'context' object not available in JavaScrpt integrations
'context' object not available in JavaScript integrations
Mar 16, 2020
While the integrations generally work in Camel-K 1.0.0.-RC2 , the 'context' object is not available:
const amq = context.getComponent('activemq');
causes:
The text was updated successfully, but these errors were encountered: