I downloaded activemq-5.9.jar from
http://activemq.apache.org/activemq-590-release.html and put that jar in
lib directory of HAPROXY_EXTENSION home.

I am seeing following message -

[2014-06-08 21:18:08,060] ERROR - [TopicSubscriber] Error while subscribing
to the topic: topology
javax.naming.NameNotFoundException: topicConnectionfactory
        at
org.apache.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:235)
        at javax.naming.InitialContext.lookup(InitialContext.java:411)
        at
org.apache.stratos.messaging.broker.connect.TopicConnector.init(TopicConnector.java:62)
        at
org.apache.stratos.messaging.broker.subscribe.TopicSubscriber.doSubscribe(TopicSubscriber.java:63)
        at
org.apache.stratos.messaging.broker.subscribe.TopicSubscriber.run(TopicSubscriber.java:116)
        at java.lang.Thread.run(Thread.java:744)

Is there a way to move ahead?

Thanks,

P.S.
I did not put other dependencies like geronimo and hawtbuf, as did not get
any errors for these classes


On Mon, Jun 9, 2014 at 8:55 AM, Nirmal Fernando <nirmal070...@gmail.com>
wrote:

> Sorry Parvez, we seems to lack documentation on this aspect.
>
> You need to add following jars, to lib directory;
>
> <!-- activemq client jars -->
>         <dependency>
> <groupId>org.apache.geronimo.specs</groupId>
>             <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
>             <version>1.0.1</version>
>         </dependency>
>         <dependency>
>             <groupId>org.fusesource.hawtbuf</groupId>
>             <artifactId>hawtbuf</artifactId>
>             <version>1.9</version>
>         </dependency>
>         <dependency>
>            <groupId>org.apache.activemq</groupId>
>            <artifactId>activemq-client</artifactId>
>            <version>5.9.1</version>
>         </dependency>
>
>
>
> On Mon, Jun 9, 2014 at 8:44 AM, Parvez Shaikh <parvez.h.sha...@gmail.com>
> wrote:
>
>> I think we're using ActiveMQ as message broker, is there an easy or quick
>> way to confirm that?
>>
>> Meanwhile the error changed -
>>
>> javax.naming.NoInitialContextException: Cannot instantiate class:
>> org.apache.activemq.jndi.ActiveMQInitialContextFactory [Root exception is
>> java.lang.ClassNotFoundException:
>> org.apache.activemq.jndi.ActiveMQInitialContextFactory]
>>
>> I just quickly tried to find the jar org.apache.activemq and couldn't
>> find it in "lib" directory that comes with HAPROXY-EXTENSION zip file.
>>
>> Any pointers where to get this jar / class?
>>
>>
>> On Mon, Jun 9, 2014 at 8:22 AM, Nirmal Fernando <nirmal070...@gmail.com>
>> wrote:
>>
>>> Hi Parvez,
>>>
>>> Seems like the extension code is broken. Are you using ActiveMQ as the
>>> message broker? If so please replace your jndi.properties file with
>>> following;
>>>
>>> connectionfactoryName=TopicConnectionFactory
>>> java.naming.provider.url=tcp://localhost:61616
>>>
>>> java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
>>>
>>>
>>>
>>> On Mon, Jun 9, 2014 at 8:10 AM, Parvez Shaikh <parvez.h.sha...@gmail.com
>>> > wrote:
>>>
>>>> Thanks Imesh,
>>>>
>>>> While it resolved unable to load jndi.properties
>>>>
>>>> [2014-06-08 20:22:31,624] ERROR - [TopicSubscriber] Error while
>>>> subscribing to the topic: topology
>>>> javax.jms.JMSException: Error creating connection: Unable to Connect
>>>>         at
>>>> org.wso2.andes.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:325)
>>>>         at
>>>> org.wso2.andes.client.AMQConnectionFactory.createTopicConnection(AMQConnectionFactory.java:429)
>>>>         at
>>>> org.apache.stratos.messaging.broker.connect.TopicConnector.init(TopicConnector.java:68)
>>>>         at
>>>> org.apache.stratos.messaging.broker.subscribe.TopicSubscriber.doSubscribe(TopicSubscriber.java:63)
>>>>         at
>>>> org.apache.stratos.messaging.broker.subscribe.TopicSubscriber.run(TopicSubscriber.java:116)
>>>>         at java.lang.Thread.run(Thread.java:744)
>>>> Caused by: org.wso2.andes.AMQConnectionFailureException: Unable to
>>>> Connect
>>>>         at
>>>> org.wso2.andes.client.AMQConnection.<init>(AMQConnection.java:475)
>>>>         at
>>>> org.wso2.andes.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:315)
>>>>         ... 5 more
>>>> [2014-06-08 20:22:31,626]  INFO - [TopicSubscriber] Will try to
>>>> subscribe again in 30 sec
>>>> [2014-06-08 20:22:31,626] ERROR - [AMQStateManager] No Waiters for
>>>> error saving as last error:Exception thrown against AMQConnection:
>>>> Host: <<MB-Host>>
>>>> Port: 61616
>>>> Virtual Host: carbon
>>>> Client ID: carbon
>>>> Active session count: 0: org.wso2.andes.AMQDisconnectedException:
>>>> Server closed connection and reconnection not permitted.
>>>>
>>>> Now I am suspecting following line in jndi.properties -
>>>>
>>>> connectionfactory.topicConnectionfactory=amqp://admin:admin@carbon
>>>> /carbon?brokerlist='tcp://<MB-Host>:61616'
>>>>
>>>> Can someone help understand what this connection factory describing
>>>> here; I could relate to "tcp", a host name. port id and AMQP is most likely
>>>> describing a connection protocol to ActiveMQ Message broker, but unable to
>>>> gather what admin:admin@carbon/carbon really indicating here. Is this
>>>> configurable?
>>>>
>>>> Thanks
>>>>
>>>>
>>>>
>>>> On Sun, Jun 8, 2014 at 11:01 PM, Imesh Gunaratne <im...@apache.org>
>>>> wrote:
>>>>
>>>>> Issue reported: https://issues.apache.org/jira/browse/STRATOS-668
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>> On Sun, Jun 8, 2014 at 10:45 PM, Imesh Gunaratne <im...@apache.org>
>>>>> wrote:
>>>>>
>>>>>> Hi Parvez,
>>>>>>
>>>>>> Welcome to Stratos, its really nice to hear that you are
>>>>>> experimenting with Stratos.
>>>>>>
>>>>>> Regarding the issue you encountered, it seems like there is an
>>>>>> invalid entry in the jndi.properties file shipped with the HAProxy
>>>>>> extension package. Please open
>>>>>> <HAPROXY_EXTENSION_HOME>/conf/jndi.properties file and update
>>>>>> java.naming.provider.url to following:
>>>>>>
>>>>>> java.naming.provider.url=conf/jndi.properties
>>>>>>
>>>>>> I will create a JIRA to fix this in the next release.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>> On Sun, Jun 8, 2014 at 10:02 PM, Parvez Shaikh <
>>>>>> parvez.h.sha...@gmail.com> wrote:
>>>>>>
>>>>>>> Hi experts,
>>>>>>>
>>>>>>> I am new to stratos and exploring on how to integrate existing
>>>>>>> haproxy cartridge with stratos.
>>>>>>>
>>>>>>> I am referring
>>>>>>> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Configuring+HAProxy+Load+Balancer
>>>>>>>
>>>>>>> After following steps mentioned in the link when I run
>>>>>>> haproxy-extension.sh, I am getting following error messgae -
>>>>>>>
>>>>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>>>>> SLF4J: Found binding in
>>>>>>> [jar:file:/opt/apache-stratos-haproxy-extension-4.0.0-incubating/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>> SLF4J: Found binding in
>>>>>>> [jar:file:/opt/apache-stratos-haproxy-extension-4.0.0-incubating/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
>>>>>>> explanation.
>>>>>>> [2014-06-08 09:57:39,480]  WARN -
>>>>>>> [PropertiesFileInitialContextFactory] Unable to load property file
>>>>>>> specified in Provider_URL:repository/conf/jndi.properties
>>>>>>> Due to:repository/conf/jndi.properties (No such file or directory)
>>>>>>>
>>>>>>>
>>>>>>> This I am running in a VM which is expected to be a haproxy based
>>>>>>> load balancerr.
>>>>>>> Message is clear enough to indicate that
>>>>>>> repository/conf/jndi.properties file is not found.
>>>>>>>
>>>>>>> Question I have is, how do I get this repository directory? Is it
>>>>>>> going to contain same 'conf' directory? Is it referring to directory on
>>>>>>> message broker host or same host as haproxy?
>>>>>>>
>>>>>>> <HAProxy_EXTENSION_HOME> is where I have extracted in
>>>>>>> apache-stratos-load-balancer-4.0.0-incubating.zip and it doesn't have 
>>>>>>> any
>>>>>>> 'repository' directory. Am I missing something important?
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Imesh Gunaratne
>>>>>>
>>>>>> Technical Lead, WSO2
>>>>>> Committer & PPMC Member, Apache Stratos
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Imesh Gunaratne
>>>>>
>>>>> Technical Lead, WSO2
>>>>> Committer & PPMC Member, Apache Stratos
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>

Reply via email to