activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Smith <psm...@aconex.com>
Subject Re: AMQ 4.1 and Spring XML beans
Date Tue, 04 Sep 2007 06:51:58 GMT

On 04/09/2007, at 4:46 PM, James Strachan wrote:

> On 9/3/07, Paul Smith <psmith@aconex.com> wrote:
>> Confused!  This works (as expected):
>>
>>    <amq:broker useJmx="true" persistent="true">
>>      <amq:persistenceAdapter>
>>                 <amq:jdbcPersistenceAdapter dataSource="#derby-ds"/>
>>         </amq:persistenceAdapter>
>>
>>      <amq:transportConnectors>
>>        <amq:transportConnector uri="tcp://localhost:0" />
>>      </amq:transportConnectors>
>>    </amq:broker>
>>
>> But this doesn't which is sort of copied from the XML guide on the
>> website:
>>
>>    <amq:broker useJmx="true" persistent="true">
>>         <amq:persistenceAdapter>
>>                 <journaledJDBC journalLogFiles="5" dataDirectory="$
>> {activemq.base}/activemq-data"  dataSource="#derby-ds"/>
>
> this is an XML error - the <journaledJDBC> must be in the same
> namespace as the rest of the ActiveMQ XML

Tried that last night too, doesn't make any difference:

[2007-09-04 16:50:55,721 INFO ][BeanDefinitionReader][main] Loading  
XML bean definitions from class path resource [amq.xml]
Exception in thread "main"  
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: L 
ine 16 in XML document from class path resource [amq.xml] is invalid;  
nested exception is org.xml.sax.SAXParseException: cvc-complex-type. 
2.4.a: Invalid content was found starting with element  
'amq:journaledJDBC'. One of '{"http://activemq.org/config/ 
1.0":jdbcPersistenceAdapter, "http://activemq.org/config/ 
1.0":journalPersistenceAdapter, "http://activemq.org/config/ 
1.0":kahaPersistenceAdapter, "http://activemq.org/config/ 
1.0":memoryPersistenceAdapter, "http://activemq.org/config/ 
1.0":quickJournalPersistenceAdapter, "http://activemq.org/config/ 
1.0":rapidPersistenceAdapter, WC[##other:"http://activemq.org/config/ 
1.0"]}' is expected.
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a:  
Invalid content was found starting with element 'amq:journaledJDBC'.  
One of '{"http://activemq.org/config/1.0":jdbcPersistenceAdapter,  
"http://activemq.org/config/1.0":journalPersistenceAdapter, "http:// 
activemq.org/config/1.0":kahaPersistenceAdapter, "http://activemq.org/ 
config/1.0":memoryPersistenceAdapter, "http://activemq.org/config/ 
1.0":quickJournalPersistenceAdapter, "http://activemq.org/config/ 
1.0":rapidPersistenceAdapter, WC[##other:"http://activemq.org/config/ 
1.0"]}' is expected.
	at  
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXPar 
seException(ErrorHandlerWrapper.java:236)


using:

   <!--  lets create an embedded ActiveMQ Broker -->
   <amq:broker useJmx="true" persistent="true">
<!--    <amq:persistenceAdapter>
   		<amq:jdbcPersistenceAdapter dataSource="#derby-ds"/>
	</amq:persistenceAdapter>
-->

	<amq:persistenceAdapter>
		<amq:journaledJDBC journalLogFiles="5" dataDirectory="$ 
{activemq.base}/activemq-data"  dataSource="#derby-ds"/>
	</amq:persistenceAdapter>

     <amq:transportConnectors>
       <amq:transportConnector uri="tcp://localhost:0" />
     </amq:transportConnectors>
   </amq:broker>

Any ideas?

cheers,

Paul
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message