Hello all

I'm experiencing this same error with ActiveMQ 5.0 trunk revision 578254.

ERROR: Failed to instantiate Spring bean factory: Line 9 in XML document from file [C:\gridgain-1.5.1\config\gridgain.xml] is invalid; nested excepti on is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'amq:broker'.
wrapper

I'm trying to configure GridGain to use ActiveMQ. Without the amq:broker bits, it works fine. My XML configuration:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"; xmlns:amq="http://activemq.org/config/1.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:util="http://www.springframework.org/schema/util";
 xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd http://activemq.org/config/1.0 http://activemq.apache.org/schema/core/activemq-core-5.0-SNAPSHOT.xsd";>
 <description>GridGain configuration</description>
 <amq:broker useJmx="false" persistent="false">
   <amq:transportConnectors>
     <amq:transportConnector uri="tcp://localhost:41292" />
   </amq:transportConnectors>
 </amq:broker>
 <util:map id="jmsJndiMap">
   <entry>
     <key>
<util:constant static-field="javax.naming.Context.INITIAL_CONTEXT_FACTORY" />
     </key>
     <value>org.apache.activemq.jndi.ActiveMQInitialContextFactory</value>
   </entry>
   <entry>
     <key>
       <util:constant static-field="javax.naming.Context.PROVIDER_URL" />
     </key>
     <value>vm://localhost</value>
   </entry>
 </util:map>
<bean id="grid" class="org.gridgain.grid.GridConfigurationAdapter" scope="singleton">
   <property name="gridName" value="mygrid" />
   <property name="peerClassLoadingEnabled" value="true" />
   <property name="communicationSpi">
<bean class="org.gridgain.grid.spi.communication.jms.GridJmsCommunicationSpi">
       <property name="connectionFactoryName" value="connectionFactory" />
       <property name="topicName" value="topic/gridgain.communication" />
       <property name="jndiEnvironment" ref="jmsJndiMap" />
     </bean>
   </property>
   <property name="discoverySpi">
     <bean class="org.gridgain.grid.spi.discovery.jms.GridJmsDiscoverySpi">
       <property name="connectionFactoryName" value="connectionFactory" />
       <property name="topicName" value="topic/gridgain.discovery" />
       <property name="jndiEnvironment" ref="jmsJndiMap" />
     </bean>
   </property>
 </bean>
</beans>

Any thoughts?

Regards,

Albert

----- Original Message ----- From: "Paul Smith" <[EMAIL PROTECTED]>
To: <users@activemq.apache.org>
Sent: Monday, September 03, 2007 1:06 PM
Subject: AMQ 4.1 and Spring XML beans


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"/>
 </amq:persistenceAdapter>

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

I get this error after starting up Spring:

Exception in thread "main"
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: L
ine 15 in XML document from class path resource [amq.xml] is invalid;
nested exception is org.xml.sax.SAXParseException: cvc-complex-type.
2.4.c: The matching wildcard is strict, but no declaration can be
found for element 'journaledJDBC'.
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The
matching wildcard is strict, but no declaration can be found for
element 'journaledJDBC'.
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXPar
seException(ErrorHandlerWrapper.java:236)

Reply via email to