contactreji commented on issue #892: Defining datasource in groovy and using in 
XML routes
URL: https://github.com/apache/camel-k/issues/892#issuecomment-527546770
 
 
   I am trying to integrate with activemq. I have my groovy beans as follows
   ```
   import org.apache.activemq.ActiveMQConnectionFactory;
   import org.apache.activemq.camel.component.ActiveMQComponent;
   import org.apache.activemq.pool.PooledConnectionFactory;
   import org.apache.camel.component.jms.JmsConfiguration;
   context {
       registry {
        
   activeMQConnectionFactory = [ brokerURL: 'tcp://localhost:61616', userName: 
'admin', password: 'admin' ] as ActiveMQConnectionFactory
   pooledConnectionFactory = [ maxConnections: '8', connectionFactory: 
'activeMQConnectionFactory' ]  as  PooledConnectionFactory 
   jmsConfig = [ connectionFactory: 'pooledConnectionFactory', 
concurrentConsumers: '2', maxConcurrentConsumers: '10' ] as JmsConfiguration
   activemq = [ configuration: 'jmsConfig'] as ActiveMQComponent
   }
   }
   ```
   
   and route as follows
   
   ```xml
   <?xml version="1.0" encoding="UTF-8"?>
   <routes xmlns="http://camel.apache.org/schema/spring"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation=" 
http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd";>
      <route streamCache="true">
         <from uri="activemq:queue:test.queue" />
         <log message="Received request to process" />
      </route>
   </routes>
   ```
   
   Camel K build doesn't complete and I see following message
   
   ```
   
ltamehrp7v0","api-version":"camel.apache.org/v1alpha1","kind":"IntegrationContext","ns":"myproject","name":"ctx-bln9je2uoltamehrp7v0","phase":"Error","error":"failure
 while determining classpath: exit status 
1","stacktrace":"github.com/apache/camel-k/vendor/github.com/go-logr/zapr.(*zapLogger).Error\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/github.com/go-logr/zapr/zapr.go:128\ngithub.com/apache/camel-k/pkg/util/log.Logger.Error\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/pkg/util/log/log.go:70\ngithub.com/apache/camel-k/pkg/controller/integrationcontext.(*buildAction).handleBuildRunning\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/pkg/controller/integrationcontext/build.go:214\ngithub.com/apache/camel-k/pkg/controller/integrationcontext.(*buildAction).Handle\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/pkg/controller/integrationcontext/build.go:61\ngithub.com/apache/camel-k/pkg/controller/integrationcontext.(*ReconcileIntegrationContext).Reconcile\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/pkg/controller/integrationcontext/integrationcontext_controller.go:138\ngithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:215\ngithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:158\ngithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133\ngithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134\ngithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait.Until\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88"}
   ```
   
   Any examples on connecting to activeMQ from camel k projects?
   
   
   
   
   

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to