You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by SketchCND <sk...@yahoo.co.uk> on 2011/07/01 17:21:24 UTC

Embedded Broker with STOMP example

I have a maven project embedding a broker using Spring XML / XBean with the STOMP transport configured. Any help would be greatly appreciated!



Logging indicates the broker starts and the STOMP transport has started on the configured port. However, using the STOMP example in the ActiveMQ 5.5 download times out and fails.
Starting ActiveMQ from the download and passing my XML config as a parameter (eg. activemq.bat xbean:mybroker.xml) and then running the same STOMP example works.
Bothe the other (vm / ssl) transports work as expected in my embedded broker
Here is my configuration snippets:
 POM.XML
<!--Start POM snippet -->
<properties>
...
<log4j-version>1.2.16</log4j-version>
<slf4j-version>1.6.1</slf4j-version>
<activemq-version>5.5.0</activemq-version>
<camel-version>2.7.2</camel-version>
<jetty-version>7.4.2.v20110526</jetty-version>
<springframework-version>3.0.5.RELEASE</springframework-version>
<xbean-version>3.7</xbean-version>
</properties>
<depencies>
...
<!-- Start: Messaging -->
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<version>${activemq-version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-camel</artifactId>
<version>${activemq-version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-spring</artifactId>
<version>${activemq-version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-pool</artifactId>
<version>${activemq-version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-fileserver</artifactId>
<version>${activemq-version}</version>
<type>war</type>
</dependency>
<dependency>
  <groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>${camel-version}</version>
</dependency>
<dependency>
  <groupId>org.apache.camel</groupId>
<artifactId>camel-spring</artifactId>
<version>${camel-version}</version>
</dependency>
<dependency>
  <groupId>org.apache.camel</groupId>
<artifactId>camel-spring-javaconfig</artifactId>
<version>${camel-version}</version>
</dependency>
<dependency>
  <groupId>org.apache.camel</groupId>
<artifactId>camel-jms</artifactId>
<version>${camel-version}</version>
</dependency>
<!-- End: Messaging -->
...
</dependencies>
<!--End POM snippet -->

<!--Start mybroker.xml snippet -->
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core" xmlns:jms="http://www.springframework.org/schema/jms"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core-5.5.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-3.0.xsd">

<context:property-placeholder />

<amq:broker id="server.Broker"
brokerName="${activemq.broker.name}" 
useJmx="false"
persistent="true"
dataDirectory="${activemq.broker.dataDir}"
start="true">
<amq:plugins>
<amq:simpleAuthenticationPlugin>
<amq:users>
<amq:authenticationUser username="${activemq.broker.auth.userName}"
password="${activemq.broker.auth.password}" 
groups="admins,publishers,consumers" />
</amq:users>
</amq:simpleAuthenticationPlugin>
</amq:plugins>
<amq:systemUsage>
            <amq:systemUsage>
                <amq:memoryUsage>
                    <amq:memoryUsage limit="256 mb"/>
                </amq:memoryUsage>
                <amq:storeUsage>
                    <amq:storeUsage limit="1 gb"/>
                </amq:storeUsage>
                <amq:tempUsage>
                    <amq:tempUsage limit="100 mb"/>
                </amq:tempUsage>
            </amq:systemUsage>
        </amq:systemUsage>
<amq:transportConnectors>
<amq:transportConnector name="vm"
uri="vm://${activemq.broker.name}" />
<amq:transportConnector name="ssl"
uri="ssl://0.0.0.0:47474?transport.needClientAuth=true" />
<amq:transportConnector name="stomp"
uri="stomp://0.0.0.0:61613" />
</amq:transportConnectors>
</amq:broker>

<import resource="jms-config.xml" />
</beans>
<!--End mybroker.xml snippet -->

Broker is initialized using spring with a call like:  "new FileSystemXmlApplicationContext("/spring/mybroker.xml");"

Any ideas / suggestions getting STOMP transport to work on an Embedded Broker?

Thanks in advance
SketchCND

Re: (FIXED) STOMP transport in embedded Broker not working

Posted by Gary Tully <ga...@gmail.com>.
Thanks for closing the loop :)
On 4 Jul 2011 13:28, "SketchCND" <sk...@yahoo.co.uk> wrote:
> I added the activemq-optional artifact to my POM and this is now working.
>
> <dependency>
> <groupId>org.apache.activemq</groupId>
> <artifactId>activemq-core</artifactId>
> </dependency>
>
> -SketchCND
>
> --
> View this message in context:
http://activemq.2283324.n4.nabble.com/STOMP-transport-in-embedded-Broker-not-working-tp3640473p3643511.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

(FIXED) STOMP transport in embedded Broker not working

Posted by SketchCND <sk...@yahoo.co.uk>.
I added the activemq-optional artifact to my POM and this is now working.

<dependency>
   <groupId>org.apache.activemq</groupId> 
   <artifactId>activemq-core</artifactId> 
</dependency>

-SketchCND

--
View this message in context: http://activemq.2283324.n4.nabble.com/STOMP-transport-in-embedded-Broker-not-working-tp3640473p3643511.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: STOMP transport in embedded Broker not working

Posted by Dejan Bosanac <de...@nighttale.net>.
Can you turn on debug logging, it should help seeing what's wrong. One thing
I noticed is that you're missing some dependencies like xstream for example.

Regards
-- 
Dejan Bosanac - http://twitter.com/dejanb
-----------------
The experts in open source integration and messaging - http://fusesource.com
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Sat, Jul 2, 2011 at 9:53 PM, Martin C. <ma...@gmx.at> wrote:

> Hi,
>
> On Sat, Jul 2, 2011 at 7:18 PM, SketchCND
> <sk...@yahoo.co.uk> wrote:
> > Hi Martin,
> >
> > Thanks for the reply. I don't believe that this issue is on the client
> side.
> [...]
>
> Hmm, I suppose you are right and I think my reply might have been
> meant for another topic. I just need to find it again. Sorry!
>
> Best regards,
> Martin
>

Re: STOMP transport in embedded Broker not working

Posted by "Martin C." <ma...@gmx.at>.
Hi,

On Sat, Jul 2, 2011 at 7:18 PM, SketchCND
<sk...@yahoo.co.uk> wrote:
> Hi Martin,
>
> Thanks for the reply. I don't believe that this issue is on the client side.
[...]

Hmm, I suppose you are right and I think my reply might have been
meant for another topic. I just need to find it again. Sorry!

Best regards,
Martin

Re: EXTERNAL: Re: Upgrade from 5.3 to 5.5

Posted by Gary Tully <ga...@gmail.com>.
thanks for closing the loop, the ordering is a bit of a pain, but
there is value to schema validation as you can be sure your additional
configuration is being respected.

On 5 July 2011 22:31, Robillard, Greg L <gr...@lmco.com> wrote:
> In case anyone cares!
>
> Original:
>        <plugins>
>        <bean id="ActiveMqSecurity" class="com.lmco.fltwinds.activemqsecurity.FltwindsSecurityPlugin" xmlns="">
>            <property name ="dbDriver" value="com.mysql.jdbc.Driver" />
>            <property name ="dbUri" value="jdbc:mysql://localhost:3306/fltwinds" />
>            <property name ="dbUsername" value="fltwinds" />
>            <property name ="dbPassword" value="fltwinds" />
>        </bean>
>       </plugins>
>
>
>  New:
>
>        <plugins>
>                <bean id="ActiveMqSecurity" class="com.lmco.fltwinds.activemqsecurity.FltwindsSecurityPlugin" xmlns="http://www.springframework.org/schema/beans">
>            <property name ="dbDriver" value="com.mysql.jdbc.Driver" />
>            <property name ="dbUri" value="jdbc:mysql://localhost:3306/fltwinds?relaxAutoCommit=true"/>
>            <property name ="dbUsername" value="fltwinds" />
>            <property name ="dbPassword" value="fltwinds" />
>                </bean>
>         </plugins>
>
> Additionally, the configuration had to be moved to alphabetic location.
>
> Regards,
>
>
> -----Original Message-----
> From: Marcelo Jabali [mailto:mjabali@fusesource.com]
> Sent: Tuesday, July 05, 2011 1:22 PM
> To: users@activemq.apache.org
> Subject: EXTERNAL: Re: Upgrade from 5.3 to 5.5
>
> Hi Greg,
>
> The empty xmlns="" seems to be causing that exception.
>
> Hope this helps,
>
> -Marcelo
>
> On Jul 5, 2011, at 10:47 AM, Robillard, Greg L wrote:
>
>> I am running the following plugin on 5.3.
>>
>>       <plugins>
>>        <bean id="ActiveMqSecurity" class="com.lmco.fltwinds.activemqsecurity.FltwindsSecurityPlugin" xmlns="">
>>            <property name ="dbDriver" value="com.mysql.jdbc.Driver" />
>>            <property name ="dbUri" value="jdbc:mysql://localhost:3306/fltwinds" />
>>            <property name ="dbUsername" value="fltwinds" />
>>            <property name ="dbPassword" value="fltwinds" />
>>        </bean>
>>       </plugins>
>>
>> When upgrading to 5.5, the same plugin causes the following error.
>>
>> Microsoft Windows XP [Version 5.1.2600]
>> (C) Copyright 1985-2001 Microsoft Corp.
>>
>> C:\Documents and Settings\GLROBILL>cd ../..
>>
>> C:\>cd apache-activemq-5.5.0
>>
>> C:\apache-activemq-5.5.0>cd bin
>>
>> C:\apache-activemq-5.5.0\bin>./activemq.bat
>> '.' is not recognized as an internal or external command,
>> operable program or batch file.
>>
>> C:\apache-activemq-5.5.0\bin>activemq.bat
>> Java Runtime: Sun Microsystems Inc. 1.6.0_24 C:\Program Files\Java\jdk1.6.0_24\jre
>>  Heap sizes: current=15872k  free=14340k  max=506816k
>>    JVM args: -Dcom.sun.management.jmxremote -Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties -Dactivemq.classpath=C:\apache-activemq-5.5.0
>> \bin\../conf;C:\apache-activemq-5.5.0\bin\../conf; -Dactivemq.home=C:\apache-activemq-5.5.0\bin\.. -Dactivemq.base=C:\apache-activemq-5.5.0\bin\..
>> ACTIVEMQ_HOME: C:\apache-activemq-5.5.0\bin\..
>> ACTIVEMQ_BASE: C:\apache-activemq-5.5.0\bin\..
>> Loading message broker from: xbean:activemq.xml
>> INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@af8358: startup date [Tue Jul 05 12:45:17 CDT 2011]; root of context hierarchy
>> ERROR: java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 103 in XML document from class path resource [activ
>> emq.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'plugins'. One of '{WC[##other:"http://activemq.apache.o
>> rg/schema/core"]}' is expected.
>> java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 103 in XML document from class path resource [activemq.xml
>> ] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'plugins'. One of '{WC[##other:"http://activemq.apache.org/sche
>> ma/core"]}' is expected.
>>        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:98)
>>        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>>        at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:143)
>>        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>>        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:85)
>>        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:251)
>>        at org.apache.activemq.console.Main.main(Main.java:107)
>> Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 103 in XML document from class path resource [activemq.xml] is invalid; nested exception is org.xml.sax.SAXParseE
>> xception: cvc-complex-type.2.4.a: Invalid content was found starting with element 'plugins'. One of '{WC[##other:"http://activemq.apache.org/schema/core"]}' is expected.
>>        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
>>        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
>>        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
>>        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:111)
>>        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:104)
>>        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
>>
>> Any assistance would be greatly appreciated.
>>
>> Greg L Robillard
>
>
>
>



-- 
http://fusesource.com
http://blog.garytully.com

RE: EXTERNAL: Re: Upgrade from 5.3 to 5.5

Posted by "Robillard, Greg L" <gr...@lmco.com>.
In case anyone cares!

Original:
	<plugins>
        <bean id="ActiveMqSecurity" class="com.lmco.fltwinds.activemqsecurity.FltwindsSecurityPlugin" xmlns="">
            <property name ="dbDriver" value="com.mysql.jdbc.Driver" />
            <property name ="dbUri" value="jdbc:mysql://localhost:3306/fltwinds" />
            <property name ="dbUsername" value="fltwinds" />
            <property name ="dbPassword" value="fltwinds" />
        </bean>
       </plugins>


 New:

	<plugins>
		<bean id="ActiveMqSecurity" class="com.lmco.fltwinds.activemqsecurity.FltwindsSecurityPlugin" xmlns="http://www.springframework.org/schema/beans"> 
            <property name ="dbDriver" value="com.mysql.jdbc.Driver" /> 
            <property name ="dbUri" value="jdbc:mysql://localhost:3306/fltwinds?relaxAutoCommit=true"/> 
            <property name ="dbUsername" value="fltwinds" /> 
            <property name ="dbPassword" value="fltwinds" /> 
        	</bean>
	 </plugins>

Additionally, the configuration had to be moved to alphabetic location.

Regards,


-----Original Message-----
From: Marcelo Jabali [mailto:mjabali@fusesource.com] 
Sent: Tuesday, July 05, 2011 1:22 PM
To: users@activemq.apache.org
Subject: EXTERNAL: Re: Upgrade from 5.3 to 5.5

Hi Greg,

The empty xmlns="" seems to be causing that exception.

Hope this helps,

-Marcelo

On Jul 5, 2011, at 10:47 AM, Robillard, Greg L wrote:

> I am running the following plugin on 5.3.
> 
> 	<plugins>
>        <bean id="ActiveMqSecurity" class="com.lmco.fltwinds.activemqsecurity.FltwindsSecurityPlugin" xmlns="">
>            <property name ="dbDriver" value="com.mysql.jdbc.Driver" />
>            <property name ="dbUri" value="jdbc:mysql://localhost:3306/fltwinds" />
>            <property name ="dbUsername" value="fltwinds" />
>            <property name ="dbPassword" value="fltwinds" />
>        </bean>
>       </plugins>
> 
> When upgrading to 5.5, the same plugin causes the following error.
> 
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
> 
> C:\Documents and Settings\GLROBILL>cd ../..
> 
> C:\>cd apache-activemq-5.5.0
> 
> C:\apache-activemq-5.5.0>cd bin
> 
> C:\apache-activemq-5.5.0\bin>./activemq.bat
> '.' is not recognized as an internal or external command,
> operable program or batch file.
> 
> C:\apache-activemq-5.5.0\bin>activemq.bat
> Java Runtime: Sun Microsystems Inc. 1.6.0_24 C:\Program Files\Java\jdk1.6.0_24\jre
>  Heap sizes: current=15872k  free=14340k  max=506816k
>    JVM args: -Dcom.sun.management.jmxremote -Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties -Dactivemq.classpath=C:\apache-activemq-5.5.0
> \bin\../conf;C:\apache-activemq-5.5.0\bin\../conf; -Dactivemq.home=C:\apache-activemq-5.5.0\bin\.. -Dactivemq.base=C:\apache-activemq-5.5.0\bin\..
> ACTIVEMQ_HOME: C:\apache-activemq-5.5.0\bin\..
> ACTIVEMQ_BASE: C:\apache-activemq-5.5.0\bin\..
> Loading message broker from: xbean:activemq.xml
> INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@af8358: startup date [Tue Jul 05 12:45:17 CDT 2011]; root of context hierarchy
> ERROR: java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 103 in XML document from class path resource [activ
> emq.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'plugins'. One of '{WC[##other:"http://activemq.apache.o
> rg/schema/core"]}' is expected.
> java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 103 in XML document from class path resource [activemq.xml
> ] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'plugins'. One of '{WC[##other:"http://activemq.apache.org/sche
> ma/core"]}' is expected.
>        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:98)
>        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>        at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:143)
>        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:85)
>        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:251)
>        at org.apache.activemq.console.Main.main(Main.java:107)
> Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 103 in XML document from class path resource [activemq.xml] is invalid; nested exception is org.xml.sax.SAXParseE
> xception: cvc-complex-type.2.4.a: Invalid content was found starting with element 'plugins'. One of '{WC[##other:"http://activemq.apache.org/schema/core"]}' is expected.
>        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
>        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
>        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
>        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:111)
>        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:104)
>        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
> 
> Any assistance would be greatly appreciated.
> 
> Greg L Robillard




RE: EXTERNAL: Re: Upgrade from 5.3 to 5.5

Posted by "Robillard, Greg L" <gr...@lmco.com>.
Nope, found that 5.3 to 5.5 requires the schema to be in alphabetic order.  Now I get a different error.


C:\apache-activemq-5.5.0\bin>activemq.bat
Java Runtime: Sun Microsystems Inc. 1.6.0_24 C:\Program Files\Java\jdk1.6.0_24\jre
  Heap sizes: current=15872k  free=14340k  max=506816k
    JVM args: -Dcom.sun.management.jmxremote -Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties -Dactivemq.classpath=C:\apache-activemq-5.5.0
\bin\../conf;C:\apache-activemq-5.5.0\bin\../conf; -Dactivemq.home=C:\apache-activemq-5.5.0\bin\.. -Dactivemq.base=C:\apache-activemq-5.5.0\bin\..
ACTIVEMQ_HOME: C:\apache-activemq-5.5.0\bin\..
ACTIVEMQ_BASE: C:\apache-activemq-5.5.0\bin\..
Loading message broker from: xbean:activemq.xml
 INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@d80be3: startup date [Tue Jul 05 14:03:26 CDT 2011]; root of context hierarchy
 INFO | Loading XML bean definitions from class path resource [activemq.xml]
ERROR: java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 68 in XML document from class path resource [active
mq.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'bean'. One of '{"http://activemq.apache.org/schema/core"
:authorizationPlugin, "http://activemq.apache.org/schema/core":connectionDotFilePlugin, "http://activemq.apache.org/schema/core":destinationDotFilePlugin, "http://activemq.apache.org/schema/core":disc
ardingDLQBrokerPlugin, "http://activemq.apache.org/schema/core":forcePersistencyModeBrokerPlugin, "http://activemq.apache.org/schema/core":jaasAuthenticationPlugin, "http://activemq.apache.org/schema/
core":jaasCertificateAuthenticationPlugin, "http://activemq.apache.org/schema/core":jaasDualAuthenticationPlugin, "http://activemq.apache.org/schema/core":loggingBrokerPlugin, "http://activemq.apache.
org/schema/core":multicastTraceBrokerPlugin, "http://activemq.apache.org/schema/core":simpleAuthenticationPlugin, "http://activemq.apache.org/schema/core":statisticsBrokerPlugin, "http://activemq.apac
he.org/schema/core":timeStampingBrokerPlugin, "http://activemq.apache.org/schema/core":traceBrokerPathPlugin, "http://activemq.apache.org/schema/core":udpTraceBrokerPlugin, WC[##other:"http://activemq
.apache.org/schema/core"]}' is expected.
java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 68 in XML document from class path resource [activemq.xml]
 is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'bean'. One of '{"http://activemq.apache.org/schema/core":author
izationPlugin, "http://activemq.apache.org/schema/core":connectionDotFilePlugin, "http://activemq.apache.org/schema/core":destinationDotFilePlugin, "http://activemq.apache.org/schema/core":discardingD
LQBrokerPlugin, "http://activemq.apache.org/schema/core":forcePersistencyModeBrokerPlugin, "http://activemq.apache.org/schema/core":jaasAuthenticationPlugin, "http://activemq.apache.org/schema/core":j
aasCertificateAuthenticationPlugin, "http://activemq.apache.org/schema/core":jaasDualAuthenticationPlugin, "http://activemq.apache.org/schema/core":loggingBrokerPlugin, "http://activemq.apache.org/sch
ema/core":multicastTraceBrokerPlugin, "http://activemq.apache.org/schema/core":simpleAuthenticationPlugin, "http://activemq.apache.org/schema/core":statisticsBrokerPlugin, "http://activemq.apache.org/
schema/core":timeStampingBrokerPlugin, "http://activemq.apache.org/schema/core":traceBrokerPathPlugin, "http://activemq.apache.org/schema/core":udpTraceBrokerPlugin, WC[##other:"http://activemq.apache
.org/schema/core"]}' is expected.
        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:98)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:143)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:85)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        ... 10 more

-----Original Message-----
From: Marcelo Jabali [mailto:mjabali@fusesource.com] 
Sent: Tuesday, July 05, 2011 1:22 PM
To: users@activemq.apache.org
Subject: EXTERNAL: Re: Upgrade from 5.3 to 5.5

Hi Greg,

The empty xmlns="" seems to be causing that exception.

Hope this helps,

-Marcelo

On Jul 5, 2011, at 10:47 AM, Robillard, Greg L wrote:

> I am running the following plugin on 5.3.
> 
> 	<plugins>
>        <bean id="ActiveMqSecurity" class="com.lmco.fltwinds.activemqsecurity.FltwindsSecurityPlugin" xmlns="">
>            <property name ="dbDriver" value="com.mysql.jdbc.Driver" />
>            <property name ="dbUri" value="jdbc:mysql://localhost:3306/fltwinds" />
>            <property name ="dbUsername" value="fltwinds" />
>            <property name ="dbPassword" value="fltwinds" />
>        </bean>
>       </plugins>
> 
> When upgrading to 5.5, the same plugin causes the following error.
> 
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
> 
> C:\Documents and Settings\GLROBILL>cd ../..
> 
> C:\>cd apache-activemq-5.5.0
> 
> C:\apache-activemq-5.5.0>cd bin
> 
> C:\apache-activemq-5.5.0\bin>./activemq.bat
> '.' is not recognized as an internal or external command,
> operable program or batch file.
> 
> C:\apache-activemq-5.5.0\bin>activemq.bat
> Java Runtime: Sun Microsystems Inc. 1.6.0_24 C:\Program Files\Java\jdk1.6.0_24\jre
>  Heap sizes: current=15872k  free=14340k  max=506816k
>    JVM args: -Dcom.sun.management.jmxremote -Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties -Dactivemq.classpath=C:\apache-activemq-5.5.0
> \bin\../conf;C:\apache-activemq-5.5.0\bin\../conf; -Dactivemq.home=C:\apache-activemq-5.5.0\bin\.. -Dactivemq.base=C:\apache-activemq-5.5.0\bin\..
> ACTIVEMQ_HOME: C:\apache-activemq-5.5.0\bin\..
> ACTIVEMQ_BASE: C:\apache-activemq-5.5.0\bin\..
> Loading message broker from: xbean:activemq.xml
> INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@af8358: startup date [Tue Jul 05 12:45:17 CDT 2011]; root of context hierarchy
> ERROR: java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 103 in XML document from class path resource [activ
> emq.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'plugins'. One of '{WC[##other:"http://activemq.apache.o
> rg/schema/core"]}' is expected.
> java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 103 in XML document from class path resource [activemq.xml
> ] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'plugins'. One of '{WC[##other:"http://activemq.apache.org/sche
> ma/core"]}' is expected.
>        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:98)
>        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>        at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:143)
>        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:85)
>        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:251)
>        at org.apache.activemq.console.Main.main(Main.java:107)
> Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 103 in XML document from class path resource [activemq.xml] is invalid; nested exception is org.xml.sax.SAXParseE
> xception: cvc-complex-type.2.4.a: Invalid content was found starting with element 'plugins'. One of '{WC[##other:"http://activemq.apache.org/schema/core"]}' is expected.
>        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
>        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
>        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
>        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:111)
>        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:104)
>        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
> 
> Any assistance would be greatly appreciated.
> 
> Greg L Robillard




Re: Upgrade from 5.3 to 5.5

Posted by Marcelo Jabali <mj...@fusesource.com>.
Hi Greg,

The empty xmlns="" seems to be causing that exception.

Hope this helps,

-Marcelo

On Jul 5, 2011, at 10:47 AM, Robillard, Greg L wrote:

> I am running the following plugin on 5.3.
> 
> 	<plugins>
>        <bean id="ActiveMqSecurity" class="com.lmco.fltwinds.activemqsecurity.FltwindsSecurityPlugin" xmlns="">
>            <property name ="dbDriver" value="com.mysql.jdbc.Driver" />
>            <property name ="dbUri" value="jdbc:mysql://localhost:3306/fltwinds" />
>            <property name ="dbUsername" value="fltwinds" />
>            <property name ="dbPassword" value="fltwinds" />
>        </bean>
>       </plugins>
> 
> When upgrading to 5.5, the same plugin causes the following error.
> 
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
> 
> C:\Documents and Settings\GLROBILL>cd ../..
> 
> C:\>cd apache-activemq-5.5.0
> 
> C:\apache-activemq-5.5.0>cd bin
> 
> C:\apache-activemq-5.5.0\bin>./activemq.bat
> '.' is not recognized as an internal or external command,
> operable program or batch file.
> 
> C:\apache-activemq-5.5.0\bin>activemq.bat
> Java Runtime: Sun Microsystems Inc. 1.6.0_24 C:\Program Files\Java\jdk1.6.0_24\jre
>  Heap sizes: current=15872k  free=14340k  max=506816k
>    JVM args: -Dcom.sun.management.jmxremote -Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties -Dactivemq.classpath=C:\apache-activemq-5.5.0
> \bin\../conf;C:\apache-activemq-5.5.0\bin\../conf; -Dactivemq.home=C:\apache-activemq-5.5.0\bin\.. -Dactivemq.base=C:\apache-activemq-5.5.0\bin\..
> ACTIVEMQ_HOME: C:\apache-activemq-5.5.0\bin\..
> ACTIVEMQ_BASE: C:\apache-activemq-5.5.0\bin\..
> Loading message broker from: xbean:activemq.xml
> INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@af8358: startup date [Tue Jul 05 12:45:17 CDT 2011]; root of context hierarchy
> ERROR: java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 103 in XML document from class path resource [activ
> emq.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'plugins'. One of '{WC[##other:"http://activemq.apache.o
> rg/schema/core"]}' is expected.
> java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 103 in XML document from class path resource [activemq.xml
> ] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'plugins'. One of '{WC[##other:"http://activemq.apache.org/sche
> ma/core"]}' is expected.
>        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:98)
>        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>        at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:143)
>        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:85)
>        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:251)
>        at org.apache.activemq.console.Main.main(Main.java:107)
> Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 103 in XML document from class path resource [activemq.xml] is invalid; nested exception is org.xml.sax.SAXParseE
> xception: cvc-complex-type.2.4.a: Invalid content was found starting with element 'plugins'. One of '{WC[##other:"http://activemq.apache.org/schema/core"]}' is expected.
>        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
>        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
>        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
>        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:111)
>        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:104)
>        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
> 
> Any assistance would be greatly appreciated.
> 
> Greg L Robillard




Upgrade from 5.3 to 5.5

Posted by "Robillard, Greg L" <gr...@lmco.com>.
I am running the following plugin on 5.3.

	<plugins>
        <bean id="ActiveMqSecurity" class="com.lmco.fltwinds.activemqsecurity.FltwindsSecurityPlugin" xmlns="">
            <property name ="dbDriver" value="com.mysql.jdbc.Driver" />
            <property name ="dbUri" value="jdbc:mysql://localhost:3306/fltwinds" />
            <property name ="dbUsername" value="fltwinds" />
            <property name ="dbPassword" value="fltwinds" />
        </bean>
       </plugins>

When upgrading to 5.5, the same plugin causes the following error.

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\GLROBILL>cd ../..

C:\>cd apache-activemq-5.5.0

C:\apache-activemq-5.5.0>cd bin

C:\apache-activemq-5.5.0\bin>./activemq.bat
'.' is not recognized as an internal or external command,
operable program or batch file.

C:\apache-activemq-5.5.0\bin>activemq.bat
Java Runtime: Sun Microsystems Inc. 1.6.0_24 C:\Program Files\Java\jdk1.6.0_24\jre
  Heap sizes: current=15872k  free=14340k  max=506816k
    JVM args: -Dcom.sun.management.jmxremote -Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties -Dactivemq.classpath=C:\apache-activemq-5.5.0
\bin\../conf;C:\apache-activemq-5.5.0\bin\../conf; -Dactivemq.home=C:\apache-activemq-5.5.0\bin\.. -Dactivemq.base=C:\apache-activemq-5.5.0\bin\..
ACTIVEMQ_HOME: C:\apache-activemq-5.5.0\bin\..
ACTIVEMQ_BASE: C:\apache-activemq-5.5.0\bin\..
Loading message broker from: xbean:activemq.xml
 INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@af8358: startup date [Tue Jul 05 12:45:17 CDT 2011]; root of context hierarchy
ERROR: java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 103 in XML document from class path resource [activ
emq.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'plugins'. One of '{WC[##other:"http://activemq.apache.o
rg/schema/core"]}' is expected.
java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 103 in XML document from class path resource [activemq.xml
] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'plugins'. One of '{WC[##other:"http://activemq.apache.org/sche
ma/core"]}' is expected.
        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:98)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:143)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:85)
        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:251)
        at org.apache.activemq.console.Main.main(Main.java:107)
Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 103 in XML document from class path resource [activemq.xml] is invalid; nested exception is org.xml.sax.SAXParseE
xception: cvc-complex-type.2.4.a: Invalid content was found starting with element 'plugins'. One of '{WC[##other:"http://activemq.apache.org/schema/core"]}' is expected.
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:111)
        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:104)
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)

Any assistance would be greatly appreciated.

Greg L Robillard

Re: STOMP transport in embedded Broker not working

Posted by SketchCND <sk...@yahoo.co.uk>.
Hi Martin,

Thanks for the reply. I don't believe that this issue is on the client side.
As I mentioned in my original post, when starting ActiveMQ using the
download abd passing my xml config as "activemq.bat xbean:myconfig.xml" the
stomp clients can pub/sub to the broker. Tested using the Stomp Example that
ships with the download. My issue begins when attempting to embed a broker
in my Java app and instantiating it using spring. Logging reports broker
started with vm, tcp & stomp transports up and running. VM and TCP works as
expected, but STOMP fails using the exact same example client from the
ActiveMQ download. I've tried setting trace on using the Debugging section
of  http://activemq.apache.org/stomp.html
http://activemq.apache.org/stomp.html  but I don't see any activity on
logging screen / file

Has anyone got STOMP working successfully with and embedded broker?

- SketchCND
   

--
View this message in context: http://activemq.2283324.n4.nabble.com/STOMP-transport-in-embedded-Broker-not-working-tp3640473p3640811.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: STOMP transport in embedded Broker not working

Posted by "Martin C." <ma...@gmx.at>.
Hi,

I just noticed I got the documentation for the C++ project, but I
suppose there will be similar settings for the broker itself.

Best regards,
Martin

On Sat, Jul 2, 2011 at 3:11 PM, Martin C. <ma...@gmx.at> wrote:
> Hi,
>
> maybe http://activemq.apache.org/cms/configuring.html can help,
> especially the wireFormat.maxInactivityDuration setting. But I don't
> know if/how it applies to STOMP connections, but I would also be very
> interested in this, as it might be that I need to connect some clients
> via STOMP.
>
> Best regards,
> Martin
>
> On Sat, Jul 2, 2011 at 2:58 PM, SketchCND
> <sk...@yahoo.co.uk> wrote:
>> I have a maven project embedding a broker using Spring XML / XBean with the STOMP transport configured. Any help would be greatly appreciated!
>>
>>
>>
>> Logging indicates the broker starts and the STOMP transport has started on the configured port. However, using the STOMP example in the ActiveMQ 5.5 download times out and fails.
>> Starting ActiveMQ from the download and passing my XML config as a parameter (eg. activemq.bat xbean:mybroker.xml) and then running the same STOMP example works.
>> Both the other (vm / tcp) transports work as expected in my embedded broker
>> Here is my configuration snippets:
>>  POM.XML
>> <!--Start POM snippet -->
>> <properties>
>> ...
>> <log4j-version>1.2.16</log4j-version>
>> <slf4j-version>1.6.1</slf4j-version>
>> <activemq-version>5.5.0</activemq-version>
>> <camel-version>2.7.2</camel-version>
>> <jetty-version>7.4.2.v20110526</jetty-version>
>> <springframework-version>3.0.5.RELEASE</springframework-version>
>> <xbean-version>3.7</xbean-version>
>> </properties>
>> <depencies>
>> ...
>> <!-- Start: Messaging -->
>> <dependency>
>> <groupId>org.apache.activemq</groupId>
>> <artifactId>activemq-core</artifactId>
>> <version>${activemq-version}</version>
>> </dependency>
>> <dependency>
>> <groupId>org.apache.activemq</groupId>
>> <artifactId>activemq-camel</artifactId>
>> <version>${activemq-version}</version>
>> </dependency>
>> <dependency>
>> <groupId>org.apache.activemq</groupId>
>> <artifactId>activemq-spring</artifactId>
>> <version>${activemq-version}</version>
>> </dependency>
>> <dependency>
>> <groupId>org.apache.activemq</groupId>
>> <artifactId>activemq-pool</artifactId>
>> <version>${activemq-version}</version>
>> </dependency>
>> <dependency>
>> <groupId>org.apache.activemq</groupId>
>> <artifactId>activemq-fileserver</artifactId>
>> <version>${activemq-version}</version>
>> <type>war</type>
>> </dependency>
>> <dependency>
>>   <groupId>org.apache.camel</groupId>
>> <artifactId>camel-core</artifactId>
>> <version>${camel-version}</version>
>> </dependency>
>> <dependency>
>>   <groupId>org.apache.camel</groupId>
>> <artifactId>camel-spring</artifactId>
>> <version>${camel-version}</version>
>> </dependency>
>> <dependency>
>>   <groupId>org.apache.camel</groupId>
>> <artifactId>camel-spring-javaconfig</artifactId>
>> <version>${camel-version}</version>
>> </dependency>
>> <dependency>
>>   <groupId>org.apache.camel</groupId>
>> <artifactId>camel-jms</artifactId>
>> <version>${camel-version}</version>
>> </dependency>
>> <!-- End: Messaging -->
>> ...
>> </dependencies>
>> <!--End POM snippet -->
>>
>> <!--Start mybroker.xml snippet -->
>> <?xml version="1.0" encoding="UTF-8"?>
>> <beans xmlns="http://www.springframework.org/schema/beans"
>> xmlns:amq="http://activemq.apache.org/schema/core" xmlns:jms="http://www.springframework.org/schema/jms"
>> xmlns:context="http://www.springframework.org/schema/context"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
>> http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core-5.5.0.xsd
>> http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
>> http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-3.0.xsd">
>>
>> <context:property-placeholder />
>>
>> <amq:broker id="server.Broker"
>> brokerName="${activemq.broker.name}"
>> useJmx="false"
>> persistent="true"
>> dataDirectory="${activemq.broker.dataDir}"
>> start="true">
>> <amq:transportConnectors>
>> <amq:transportConnector name="vm"
>> uri="vm://${activemq.broker.name}" />
>> <amq:transportConnector name="tcp"
>> uri="tcp://0.0.0.0:47474" />
>> <amq:transportConnector name="stomp"
>> uri="stomp://0.0.0.0:61613" />
>> </amq:transportConnectors>
>> </amq:broker>
>>
>> </beans>
>> <!--End mybroker.xml snippet -->
>>
>> Broker is initialized using spring with a call like:  "new FileSystemXmlApplicationContext("/spring/mybroker.xml");"
>>
>> Any ideas / suggestions getting STOMP transport to work on an embedded Broker?
>>
>> Thanks in advance
>> SketchCND
>

Re: STOMP transport in embedded Broker not working

Posted by "Martin C." <ma...@gmx.at>.
Hi,

maybe http://activemq.apache.org/cms/configuring.html can help,
especially the wireFormat.maxInactivityDuration setting. But I don't
know if/how it applies to STOMP connections, but I would also be very
interested in this, as it might be that I need to connect some clients
via STOMP.

Best regards,
Martin

On Sat, Jul 2, 2011 at 2:58 PM, SketchCND
<sk...@yahoo.co.uk> wrote:
> I have a maven project embedding a broker using Spring XML / XBean with the STOMP transport configured. Any help would be greatly appreciated!
>
>
>
> Logging indicates the broker starts and the STOMP transport has started on the configured port. However, using the STOMP example in the ActiveMQ 5.5 download times out and fails.
> Starting ActiveMQ from the download and passing my XML config as a parameter (eg. activemq.bat xbean:mybroker.xml) and then running the same STOMP example works.
> Both the other (vm / tcp) transports work as expected in my embedded broker
> Here is my configuration snippets:
>  POM.XML
> <!--Start POM snippet -->
> <properties>
> ...
> <log4j-version>1.2.16</log4j-version>
> <slf4j-version>1.6.1</slf4j-version>
> <activemq-version>5.5.0</activemq-version>
> <camel-version>2.7.2</camel-version>
> <jetty-version>7.4.2.v20110526</jetty-version>
> <springframework-version>3.0.5.RELEASE</springframework-version>
> <xbean-version>3.7</xbean-version>
> </properties>
> <depencies>
> ...
> <!-- Start: Messaging -->
> <dependency>
> <groupId>org.apache.activemq</groupId>
> <artifactId>activemq-core</artifactId>
> <version>${activemq-version}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.activemq</groupId>
> <artifactId>activemq-camel</artifactId>
> <version>${activemq-version}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.activemq</groupId>
> <artifactId>activemq-spring</artifactId>
> <version>${activemq-version}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.activemq</groupId>
> <artifactId>activemq-pool</artifactId>
> <version>${activemq-version}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.activemq</groupId>
> <artifactId>activemq-fileserver</artifactId>
> <version>${activemq-version}</version>
> <type>war</type>
> </dependency>
> <dependency>
>   <groupId>org.apache.camel</groupId>
> <artifactId>camel-core</artifactId>
> <version>${camel-version}</version>
> </dependency>
> <dependency>
>   <groupId>org.apache.camel</groupId>
> <artifactId>camel-spring</artifactId>
> <version>${camel-version}</version>
> </dependency>
> <dependency>
>   <groupId>org.apache.camel</groupId>
> <artifactId>camel-spring-javaconfig</artifactId>
> <version>${camel-version}</version>
> </dependency>
> <dependency>
>   <groupId>org.apache.camel</groupId>
> <artifactId>camel-jms</artifactId>
> <version>${camel-version}</version>
> </dependency>
> <!-- End: Messaging -->
> ...
> </dependencies>
> <!--End POM snippet -->
>
> <!--Start mybroker.xml snippet -->
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:amq="http://activemq.apache.org/schema/core" xmlns:jms="http://www.springframework.org/schema/jms"
> xmlns:context="http://www.springframework.org/schema/context"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
> http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core-5.5.0.xsd
> http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
> http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-3.0.xsd">
>
> <context:property-placeholder />
>
> <amq:broker id="server.Broker"
> brokerName="${activemq.broker.name}"
> useJmx="false"
> persistent="true"
> dataDirectory="${activemq.broker.dataDir}"
> start="true">
> <amq:transportConnectors>
> <amq:transportConnector name="vm"
> uri="vm://${activemq.broker.name}" />
> <amq:transportConnector name="tcp"
> uri="tcp://0.0.0.0:47474" />
> <amq:transportConnector name="stomp"
> uri="stomp://0.0.0.0:61613" />
> </amq:transportConnectors>
> </amq:broker>
>
> </beans>
> <!--End mybroker.xml snippet -->
>
> Broker is initialized using spring with a call like:  "new FileSystemXmlApplicationContext("/spring/mybroker.xml");"
>
> Any ideas / suggestions getting STOMP transport to work on an embedded Broker?
>
> Thanks in advance
> SketchCND

STOMP transport in embedded Broker not working

Posted by SketchCND <sk...@yahoo.co.uk>.
I have a maven project embedding a broker using Spring XML / XBean with the STOMP transport configured. Any help would be greatly appreciated!



Logging indicates the broker starts and the STOMP transport has started on the configured port. However, using the STOMP example in the ActiveMQ 5.5 download times out and fails.
Starting ActiveMQ from the download and passing my XML config as a parameter (eg. activemq.bat xbean:mybroker.xml) and then running the same STOMP example works.
Both the other (vm / tcp) transports work as expected in my embedded broker
Here is my configuration snippets:
 POM.XML
<!--Start POM snippet -->
<properties>
...
<log4j-version>1.2.16</log4j-version>
<slf4j-version>1.6.1</slf4j-version>
<activemq-version>5.5.0</activemq-version>
<camel-version>2.7.2</camel-version>
<jetty-version>7.4.2.v20110526</jetty-version>
<springframework-version>3.0.5.RELEASE</springframework-version>
<xbean-version>3.7</xbean-version>
</properties>
<depencies>
...
<!-- Start: Messaging -->
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<version>${activemq-version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-camel</artifactId>
<version>${activemq-version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-spring</artifactId>
<version>${activemq-version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-pool</artifactId>
<version>${activemq-version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-fileserver</artifactId>
<version>${activemq-version}</version>
<type>war</type>
</dependency>
<dependency>
  <groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>${camel-version}</version>
</dependency>
<dependency>
  <groupId>org.apache.camel</groupId>
<artifactId>camel-spring</artifactId>
<version>${camel-version}</version>
</dependency>
<dependency>
  <groupId>org.apache.camel</groupId>
<artifactId>camel-spring-javaconfig</artifactId>
<version>${camel-version}</version>
</dependency>
<dependency>
  <groupId>org.apache.camel</groupId>
<artifactId>camel-jms</artifactId>
<version>${camel-version}</version>
</dependency>
<!-- End: Messaging -->
...
</dependencies>
<!--End POM snippet -->

<!--Start mybroker.xml snippet -->
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core" xmlns:jms="http://www.springframework.org/schema/jms"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core-5.5.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-3.0.xsd">

<context:property-placeholder />

<amq:broker id="server.Broker"
brokerName="${activemq.broker.name}" 
useJmx="false"
persistent="true"
dataDirectory="${activemq.broker.dataDir}"
start="true">
<amq:transportConnectors>
<amq:transportConnector name="vm"
uri="vm://${activemq.broker.name}" />
<amq:transportConnector name="tcp"
uri="tcp://0.0.0.0:47474" />
<amq:transportConnector name="stomp"
uri="stomp://0.0.0.0:61613" />
</amq:transportConnectors>
</amq:broker>

</beans>
<!--End mybroker.xml snippet -->

Broker is initialized using spring with a call like:  "new FileSystemXmlApplicationContext("/spring/mybroker.xml");"

Any ideas / suggestions getting STOMP transport to work on an embedded Broker?

Thanks in advance
SketchCND