Announcement Announcement Module
Collapse
No announcement yet.
where did the Rabbit schema go? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • where did the Rabbit schema go?

    I ran a few days ago the spring-rabbit-stocks sample and it all went fine. Now it fails, I get validation errors on a few of the XML resources. I see that they all refer to http://www.springframework.org/schem...rabbit-1.0.xsd, whereas the http://www.springframework.org/schema/rabbit directory is not available anymore.

    Where did it disappear? I see the http://www.springframework.org/schema/integration/amqp, but that is a different schema I believe.

    Thanks for your help.

  • #2
    The physical presence of the XSD file at that URL should not have any impact on your application at runtime since it is relying on the Spring AMQP JARs on your classpath instead. Can you let us know what version you have on the classpath and then provide a stack trace of the error you are seeing?

    Thanks,
    Mark

    Comment


    • #3
      When I run it with spring.amqp.version=1.0.0.BUILD-SNAPSHOT in my POM file everything works fine (that's how the POM file of the spring-rabbit-stocks came with). I tried to change that property in the POM file to spring.amqp.version=1.0.0.RC1 (as I want to use this project as a baseline for my project, and of course I want to integrate with the latest released version, namely RC1). I get one compilation error which I could fix (change from BindingBuilder.bind() to BindingBuilder.from()). But when I run it I get multiple exceptions like this:

      ERROR main [gframework.web.servlet.DispatcherServlet]: Context initialization failed
      org.springframework.beans.factory.xml.XmlBeanDefin itionStoreException: Line 13 in XML document from URL [file:/C:/Users/royr/workspace_estore_blc/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/spring-rabbit-stocks/WEB-INF/classes/servlet-config.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 'rabbit:template'.
      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio nReader.java:396)
      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:334)
      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:302)
      at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:143)
      at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:178)
      at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:149)
      at org.springframework.web.context.support.XmlWebAppl icationContext.loadBeanDefinitions(XmlWebApplicati onContext.java:124)
      at org.springframework.web.context.support.XmlWebAppl icationContext.loadBeanDefinitions(XmlWebApplicati onContext.java:93)
      at org.springframework.context.support.AbstractRefres hableApplicationContext.refreshBeanFactory(Abstrac tRefreshableApplicationContext.java:130)
      at org.springframework.context.support.AbstractApplic ationContext.obtainFreshBeanFactory(AbstractApplic ationContext.java:467)
      at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:397)
      at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:4 42)
      at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:4 58)
      at org.springframework.web.servlet.FrameworkServlet.i nitWebApplicationContext(FrameworkServlet.java:339 )
      at org.springframework.web.servlet.FrameworkServlet.i nitServletBean(FrameworkServlet.java:306)
      at org.springframework.web.servlet.HttpServletBean.in it(HttpServletBean.java:127)
      at javax.servlet.GenericServlet.init(GenericServlet.j ava:212)
      at org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:1173)
      at org.apache.catalina.core.StandardWrapper.load(Stan dardWrapper.java:993)
      at org.apache.catalina.core.StandardContext.loadOnSta rtup(StandardContext.java:4350)
      at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4659)
      at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
      at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:785)
      at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
      at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:445)
      at org.apache.catalina.core.StandardService.start(Sta ndardService.java:519)
      at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:710)
      at org.apache.catalina.startup.Catalina.start(Catalin a.java:581)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:289)
      at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:414)
      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 'rabbit:template'.
      at com.sun.org.apache.xerces.internal.util.ErrorHandl erWrapper.createSAXParseException(ErrorHandlerWrap per.java:195)
      at com.sun.org.apache.xerces.internal.util.ErrorHandl erWrapper.error(ErrorHandlerWrapper.java:131)
      at com.sun.org.apache.xerces.internal.impl.XMLErrorRe porter.reportError(XMLErrorReporter.java:384)
      at com.sun.org.apache.xerces.internal.impl.XMLErrorRe porter.reportError(XMLErrorReporter.java:318)
      at com.sun.org.apache.xerces.internal.impl.xs.XMLSche maValidator$XSIErrorReporter.reportError(XMLSchema Validator.java:417)
      at com.sun.org.apache.xerces.internal.impl.xs.XMLSche maValidator.reportSchemaError(XMLSchemaValidator.j ava:3181)
      at com.sun.org.apache.xerces.internal.impl.xs.XMLSche maValidator.handleStartElement(XMLSchemaValidator. java:1926)
      at com.sun.org.apache.xerces.internal.impl.xs.XMLSche maValidator.emptyElement(XMLSchemaValidator.java:7 25)
      at com.sun.org.apache.xerces.internal.impl.XMLNSDocum entScannerImpl.scanStartElement(XMLNSDocumentScann erImpl.java:377)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumen tFragmentScannerImpl$FragmentContentDriver.next(XM LDocumentFragmentScannerImpl.java:2755)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumen tScannerImpl.next(XMLDocumentScannerImpl.java:648)
      at com.sun.org.apache.xerces.internal.impl.XMLNSDocum entScannerImpl.next(XMLNSDocumentScannerImpl.java: 140)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumen tFragmentScannerImpl.scanDocument(XMLDocumentFragm entScannerImpl.java:511)
      at com.sun.org.apache.xerces.internal.parsers.XML11Co nfiguration.parse(XML11Configuration.java:808)
      at com.sun.org.apache.xerces.internal.parsers.XML11Co nfiguration.parse(XML11Configuration.java:737)
      at com.sun.org.apache.xerces.internal.parsers.XMLPars er.parse(XMLParser.java:119)
      at com.sun.org.apache.xerces.internal.parsers.DOMPars er.parse(DOMParser.java:235)
      at com.sun.org.apache.xerces.internal.jaxp.DocumentBu ilderImpl.parse(DocumentBuilderImpl.java:284)
      at org.springframework.beans.factory.xml.DefaultDocum entLoader.loadDocument(DefaultDocumentLoader.java: 75)
      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio nReader.java:388)
      ... 33 more

      Comment


      • #4
        Different xsd files

        I took a further look at it. The org/springframework/amqp/rabbit/config/spring-rabbit-1.0.xsd file has changed. In the 1.0.0.BUILD-SNAPSHOT version of the spring-rabbit.jar it is larger (33KB), and includes the <xsd:element name="template">. In the 1.0.0.RC1 version of the jar file, the same xsd file is smaller (25KB) and misses this element (and maybe others as well). Both files are attached in this ZIP file.

        Any idea why the difference?

        Comment


        • #5
          The difference means new features were added between RC1 and now. The "RC" label means that we will release the code if no problems are found - RC1 was far from perfect as it turned out and quite a few changes have been implemented since then. RC2 is just round the corner, so I would carry on with the snapshot for now if I were you.

          Comment


          • #6
            Thanks, Dave, I understand. I'll stick to the snapshot for now.
            BTW - do you have a roadmap for the RCs and final release? I plan to use spring-amqp in a project which should go live mid-October 2011 (so has to be finalized a few weeks before that). I have no problem releasing my project even with a snapshot (provided it's stable enough), and later switching to the release version, however if there'll be interface changes (see above the changes to BindingBuilder interface) it will make it more difficult.

            Thanks again, Roy

            Comment


            • #7
              RC2 has been ready for a while now, and we haven't had time to release it. The plan is to do it tomorrow. The idea with RC labels is that they are "final" - there should not be any more changes unless someone finds problems. Please try the snapshot and give feedback, and then we can think about the GA release. There's no reason why it shouldn't happen in July, but that's not a promise.

              Comment


              • #8
                Thanks, Dave. I saw you released RC2 indeed. I run my project now with the snapshot - I'll give feedback as I have it.

                Comment

                Working...
                X