activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dejan Bosanac <de...@nighttale.net>
Subject Re: http transport instead of tcp
Date Tue, 31 Jul 2012 10:05:54 GMT
I think you just need http client
(http://hc.apache.org/httpclient-3.x/) added to your the classpath
(anywhere under the lib/ folder)

Regards
-- 
Dejan Bosanac
Senior Software Engineer | FuseSource Corp.
dejanb@fusesource.com | fusesource.com
skype: dejan.bosanac | twitter: @dejanb
blog: http://www.nighttale.net
ActiveMQ in Action: http://www.manning.com/snyder/


On Tue, Jul 31, 2012 at 8:48 AM, mark.waltje <waltje@nlcom.nl> wrote:
> Hey,
>
> Currently I got a setup that I am satisfied with Using ActiveMQ 5.6..
> However it's using TCP instead of the desired HTTP (for Firewall reasons).
> When I change TCP into HTTP I get that a library is missing. Upon searching
> I found that I need to move some jars from optional to the lib folder. I did
> but it still gives me the error. I even moved all optional jars but still no
> result.
>
> Anyone know what I am doing wrong?
>
> Here's a part of the config where I changed tcp into http:
>
>         <transportConnectors>
>             <transportConnector name="openwire" uri="http://0.0.0.0:61618"/>
>         </transportConnectors>
>
>         <networkConnectors>
>                 <networkConnector uri="static:(http://localhost:61617)"
> name="serverA">
>                         <excludedDestinations>
>                                 <queue physicalName=">" />
>                                 <topic physicalName=">" />
>                         </excludedDestinations>
>                         <staticallyIncludedDestinations>
>                                 <queue physicalName="Mail2" />
>                         </staticallyIncludedDestinations>
>                 </networkConnector>
>         </networkConnectors>
>
> Error given:
>
> 2012-07-30 16:59:25,091 | INFO  | Establishing network connection from
> vm://localhost?async=false&network=true to http://localhost:61617 |
> org.apache.activemq.network.DiscoveryNetworkConnector | main
> 2012-07-30 16:59:25,100 | ERROR | Failed to load: class path resource
> [activemq.xml], reason: Error creating bean with name
> 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in class path
> resource [activemq.xml]: Invocation of init method failed; nested exception
> is java.lang.NoClassDefFoundError:
> org/apache/http/message/AbstractHttpMessage |
> org.apache.activemq.xbean.XBeanBrokerFactory | main
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in class
> path resource [activemq.xml]: Invocation of init method failed; nested
> exception is java.lang.NoClassDefFoundError:
> org/apache/http/message/AbstractHttpMessage
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
>         at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
>         at
> org.apache.activemq.xbean.XBeanBrokerFactory$1.<init>(XBeanBrokerFactory.java:108)
>         at
> org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:108)
>         at
> org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:72)
>         at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
>         at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
>         at
> org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:115)
>         at
> org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74)
>         at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>         at
> org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:148)
>         at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>         at
> org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:90)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.activemq.console.Main.runTaskClass(Main.java:257)
>         at org.apache.activemq.console.Main.main(Main.java:111)
> Caused by: java.lang.NoClassDefFoundError:
> org/apache/http/message/AbstractHttpMessage
>         at
> org.apache.activemq.transport.http.HttpTransportFactory.createTransport(HttpTransportFactory.java:72)
>         at
> org.apache.activemq.transport.TransportFactory.doConnect(TransportFactory.java:141)
>         at
> org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:67)
>         at
> org.apache.activemq.network.DiscoveryNetworkConnector.onServiceAdd(DiscoveryNetworkConnector.java:123)
>         at
> org.apache.activemq.transport.discovery.simple.SimpleDiscoveryAgent.start(SimpleDiscoveryAgent.java:77)
>         at
> org.apache.activemq.network.DiscoveryNetworkConnector.handleStart(DiscoveryNetworkConnector.java:193)
>         at
> org.apache.activemq.network.NetworkConnector$1.doStart(NetworkConnector.java:61)
>         at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:54)
>         at
> org.apache.activemq.network.NetworkConnector.start(NetworkConnector.java:202)
>         at
> org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:2295)
>         at org.apache.activemq.broker.BrokerService.start(BrokerService.java:551)
>         at
> org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:60)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
>         ... 28 more
> Caused by: java.lang.ClassNotFoundException:
> org.apache.http.message.AbstractHttpMessage
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>         ... 47 more
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/http-transport-instead-of-tcp-tp4654580.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message