You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Andrew Thorburn <nz...@gmail.com> on 2008/04/29 03:03:21 UTC

Geronimo 1.1.1 + ActiveMQ - How do I allow pages to find amq.js?

I tried to load up a page (that worked fine when I tested using AMQ 5.0)
under Geronimo 1.1.1, and it seems that it can't find amq.js.

I know that I had to edit my web.xml file when testing it first time around,
but upon doing the same thing, it gave an error that it couldn't find
org.apache.activemq.web.AjaxServlet. Is this likely to be a case of me
trying to use instructions that are too new?

I can't really upgrade as that would cause a large number of problems with
the application I'm adding to (I've come in recently and it's quite large),
and I don't have time to fix them all.

The other relevant things are that the project uses Struts (*.do stuff,
etc), and I'm not entirely sure how that works.

I also tried to add some dependencies to the geronimo-web.xml file, but it
decided it didn't like the <exclusion> tags. Removed those, and it went a
bit further: it now says it's "Unable to resolve dependency
incubator-activemq/activemq-web//"

Anyone able to give me some help here? Otherwise I've got a bad feeling
it'll take a long time to figure this all out by myself.

Re: Geronimo 1.1.1 + ActiveMQ - How do I allow pages to find amq.js?

Posted by Andrew Thorburn <nz...@gmail.com>.
Bur. So it appears that it doesn't actually come with amq.js, and I assume
that any version of activemq_web.jar that does will have other dependencies
that won't be met. Bugger.

I guess I'll need some help trying to make Geronimo 1.1.1 work with ActiveMQ
4/5. I know you said something about that, and I'll have a go at then when I
can, but I've got a feeling it won't be very pretty. I just hope that my
project's libraries get priority over Geronimos. If not, then I'm totally
screwed, and will need to upgrade Geronimo (with all the fun that entails).

Thanks for your help so far,

- Andrew Thorburn

Re: Geronimo 1.1.1 + ActiveMQ - How do I allow pages to find amq.js?

Posted by Andrew Thorburn <nz...@gmail.com>.
On Wed, Apr 30, 2008 at 11:20 AM, David Jencks <da...@yahoo.com>
wrote:

>
> On Apr 29, 2008, at 3:59 PM, Andrew Thorburn wrote:
>
> Doh. Should probably have been a bit more specific:
>
> I'm trying to do AJAX stuff (using Javascript), and in order to do some
> testing, I need to be able to create a simple page that can be found by an
> existing project. So far, not too hard.
>
> The tricky bit is that it uses Geronimo, and I want the project to be able
> to find the ActiveMQ implementation. amq.js is the Javascript that allows a
> web browser to do AJAX stuff with a JMS queue. This is probably the
> important part - I want to use the AJAX functionality of ActiveMQ, and in
> order to do that, I need access to the various javascript files that contain
> the implementation. Right now, my project can't find them, and thus I'm
> kinda stuck.
>
> The exact version of AMQ doesn't matter (right now, anyway), however, the
> version of *Geronimo* does - I can't upgrade from 1.1.1 to 2.* because the
> project I'm working on has issues with it.
>
>
> Have you complained about the issues, filed jiras etc?  If not please do
> :-)
>

I'll complain about them if it turns out it wasn't just me being thick :).

>
> As such, 3.4 seems like it would work just as well as 5.0.0, provided 3.4
> has AJAX support. If it doesn't, then what I'm trying to do will never be
> successful, and I'm a little screwed.
>
> I'll keep playing around with the dependencies and see if they'll work for
> me.
>
> I hope that makes things a bit clearer with regards to what I'm trying to
> do.
>
> Also, while I'm here, if I wanted to use ActiveMQ 5.0.0 (or any version
> apart from what's provided), what would that involve for Geronimo 1.1.1?
> Would it be a simple matter of adding it to the repository (i.e. click and
> drag), or would it be more complex than that?
>
>
> You definitely won't be able to administer amq 5 from the geronimo console
> like you can with the built in amq.  If you run the g. admin console you
> will probably have to be very careful with your classloaders since IIUC the
> console only runs if the built in amq is running.  So you'll have to be
> careful to get AMQ 5 loaded in a separate classloader.  A very basic
> integration more or less similar to the built in integration should be
> pretty easy by copying and modifying the broker gbean to start the
> appropriate amq 5 class.  You should use the native xbean xml configuration
> rather than trying to get all the geronimo gbeans to work.
>
> Even easier.... IIRC AMQ 4 and 5 have a web app that starts up a broker
> (that you can then use the ajax stuff on).  IIRC this even has the broker
> classes inside.  So if you deploy this web app and make sure the build in
> amq is not in the classpath that will probably work.
>

I just discovered something: It seems that there's no AJAX support in AMQ
3.2.4 (the version that comes with Geronimo 1.1.1), or if there is, it's
hidden quite well. I don't see it in the activemq-core-3.2.4 JAR... I had a
look after it complained that it couldn't find the class
org.apache.activemq.web.AjaxServlet. As it turns out, I can't find a class
called AjaxServelet either.

A quick Google tells me that it's in activemq-web.jar in any event, so that
doesn't help. I'll try putting one from a later version in there and I'll
see what happens. If not, is there somewhere I could find the 3.2.4 (or even
just 3.2.*) version of activemq-web.jar?

>
> Hope this helps
> david jencks
>

Thanks,

- Andrew Thorburn

>
>
>
> - Andrew Thorburn
>
> On Wed, Apr 30, 2008 at 5:02 AM, David Jencks <da...@yahoo.com>
> wrote:
>
> >
> > On Apr 28, 2008, at 6:03 PM, Andrew Thorburn wrote:
> >
> >  I tried to load up a page (that worked fine when I tested using AMQ
> > > 5.0) under Geronimo 1.1.1, and it seems that it can't find amq.js.
> > >
> > > I know that I had to edit my web.xml file when testing it first time
> > > around, but upon doing the same thing, it gave an error that it couldn't
> > > find org.apache.activemq.web.AjaxServlet. Is this likely to be a case of me
> > > trying to use instructions that are too new?
> > >
> >
> > IIRC Geronimo 1.1.1 includes an AMQ version somewhere around 3.x.  I
> > don't know that anyone has succeeded in using AMQ 5 with G. 1.1.1.
> >
> > >
> > >
> > > I can't really upgrade as that would cause a large number of problems
> > > with the application I'm adding to (I've come in recently and it's quite
> > > large), and I don't have time to fix them all.
> > >
> >
> > Even the latest geronimo is still on AMQ 4.1.2....
> >
> > >
> > >
> > > The other relevant things are that the project uses Struts (*.do
> > > stuff, etc), and I'm not entirely sure how that works.
> > >
> > > I also tried to add some dependencies to the geronimo-web.xml file,
> > > but it decided it didn't like the <exclusion> tags. Removed those, and it
> > > went a bit further: it now says it's "Unable to resolve dependency
> > > incubator-activemq/activemq-web//"
> > >
> >
> > that doesn't look much like the id for an existing activemq jar..... are
> > you sure it isn't something like org.apache.activemq/activemq-web//?  You
> > will also need to get these jars into your geronimo repository yourself
> > unless you use a geronimo plugin -- and they don't work well before geronimo
> > 2.1.
> >
> > >
> > >
> > > Anyone able to give me some help here? Otherwise I've got a bad
> > > feeling it'll take a long time to figure this all out by myself.
> > >
> >
> > Do you need AMQ 5? What does the amq.js page do?  Is it included in the
> > AMQ version geronimo includes?
> >
> > More questions for you, but I don't understand exactly what you are
> > trying to do yet.
> >
> > thanks
> > david jencks
> >
> >
>

Re: Geronimo 1.1.1 + ActiveMQ - How do I allow pages to find amq.js?

Posted by David Jencks <da...@yahoo.com>.
On Apr 29, 2008, at 3:59 PM, Andrew Thorburn wrote:

> Doh. Should probably have been a bit more specific:
>
> I'm trying to do AJAX stuff (using Javascript), and in order to do  
> some testing, I need to be able to create a simple page that can be  
> found by an existing project. So far, not too hard.
>
> The tricky bit is that it uses Geronimo, and I want the project to  
> be able to find the ActiveMQ implementation. amq.js is the  
> Javascript that allows a web browser to do AJAX stuff with a JMS  
> queue. This is probably the important part - I want to use the AJAX  
> functionality of ActiveMQ, and in order to do that, I need access to  
> the various javascript files that contain the implementation. Right  
> now, my project can't find them, and thus I'm kinda stuck.
>
> The exact version of AMQ doesn't matter (right now, anyway),  
> however, the version of *Geronimo* does - I can't upgrade from 1.1.1  
> to 2.* because the project I'm working on has issues with it.

Have you complained about the issues, filed jiras etc?  If not please  
do :-)

> As such, 3.4 seems like it would work just as well as 5.0.0,  
> provided 3.4 has AJAX support. If it doesn't, then what I'm trying  
> to do will never be successful, and I'm a little screwed.
>
> I'll keep playing around with the dependencies and see if they'll  
> work for me.
>
> I hope that makes things a bit clearer with regards to what I'm  
> trying to do.
>
> Also, while I'm here, if I wanted to use ActiveMQ 5.0.0 (or any  
> version apart from what's provided), what would that involve for  
> Geronimo 1.1.1? Would it be a simple matter of adding it to the  
> repository (i.e. click and drag), or would it be more complex than  
> that?

You definitely won't be able to administer amq 5 from the geronimo  
console like you can with the built in amq.  If you run the g. admin  
console you will probably have to be very careful with your  
classloaders since IIUC the console only runs if the built in amq is  
running.  So you'll have to be careful to get AMQ 5 loaded in a  
separate classloader.  A very basic integration more or less similar  
to the built in integration should be pretty easy by copying and  
modifying the broker gbean to start the appropriate amq 5 class.  You  
should use the native xbean xml configuration rather than trying to  
get all the geronimo gbeans to work.

Even easier.... IIRC AMQ 4 and 5 have a web app that starts up a  
broker (that you can then use the ajax stuff on).  IIRC this even has  
the broker classes inside.  So if you deploy this web app and make  
sure the build in amq is not in the classpath that will probably work.

Hope this helps
david jencks

>
>
> - Andrew Thorburn
>
> On Wed, Apr 30, 2008 at 5:02 AM, David Jencks  
> <da...@yahoo.com> wrote:
>
> On Apr 28, 2008, at 6:03 PM, Andrew Thorburn wrote:
>
> I tried to load up a page (that worked fine when I tested using AMQ  
> 5.0) under Geronimo 1.1.1, and it seems that it can't find amq.js.
>
> I know that I had to edit my web.xml file when testing it first time  
> around, but upon doing the same thing, it gave an error that it  
> couldn't find org.apache.activemq.web.AjaxServlet. Is this likely to  
> be a case of me trying to use instructions that are too new?
>
> IIRC Geronimo 1.1.1 includes an AMQ version somewhere around 3.x.  I  
> don't know that anyone has succeeded in using AMQ 5 with G. 1.1.1.
>
>
>
> I can't really upgrade as that would cause a large number of  
> problems with the application I'm adding to (I've come in recently  
> and it's quite large), and I don't have time to fix them all.
>
> Even the latest geronimo is still on AMQ 4.1.2....
>
>
>
> The other relevant things are that the project uses Struts (*.do  
> stuff, etc), and I'm not entirely sure how that works.
>
> I also tried to add some dependencies to the geronimo-web.xml file,  
> but it decided it didn't like the <exclusion> tags. Removed those,  
> and it went a bit further: it now says it's "Unable to resolve  
> dependency incubator-activemq/activemq-web//"
>
> that doesn't look much like the id for an existing activemq jar.....  
> are you sure it isn't something like org.apache.activemq/activemq- 
> web//?  You will also need to get these jars into your geronimo  
> repository yourself unless you use a geronimo plugin -- and they  
> don't work well before geronimo 2.1.
>
>
>
> Anyone able to give me some help here? Otherwise I've got a bad  
> feeling it'll take a long time to figure this all out by myself.
>
> Do you need AMQ 5? What does the amq.js page do?  Is it included in  
> the AMQ version geronimo includes?
>
> More questions for you, but I don't understand exactly what you are  
> trying to do yet.
>
> thanks
> david jencks
>


Re: Geronimo 1.1.1 + ActiveMQ - How do I allow pages to find amq.js?

Posted by Andrew Thorburn <nz...@gmail.com>.
Doh. Should probably have been a bit more specific:

I'm trying to do AJAX stuff (using Javascript), and in order to do some
testing, I need to be able to create a simple page that can be found by an
existing project. So far, not too hard.

The tricky bit is that it uses Geronimo, and I want the project to be able
to find the ActiveMQ implementation. amq.js is the Javascript that allows a
web browser to do AJAX stuff with a JMS queue. This is probably the
important part - I want to use the AJAX functionality of ActiveMQ, and in
order to do that, I need access to the various javascript files that contain
the implementation. Right now, my project can't find them, and thus I'm
kinda stuck.

The exact version of AMQ doesn't matter (right now, anyway), however, the
version of *Geronimo* does - I can't upgrade from 1.1.1 to 2.* because the
project I'm working on has issues with it. As such, 3.4 seems like it would
work just as well as 5.0.0, provided 3.4 has AJAX support. If it doesn't,
then what I'm trying to do will never be successful, and I'm a little
screwed.

I'll keep playing around with the dependencies and see if they'll work for
me.

I hope that makes things a bit clearer with regards to what I'm trying to
do.

Also, while I'm here, if I wanted to use ActiveMQ 5.0.0 (or any version
apart from what's provided), what would that involve for Geronimo 1.1.1?
Would it be a simple matter of adding it to the repository (i.e. click and
drag), or would it be more complex than that?

- Andrew Thorburn

On Wed, Apr 30, 2008 at 5:02 AM, David Jencks <da...@yahoo.com>
wrote:

>
> On Apr 28, 2008, at 6:03 PM, Andrew Thorburn wrote:
>
>  I tried to load up a page (that worked fine when I tested using AMQ 5.0)
> > under Geronimo 1.1.1, and it seems that it can't find amq.js.
> >
> > I know that I had to edit my web.xml file when testing it first time
> > around, but upon doing the same thing, it gave an error that it couldn't
> > find org.apache.activemq.web.AjaxServlet. Is this likely to be a case of me
> > trying to use instructions that are too new?
> >
>
> IIRC Geronimo 1.1.1 includes an AMQ version somewhere around 3.x.  I don't
> know that anyone has succeeded in using AMQ 5 with G. 1.1.1.
>
> >
> >
> > I can't really upgrade as that would cause a large number of problems
> > with the application I'm adding to (I've come in recently and it's quite
> > large), and I don't have time to fix them all.
> >
>
> Even the latest geronimo is still on AMQ 4.1.2....
>
> >
> >
> > The other relevant things are that the project uses Struts (*.do stuff,
> > etc), and I'm not entirely sure how that works.
> >
> > I also tried to add some dependencies to the geronimo-web.xml file, but
> > it decided it didn't like the <exclusion> tags. Removed those, and it went a
> > bit further: it now says it's "Unable to resolve dependency
> > incubator-activemq/activemq-web//"
> >
>
> that doesn't look much like the id for an existing activemq jar..... are
> you sure it isn't something like org.apache.activemq/activemq-web//?  You
> will also need to get these jars into your geronimo repository yourself
> unless you use a geronimo plugin -- and they don't work well before geronimo
> 2.1.
>
> >
> >
> > Anyone able to give me some help here? Otherwise I've got a bad feeling
> > it'll take a long time to figure this all out by myself.
> >
>
> Do you need AMQ 5? What does the amq.js page do?  Is it included in the
> AMQ version geronimo includes?
>
> More questions for you, but I don't understand exactly what you are trying
> to do yet.
>
> thanks
> david jencks
>
>

Re: Geronimo 1.1.1 + ActiveMQ - How do I allow pages to find amq.js?

Posted by David Jencks <da...@yahoo.com>.
On Apr 28, 2008, at 6:03 PM, Andrew Thorburn wrote:

> I tried to load up a page (that worked fine when I tested using AMQ  
> 5.0) under Geronimo 1.1.1, and it seems that it can't find amq.js.
>
> I know that I had to edit my web.xml file when testing it first time  
> around, but upon doing the same thing, it gave an error that it  
> couldn't find org.apache.activemq.web.AjaxServlet. Is this likely to  
> be a case of me trying to use instructions that are too new?

IIRC Geronimo 1.1.1 includes an AMQ version somewhere around 3.x.  I  
don't know that anyone has succeeded in using AMQ 5 with G. 1.1.1.
>
>
> I can't really upgrade as that would cause a large number of  
> problems with the application I'm adding to (I've come in recently  
> and it's quite large), and I don't have time to fix them all.

Even the latest geronimo is still on AMQ 4.1.2....
>
>
> The other relevant things are that the project uses Struts (*.do  
> stuff, etc), and I'm not entirely sure how that works.
>
> I also tried to add some dependencies to the geronimo-web.xml file,  
> but it decided it didn't like the <exclusion> tags. Removed those,  
> and it went a bit further: it now says it's "Unable to resolve  
> dependency incubator-activemq/activemq-web//"

that doesn't look much like the id for an existing activemq jar.....  
are you sure it isn't something like org.apache.activemq/activemq- 
web//?  You will also need to get these jars into your geronimo  
repository yourself unless you use a geronimo plugin -- and they don't  
work well before geronimo 2.1.
>
>
> Anyone able to give me some help here? Otherwise I've got a bad  
> feeling it'll take a long time to figure this all out by myself.

Do you need AMQ 5? What does the amq.js page do?  Is it included in  
the AMQ version geronimo includes?

More questions for you, but I don't understand exactly what you are  
trying to do yet.

thanks
david jencks