You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Bart Molenkamp <b....@bizzdesign.nl> on 2007/01/25 16:38:33 UTC

Bug in cocoon-22-archetype-webapp? (was: applicationContext.xml not valid according to schema?)

Looking at the archetype, I see the configuration:


> -----Oorspronkelijk bericht-----
> Van: Bart Molenkamp
> Verzonden: donderdag 25 januari 2007 16:32
> Aan: dev@cocoon.apache.org
> Onderwerp: RE: applicationContext.xml not valid according to schema?
> 
> Thanks, I just found out myself while looking at the resources in the
> archetype...
> 
> Thanks!
> Bart.
> 
> > -----Oorspronkelijk bericht-----
> > Van: Leszek Gawron [mailto:lgawron@mobilebox.pl]
> > Verzonden: donderdag 25 januari 2007 16:29
> > Aan: dev@cocoon.apache.org
> > Onderwerp: Re: applicationContext.xml not valid according to schema?
> >
> > Bart Molenkamp wrote:
> > > Hi,
> > >
> > > I can't start Cocoon 2.2, because the file
> > > WEB-INF/applicationContext.xml isn't valid. I get the following
> > > exception:
> > >
> > >
> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
> > > Line 30 in XML document from ServletContext resource
> > > [/WEB-INF/applicationContext.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
> > > 'cocoon:settings'.
> > > 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
> > > 'cocoon:settings'.
> > >
> > > I really don't understand why this error occurs. The file is
created
> by
> > > cocoon's webapp archetype, and I was able to run my application
> before
> > > today. If I open the file in Eclipse (using WTP's XML editor, it
> also
> > > notices the errors).
> > >
> > > Does anybody have any clue (I'm using spring 2.0.2, cocoon
> > > 2.2.0-M3-SNAPSHOT)?
> >
> > The syntax you're using is outdated (I also have hard time to keep
up
> > lately). Your applicationContext.xml should state:
> >
> > > <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"
> > >        xmlns:avalon="http://cocoon.apache.org/schema/avalon"
> > >
> xsi:schemaLocation="http://www.springframework.org/schema/beans
> > http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> > >
> http://www.springframework.org/schema/util
> > http://www.springframework.org/schema/util/spring-util-2.0.xsd
> > >
> http://cocoon.apache.org/schema/configurator
> >
>
http://cocoon.apache.org/schema/configurator/cocoon-configurator-1.0.xsd
> > >                            http://cocoon.apache.org/schema/avalon
> > http://cocoon.apache.org/schema/avalon/cocoon-avalon-1.0.xsd">
> > >
> > >   <!-- Activate Cocoon Spring Configurator -->
> > >   <configurator:settings/>
> > >
> > >   <!-- Configure Log4j -->
> > >   <bean name="org.apache.cocoon.spring.configurator.log4j"
> > >
> >
class="org.apache.cocoon.spring.configurator.log4j.Log4JConfigurator"
> > >         scope="singleton">
> > >     <property name="settings"
> > ref="org.apache.cocoon.configuration.Settings"/>
> > >     <property name="resource" value="/WEB-INF/cocoon/log4j.xml"/>
> > >   </bean>
> > >
> > >   <!-- Activate Avalon Bridge -->
> > >   <avalon:bridge/>
> > >
> > > </beans>
> >
> >
> > no <cocoon:settings/> anymore...
> >
> > --
> > Leszek