Issue Details (XML | Word | Printable)

Key: AMQ-1638
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Hiram Chirino
Reporter: Cyrille Le Clerc
Votes: 1
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
ActiveMQ

XmlBeanDefinitionStoreException : activemq.xsd URL broken in spring.schemas

Created: 28/Mar/08 09:53 AM   Updated: 26/Nov/08 04:58 AM
Return to search
Component/s: Broker
Affects Version/s: 5.0.0
Fix Version/s: 5.1.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works AMQ-1638.patch 2008-03-28 10:00 AM Cyrille Le Clerc 0.7 kB
Environment: activemq-core-5.0.0 and spring-jms-2.5.2 .
Issue Links:
dependent
 


 Description  « Hide
Problem description

activemq-core's spring.schemas file targets broken activemq xsd urls. When beans.xml targets the correct activemq-core-5.0.0.xsd url in xsi:schemaLocation attribute, Spring fails to start if an internet connection to activemq.apache.org does not work.

Sample of currently failing spring configuration file

beans.xml with "activemq-core-5.0.0.xsd" in "xsi:schemaLocation" attribute
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:lang="http://www.springframework.org/schema/lang"
   xmlns:amq="http://activemq.org/config/1.0" xmlns:jms="http://www.springframework.org/schema/jms"
   xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd
http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-2.5.xsd
http://activemq.org/config/1.0 http://activemq.apache.org/schema/core/activemq-core-5.0.0.xsd">
   ...
   <amq:queue id="requestDestination" physicalName="requestDestination" />
   <amq:queue id="replyToDestination" physicalName="replyToDestination" />
   <amq:connectionFactory id="activeMqConnectionFactory" brokerURL="vm://localhost?broker.persistent=false&amp;broker.useJmx=false" />
   ...
</beans>

Spring loading failure stacktrace

42907 [main] WARN  org.springframework.beans.factory.xml.XmlBeanDefinitionReader  - Ignored XML validation warning
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://activemq.apache.org/schema/core/activemq-core-5.0.0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
...
	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283)
	at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
...
	at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:44)
...
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
42969 [main] ERROR org.springframework.test.context.TestContextManager  - Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@1be8711] to prepare test instance [fr.xebia.sample.springframework.jms.requestreply.RequestReplySpringFrameworkTest@1958cc2]
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 24 in XML document from class path resource [fr/xebia/sample/springframework/jms/requestreply/beans.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 'amq:queue'.
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
...
	at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:44)
...
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
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 'amq:queue'.
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
...
	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283)
	at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:382)
	... 26 more


 All   Comments   Work Log   Change History   Subversion Commits   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
Cyrille Le Clerc made changes - 28/Mar/08 10:00 AM
Field Original Value New Value
Attachment AMQ-1638.patch [ 16274 ]
Hiram Chirino made changes - 24/Apr/08 10:12 AM
Assignee Hiram Chirino [ chirino ]
Hiram Chirino made changes - 24/Apr/08 10:15 AM
Link This issue depends upon AMQ-1673 [ AMQ-1673 ]
Hiram Chirino made changes - 24/Apr/08 10:15 AM
Resolution Fixed [ 1 ]
Fix Version/s 5.1.0 [ 11802 ]
Status Open [ 1 ] Resolved [ 5 ]