Uploaded image for project: 'Fuse Tooling'
  1. Fuse Tooling
  2. FUSETOOLS-2405

ActiveMQ template contains errors which prevent from deploying on JBoss Fuse

    XMLWordPrintable

Details

      1. create a new Fuse Integration Project from ActiveMQ/blueprint/2.17.0.redhat-630254
      2. follow instructions in ReadMe file to deploy the project to JBoss Fuse runtime

    Description

      If I create a new Fuse Integration project from ActiveMQ/blueprint template, I'm unable to deploy it on JBoss Fuse (see attached video and error log below). I followed instructions in ReadMe file.

      2017-05-15 14:27:43,300 | ERROR | - file://work/in | DefaultErrorHandler              | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630254 | Failed delivery for (MessageId: ID-tsedmikntb-35165-1494851250027-0-49 on ExchangeId: ID-tsedmikntb-35165-1494851250027-0-50). Exhausted after delivery attempt: 1 caught: org.springframework.jms.JmsSecurityException: User name [${broker.userName}] or password is invalid.; nested exception is javax.jms.JMSSecurityException: User name [${broker.userName}] or password is invalid.
      
      Message History
      ---------------------------------------------------------------------------------------------------------------------------------------
      RouteId              ProcessorId          Processor                                                                        Elapsed (ms)
      [file-to-jms-route ] [file-to-jms-route ] [file://work/in                                                                ] [        78]
      [file-to-jms-route ] [logReceivingOrder ] [log                                                                           ] [         0]
      [file-to-jms-route ] [sendIncomingOrder ] [activemq:incomingOrders?username=${broker.userName}&password=xxxxxx           ] [        77]
      
      Stacktrace
      ---------------------------------------------------------------------------------------------------------------------------------------
      org.springframework.jms.JmsSecurityException: User name [${broker.userName}] or password is invalid.; nested exception is javax.jms.JMSSecurityException: User name [${broker.userName}] or password is invalid.
              at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:291)[243:org.apache.servicemix.bundles.spring-jms:3.2.16.RELEASE_2]
              at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:168)[243:org.apache.servicemix.bundles.spring-jms:3.2.16.RELEASE_2]
              at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:469)[243:org.apache.servicemix.bundles.spring-jms:3.2.16.RELEASE_2]
              at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.send(JmsConfiguration.java:457)[244:org.apache.camel.camel-jms:2.17.0.redhat-630254]
              at org.apache.camel.component.jms.JmsProducer.doSend(JmsProducer.java:414)[244:org.apache.camel.camel-jms:2.17.0.redhat-630254]
              at org.apache.camel.component.jms.JmsProducer.processInOnly(JmsProducer.java:368)[244:org.apache.camel.camel-jms:2.17.0.redhat-630254]
              at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:154)[244:org.apache.camel.camel-jms:2.17.0.redhat-630254]
              at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145)[232:org.apache.camel.camel-core:2.17.0.redhat-630254]
              at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)[232:org.apache.camel.camel-core:2.17.0.redhat-630254]
              at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:468)[232:org.apache.camel.camel-core:2.17.0.redhat-630254]
              at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:196)[232:org.apache.camel.camel-core:2.17.0.redhat-630254]
              at org.apache.camel.processor.Pipeline.process(Pipeline.java:121)[232:org.apache.camel.camel-core:2.17.0.redhat-630254]
              at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)[232:org.apache.camel.camel-core:2.17.0.redhat-630254]
              at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:196)[232:org.apache.camel.camel-core:2.17.0.redhat-630254]
              at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:454)[232:org.apache.camel.camel-core:2.17.0.redhat-630254]
              at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:226)[232:org.apache.camel.camel-core:2.17.0.redhat-630254]
              at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:190)[232:org.apache.camel.camel-core:2.17.0.redhat-630254]
              at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:175)[232:org.apache.camel.camel-core:2.17.0.redhat-630254]
              at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:102)[232:org.apache.camel.camel-core:2.17.0.redhat-630254]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_111]
              at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_111]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_111]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_111]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_111]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_111]
              at java.lang.Thread.run(Thread.java:745)[:1.8.0_111]
      Caused by: javax.jms.JMSSecurityException: User name [${broker.userName}] or password is invalid.
              at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:52)[219:org.apache.activemq.activemq-osgi:5.11.0.redhat-630254]
              at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1396)[219:org.apache.activemq.activemq-osgi:5.11.0.redhat-630254]
              at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1473)[219:org.apache.activemq.activemq-osgi:5.11.0.redhat-630254]
              at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:325)[219:org.apache.activemq.activemq-osgi:5.11.0.redhat-630254]
              at org.springframework.jms.support.JmsAccessor.createSession(JmsAccessor.java:196)[243:org.apache.servicemix.bundles.spring-jms:3.2.16.RELEASE_2]
              at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:457)[243:org.apache.servicemix.bundles.spring-jms:3.2.16.RELEASE_2]
              ... 23 more
      Caused by: java.lang.SecurityException: User name [${broker.userName}] or password is invalid.
              at org.apache.activemq.security.JaasAuthenticationBroker.authenticate(JaasAuthenticationBroker.java:89)
              at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:68)
              at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:97)
              at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:102)
              at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:842)
              at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:77)
              at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
              at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:326)
              at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:190)
              at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
              at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:125)
              at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:301)
              at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
              at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214)[219:org.apache.activemq.activemq-osgi:5.11.0.redhat-630254]
              at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)[219:org.apache.activemq.activemq-osgi:5.11.0.redhat-630254]
              ... 1 more
      Caused by: javax.security.auth.login.FailedLoginException: login failed
              at org.apache.karaf.jaas.modules.properties.PropertiesLoginModule.login(PropertiesLoginModule.java:114)
              at org.apache.karaf.jaas.boot.ProxyLoginModule.login(ProxyLoginModule.java:83)[karaf-jaas-boot.jar:]
              at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_111]
              at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_111]
              at javax.security.auth.login.LoginContext.invoke(LoginContext.java:755)
              at javax.security.auth.login.LoginContext.access$000(LoginContext.java:195)
              at javax.security.auth.login.LoginContext$4.run(LoginContext.java:682)
              at javax.security.auth.login.LoginContext$4.run(LoginContext.java:680)
              at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_111]
              at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
              at javax.security.auth.login.LoginContext.login(LoginContext.java:587)
              at org.apache.activemq.security.JaasAuthenticationBroker.authenticate(JaasAuthenticationBroker.java:84)
              ... 15 more
      

      Apparently, there is a problem with variables (broker.username, ...) propagation.

      You can fix this issue with the following steps:

      1. in ReadMe.txt change the

        create a properties file named camel.activemq.spring.conf in etc folder of JBoss Fuse containing ActiveMQ

        to

        create a properties file named camel.activemq.blueprint.cfg in etc folder of JBoss Fuse containing ActiveMQ

        The file should be named after value of persistant-id attribute of property-placeholder in camel-blueprint.xml file.
      2. in camel-blueprint.xml remove the following parameters
        ?username=${broker.userName}&password=${broker.password}

        from every activemq definition in Camel routes. Broker username/password/URL is defined directly in ActiveMQ bean definition.

      Attachments

        Activity

          People

            bfitzpat_rh Brian Fitzpatrick (Inactive)
            tsedmik Tomáš Sedmík
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: