activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Embedded Broker - configuration via Java
Date Fri, 08 Jun 2007 09:41:54 GMT
On 6/8/07, James Strachan <james.strachan@gmail.com> wrote:
> On 6/8/07, Raffaele <r.gambelli@prismasw.it> wrote:
> >
> > Hi all,
> >
> > I'm trying to create, configure and launch a broker all in one class.
> >
> > I have a ClassNotFoundException executing the following lines:
> >
> > BrokerService broker = new BrokerService();
> > broker.addConnector("tcp://localhost:61616");
> > broker.start();
> >
> > And the exception thrown by addConnector(...) is this:
> >
> > java.lang.NoClassDefFoundError:
> > javax/management/MalformedObjectNameException
> >         at
> > org.apache.activemq.broker.BrokerService.getManagementContext(BrokerService.java:696)
> >         at
> > org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1265)
> >         at
> > org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1209)
> >         at
> > org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:508)
> >         at
> > org.apache.activemq.broker.BrokerService.addConnector(BrokerService.java:163)
> >         at
> > org.apache.activemq.broker.BrokerService.addConnector(BrokerService.java:153)
> >         at pss.jms.EmbeddedBroker.main(EmbeddedBroker.java:49)
> >
> > In my simple test project I'm including only the apache-activemq-4.*.jar
> > found in the activemq home directory.
> > 1) Which other jar should I include?
>
> Looks like you also need JMX - or Java 5 (which comes with JMX). You
> could just disable JMS via broker.setUseJmx(false).

I meant to disable JMX not JMS  :)

-- 
James
-------
http://macstrac.blogspot.com/

Mime
View raw message