hello,

ActiveMQ update from 6.1.5 to 6.2.0 brings spring libraries version upgrade from 6.1.16 to 6.2.12. With ActiveMQ version 6.1.5 following camel configuration was used to set HttpComponent (pay attention to soTimeout property):

    <bean id="httpcomp" class="org.apache.camel.component.http.HttpComponent">
        <property name="camelContext" ref="camel"/>
        <property name="httpConfiguration" ref="myHttpConfiguration"/>
        <property name="maxTotalConnections" value="200"/>
        <property name="connectionsPerRoute" value="50"/>
        <property name="soTimeout" value="#{T(org.apache.hc.core5.util.Timeout).ofMilliseconds(0L)}"/>
    </bean>

    <bean id="myHttpConfiguration" class="org.apache.camel.http.common.HttpConfiguration">
    </bean>

This definition worked fine, ActiveMQ 6.1.5 started without any problems.

After ActiveMQ update to 6.2.0, where spring 6.2.12 is now used, error below occurs. Found something similar here - https://github.com/spring-projects/spring-framework/issues/31872

INFO   | jvm 1    | 2025/12/03 00:21:02 | ERROR | Failed to load: class path resource [activemq.xml], reason: Error creating bean with name 'httpcomp' defined in class path resource [camel.xml]: Failed to convert property value of type 'org.apache.hc.core5.util.Timeout' to required type 'long' for property 'soTimeout'; Cannot convert value of type 'org.apache.hc.core5.util.Timeout' to required type 'long' for property 'soTimeout': PropertyEditor [org.springframework.beans.propertyeditors.CustomNumberEditor] returned inappropriate value of type 'org.apache.hc.core5.util.Timeout'
INFO   | jvm 1    | 2025/12/03 00:21:02 | org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpcomp' defined in class path resource [camel.xml]: Failed to convert property value of type 'org.apache.hc.core5.util.Timeout' to required type 'long' for property 'soTimeout'; Cannot convert value of type 'org.apache.hc.core5.util.Timeout' to required type 'long' for property 'soTimeout': PropertyEditor [org.springframework.beans.propertyeditors.CustomNumberEditor] returned inappropriate value of type 'org.apache.hc.core5.util.Timeout'
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:614)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:529)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:373)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.springframework.beans.factory.support.DefaultListableBeanFactory.instantiateSingleton(DefaultListableBeanFactory.java:1228)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingleton(DefaultListableBeanFactory.java:1194)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:1130)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:990)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:627)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.apache.activemq.xbean.XBeanBrokerFactory$1.<init>(XBeanBrokerFactory.java:104)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:104)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:67)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:87)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:154)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at java.base/java.lang.reflect.Method.invoke(Method.java:580)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.apache.activemq.console.Main.main(Main.java:115)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at java.base/java.lang.reflect.Method.invoke(Method.java:580)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:346)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at java.base/java.lang.Thread.run(Thread.java:1583)
INFO   | jvm 1    | 2025/12/03 00:21:02 | Caused by: org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'org.apache.hc.core5.util.Timeout' to required type 'long' for property 'soTimeout'; Cannot convert value of type 'org.apache.hc.core5.util.Timeout' to required type 'long' for property 'soTimeout': PropertyEditor [org.springframework.beans.propertyeditors.CustomNumberEditor] returned inappropriate value of type 'org.apache.hc.core5.util.Timeout'
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.springframework.beans.AbstractNestablePropertyAccessor.convertIfNecessary(AbstractNestablePropertyAccessor.java:599)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.springframework.beans.AbstractNestablePropertyAccessor.convertForProperty(AbstractNestablePropertyAccessor.java:608)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:190)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1785)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1729)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1474)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:606)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       ... 30 more
INFO   | jvm 1    | 2025/12/03 00:21:02 | Caused by: java.lang.IllegalArgumentException: Cannot convert value of type 'org.apache.hc.core5.util.Timeout' to required type 'long' for property 'soTimeout': PropertyEditor [org.springframework.beans.propertyeditors.CustomNumberEditor] returned inappropriate value of type 'org.apache.hc.core5.util.Timeout'
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:269)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       at org.springframework.beans.AbstractNestablePropertyAccessor.convertIfNecessary(AbstractNestablePropertyAccessor.java:589)
INFO   | jvm 1    | 2025/12/03 00:21:02 |       ... 36 more

thanks.

Comment From: bclozel

Thanks for the report. Unfortunately this is not really actionable in its current form.

Can you create a minimal sample application that: * removes activemq completely from the picture * just depends on spring and HttpComponent * fails with spring 6.2.x but works with 6.1.x

Thanks!

Comment From: mdeinum

Looking at the error it looks like an Apache Camel Http Component upgrade was also done (or pulled in somehow).

Versions < 4.14 have the soTimeout property as an org.apache.hc.core5.util.Timeout after that is was changed to a long. Which is what the error here would indicate. Changing the property declaration to <property name="soTimeout" value="0"/> should fix this.

IMHO not a problem with the Spring upgrade but another dependency upgrade that sneaked in.

Comment From: tyoma53

indeed, thanks a lot for your advice, just changed "value" to 0 without class specyfing, and it did the trick.

i went through all camel migration guides between 4.8 and 4.14 and haven't seen any changhes in soTimeout type there, but instead i had to check HTTP component documentation itself.