Spring Dynamic Module - Parse Exception while deploying the osgi bundle to IBM Liberty

146 views Asked by At

I am getting the below parse exception while deploying the SPRING DM OSGI bundle into the IBM Liberty.

Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 2 in XML document from URL [bundleentry://240.fwk843512726/WEB-INF/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException; systemId: http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; lineNumber: 2; columnNumber: 35; s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw '301 Moved Permanently'.

What is causing this error?

1

There are 1 answers

2
Jérémie B On

If you use the "legacy" Spring DM, then the "blueprint" namespace is not the one you should use. This xsd is not packaged in the bundles of your container : SpringDM try to download it from the network, and some proxy/web server sends an HTTP redirect (301), which is not a valid xsd document..

With SpringDM, you should use only Spring namespaces.

However, SpringDM is obsolete now, and should not be used.. You can use Blueprint, or better Declaratives Services.

There are two implementations of Blueprint you can use : Aries-Blueprint, or Gemini Blueprint (which supports Spring 4.3, Blueprint and is more or less compatible with SpringDM)