javajmsactivemq-classicmessage-queue

ClassNotFoundException:KahaPersistenceAdapter in ACtiveMQ 5.8


I migrated my application from ActiveMQ 5.5.1 to ActiveMQ 5.8.0. My application has persistence configuration at activemq.xml file as following:

    <persistenceAdapter>
     <kahaPersistenceAdapter directory="${activemq.base}/data/msg" maxDataFileLength="20 Mb"/>
    </persistenceAdapter>

but when I start activemq, I get following exception at wrapper.log file:

INFO   | jvm 1    | 2013/02/24 10:43:28 | Caused by: java.lang.ClassNotFoundException: org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter
INFO   | jvm 1    | 2013/02/24 10:43:28 |   at java.net.URLClassLoader$1.run(Unknown Source)
INFO   | jvm 1    | 2013/02/24 10:43:28 |   at java.security.AccessController.doPrivileged(Native Method)
INFO   | jvm 1    | 2013/02/24 10:43:28 |   at java.net.URLClassLoader.findClass(Unknown Source)
INFO   | jvm 1    | 2013/02/24 10:43:28 |   at java.lang.ClassLoader.loadClass(Unknown Source)
INFO   | jvm 1    | 2013/02/24 10:43:28 |   at java.lang.ClassLoader.loadClass(Unknown Source)
INFO   | jvm 1    | 2013/02/24 10:43:28 |   at org.apache.xbean.spring.context.v2c.XBeanQNameHelper.loadClass(XBeanQNameHelper.java:107)
INFO   | jvm 1    | 2013/02/24 10:43:28 |   at org.apache.xbean.spring.context.v2c.XBeanQNameHelper.getBeanInfo(XBeanQNameHelper.java:72)

Note: My application has message in queues that stored by activemq 5.5.1 and can't change persistence configuration.


Solution

  • Had you put activemq-all-5.8.0.jar in the classpath?

    The KahaPersistenceAdapter is deprecated, but it is still contained in the jar.