You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Barbara Rosi-Schwartz <Ba...@iggroup.com> on 2011/08/26 12:28:47 UTC

Spring Configurator in an OSGi environment

Hello everyone.

I am wondering if anybody has any experience of using the Spring Configurator in an OSGi environment.

I am running an application under Eclipse Virgo (version 3.0.0.RELEASE) and I would like to use the Configurator for my multi-environment requirements. I have OSGi-ified the Configurator's jar and I have build a very simple test program to try it out and learn it.

Unfortunately, when my spring config file is read, I get the following exception:

This seems to indicate that the Configurator's schema file is not found. I have checked the structure of my Configurator OSGi bundle and it is exactly the same as the original jar, with all the schema files and the spring.schema and spring.handlers files where they are expected.

I have been in contact with the OSGi/Virgo guys to explore whether or not this is an OSGi issue, but so far with no success.

Does anybody have any experience or ideas to contribute?

TIA,
B.

BARBARA ROSI-SCHWARTZ
Senior Developer

IG Group|Cannon Bridge House
25 Dowgate Hill|London|EC4R ZYA

t: +44(0)20 7573 0208 (Direct)
t: +44(0)20 7896 0011 (Switchboard)
w: www.iggroup.com


________________________________
The information contained in this email is strictly confidential and for the use of the addressee only, unless otherwise indicated. If you are not the intended recipient, please do not read, copy, use or disclose to others this message or any attachment. Please also notify the sender by replying to this email or by telephone (+44 (0)20 7896 0011) and then delete the email and any copies of it. Opinions, conclusions (etc) that do not relate to the official business of this company shall be understood as neither given nor endorsed by it. IG Group Holdings plc is a company registered in England and Wales under number 01190902. VAT registration number 761 2978 07. Registered Office: Cannon Bridge House, 25 Dowgate Hill, London EC4R 2YA. Authorised and regulated by the Financial Services Authority. FSA Register number 114059.

RE: Spring Configurator in an OSGi environment

Posted by Barbara Rosi-Schwartz <Ba...@iggroup.com>.
Thanks Francesco.

My xml file contains exactly the header you posted (should have mentioned that in my original posting).

From: Francesco Chicchiriccò [mailto:ilgrosso@apache.org]
Sent: 26 August 2011 11:37
To: users@cocoon.apache.org
Subject: Re: Spring Configurator in an OSGi environment

On 26/08/2011 12:31, Barbara Rosi-Schwartz wrote:
Ooops, sorry, I forgot to paste the exception in. Here it 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'.

It seems that one of your Spring XML files is not containing the needed declarations for the configuration namespace; such file should have an header like as the following:

<beans xmlns="http://www.springframework.org/schema/beans"<http://www.springframework.org/schema/beans>
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<http://www.w3.org/2001/XMLSchema-instance>
       xmlns:util="http://www.springframework.org/schema/util"<http://www.springframework.org/schema/util>
       xmlns:configurator="http://cocoon.apache.org/schema/configurator"<http://cocoon.apache.org/schema/configurator>
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans.xsd
                           http://www.springframework.org/schema/util
                           http://www.springframework.org/schema/util/spring-util.xsd
                           http://cocoon.apache.org/schema/configurator
                           http://cocoon.apache.org/schema/configurator/cocoon-configurator-1.0.1.xsd">

Regards.


Thanks again
From: Barbara Rosi-Schwartz [mailto:Barbara.Rosi-Schwartz@iggroup.com]
Sent: 26 August 2011 11:29
To: users@cocoon.apache.org<ma...@cocoon.apache.org>
Subject: Spring Configurator in an OSGi environment

Hello everyone.

I am wondering if anybody has any experience of using the Spring Configurator in an OSGi environment.

I am running an application under Eclipse Virgo (version 3.0.0.RELEASE) and I would like to use the Configurator for my multi-environment requirements. I have OSGi-ified the Configurator's jar and I have build a very simple test program to try it out and learn it.

Unfortunately, when my spring config file is read, I get the following exception:

This seems to indicate that the Configurator's schema file is not found. I have checked the structure of my Configurator OSGi bundle and it is exactly the same as the original jar, with all the schema files and the spring.schema and spring.handlers files where they are expected.

I have been in contact with the OSGi/Virgo guys to explore whether or not this is an OSGi issue, but so far with no success.

Does anybody have any experience or ideas to contribute?

TIA,
B.

--

Francesco Chicchiriccò



Apache Cocoon Committer and PMC Member

http://people.apache.org/~ilgrosso/

________________________________
The information contained in this email is strictly confidential and for the use of the addressee only, unless otherwise indicated. If you are not the intended recipient, please do not read, copy, use or disclose to others this message or any attachment. Please also notify the sender by replying to this email or by telephone (+44 (0)20 7896 0011) and then delete the email and any copies of it. Opinions, conclusions (etc) that do not relate to the official business of this company shall be understood as neither given nor endorsed by it. IG Group Holdings plc is a company registered in England and Wales under number 01190902. VAT registration number 761 2978 07. Registered Office: Cannon Bridge House, 25 Dowgate Hill, London EC4R 2YA. Authorised and regulated by the Financial Services Authority. FSA Register number 114059.

Re: Spring Configurator in an OSGi environment

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 26/08/2011 12:31, Barbara Rosi-Schwartz wrote:
>
> Ooops, sorry, I forgot to paste the exception in. Here it 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'.
>

It seems that one of your Spring XML files is not containing the needed 
declarations for the configuration namespace; such file should have an 
header like as the following:

<beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:util="http://www.springframework.org/schema/util"
        xmlns:configurator="http://cocoon.apache.org/schema/configurator"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
                            
http://www.springframework.org/schema/beans/spring-beans.xsd
                            http://www.springframework.org/schema/util
                            
http://www.springframework.org/schema/util/spring-util.xsd
                            http://cocoon.apache.org/schema/configurator
                            
http://cocoon.apache.org/schema/configurator/cocoon-configurator-1.0.1.xsd">

Regards.

> Thanks again
>
> *From:*Barbara Rosi-Schwartz [mailto:Barbara.Rosi-Schwartz@iggroup.com]
> *Sent:* 26 August 2011 11:29
> *To:* users@cocoon.apache.org
> *Subject:* Spring Configurator in an OSGi environment
>
> Hello everyone.
>
> I am wondering if anybody has any experience of using the Spring 
> Configurator in an OSGi environment.
>
> I am running an application under Eclipse Virgo (version 
> 3.0.0.RELEASE) and I would like to use the Configurator for my 
> multi-environment requirements. I have OSGi-ified the Configurator's 
> jar and I have build a very simple test program to try it out and 
> learn it.
>
> Unfortunately, when my spring config file is read, I get the following 
> exception:
>
> This seems to indicate that the Configurator's schema file is not 
> found. I have checked the structure of my Configurator OSGi bundle and 
> it is exactly the same as the original jar, with all the schema files 
> and the spring.schema and spring.handlers files where they are expected.
>
> I have been in contact with the OSGi/Virgo guys to explore whether or 
> not this is an OSGi issue, but so far with no success.
>
> Does anybody have any experience or ideas to contribute?
>
> TIA,
>
> B.
>
-- 
Francesco Chicchiriccò

Apache Cocoon Committer and PMC Member
http://people.apache.org/~ilgrosso/


RE: Spring Configurator in an OSGi environment

Posted by Barbara Rosi-Schwartz <Ba...@iggroup.com>.
Ooops, sorry, I forgot to paste the exception in. Here it 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'.
      at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
      at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
      at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
      at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
      at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:417)
      at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3182)
      at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1927)
      at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:725)
      at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
      at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
      at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:235)
      at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
      at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
      ... 21 common frames omitted

Thanks again
From: Barbara Rosi-Schwartz [mailto:Barbara.Rosi-Schwartz@iggroup.com]
Sent: 26 August 2011 11:29
To: users@cocoon.apache.org
Subject: Spring Configurator in an OSGi environment

Hello everyone.

I am wondering if anybody has any experience of using the Spring Configurator in an OSGi environment.

I am running an application under Eclipse Virgo (version 3.0.0.RELEASE) and I would like to use the Configurator for my multi-environment requirements. I have OSGi-ified the Configurator's jar and I have build a very simple test program to try it out and learn it.

Unfortunately, when my spring config file is read, I get the following exception:

This seems to indicate that the Configurator's schema file is not found. I have checked the structure of my Configurator OSGi bundle and it is exactly the same as the original jar, with all the schema files and the spring.schema and spring.handlers files where they are expected.

I have been in contact with the OSGi/Virgo guys to explore whether or not this is an OSGi issue, but so far with no success.

Does anybody have any experience or ideas to contribute?

TIA,
B.

BARBARA ROSI-SCHWARTZ
Senior Developer

IG Group|Cannon Bridge House
25 Dowgate Hill|London|EC4R ZYA

t: +44(0)20 7573 0208 (Direct)
t: +44(0)20 7896 0011 (Switchboard)
w: www.iggroup.com


________________________________
The information contained in this email is strictly confidential and for the use of the addressee only, unless otherwise indicated. If you are not the intended recipient, please do not read, copy, use or disclose to others this message or any attachment. Please also notify the sender by replying to this email or by telephone (+44 (0)20 7896 0011) and then delete the email and any copies of it. Opinions, conclusions (etc) that do not relate to the official business of this company shall be understood as neither given nor endorsed by it. IG Group Holdings plc is a company registered in England and Wales under number 01190902. VAT registration number 761 2978 07. Registered Office: Cannon Bridge House, 25 Dowgate Hill, London EC4R 2YA. Authorised and regulated by the Financial Services Authority. FSA Register number 114059.