6 Replies Latest reply on Nov 19, 2009 12:08 PM by vpothnis

    hornetq-jms.xsd allows only 1 connector-ref to be defined wi

      Hello,

      I am trying to explicitly specify the members of a cluster and I have the following configuration in the "hornetq-jms.xml"

      <connection-factory name="ConnectionFactory">
       <connector-ref connector-name="netty-1" backup-connector-name="backup-netty-1"/>
       <connector-ref connector-name="netty-2" backup-connector-name="backup-netty-2"/>
       <entries>
       <entry name="ConnectionFactory"/>
       <entry name="XAConnectionFactory"/>
       <entry name="java:/ConnectionFactory"/>
       <entry name="java:/XAConnectionFactory"/>
       </entries>
       <connection-load-balancing-policy-class-name>
       org.hornetq.core.client.impl.RoundRobinConnectionLoadBalancingPolicy
       </connection-load-balancing-policy-class-name>
       <failover-on-server-shutdown>true</failover-on-server-shutdown>
       </connection-factory>
      


      But when i start the hornetq server, I get the following error:
      [main] 15:03:39,271 SEVERE [org.hornetq.core.deployers.impl.FileDeploymentManager] Error deploying file:/C:/Tools/HQ-L1/config/live-manual/hornetq-jms.xml
      
      java.lang.IllegalStateException: Invalid configuration
       at org.hornetq.utils.XMLUtil.validate(XMLUtil.java:496)
       at org.hornetq.jms.server.impl.JMSServerDeployer.validate(JMSServerDeployer.java:100)
       at org.hornetq.core.deployers.impl.XmlDeployer.deploy(XmlDeployer.java:155)
       at org.hornetq.core.deployers.impl.FileDeploymentManager.registerDeployer(FileDeploymentManager.java:129)
       at org.hornetq.core.deployers.impl.XmlDeployer.start(XmlDeployer.java:210)
       at org.hornetq.jms.server.impl.JMSServerManagerImpl.activated(JMSServerManagerImpl.java:118)
       at org.hornetq.core.server.impl.HornetQServerImpl.callActivateCallbacks(HornetQServerImpl.java:804)
       at org.hornetq.core.server.impl.HornetQServerImpl.initialisePart2(HornetQServerImpl.java:1036)
      ...
      ...
      ...
       at org.hornetq.integration.bootstrap.HornetQBootstrapServer.main(HornetQBootstrapServer.java:73)
      Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'connector-ref'. One of '{"urn:hornetq":d
      iscovery-group-ref, "urn:hornetq":discovery-initial-wait-timeout, "urn:hornetq":entries, "urn:hornetq":client-failure-check-period, "urn:hornetq":connectio
      n-ttl, "urn:hornetq":call-timeout, "urn:hornetq":consumer-window-size, "urn:hornetq":consumer-max-rate, "urn:hornetq":producer-window-size, "urn:hornetq":p
      roducer-max-rate, "urn:hornetq":cache-large-message-client, "urn:hornetq":min-large-message-size, "urn:hornetq":client-id, "urn:hornetq":dups-ok-batch-size
      , "urn:hornetq":transaction-batch-size, "urn:hornetq":block-on-acknowledge, "urn:hornetq":block-on-non-persistent-send, "urn:hornetq":block-on-persistent-s
      end, "urn:hornetq":auto-group-id, "urn:hornetq":max-connections, "urn:hornetq":pre-acknowledge, "urn:hornetq":retry-interval, "urn:hornetq":retry-interval-
      multiplier, "urn:hornetq":reconnect-attempts, "urn:hornetq":failover-on-server-shutdown, "urn:hornetq":connection-load-balancing-policy-class-name, "urn:ho
      rnetq":use-global-pools, "urn:hornetq":scheduled-thread-pool-max-size, "urn:hornetq":thread-pool-max-size}' is expected.
       at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
       at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
      


      Is this because the hornetq-jms.xsd defines this?

      ...
      <xsd:element name="connection-factory">
       <xsd:complexType>
       <xsd:all>
       <xsd:element name="connector-ref" type="connector-refType" maxOccurs="1" minOccurs="0"></xsd:element>
      ...
      


      A "maxOccurs" of 1.

      Any inputs on this?

      Thanks
      Vinay