Page 1 of 1

Admin Configuration Issue

Posted: Sat Nov 24, 2012 2:39 pm
by meifullerton
My admin war started with the following error:

[ERROR] 13:30:27 ContextLoader - Context initialization failed
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://schema.broadleafcommerce.org/mo]
Offending resource: resource loaded from byte array

at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
.......................................
The application context file is:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mo="http://schema.broadleafcommerce.org/mo"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/b ... ns-3.1.xsd
http://schema.broadleafcommerce.org/mo
http://schema.broadleafcommerce.org/mo/mo-2.0.xsd">

<bean id="blUtilityRemoteService" class="org.broadleafcommerce.cms.admin.server.CMSUtilityRemoteService">
<property name="assetServerUrlPrefix" value="${asset.server.url.prefix.internal}"/>
</bean>

<bean id="blCustomPersistenceHandlers" class="org.springframework.beans.factory.config.ListFactoryBean" scope="prototype">
<property name="sourceList">
<list>
<bean class="org.broadleafcommerce.cms.admin.server.handler.PageTemplateCustomPersistenceHandler"/>
<bean class="org.broadleafcommerce.cms.admin.server.handler.PagesCustomPersistenceHandler"/>
<bean class="org.broadleafcommerce.cms.admin.server.handler.StaticAssetCustomPersistenceHandler">
<property name="assetServerUrlPrefix" value="${asset.server.url.prefix.internal}"/>
</bean>
<bean class="org.broadleafcommerce.cms.admin.server.handler.StructuredContentCustomPersistenceHandler"/>
<bean class="org.broadleafcommerce.cms.admin.server.handler.StructuredContentTypeCustomPersistenceHandler"/>
<bean class="org.broadleafcommerce.cms.admin.server.handler.SandBoxItemCustomPersistenceHandler"/>
<bean class="org.broadleafcommerce.cms.admin.server.handler.PendingSandBoxItemCustomPersistenceHandler"/>
<bean class="org.broadleafcommerce.cms.admin.server.handler.TimeDTOCustomPersistenceHandler"/>
<bean class="org.broadleafcommerce.cms.admin.server.handler.RequestDTOCustomPersistenceHandler"/>
<bean class="org.broadleafcommerce.cms.admin.server.handler.StructuredContentItemCriteriaCustomPersistenceHandler"/>
</list>
</property>
</bean>

<mo:override id="blMetadataOverrides" />
</beans>


Any ideas? I'm running 2.0.2-GA on Tomcat 6.0.35.
I didn't have this problem in previous version. (when it was dfined as <bean id="blMetadataOverrides" class="org.springframework.beans.factory.config.MapFactoryBean"> ...)

Thanks,
Mei

Re: Admin Configuration Issue

Posted: Fri Dec 07, 2012 10:47 am
by jefffischer
See if you can connect to http://schema.broadleafcommerce.org/mo/mo-2.0.xsd. Although this is not required for the runtime to successfully start, it may help with your issue.

For Spring to use the custom namespace, it needs to be able to find the schema file defined in spring.schema (see this file in our broadleaf-open-admin-platform jar). If there is something stopping these files from being able to be found using the current classloader, then spring will fail similarly to what you've shown.