Spring XSD Schema Problems [message #825974] |
Wed, 21 March 2012 13:45 |
Wolfgang Schele Messages: 11 Registered: February 2012 |
Junior Member |
|
|
Hi,
I use Spring Dynamic Modules in my RCP App. I download all the Plugin's into my Target Platform...when I compile the project all looks correct, in Java I can use all the Spring related classes.
But when the code is loaded when I start my RCP-App following happen:
FileSystemResource res = new FileSystemResource("spring-test-project.xml");
XmlBeanFactory beanFactory = new XmlBeanFactory(res);
I got the error:
21.03.2012 14:41:52 org.springframework.util.xml.SimpleSaxErrorHandler warning
WARNUNG: Ignored XML validation warning org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document '<I remove the protocol due to forum limitations>://www.springframework.org/schema/beans/spring-beans-3.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(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(Unknown Source)
...
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 6 in XML document from file [spring-test-project.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:73)
at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:61)
...
It seems that the XSD's could not be found. I tried a lot of things...
I use Eclipse Indigo and Spring 3.0.5...
thx
[Updated on: Wed, 21 March 2012 13:48] Report message to a moderator
|
|
|
Re: Spring XSD Schema Problems [message #828764 is a reply to message #825974] |
Sun, 25 March 2012 08:42 |
Jack Kilian Messages: 40 Registered: March 2012 |
Member |
|
|
I had similar problems when i load spring dm bundles via software site...
download the Spring DM modules from the spring homepage and put them into yout target platform. attention - don't forget the dependencies.
then ensure the following - the file location and the naming of spring dm / osgi integration is fixed, a second restiction is, that a special bundle should be started:
a. ) META-INF\spring\services-context.xml
a.1) ...within this services-context.xml refer your spring environment.
b.) start the spring-osgi-extender.jar bundle on level 4 and at starting time !
c.) to use the spring osgi integration you should export it from a osgi point of view and import it into your rcp client. read the doc form spring dm regarding this.
best regards
jk
[Updated on: Sun, 25 March 2012 08:45] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04808 seconds