You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Sam Roberts <vi...@gmail.com> on 2013/05/30 01:47:46 UTC

How do I run activemq with STOMP? Why is derby not found?

I'm staring at the docs, and just going around in circles trying to
follow their advice.

I'm using 5.8.0, installed using homebrew.

I have tried using conf/activemq-stomp.xml, using the command it says
to, and any other variants I can think of:

   activemq console xbean:conf/activemq-stomp.xml
  activemq start xbean:conf/activemq-stomp.xml
   activemq start
xbean:file:/usr/local/Cellar/activemq/5.8.0/libexec/conf/activemq-stomp.xml

   cp /usr/local/Cellar/activemq/5.8.0/libexec/example/conf/activemq.xml .
   activemq start xbean:file:./activemq.xml

The latter almost worked, it even printed a pid, but didn't stay
alive. I also added  <transportConnector name="stomp"
uri="stomp://localhost:61613"/> to libexec/conf/activemq.xml, same
result.

The log file says this, but I've no idea what it means:

2013-05-29 16:20:49,690 | ERROR | Failed to load: URL
[file:./activemq.xml], reason: Error creating bean with name
'org.apache.activemq.xbean.XBeanBrokerService#0' defined in URL
[file:./activemq.xml]:
 Invocation of init method failed; nested exception is
java.lang.NoClassDefFoundError:
org/apache/derby/jdbc/EmbeddedDataSource |
org.apache.activemq.xbean.XBeanBrokerFactory | main
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name
'org.apache.activemq.xbean.XBeanBrokerService#0' defined in URL
[file:./activemq.xml]: Invocation of init method f
ailed; nested exception is java.lang.NoClassDefFoundError:
org/apache/derby/jdbc/EmbeddedDataSource

My goal, btw, is merely to demonstrate that a node.js app can talk to
activemq over STOMP. I'm not trying to get a production version of
running, I'm just trying to get something running that I can talk to
with STOMP. And, for what its worth, I'm not a java developer, which
might be why the docs are so obscure to me.


And any idea why activemq start --help gives no help, and activemq
console --help appears to give help for the start command?

Re: How do I run activemq with STOMP? Why is derby not found?

Posted by Paul Gale <pa...@gmail.com>.
One way to see is to start ActiveMQ in console mode:

./bin/activemq console

and read the debug output that appears on the screen.

Thanks,
Paul


On Thu, May 30, 2013 at 2:54 PM, Sam Roberts <vi...@gmail.com> wrote:

> On Wed, May 29, 2013 at 7:47 PM, Christian Posta
> <ch...@gmail.com> wrote:
> > Yah, you can set environment variables...
> >
> > ACTIVEMQ_HOME -- the root dir for your install
> > ACTIVEMQ_BASE  -- the root dir for your current broker, usually the same
> as
> > ACTIVEMQ_HOME
> > ACTIVEMQ_CONF  -- the dir to use for configuration
> > ACTIVEMQ_DATA  -- the dir to use for data files (kahadb, log, etc, by
> > default)
>
> Thanks. Is there any way for me to see what it is using for the
> default values of those?
>

Re: How do I run activemq with STOMP? Why is derby not found?

Posted by Christian Posta <ch...@gmail.com>.
yah, you can check the activemq script to see how it resolves the env
variables...
you can check the code here which shows how it further tries to resolve
them:

http://svn.apache.org/viewvc/activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java?view=markup




On Thu, May 30, 2013 at 11:54 AM, Sam Roberts <vi...@gmail.com> wrote:

> On Wed, May 29, 2013 at 7:47 PM, Christian Posta
> <ch...@gmail.com> wrote:
> > Yah, you can set environment variables...
> >
> > ACTIVEMQ_HOME -- the root dir for your install
> > ACTIVEMQ_BASE  -- the root dir for your current broker, usually the same
> as
> > ACTIVEMQ_HOME
> > ACTIVEMQ_CONF  -- the dir to use for configuration
> > ACTIVEMQ_DATA  -- the dir to use for data files (kahadb, log, etc, by
> > default)
>
> Thanks. Is there any way for me to see what it is using for the
> default values of those?
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Re: How do I run activemq with STOMP? Why is derby not found?

Posted by Sam Roberts <vi...@gmail.com>.
On Wed, May 29, 2013 at 7:47 PM, Christian Posta
<ch...@gmail.com> wrote:
> Yah, you can set environment variables...
>
> ACTIVEMQ_HOME -- the root dir for your install
> ACTIVEMQ_BASE  -- the root dir for your current broker, usually the same as
> ACTIVEMQ_HOME
> ACTIVEMQ_CONF  -- the dir to use for configuration
> ACTIVEMQ_DATA  -- the dir to use for data files (kahadb, log, etc, by
> default)

Thanks. Is there any way for me to see what it is using for the
default values of those?

Re: How do I run activemq with STOMP? Why is derby not found?

Posted by Christian Posta <ch...@gmail.com>.
Yah, you can set environment variables...

ACTIVEMQ_HOME -- the root dir for your install
ACTIVEMQ_BASE  -- the root dir for your current broker, usually the same as
ACTIVEMQ_HOME
ACTIVEMQ_CONF  -- the dir to use for configuration
ACTIVEMQ_DATA  -- the dir to use for data files (kahadb, log, etc, by
default)






On Wed, May 29, 2013 at 5:18 PM, Sam Roberts <vi...@gmail.com> wrote:

> Thanks, yes, when I ran it from here it started:
>
> sam@slsam:/usr/local/Cellar/activemq/5.8.0/libexec % ls
> ./ WebConsole-README.txt bin/ data/ example/ tmp/ webapps/
> ../ activemq-all-5.8.0.jar* conf/ docs/ lib/ user-guide.html webapps-demo/
> sam@slsam:/usr/local/Cellar/activemq/5.8.0/libexec %
>
> With:
>
> activemq console xbean:file:./conf/activemq.xml
>
> Is there any way to do that without having to cd into that location?
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Re: How do I run activemq with STOMP? Why is derby not found?

Posted by Sam Roberts <vi...@gmail.com>.
Thanks, yes, when I ran it from here it started:

sam@slsam:/usr/local/Cellar/activemq/5.8.0/libexec % ls
./ WebConsole-README.txt bin/ data/ example/ tmp/ webapps/
../ activemq-all-5.8.0.jar* conf/ docs/ lib/ user-guide.html webapps-demo/
sam@slsam:/usr/local/Cellar/activemq/5.8.0/libexec %

With:

activemq console xbean:file:./conf/activemq.xml

Is there any way to do that without having to cd into that location?

Re: How do I run activemq with STOMP? Why is derby not found?

Posted by Christian Posta <ch...@gmail.com>.
Not sure exactly where homebrew puts it (/usr/local/Cellar/activemq ?)
..but it sounds like the script cannot see the conf files..

maybe navigate to the place that homebrew put activemq... should be a conf/
folder there.. run activemq console from there...


On Wed, May 29, 2013 at 4:47 PM, Sam Roberts <vi...@gmail.com> wrote:

> I'm staring at the docs, and just going around in circles trying to
> follow their advice.
>
> I'm using 5.8.0, installed using homebrew.
>
> I have tried using conf/activemq-stomp.xml, using the command it says
> to, and any other variants I can think of:
>
>    activemq console xbean:conf/activemq-stomp.xml
>   activemq start xbean:conf/activemq-stomp.xml
>    activemq start
> xbean:file:/usr/local/Cellar/activemq/5.8.0/libexec/conf/activemq-stomp.xml
>
>    cp /usr/local/Cellar/activemq/5.8.0/libexec/example/conf/activemq.xml .
>    activemq start xbean:file:./activemq.xml
>
> The latter almost worked, it even printed a pid, but didn't stay
> alive. I also added  <transportConnector name="stomp"
> uri="stomp://localhost:61613"/> to libexec/conf/activemq.xml, same
> result.
>
> The log file says this, but I've no idea what it means:
>
> 2013-05-29 16:20:49,690 | ERROR | Failed to load: URL
> [file:./activemq.xml], reason: Error creating bean with name
> 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in URL
> [file:./activemq.xml]:
>  Invocation of init method failed; nested exception is
> java.lang.NoClassDefFoundError:
> org/apache/derby/jdbc/EmbeddedDataSource |
> org.apache.activemq.xbean.XBeanBrokerFactory | main
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name
> 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in URL
> [file:./activemq.xml]: Invocation of init method f
> ailed; nested exception is java.lang.NoClassDefFoundError:
> org/apache/derby/jdbc/EmbeddedDataSource
>
> My goal, btw, is merely to demonstrate that a node.js app can talk to
> activemq over STOMP. I'm not trying to get a production version of
> running, I'm just trying to get something running that I can talk to
> with STOMP. And, for what its worth, I'm not a java developer, which
> might be why the docs are so obscure to me.
>
>
> And any idea why activemq start --help gives no help, and activemq
> console --help appears to give help for the start command?
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta