Custom XML schema definition not found [message #718796] |
Thu, 25 August 2011 07:26  |
Eclipse User |
|
|
|
Hello everybody.
I am trying to use the Cocoon Spring Configurator for a simple test Virgo project but I am running against a problem when I deploy the app to Virgo. The exception that gets thrown is the following:
[2011-08-25 12:19:07.118] region-dm-14 <AG0000E> Application context creation failure for bundle 'test' version '0.0.1.SNAPSHOT'. org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 11 in XML document from URL [bundleentry://108.fwk435865682/META-INF/spring/test-ontext.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:settings'.
The configurator:settings element is defined in the custom schema that is provided by the Cocoon Spring Configurator, on which my app depends.
As the Cocoon Spring Configurator is not available in OSGi version, I have had to OSGi-ify it, and I have explored the reconstituted jar with great attention and everything seems to be there, including the META-INF/spring.handlers and META-INF/spring.schemas files that, I believe, Spring DM requires.
Any idea what the cause might be?
|
|
|
|
|
|
|
Re: Custom XML schema definition not found [message #718816 is a reply to message #718807] |
Thu, 25 August 2011 08:31   |
Eclipse User |
|
|
|
Hmmm...
Looking once again at the generated MANIFEST.MF for the OSGi-ified Configurator bundle, I have:
Build-Jdk: 1.6.0_24
Built-By: rosib
Bundle-Description: This OSGi bundle simply wraps cocoon-spring-configur
ator-2.1.0.jar artifact.
Bundle-DocURL: http://www.iggroup.com
Bundle-ManifestVersion: 2
Bundle-Name: ig-osgi-cocoon-spring-configurator
Bundle-SymbolicName: org.apache.cocoon.ig-osgi-cocoon-spring-configurato
r
Bundle-Vendor: IG Index
Bundle-Version: 2.1.0.SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Embed-Directory: org/apache/cocoon/spring/configurator/schema
Export-Package: org.apache.cocoon.spring.configurator;uses:="org.apache.
commons.logging,javax.servlet,org.apache.cocoon.spring.configurator.imp
l";version="2.1.0.SNAPSHOT",org.apache.cocoon.spring.configurator.impl;
uses:="org.apache.commons.logging,org.apache.cocoon.configuration,org.w
3c.dom,javax.servlet,org.apache.cocoon.spring.configurator";version="2.
1.0.SNAPSHOT"
Ignore-Package: org.springframework.beans.factory.support,org.springfram
ework.web.context.request,org.springframework.util,org.springframework.
beans,org.springframework.core.io,org.springframework.beans.factory.xml
,org.springframework.context,org.springframework.beans.factory.config,o
rg.springframework.core.io.support,org.springframework.web.context,org.
springframework.web.context.support,org.springframework.beans.factory
Import-Package: javax.servlet;version="[2.5,3)",org.apache.cocoon.config
uration,org.apache.commons.logging;version="[1.1,2)",org.apache.log4j;v
ersion="[1.2,2)",org.apache.log4j.spi;version="[1.2,2)",org.apache.log4
j.xml;version="[1.2,2)",org.w3c.dom;version="[1.3,2)"
Tool: Bnd-1.43.0
(yes, I generated the bundle with the, dare I say it, Felix's maven-bundle-plugin... I was having problems with Bundlor and was in a hurry)
I am a bit worried about the line
Embed-Directory: org/apache/cocoon/spring/configurator/schema
Is that kosher?
|
|
|
|
|
|
|
|
|
Re: Custom XML schema definition not found [message #719294 is a reply to message #719219] |
Fri, 26 August 2011 11:55  |
Eclipse User |
|
|
|
Joel Rosi-Schwartz wrote on Fri, 26 August 2011 13:54A couple of questions on this
1. Should it be possible to do what Cocoon is attempting, i.e. providing a custom Spring schema, in a OSGi/Virgo environment? Or is the approach fundamentally flawed?
2. If it is not flawed how would you suggest analysing the problem. Are there logging options that will reveal what Spring DM configuration is doing during the parsing of bundles. Specifically I would be interested in looking at the mechanism that is picking up the custom schema.
3. If all else fails what are the other options for achieving runtime differentiation by environment. I know this can be achieved using Maven profiles, but that is at compile time. Barbara's goal is to use multiple config dirs to have environments launched from within single installation of Virgo. This means a more dynamic approach is called for.
Btw, I know that we can fall back to PropertyPlaceholderConfigurer on a bundle by bundle basis, but I am concerned that will tend to increase that maintenance overhead and lead to obscure bugs if the same variable is required in two or more bundles.
Thanks,
Joel
Custom namespaces should work in Virgo. I *think* I've heard of people using them successfully.
You may like to ask about this problem on the Gemini forum as I don't know or remember what Spring DM logging is relevant here.
|
|
|
Powered by
FUDForum. Page generated in 0.05433 seconds