Hawtio Compatibility with Camel 3.x - java

We have recently upgraded Camel version in our application from 2.20.2 to 3.11.2. Hawtio web console used to show some Camel related details with Camel 2.20.2 which are missing after the upgrade to 3.11.2. After doing some analysis, I found that Hawtio is trying to access some MBeans which Camel used to expose before, but not now after the upgrade.
MBean not available
I just want to check if Hawtio is compatible with Camel 3.x or not, or is there anything else that I'm missing.
Currently we are using:
Camel 3.11.2 with Spring DSL
Hawtio 2.13.0

You are probably missing one dependency.
Here is the full list of mines - ok probably too much as components are included in this list, but you will also find some basic one (like "camel-base-engine-3.9.0.jar").
camel-api-3.9.0.jar
camel-base-3.9.0.jar
camel-base-engine-3.9.0.jar
camel-bean-3.9.0.jar
camel-bindy-3.9.0.jar
camel-catalog-3.9.0.jar
camel-cdi-3.9.0.jar
camel-core-3.9.0.jar
camel-core-catalog-3.9.0.jar
camel-core-engine-3.9.0.jar
camel-core-languages-3.9.0.jar
camel-core-model-3.9.0.jar
camel-core-processor-3.9.0.jar
camel-core-reifier-3.9.0.jar
camel-core-xml-3.9.0.jar
camel-csv-3.9.0.jar
camel-direct-3.9.0.jar
camel-directvm-3.9.0.jar
camel-file-3.9.0.jar
camel-ftp-3.9.0.jar
camel-health-3.9.0.jar
camel-http-3.9.0.jar
camel-http-base-3.9.0.jar
camel-http-common-3.9.0.jar
camel-jackson-3.9.0.jar
camel-jaxb-3.9.0.jar
camel-json-validator-3.9.0.jar
camel-jsonpath-3.9.0.jar
camel-jta-3.9.0.jar
camel-log-3.9.0.jar
camel-main-3.9.0.jar
camel-management-3.9.0.jar
camel-management-api-3.9.0.jar
camel-microprofile-config-3.9.0.jar
camel-microprofile-health-3.9.0.jar
camel-microprofile-metrics-3.9.0.jar
camel-mock-3.9.0.jar
camel-seda-3.9.0.jar
camel-sjms-3.9.0.jar
camel-sjms2-3.9.0.jar
camel-support-3.9.0.jar
camel-timer-3.9.0.jar
camel-util-3.9.0.jar
camel-xml-jaxb-3.9.0.jar
camel-xml-jaxp-3.9.0.jar
camel-xpath-3.9.0.jar

Related

Incompatible versions of camel-activemq component and camel-http4 component

I have a Spring-boot Camel application that receives HTTP requests and has to put them on an ActiveMQ.
I am using Maven to handle my dependencies, but I have a problem with the Camel-ActiveMQ component.
When using camel I am trying to keep the versions of different components the same. So far version 2.24.2 was working fine until I wanted to add a route with an ActiveMQ endpoint. There is no Camel-ActiveMQ 2.24.2 version in the Maven repositories that I am looking in.
I can not find a version of the Camel-ActiveMQ artifact that matches my other camel-components.
Some links to the components that I am using:
- Camel-ActiveMQ
- Camel-HTTP4
- Camel-Spring-Boot-Starter
I have tried using mixed versions of Camel Components (e.g. 2.24.2 for all components but 3.0.0-RC1 for ActiveMQ). This causes class loading exceptions on runtime due to multiple versions of classes being available.
I have found a versions that exist for the rest of my components and Camel-ActiveMQ (3.0.0-M1) but this again gives classloading exceptions when running the applications
Where can I find compatible versions?
Reading further I found the following in the Camel-ActiveMQ documentation:
SPRING BOOT AUTO-CONFIGURATION
When using Spring Boot make sure to use the following Maven dependency to have support for auto configuration:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-activemq-starter</artifactId>
<version>x.x.x</version>
<!-- use the same version as your Camel core version -->
</dependency>
There is no 2.24.2 version available, but running with 3.0.0-M1 seems to work. Seems that the Camel-Spring-Boot functionality is kinda new, and will force me to use a 3.x version of camel.

SpringBoot 1.5.x to 2.x upgrade

I am looking at the migration guide in this link
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Migration-Guide
Our environment currently has SpringBoot Services running 1.5.x. I am planning an upgrade to 2.x but would prefer planning for it a Service at a time at least to start with. We use Discovery (eureka), Config and other Spring Cloud modules as well.
I am planning to start with Discovery and wanted to get advice on how people have gone ahead with a migration as such. So based this plan, discovery will run 2.x with clients running 1.x to start.

Why am I getting "is not a NamedXAResource" in Apache Karaf 4.0.4?

I have some transactional code that worked very well in old versions of Apache Karaf. Now in Apache Karaf 4.0.4 I see a lot of exceptions.
java.lang.IllegalStateException: Cannot log transactions as org.apache.derby.jdbc.EmbedXAResource#77cbf3e5 is not a NamedXAResource.
and
org.apache.aries.transaction.manager - 1.3.0 | Please correct the integration and supply a NamedXA
java.lang.IllegalStateException: Cannot log transactions as TransactionContext{transactionId=null,connection=ActiveMQConnection
I found the answer and post it here to give others a quicker way to solve the same problem. It took me quite a while and some help from Guillaume to figure this out.
The geronimo transaction manager that is used in Apache Karaf inside the Aries transaction manager bundle can recover transactions. By default this feature is switched off in older karaf versions. In Apache Karaf 4.0.4 this has changed.
The config etc/org.apache.aries.transaction.cfg contains this setting
aries.transaction.recoverable = true
It activates the recovery support. The downside of this is that all jdbc and jms Connections must then implement NamedXAResource. This is outside the standard so most jdbc and jms providers do not support this.
The solution for ActiveMQ is to use the JCAPoolingConnectionFactory. For jdbc you can wrap your XADataSource using aries transaction jdbc. It provides a pooling support that also supports recovery.
If you are happy with how your application worked before you can simply set the above switch back to false. The transactions will then work like in older Apache Karaf versions.

Modify bootstrap version in hawtio

I am using Hawtio for an internal web application. It talks to my RESTful Tomcat server in the back-end. But currently Hawtio uses Bootstrap2.3.2 version which is no longer supported by Bootstrap foundation.
Is there any way to change Hawtio settings or reconfigure it to use the latest bootstrap version.
This question was asked on the hawtio issue tracker and answered by Stan Lewis: https://github.com/hawtio/hawtio/issues/2060
yeah, in hawtio v2 we're running against an up to date Bootstrap and have
added Patternfly.
To be honest, updating Bootstrap was non-trivial, requiring changes in
every HTML partial, I wouldn't want to do it for v1.

Overview of camel endpoints?

I have deployed my camel integration projects (WAR) on a JBoss Wildfly application server.
I was wondering if there is a way to see what endpoints are available and what the URL's are?
In a similiar way as i can log into the administration console under Wildfly and select web services to get an overview of what is deployed?
Thanks in advance for your help.
Yes, if you have JMX enabled on your camel context, then you can view a list of endpoints via jconsole, as you can see from:
JMX is on by default according to the camel site but if you've somehow disabled it, adding:
<jmxAgent id="agent" disabled="false"/>
to your <camelContext> element should be enough to re-enable it.
There is also hawtio which is a web console to manage Java stuff, and it has plugins for Apache Camel, JBoss, and others too.
You could then install hawtio in wildfly, and then see your Camel routes / endpoints and whatnot
http://hawt.io/

Categories

Resources