Upgrading to Bloomreach v16, Apache Camel problem

Hello

Right now I am working for the fist time on a major upgrade, and I am struggling a lot.

For now, I managed to follow the Bloomreach documentation and do almost all steps, but I am stuck regarding external libraries.

What I found is, the project is using Apache camel and it is obsolete with the newer version of Java 17, which bring Spring 6, and more things, but it just breaks the current Apache Camel.

I am moving Apache Camel to 4.x, but I found there are .xml in the project handled by Camel, which to be honest I have no idea about them. The syntax seems to be broken, and I am having a hard time finding the documentation or how to solve it correctly. This is totally new for me.

`

<choice>
    <when>
        <simple>${properties:dev.enabled}</simple>

        <!-- Convert body to String -->
        <convertBodyTo type="java.lang.String"/>

        <!-- Unmarshal JSON usando bean -->
        <unmarshal ref="eventJsonFormat"/>

        <!-- Retrieve site -->
        <to uri="direct:siteresolver"/>

        <!-- Marshal JSON usando bean -->
        <marshal ref="eventJsonFormat"/>

        <to uri="log:org.onehippo.forge.camel.demo?level=INFO"/>

        <choice>
            <when>
                <simple>${properties:dev.mode}</simple>
                <recipientList>
                    <simple>file:${property.topic}-content-update?autoCreate=true&amp;charset=utf-8</simple>
                </recipientList>
            </when>
            <otherwise>
                <recipientList>
                    <simple>amqp:topic:${property.topic}-content-update</simple>
                </recipientList>
            </otherwise>
        </choice>

    </when>
</choice>

`

Apparently, the syntaxis for marshall and unmarshall no longer works that way.
Does anyone have something like that in a project or could help me a bit?

Hello @Mario_Lopez what is the project using Apache Camel for? That XML seems to imply it’s for handling CMS related events so you are probably using our Forge plugin, you should upgrade it to match your brXM version https://bloomreach-forge.github.io/camel-events-support/release-notes.html

If it’s for something unrelated, it does mean you will need to upgrade and bring it inline with brXM dependencies. You might also consider pushing out that code outside of the brXM project into its own to decouple the upgrade paths.

Hi.

For what is being used? Checking the .xml, when a specific type of documentTypes are published, it is triggering an event used by other team for indexation in Algolia (thats the most dummy explanation I can provide).

I have a couple of doubts, because checking the pom.xml, I see we were in the version 15 with Apache Camel 2.X (which is not supported apparently), and also, I see there is a forge.camel-hippoevt, which makes me wonder if we have both right now.

Also checking in the pom.xml, the dates are from 2019, so it is not something added recently

For now, I’ve achieved to have the CMS running on 16.2, but obviously, the experience manager does not work (it does not show any channel, which I know this is related to camel version, we had something similar in a previous upgrade), and the resourceAPI is totally broken, which I imagine is because of the previous point or something I havent reached yet

Unless you have a specific reason for defining the camel version in your pom, I would remove it and let our plugin pull in that dependency. And make sure you’re on the right version of the plugin (5.1.0 for brXM v16). You can also look in the demo project for samples of XML config and make any changes on your end as needed.

Not sure about the resourceapi, check the logs for errors etc and make sure you don’t have dependency conflicts with mvn dependency:tree - as much as possible you should be using ones from brXM.

I’ve fixed a little bit the pom and its versions, and now im stuck again with the camel thing.

I need to figure out how to resolve the marshall ref and unmarshall ref and because that is no longer supported on camel 4.8, and dont see it used in the example you shared. I guess this is breaking later the resourceAPI, but unsure, since this is the only error I get for now.

You should check the cms and site logs for errors, but it sounds like the camel XML config is wrong, so Spring will fail to initialize properly, and you end up with a broken cms and/or site. Have you tried marshal dataFormat="eventJsonFormat"?

Yeah. Im checking those logs each run, because I “fix” something, another thing breaks.

I’ve tried to remove the marshall/unmarshall, to have it working, but same situation. Just a different error each time.

Now I am getting an error that says the ${property.topic} it is not defined (I dont even know what the topic is), but I dont see any reference in the project, nor I’ve deleted it. This is from 2019, when the project was created and I have no idea at all about it

The dataFormat you mentioned does not exist
This is the complete .xml right now

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
    ">

  <!-- currently properties file is in the code so it will work on each environment when deployed -->
<!--   <bean id="bridgePropertyPlaceholder" class="org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer"> -->
<!--     <property name="location" value="classpath:jms-configuration-development.properties"/> -->
<!--     <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE"/> -->
<!--   </bean> -->

<!--   todo uncomment when each brxm environment has the properties file (connection string to azure sb) and jms.conf property is used for location of the properties file (check root pom cargo profile properties) -->
  <bean id="bridgePropertyPlaceholder" class="org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer">
	  <property name="location" value="file:#{systemProperties['jms.conf']}"/>
	  <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE"/>
  </bean>

  <bean id="jmsConnectionFactory" class="org.apache.qpid.jms.JmsConnectionFactory">
    <property name="remoteURI" value="amqps://${jms.remoteuri}?amqp.traceFrames=true&amp;amqp.idleTimeout=120000"/>
    <property name="username" value="${jms.username}"/>
    <property name="password" value="${jms.password}"/>
  </bean>

  <bean id="jmsCachingConnectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory">
    <property name="targetConnectionFactory" ref="jmsConnectionFactory"/>
  </bean>

  <bean id="jmsConfig" class="org.apache.camel.component.jms.JmsConfiguration">
    <property name="connectionFactory" ref="jmsCachingConnectionFactory"/>
    <property name="cacheLevelName" value="CACHE_CONSUMER"/>
  </bean>

  <bean id="amqp" class="org.apache.camel.component.amqp.AMQPComponent">
    <property name="configuration" ref="jmsConfig"/>
  </bean>

  <bean id="event-json-jackson" class="org.apache.camel.component.jackson.JacksonDataFormat">
    <property name="unmarshalType" value="com.grandvision.search.Event"/>
  </bean>

  <context:component-scan base-package="com.grandvision.search"/>

  <camelContext xmlns="http://camel.apache.org/schema/spring" id="site">

    <contextScan/>

    <route id="Route-Hippo-Event-to-SB">

      <from
              uri="hippoevent:?category=workflow&amp;action=publish,depublish&amp;documentType=grandvision:blogArticle,grandvision:contentDocument,grandvision:brand,grandvision:baseProductDetailDocument"/>

      <choice>
        <when>
          <!--enable when ms azure sb are ready-->
          <simple>${properties:dev.enabled}</simple>
          <!-- Convert the file message to String. -->
          <convertBodyTo type="java.lang.String"/>

          <!-- retrieve the site based on event  -->
          <to uri="direct:siteresolver"/>
          <to uri="log:org.onehippo.forge.camel.demo?level=INFO"/>
          <choice>
            <when>
              <!-- dev.mode = true will use a file system queue instead of the MS Azure SB Check Tomcat Folder for results -->
              <simple>${properties:dev.mode}</simple>
              <recipientList>
                <simple>file:${property.topic}-content-update?autoCreate=true&amp;charset=utf-8</simple>
              </recipientList>
            </when>
            <otherwise>
              <recipientList>
                <simple>amqp:topic:${property.topic}-content-update</simple>
              </recipientList>
            </otherwise>
          </choice>
        </when>
      </choice>

    </route>

  </camelContext>

</beans>

And this is the error

[INFO] 27.01.2026 16:21:34 ERROR main [DefaultHstSiteConfigurer.initializeComponentManager:282] HstSiteConfigurer: ComponentManager initialization failed.
[INFO] org.apache.camel.FailedToCreateRouteException: Failed to create route Route-Hippo-Event-to-SB at: >>> Choice[[When[simple{${properties:dev.enabled}} → [ConvertBodyTo[java.lang.String], To[direct:siteresolver], To[log:org.onehippo.forge.camel.demo?level=INFO], Choice[[When[simple{${properties:dev.mode}} → [RecipientList[simple{file:${property.topic}-content-update?autoCreate=true&charset=utf-8}]]]] Otherwise[[RecipientList[simple{amqp:topic:${property.topic}-content-update}]]]]]]]] <<< in route: Route(Route-Hippo-Event-to-SB)[From[hippoevent:?category=wor… because of Unknown function: property.topic at location 5

Hey @Mario_Lopez

can you try replacing ${property.topic} with ${properties:topic}

Thanks

Now it is not prompting any error. For now, I see no main errors, except one regarding the url (which I assumme it is because I do not have Algolia locally), and one error I will check once I complete the upgrade if it appears on v15

I still have the marshal and unmarshall elements removed, and once the upgrade is finished, I will check if it cause any kind of problem without those elements there.

Hey @Mario_Lopez , glad to hear the suggestion resolved your case!

Yes, it makes sense that you will receive errors when you trigger workflow operations because the event can’t reach its destination because as you said you don’t have the service running. The error you highlighted in the screenshot is actually expected because you have the user admin/admin in your local setup. This is an error logged on purpose so that you don’t leave the admin user with the default password in your higher instanes.

Best

HI again.

Everything on my end seems to work fine!!

One last question. Is there any important changes regarding the SPA SDK? Our project is headless and we are using the Bloomreach React SDK. I didnt see anything mentioned in the notes, like with the v15 upgrade regarding the resourceAPI, so I am wondering if there are some impportant things we need to know, since we are now aligning with the FE teams

The spa-sdk has a separate release cycle which can be viewed here Releases · bloomreach/spa-sdk · GitHub

If any action is needed due to a brXM upgrade, it should be called out in the upgrade steps. So if there isn’t anything specifically called out, you don’t need to do anything.

That is what I thought.

I see there was a mention to it on the v14 steps, not on 16, but just to confirm.

Thanks