You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by I am Noob <se...@ml.sme.outblaze.com> on 2009/03/09 09:31:47 UTC

ActiveMQ broker configuration in Servicemix 4

Dear All,

  I start with a clean ServiceMix instance and create a broker by the
following command:
     activemq create-broker
  I can see a file called localhost-broker.xml is created in deploy folder.
And I can see the localhost-broker.xml is registed as OSGi bundle.

  Now I configure ActiveMQ peristence adapter in the file as I am going to
use HA. I just follow the instructions in
http://servicemix.apache.org/clustering.html. My configuration is like this:

  <persistenceAdapter>
    <journaledJDBC journalLogFiles="5" dataDirectory="/opt/shared/amq"/>
  </persistenceAdapter>

  The ServiceMix instance refreshes the broker configuration but it give
error in the log.

16:09:42,685 | ERROR | xtenderThread-61 | WaiterApplicationContextExecutor |
WaiterApplicationContextExecutor  399 | Unable to create application context
for [localhost-broker.xml], unsatisfied dependencies: none
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected
exception parsing XML document from URL
[bundle://136.0:0/META-INF/spring/localhost-broker.xml]; nested exception is
java.lang.NoClassDefFoundError:
org/apache/activeio/journal/active/JournalLockedException
 at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
 at
[I skipped lines here...]
org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:746)
 at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NoClassDefFoundError:
org/apache/activeio/journal/active/JournalLockedException
 at java.lang.Class.getDeclaredMethods0(Native Method)
 at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
[I skipped lines here...]
 ... 15 more
Caused by: java.lang.ClassNotFoundException:
org.apache.activeio.journal.active.JournalLockedException
 at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:198)
 at
org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass(R4SearchPolicy.java:45)
 at
org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClass(ContentClassLoader.java:109)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
 ... 49 more
Caused by: java.lang.ClassNotFoundException:
org.apache.activeio.journal.active.JournalLockedException
 at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
 at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.searchDynamicImports(R4SearchPolicyCore.java:602)
 at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClassOrResource(R4SearchPolicyCore.java:478)
 at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:185)

  How can i resolve this error?
  I have tried to install active-io bundle from maven but it does not work
at all.

-----
Regards,
ServiceMix Noob =^D
-- 
View this message in context: http://www.nabble.com/ActiveMQ-broker-configuration-in-Servicemix-4-tp22408935p22408935.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: ActiveMQ broker configuration in Servicemix 4

Posted by I am Noob <se...@ml.sme.outblaze.com>.
Hi Dave,

  Your configuration works.
  Actually I just follow the instruction
(http://servicemix.apache.org/clustering.html) to have a test on HA and
clustering. I wanna try different types of adapters in this stage. I guess I
need to create jms provider and jms consumer to try such scenario. Did you
try before?


Dave Stanley wrote:
> 
> Can you trying and change the persistenceAdapter as follows:
> 
> <persistenceAdapter>
>             <amqPersistenceAdapter syncOnWrite="false"
> directory="${servicemix.base}/data/activemq/default" maxFileLength="20
> mb"/>
>         </persistenceAdapter>
> 
> Regards
> /Dave
> 
> On Mon, Mar 9, 2009 at 4:31 AM, I am Noob
> <se...@ml.sme.outblaze.com>wrote:
> 
>>
>> Dear All,
>>
>>  I start with a clean ServiceMix instance and create a broker by the
>> following command:
>>     activemq create-broker
>>  I can see a file called localhost-broker.xml is created in deploy
>> folder.
>> And I can see the localhost-broker.xml is registed as OSGi bundle.
>>
>>  Now I configure ActiveMQ peristence adapter in the file as I am going to
>> use HA. I just follow the instructions in
>> http://servicemix.apache.org/clustering.html. My configuration is like
>> this:
>>
>>  <persistenceAdapter>
>>    <journaledJDBC journalLogFiles="5" dataDirectory="/opt/shared/amq"/>
>>  </persistenceAdapter>
>>
>>  The ServiceMix instance refreshes the broker configuration but it give
>> error in the log.
>>
>> 16:09:42,685 | ERROR | xtenderThread-61 |
>> WaiterApplicationContextExecutor
>> |
>> WaiterApplicationContextExecutor  399 | Unable to create application
>> context
>> for [localhost-broker.xml], unsatisfied dependencies: none
>> org.springframework.beans.factory.BeanDefinitionStoreException:
>> Unexpected
>> exception parsing XML document from URL
>> [bundle://136.0:0/META-INF/spring/localhost-broker.xml]; nested exception
>> is
>> java.lang.NoClassDefFoundError:
>> org/apache/activeio/journal/active/JournalLockedException
>>  at
>>
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
>>  at
>> [I skipped lines here...]
>>
>> org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:746)
>>  at java.lang.Thread.run(Thread.java:619)
>> Caused by: java.lang.NoClassDefFoundError:
>> org/apache/activeio/journal/active/JournalLockedException
>>  at java.lang.Class.getDeclaredMethods0(Native Method)
>>  at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
>> [I skipped lines here...]
>>  ... 15 more
>> Caused by: java.lang.ClassNotFoundException:
>> org.apache.activeio.journal.active.JournalLockedException
>>  at
>>
>> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:198)
>>  at
>>
>> org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass(R4SearchPolicy.java:45)
>>  at
>>
>> org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClass(ContentClassLoader.java:109)
>>  at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>>  ... 49 more
>> Caused by: java.lang.ClassNotFoundException:
>> org.apache.activeio.journal.active.JournalLockedException
>>  at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>>  at java.security.AccessController.doPrivileged(Native Method)
>>  at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>>  at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
>>  at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>  at
>>
>> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.searchDynamicImports(R4SearchPolicyCore.java:602)
>>  at
>>
>> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClassOrResource(R4SearchPolicyCore.java:478)
>>  at
>>
>> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:185)
>>
>>  How can i resolve this error?
>>  I have tried to install active-io bundle from maven but it does not work
>> at all.
>>
>> -----
>> Regards,
>> ServiceMix Noob =^D
>> --
>> View this message in context:
>> http://www.nabble.com/ActiveMQ-broker-configuration-in-Servicemix-4-tp22408935p22408935.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 


-----
Regards,
ServiceMix Noob =^D
-- 
View this message in context: http://www.nabble.com/ActiveMQ-broker-configuration-in-Servicemix-4-tp22408935p22436398.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: ActiveMQ broker configuration in Servicemix 4

Posted by Dave Stanley <ds...@gmail.com>.
Can you trying and change the persistenceAdapter as follows:

<persistenceAdapter>
            <amqPersistenceAdapter syncOnWrite="false"
directory="${servicemix.base}/data/activemq/default" maxFileLength="20 mb"/>
        </persistenceAdapter>

Regards
/Dave

On Mon, Mar 9, 2009 at 4:31 AM, I am Noob <se...@ml.sme.outblaze.com>wrote:

>
> Dear All,
>
>  I start with a clean ServiceMix instance and create a broker by the
> following command:
>     activemq create-broker
>  I can see a file called localhost-broker.xml is created in deploy folder.
> And I can see the localhost-broker.xml is registed as OSGi bundle.
>
>  Now I configure ActiveMQ peristence adapter in the file as I am going to
> use HA. I just follow the instructions in
> http://servicemix.apache.org/clustering.html. My configuration is like
> this:
>
>  <persistenceAdapter>
>    <journaledJDBC journalLogFiles="5" dataDirectory="/opt/shared/amq"/>
>  </persistenceAdapter>
>
>  The ServiceMix instance refreshes the broker configuration but it give
> error in the log.
>
> 16:09:42,685 | ERROR | xtenderThread-61 | WaiterApplicationContextExecutor
> |
> WaiterApplicationContextExecutor  399 | Unable to create application
> context
> for [localhost-broker.xml], unsatisfied dependencies: none
> org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected
> exception parsing XML document from URL
> [bundle://136.0:0/META-INF/spring/localhost-broker.xml]; nested exception
> is
> java.lang.NoClassDefFoundError:
> org/apache/activeio/journal/active/JournalLockedException
>  at
>
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
>  at
> [I skipped lines here...]
>
> org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:746)
>  at java.lang.Thread.run(Thread.java:619)
> Caused by: java.lang.NoClassDefFoundError:
> org/apache/activeio/journal/active/JournalLockedException
>  at java.lang.Class.getDeclaredMethods0(Native Method)
>  at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
> [I skipped lines here...]
>  ... 15 more
> Caused by: java.lang.ClassNotFoundException:
> org.apache.activeio.journal.active.JournalLockedException
>  at
>
> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:198)
>  at
>
> org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass(R4SearchPolicy.java:45)
>  at
>
> org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClass(ContentClassLoader.java:109)
>  at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>  ... 49 more
> Caused by: java.lang.ClassNotFoundException:
> org.apache.activeio.journal.active.JournalLockedException
>  at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>  at java.security.AccessController.doPrivileged(Native Method)
>  at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>  at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
>  at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>  at
>
> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.searchDynamicImports(R4SearchPolicyCore.java:602)
>  at
>
> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClassOrResource(R4SearchPolicyCore.java:478)
>  at
>
> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:185)
>
>  How can i resolve this error?
>  I have tried to install active-io bundle from maven but it does not work
> at all.
>
> -----
> Regards,
> ServiceMix Noob =^D
> --
> View this message in context:
> http://www.nabble.com/ActiveMQ-broker-configuration-in-Servicemix-4-tp22408935p22408935.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>