You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by gtsafas <gt...@rblt.com> on 2009/09/03 19:16:59 UTC

No IConnectionFactory implementation found for connection URI: activemq:tcp://192.168.1.13:61616

I am trying to right a client connect to our activemq in c#.

When I try to compile I am recieving this error

No IConnectionFactory implementation found for connection URI:
activemq:tcp://192.168.1.13:61616

I am using the net 3.5 lib Apache.NMS 1.1.0.1642

I am calling this using

           IConnectionFactory factory = new
NMSConnectionFactory(connecturi);

Thanks ahead of time for the help.

-- 
View this message in context: http://www.nabble.com/No-IConnectionFactory-implementation-found-for-connection-URI%3A-activemq%3Atcp%3A--192.168.1.13%3A61616-tp25280396p25280396.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: No IConnectionFactory implementation found for connection URI: activemq:tcp://192.168.1.13:61616

Posted by gtsafas <gt...@rblt.com>.
100% sure that there is data being published.

Any other ideas?
-- 
View this message in context: http://www.nabble.com/No-IConnectionFactory-implementation-found-for-connection-URI%3A-activemq%3Atcp%3A--192.168.1.13%3A61616-tp25280396p25283170.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: No IConnectionFactory implementation found for connection URI: activemq:tcp://192.168.1.13:61616

Posted by Timothy Bish <ta...@gmail.com>.
I don't see any obvious errors, have you checked to ensure that there is
something publishing to that Topic using the Web Console ?

Regards
Tim.

On Thu, 2009-09-03 at 12:47 -0700, gtsafas wrote:
> Here is my exact code
> 
> using System;
> using System.Collections.Generic;
> using System.Text;
> using Apache.NMS.ActiveMQ;
> using Apache.NMS;
> using Apache.NMS.Util;
> using System.Threading;
> 
> namespace WindowsAuthenticator
> {
>     class Authenticator
>     {
>         protected static ITextMessage message = null;
>         
>         static void Main(string[] args)
>         {
>             //if (args.Length < 2)
>             //{
>             //    Console.WriteLine("Please specify the broker URL and
> Port");
>             //    Environment.Exit(0);
>             //}
> 
>             //Authenticator authen = new Authenticator(args[0], args[1]);
>             Authenticator authen = new Authenticator("192.168.42.30",
> "61616");
> 
>            
> 
>         }
> 
>         Authenticator(string uri, string port)
>         {
>             //brokerURI = uri;
>             //this.port = port;
>             try
>             {
>                 Uri connecturi = new Uri("tcp://" + uri + ":" + port +
> "?wireFormat=openwire");
>                 Apache.NMS.ActiveMQ.ConnectionFactory factory = new
> ConnectionFactory(connecturi);
>                 IConnection connection = factory.CreateConnection();
>                 ISession session = connection.CreateSession();
> 
>                 IDestination destination =
> SessionUtil.GetDestination(session, "topic://Topic.MD.Realtime.Stats");
>                 Console.WriteLine("Using destination: " + destination);
> 
>                 IMessageConsumer consumer =
> session.CreateConsumer(destination);
>                 connection.Start();
>                 consumer.Listener += new MessageListener(OnMessage);
> 
>                 Thread.Sleep(100000);
>             }
>             catch (Apache.NMS.NMSConnectionException e)
>             {
>                 Console.WriteLine(e.Message);
>             }
> 
> 
>         }
> 
>         protected static void OnMessage(IMessage receivedMsg)
>         {
>             message = receivedMsg as ITextMessage;
>             Console.WriteLine(message.Text);
>         }
>     }
> }
> 
-- 
Tim Bish
http://fusesource.com
http://timbish.blogspot.com/




Re: No IConnectionFactory implementation found for connection URI: activemq:tcp://192.168.1.13:61616

Posted by gtsafas <gt...@rblt.com>.
Here is my exact code

using System;
using System.Collections.Generic;
using System.Text;
using Apache.NMS.ActiveMQ;
using Apache.NMS;
using Apache.NMS.Util;
using System.Threading;

namespace WindowsAuthenticator
{
    class Authenticator
    {
        protected static ITextMessage message = null;
        
        static void Main(string[] args)
        {
            //if (args.Length < 2)
            //{
            //    Console.WriteLine("Please specify the broker URL and
Port");
            //    Environment.Exit(0);
            //}

            //Authenticator authen = new Authenticator(args[0], args[1]);
            Authenticator authen = new Authenticator("192.168.42.30",
"61616");

           

        }

        Authenticator(string uri, string port)
        {
            //brokerURI = uri;
            //this.port = port;
            try
            {
                Uri connecturi = new Uri("tcp://" + uri + ":" + port +
"?wireFormat=openwire");
                Apache.NMS.ActiveMQ.ConnectionFactory factory = new
ConnectionFactory(connecturi);
                IConnection connection = factory.CreateConnection();
                ISession session = connection.CreateSession();

                IDestination destination =
SessionUtil.GetDestination(session, "topic://Topic.MD.Realtime.Stats");
                Console.WriteLine("Using destination: " + destination);

                IMessageConsumer consumer =
session.CreateConsumer(destination);
                connection.Start();
                consumer.Listener += new MessageListener(OnMessage);

                Thread.Sleep(100000);
            }
            catch (Apache.NMS.NMSConnectionException e)
            {
                Console.WriteLine(e.Message);
            }


        }

        protected static void OnMessage(IMessage receivedMsg)
        {
            message = receivedMsg as ITextMessage;
            Console.WriteLine(message.Text);
        }
    }
}

-- 
View this message in context: http://www.nabble.com/No-IConnectionFactory-implementation-found-for-connection-URI%3A-activemq%3Atcp%3A--192.168.1.13%3A61616-tp25280396p25282892.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: No IConnectionFactory implementation found for connection URI: activemq:tcp://192.168.1.13:61616

Posted by Timothy Bish <ta...@gmail.com>.
On Thu, 2009-09-03 at 11:49 -0700, gtsafas wrote:
> Thank you for replying, we actually got passed that and are able to connect
> to the broker. We are however not receiving messages.
> 
> Any insight you can offer?
> 
> 
> Thanks again.

Did you call IConnection.Start(), that's usually the first thing to
check.

Regards
Tim.
-- 
Tim Bish
http://fusesource.com
http://timbish.blogspot.com/




Re: No IConnectionFactory implementation found for connection URI: activemq:tcp://192.168.1.13:61616

Posted by gtsafas <gt...@rblt.com>.
Thank you for replying, we actually got passed that and are able to connect
to the broker. We are however not receiving messages.

Any insight you can offer?


Thanks again.
-- 
View this message in context: http://www.nabble.com/No-IConnectionFactory-implementation-found-for-connection-URI%3A-activemq%3Atcp%3A--192.168.1.13%3A61616-tp25280396p25281980.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: No IConnectionFactory implementation found for connection URI: activemq:tcp://192.168.1.13:61616

Posted by Timothy Bish <ta...@gmail.com>.
On Thu, 2009-09-03 at 10:18 -0700, gtsafas wrote:
> I am trying to right a client connect to our activemq in c#.
> 
> When I try to compile I am recieving this error
> 
> No IConnectionFactory implementation found for connection URI:
> activemq:tcp://192.168.1.13:61616
> 
> I am using the net 3.5 lib Apache.NMS 1.1.0.1642
> 
> I am calling this using
> 
>            IConnectionFactory factory = new
> NMSConnectionFactory(connecturi);
> 
> I also have tried putting nmsprovider-activemq.config in the build dir.
> 
> 
> Thanks ahead of time for the help.
> 
> 

This is the code that's used to determine where the NMSConnectionFactory
looks for the nmsprovider-activemq.config file:

   private static string[] GetConfigSearchPaths()
   {
      ArrayList pathList = new ArrayList();

      // Check the current folder first.
      pathList.Add("");
#if !NETCF
      AppDomain currentDomain = AppDomain.CurrentDomain;

      // Check the folder the assembly is located in. 

pathList.Add(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
      if(null != currentDomain.BaseDirectory)
      {
         pathList.Add(currentDomain.BaseDirectory);
      }

      if(null != currentDomain.RelativeSearchPath)
      {
         pathList.Add(currentDomain.RelativeSearchPath);
      }
#endif

      return (string[]) pathList.ToArray(typeof(string));
   }

Your config file needs to be in one of those locations in order for it
to be found.  

Regards
Tim.


-- 
Tim Bish
http://fusesource.com
http://timbish.blogspot.com/