Announcement Announcement Module
No announcement yet.
where did the Rabbit schema go? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • 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, whereas the directory is not available anymore.

    Where did it disappear? I see the, 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?



    • #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
      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR
      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR
      at BeanDefinitionReader.loadBeanDefinitions(AbstractB
      at BeanDefinitionReader.loadBeanDefinitions(AbstractB
      at BeanDefinitionReader.loadBeanDefinitions(AbstractB
      at icationContext.loadBeanDefinitions(XmlWebApplicati
      at icationContext.loadBeanDefinitions(XmlWebApplicati
      at hableApplicationContext.refreshBeanFactory(Abstrac
      at ationContext.obtainFreshBeanFactory(AbstractApplic
      at ationContext.refresh(AbstractApplicationContext.ja va:397)
      at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext( 42)
      at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext( 58)
      at org.springframework.web.servlet.FrameworkServlet.i nitWebApplicationContext( )
      at org.springframework.web.servlet.FrameworkServlet.i nitServletBean(
      at it(
      at javax.servlet.GenericServlet.init(GenericServlet.j ava:212)
      at org.apache.catalina.core.StandardWrapper.loadServl et(
      at org.apache.catalina.core.StandardWrapper.load(Stan
      at org.apache.catalina.core.StandardContext.loadOnSta rtup(
      at org.apache.catalina.core.StandardContext.start(Sta
      at org.apache.catalina.core.ContainerBase.start(Conta
      at org.apache.catalina.core.StandardHost.start(Standa
      at org.apache.catalina.core.ContainerBase.start(Conta
      at org.apache.catalina.core.StandardEngine.start(Stan
      at org.apache.catalina.core.StandardService.start(Sta
      at org.apache.catalina.core.StandardServer.start(Stan
      at org.apache.catalina.startup.Catalina.start(Catalin
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Native
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(De
      at java.lang.reflect.Method.invoke(
      at org.apache.catalina.startup.Bootstrap.start(Bootst
      at org.apache.catalina.startup.Bootstrap.main(Bootstr
      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 erWrapper.createSAXParseException(ErrorHandlerWrap
      at erWrapper.error(
      at porter.reportError(
      at porter.reportError(
      at maValidator$XSIErrorReporter.reportError(XMLSchema
      at maValidator.reportSchemaError(XMLSchemaValidator.j ava:3181)
      at maValidator.handleStartElement(XMLSchemaValidator. java:1926)
      at maValidator.emptyElement( 25)
      at entScannerImpl.scanStartElement(XMLNSDocumentScann
      at tFragmentScannerImpl$
      at 140)
      at tFragmentScannerImpl.scanDocument(XMLDocumentFragm
      at nfiguration.parse(
      at nfiguration.parse(
      at er.parse(
      at er.parse(
      at ilderImpl.parse(
      at org.springframework.beans.factory.xml.DefaultDocum entLoader.loadDocument( 75)
      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio
      ... 33 more


      • #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?


        • #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.


          • #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


            • #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.


              • #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.