Short update on the upgrade to AMQ 6. After checking the dependency tree
with Gradle I found out that ActiveMQ was downgraded to 5.18.3. I changed
that and now it works fine.Thnx

Raymond

On Tue, Dec 5, 2023 at 10:04 AM ski n <raymondmees...@gmail.com> wrote:

> And does there is also a new version of the activemq.xsd schema?
>
> http://activemq.apache.org/schema/core/
>
> Can't find a 6.0 compatible one. The old one has also for example:
>
> <bean id="pooledConnectionFactory"
> class="javax.script.ScriptEngineFactory.PooledConnectionFactoryFactoryBean">
>
> The trouble is some libs were changed from javax to jakarta, but some
> stayed the same as they are not related to the Jakarta project as managed
> by the Eclipse foundation.
>
> Raymond
>
>
> On Tue, Dec 5, 2023 at 9:50 AM ski n <raymondmees...@gmail.com> wrote:
>
>> I think you are right. I for example, thought I updated all dependencies
>> to Jakarta, but still got:
>>
>> jakarta.servlet.ServletException: Handler dispatch failed:
>> java.lang.IncompatibleClassChangeError: Class
>> org.apache.activemq.ActiveMQConnectionFactory does not implement the
>> requested interface jakarta.jms.ConnectionFactory
>>
>> Need to run a dependency tree. Does ActiveMQ 6 completely use jakarta or
>> does it still uses javax for some stuff?
>>
>> Raymond
>>
>>
>>
>> On Tue, Dec 5, 2023 at 4:13 AM Matt Pavlovich <mattr...@gmail.com> wrote:
>>
>>> Hi Raymond-
>>>
>>> There are a ton of unit tests that use the xbean factory.
>>>
>>> I suspect a classpath issue.
>>>
>>> If you can share a simplified code project via GitHub, I’d be happy to
>>> look at it this week.
>>>
>>> Thanks,
>>> Matt Pavlovich
>>>
>>> > On Dec 4, 2023, at 4:16 PM, ski n <raymondmees...@gmail.com> wrote:
>>> >
>>> > I'm currently upgrading to the new ActiveMQ 6 (from 5.18.3 to 6.0.1).
>>> >
>>> > I'm starting an embedded with the help of xbean:
>>> >
>>> > https://activemq.apache.org/broker-xbean-uri
>>> >
>>> > Using the " xbean:file:filePathResource ".
>>> >
>>> > My code is like this:
>>> >
>>> > //get the path of activemq.xml file
>>> > String brokerPath = brokerFile.getCanonicalPath();
>>> >
>>> > //create the xbean broker uri
>>> > String brokerUrl = "xbean:file:" +
>>> > UrlEscapers.urlFragmentEscaper().escape(brokerPath);
>>> >
>>> > //create the broker with the xbean uri
>>> > URI configurationUri = new URI(brokerUrl);
>>> > broker = BrokerFactory.createBroker(configurationUri);
>>> >
>>> >
>>> > I however get a classnotfoundexception:
>>> >
>>> > Caused by: java.lang.ClassNotFoundException:
>>> > org.apache.activemq.xbean.XBeanBrokerFactory
>>> >        at
>>> >
>>> java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
>>> >        at
>>> >
>>> java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
>>> >        at
>>> java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
>>> >        at
>>> >
>>> org.apache.activemq.util.FactoryFinder$StandaloneObjectFactory.loadClass(FactoryFinder.java:88)
>>> >        at
>>> >
>>> org.apache.activemq.util.FactoryFinder$StandaloneObjectFactory.create(FactoryFinder.java:61)
>>> >        at
>>> >
>>> org.apache.activemq.util.FactoryFinder.newInstance(FactoryFinder.java:154)
>>> >        at
>>> >
>>> org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(BrokerFactory.java:41)
>>> >
>>> > I didn't change the dependencies and just updated the version. Only
>>> after
>>> > adding this dependency:
>>> >
>>> > <!--
>>> https://mvnrepository.com/artifact/org.apache.activemq/activemq-spring
>>> > -->
>>> > <dependency>
>>> >    <groupId>org.apache.activemq</groupId>
>>> >    <artifactId>activemq-spring</artifactId>
>>> >    <version>6.0.1</version>
>>> > </dependency>
>>> >
>>> > The ActiveMQ 6 Classic broker worked. Is this expected? Has there been
>>> a
>>> > change on the xbean? Is there an upgrade guide where to look out for?
>>> >
>>> > Raymond
>>>
>>>

Reply via email to