I want to use jni version of levelDB since I heard it's stable.I change the
indexFactory as follow:
<broker brokerName="broker" ... >
  ...
  <persistenceAdapter>
    <levelDB directory="activemq-data"
indexFactory="org.fusesource.leveldbjni.JniDBFactory"/>
  </persistenceAdapter>
  ...
</broker>

Unfortunately it did not work out. The broker shutdown automatically. There
is an error in activemq.log:
Error: indexFactory=Could not load any of the index factory classes :
org.fusesource.leveldbjni.jniDBFactory
Moreover, I found three other errors/warns that may relates to my problem in
log file:
Could not stop
service:levelDB[D:/apache-activemq-5.8.0/bin/data/levelDB],Reason:java.lang.NullPointerException.

Exception thrown from life cycle processor on context
close,java.lang.illegalStateException:LifeCycleProcessor not
initialized-call "refresh" before invoking lifecycle methods.

Failed to stop broker after failure in start.

Anyway, since I failed to load jni version of levelDB, I change my
configuration back to original, which means no indexFactory property is set
and pure java version will be load. However, my broker failed to start this
time , the command window prints out the following warning:
DB operation failed(entering recovery mode) |
org.pache.activemq.leveldb.levelDBClient | main

I thought the levelDB is doing some recovery work, so I went home and go to
bed. But this morning I found the command window did not print out any new
infomation and the broker did not start up normally.

I have two questions:
1. Why I can not load jni version of levelDB ? I checked 
$ACTIVEMQ_HOME/lib/extra , and I found these leveldbjni jar files:
activemq-leveldb-store-5.8.0.jar, leveldb-0.5.jar, leveldbjni-1.5.jar,
leveldb-api-0.5.jar, leveldbjni-linux32-1.5.jar, leveldbjni-linux64-1.5.jar,
leveldbjni-osx-1.5.jar, leveldbjni-win32-1.5.jar, leveldbjni-win64-1.5.jar. 
It seems all leveldbjni jar files are there .

2. Why my broker failed to start up after I changed my configuration ? How
can I start it up and did not lose messages stored ?

    Thanks for any help in advance!



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Change-indexFactory-property-of-levelDB-and-the-broker-failed-to-start-tp4673880.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to