You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "Knight, Doug" <dk...@mitre.org> on 2009/09/24 21:38:50 UTC

Collision between amq.js and jquery.query.js?

List,
I am having a problem with a jquery plugin not being recognized when I include amq.js in the sourced scripts. In the brief example below, if I comment out the amq script sections, everything works fine (the line marked "ERROR occurs here" executes with expected results, pulling the Tselect=8 from the URL). When I add in the calls to source amq.js and setup the amq.uri, I get the following two errors:

invalid array length
file:///C:/apache-activemq-5.2.0/webapps/Client/amq/prototype.js<file:///C:\apache-activemq-5.2.0\webapps\Client\amq\prototype.js> Line 464
jQuery.query is undefined
file:///C:/apache-activemq-5.2.0/webapps/Client/test.html?Tselect=8<file:///C:\apache-activemq-5.2.0\webapps\Client\test.html?Tselect=8> Line 14

I've intentionally pared down the example to not require accessing the html file via the ActiveMQ/Jetty app server, to show the collision from a simple file load. I began to post this issue to the jquery list, but I recall seeing something about a release of amq.js that removes its dependency on prototype.js. Is that available, and would that help? Anyone have an idea for how to fix this?

Thanks,
Doug


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Test amq/jQuery.query plugin conflict</title>
<!-- -->
      <script type="text/javascript" src="amq/amq.js"></script>
      <script type="text/javascript">amq.uri='amq';</script>
<!-- -->
      <script type="text/javascript" src="lib/jquery.js"></script>
      <script type="text/javascript" src="lib/jquery.query.js"></script>
      <script>
      jQuery.noConflict();
      jQuery(document).ready(function(){
            var Tselect = jQuery.query.get('Tselect'); // ERROR occurs here
        Tinfo = "Tselect:" + Tselect + ":";
        jQuery("#TestArea").append("<pre>" + Tinfo + "\n</pre>");
      //amq.addListener('T.ID', 'topic://' + Tselect + '.OUT', _handler.recvMessage);

      });
      </script>
</head>
<body>
<div id="TestArea"></div>
</body>
</html>

RE: Collision between amq.js and jquery.query.js?

Posted by "Knight, Doug" <dk...@mitre.org>.
AMQ-2427 created. Any info on a version of amq that does not use prototype?

Doug

-----Original Message-----
From: chubrilo@gmail.com [mailto:chubrilo@gmail.com] On Behalf Of Dejan Bosanac
Sent: Monday, September 28, 2009 3:27 AM
To: users@activemq.apache.org
Subject: Re: Collision between amq.js and jquery.query.js?

Hi Doug,

can you file a Jira for this please.

Thanks
--
Dejan Bosanac

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Thu, Sep 24, 2009 at 9:38 PM, Knight, Doug <dk...@mitre.org> wrote:

> List,
> I am having a problem with a jquery plugin not being recognized when I
> include amq.js in the sourced scripts. In the brief example below, if I
> comment out the amq script sections, everything works fine (the line marked
> "ERROR occurs here" executes with expected results, pulling the Tselect=8
> from the URL). When I add in the calls to source amq.js and setup the
> amq.uri, I get the following two errors:
>
> invalid array length
> file:///C:/apache-activemq-5.2.0/webapps/Client/amq/prototype.js<file:///C:\apache-activemq-5.2.0\webapps\Client\amq\prototype.js>
> Line 464
> jQuery.query is undefined
> file:///C:/apache-activemq-5.2.0/webapps/Client/test.html?Tselect=8<file:///C:\apache-activemq-5.2.0\webapps\Client\test.html?Tselect=8>
> Line 14
>
> I've intentionally pared down the example to not require accessing the html
> file via the ActiveMQ/Jetty app server, to show the collision from a simple
> file load. I began to post this issue to the jquery list, but I recall
> seeing something about a release of amq.js that removes its dependency on
> prototype.js. Is that available, and would that help? Anyone have an idea
> for how to fix this?
>
> Thanks,
> Doug
>
>
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
> <title>Test amq/jQuery.query plugin conflict</title>
> <!-- -->
>      <script type="text/javascript" src="amq/amq.js"></script>
>      <script type="text/javascript">amq.uri='amq';</script>
> <!-- -->
>      <script type="text/javascript" src="lib/jquery.js"></script>
>      <script type="text/javascript" src="lib/jquery.query.js"></script>
>      <script>
>      jQuery.noConflict();
>      jQuery(document).ready(function(){
>            var Tselect = jQuery.query.get('Tselect'); // ERROR occurs here
>        Tinfo = "Tselect:" + Tselect + ":";
>        jQuery("#TestArea").append("<pre>" + Tinfo + "\n</pre>");
>      //amq.addListener('T.ID', 'topic://' + Tselect + '.OUT',
> _handler.recvMessage);
>
>      });
>      </script>
> </head>
> <body>
> <div id="TestArea"></div>
> </body>
> </html>
>

Re: Collision between amq.js and jquery.query.js?

Posted by Dejan Bosanac <de...@nighttale.net>.
Hi Doug,

can you file a Jira for this please.

Thanks
--
Dejan Bosanac

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Thu, Sep 24, 2009 at 9:38 PM, Knight, Doug <dk...@mitre.org> wrote:

> List,
> I am having a problem with a jquery plugin not being recognized when I
> include amq.js in the sourced scripts. In the brief example below, if I
> comment out the amq script sections, everything works fine (the line marked
> "ERROR occurs here" executes with expected results, pulling the Tselect=8
> from the URL). When I add in the calls to source amq.js and setup the
> amq.uri, I get the following two errors:
>
> invalid array length
> file:///C:/apache-activemq-5.2.0/webapps/Client/amq/prototype.js<file:///C:\apache-activemq-5.2.0\webapps\Client\amq\prototype.js>
> Line 464
> jQuery.query is undefined
> file:///C:/apache-activemq-5.2.0/webapps/Client/test.html?Tselect=8<file:///C:\apache-activemq-5.2.0\webapps\Client\test.html?Tselect=8>
> Line 14
>
> I've intentionally pared down the example to not require accessing the html
> file via the ActiveMQ/Jetty app server, to show the collision from a simple
> file load. I began to post this issue to the jquery list, but I recall
> seeing something about a release of amq.js that removes its dependency on
> prototype.js. Is that available, and would that help? Anyone have an idea
> for how to fix this?
>
> Thanks,
> Doug
>
>
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
> <title>Test amq/jQuery.query plugin conflict</title>
> <!-- -->
>      <script type="text/javascript" src="amq/amq.js"></script>
>      <script type="text/javascript">amq.uri='amq';</script>
> <!-- -->
>      <script type="text/javascript" src="lib/jquery.js"></script>
>      <script type="text/javascript" src="lib/jquery.query.js"></script>
>      <script>
>      jQuery.noConflict();
>      jQuery(document).ready(function(){
>            var Tselect = jQuery.query.get('Tselect'); // ERROR occurs here
>        Tinfo = "Tselect:" + Tselect + ":";
>        jQuery("#TestArea").append("<pre>" + Tinfo + "\n</pre>");
>      //amq.addListener('T.ID', 'topic://' + Tselect + '.OUT',
> _handler.recvMessage);
>
>      });
>      </script>
> </head>
> <body>
> <div id="TestArea"></div>
> </body>
> </html>
>