You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Grzegorz Kossakowski <gr...@tuffmail.com> on 2007/09/14 14:42:20 UTC

Custom Spring configuration extensions do not work in TestCases

Hi,

I'm struggling with a following problem. I import several configuration files from a file
configuring a bean I'm testing using org.apache.cocoon.AbstractTestCase. One of imported files
contains references to <configurator:bean-map/> (our extension to Spring configs) that cannot be
resolved by Spring. I get following error:

testPrefixedSitemapVariable(org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolverTestCase)
 Time elapsed: 0.122 sec  <<< ERROR!
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem:
Failed to import bean definitions from URL location
[classpath:META-INF/cocoon/spring/ObjectModelTemplate.xml]
Offending resource: class path resource
[org/apache/cocoon/components/treeprocessor/variables/PreparedVariableResolverTestCase.spring.xml];
nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 33
in XML document from class path resource [META-INF/cocoon/spring/ObjectModelTemplate.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 'configurator:bean-map'.
Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 33 in XML
document from class path resource [META-INF/cocoon/spring/ObjectModelTemplate.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 'configurator:bean-map'.
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 'configurator:bean-map'.


I'm not Spring insider and I have no clue what to do with this. Could someone help?

-- 
Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon
http://reflectingonthevicissitudes.wordpress.com/

Re: Custom Spring configuration extensions do not work in TestCases

Posted by Grzegorz Kossakowski <gk...@apache.org>.
Daniel Fagerstrom pisze:
> It looks like an XML-schema error to me. Check line 33 in the
> ObjectModelTemplate.xml against the schema and see if there is a problem.

Thanks Daniel.
Being clueless about XML-schema error while developing XML framework is a shame ;-)

Nevertheless, I moved OM bean declarations back to EL module. I hope that this will not break your
OSGi work.

-- 
Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon
http://reflectingonthevicissitudes.wordpress.com/

Re: Custom Spring configuration extensions do not work in TestCases

Posted by Daniel Fagerstrom <da...@nada.kth.se>.
It looks like an XML-schema error to me. Check line 33 in the 
ObjectModelTemplate.xml against the schema and see if there is a problem.

/Daniel

Grzegorz Kossakowski skrev:
> Hi,
>
> I'm struggling with a following problem. I import several configuration files from a file
> configuring a bean I'm testing using org.apache.cocoon.AbstractTestCase. One of imported files
> contains references to <configurator:bean-map/> (our extension to Spring configs) that cannot be
> resolved by Spring. I get following error:
>
> testPrefixedSitemapVariable(org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolverTestCase)
>  Time elapsed: 0.122 sec  <<< ERROR!
> org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem:
> Failed to import bean definitions from URL location
> [classpath:META-INF/cocoon/spring/ObjectModelTemplate.xml]
> Offending resource: class path resource
> [org/apache/cocoon/components/treeprocessor/variables/PreparedVariableResolverTestCase.spring.xml];
> nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 33
> in XML document from class path resource [META-INF/cocoon/spring/ObjectModelTemplate.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 'configurator:bean-map'.
> Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 33 in XML
> document from class path resource [META-INF/cocoon/spring/ObjectModelTemplate.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 'configurator:bean-map'.
> 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 'configurator:bean-map'.
>
>
> I'm not Spring insider and I have no clue what to do with this. Could someone help?
>
>