PDA

View Full Version : spring-beans-2.5.xsd not found


k4k
May 29th, 2008, 05:34 AM
Probably an elementary question, but here goes:

I am running an integration test where I configured a bunch of bundles of mine.

The test, run under felix, knopflerfish or equinox fails because the spring beans factory reports an error with one of my bundle app context files (attached as mars-core-framework-bundle-context.xml.txt).

Here is the message it displays around not able to find the schema def (attached as error_message_part1.txt)

And later on:

org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'hostContextOsgi': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'hostContext' defined in URL [bundle://25.0:0/META-INF/spring/mars-core-framework-bundle-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [com.citi.mars.core.host.HostContextImpl]: Constructor threw exception; nested exception is org.springframework.beans.factory.xml.XmlBeanDefin itionStoreException: Line 4 in XML document from class path resource [META-INF/spring/mars-core-framework-bundle-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.

It seems to me that the SAX parser is unable to find the XSD doc.

Isn't it meant to revert back to the local copy it has in the spring-beans jar?

I am running under maven 2.0.7, JDK 1.6

I have switched MVN debug on and it seems the spring-beans-2.5.4 is in the test classpath.

What could I be doing wrong??

Oh, and I have checked the file for special characters and it seems in order.

Thanks a lot in advance
KK

Costin Leau
May 29th, 2008, 05:46 AM
Check what XML parser is used by your JDK install of if some other library tries to install itself as the bean. Your file looks okay and I suspect is your local configuration that might have something to do with it.
Try d/l and temporarely installing jdk5 - it might seem like a lot but it's a straight forward process that can take considerably less time then tracking the bug with only one JDK. At least you'll know whether it's something related to your JDK endorsed/ folder or something else.

P.S. and please, use [ c o d e ] tags next time.