pb with applicationContext.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

pb with applicationContext.xml

König Dierk (KBRD 11)
pb with applicationContext.xml

Hi,

I copied a working Grails installation to a second machine (both WinXP).

While the original works fine, I get the error below when trying to generate a view or controller
on the second machine.
I also attach the \web-app\WEB-INF\applicationContext.xml, which seems to be correct.

Any idea?
Mittie

     [java] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grailsApplication' d

efined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.Ill

egalStateException: Groovy files are not defined!
     [java] java.lang.IllegalStateException: Groovy files are not defined!
     [java]     at org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean.afterPropertiesSet(GrailsApplicationF

actoryBean.java:43)
     [java]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(Abstra

ctAutowireCapableBeanFactory.java:1059)
     [java]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutow

ireCapableBeanFactory.java:363)
     [java]     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
     [java]     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
     [java]     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(Default

ListableBeanFactory.java:269)
     [java]     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.jav

a:320)
     [java]     at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationCont

ext.java:87)
     [java]     at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationCont

ext.java:72)
     [java]     at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationCont

ext.java:63)
     [java]     at grails.util.GenerateUtils.main(GenerateUtils.java:51)

----
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>
        <import resource="spring/resources.xml"/>
        <bean id="grailsApplication" class="org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean">
                <description>Grails application factory bean</description>
                <property name="groovyFiles">
                        <value>**/*.groovy</value>
                </property>
        </bean>

    <bean id="grailsResourceHolder" singleton="false" class="org.codehaus.groovy.grails.commons.spring.GrailsResourceHolder">

        <property name="resources">
              <value>**/*.groovy</value>
        </property>
    </bean>

   <bean id="characterEncodingFilter"
      class="org.springframework.web.filter.CharacterEncodingFilter">
        <property name="encoding">
          <value>utf-8</value>
        </property>
   </bean>     
</beans>

Reply | Threaded
Open this post in threaded view
|

Re: pb with applicationContext.xml

graemer
This error occurs when it can't find any groovy files on the path, is
there anything different about the 2 machines in terms of where you
placed the app?

Graeme

On 3/15/06, König Dierk (KBRD 11) <[hidden email]> wrote:

>
>
> Hi,
>
> I copied a working Grails installation to a second machine (both WinXP).
>
> While the original works fine, I get the error below when trying to generate
> a view or controller
> on the second machine.
> I also attach the \web-app\WEB-INF\applicationContext.xml,
> which seems to be correct.
>
> Any idea?
> Mittie
>
>      [java]
> org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'grailsApplication' d
>
> efined in class path resource [applicationContext.xml]: Initialization of
> bean failed; nested exception is java.lang.Ill
>
> egalStateException: Groovy files are not defined!
>      [java] java.lang.IllegalStateException: Groovy files are not defined!
>      [java]     at
> org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean.afterPropertiesSet(GrailsApplicationF
>
> actoryBean.java:43)
>      [java]     at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(Abstra
>
> ctAutowireCapableBeanFactory.java:1059)
>      [java]     at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutow
>
> ireCapableBeanFactory.java:363)
>      [java]     at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
>      [java]     at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
>      [java]     at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(Default
>
> ListableBeanFactory.java:269)
>      [java]     at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.jav
>
> a:320)
>      [java]     at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationCont
>
> ext.java:87)
>      [java]     at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationCont
>
> ext.java:72)
>      [java]     at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationCont
>
> ext.java:63)
>      [java]     at grails.util.GenerateUtils.main(GenerateUtils.java:51)
>
> ----
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
> "http://www.springframework.org/dtd/spring-beans.dtd">
>
> <beans>
>         <import resource="spring/resources.xml"/>
>         <bean id="grailsApplication"
> class="org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean">
>                 <description>Grails application factory bean</description>
>                 <property name="groovyFiles">
>                         <value>**/*.groovy</value>
>                 </property>
>         </bean>
>
>     <bean id="grailsResourceHolder" singleton="false"
> class="org.codehaus.groovy.grails.commons.spring.GrailsResourceHolder">
>
>         <property name="resources">
>               <value>**/*.groovy</value>
>         </property>
>     </bean>
>
>    <bean id="characterEncodingFilter"
>
> class="org.springframework.web.filter.CharacterEncodingFilter">
>         <property name="encoding">
>           <value>utf-8</value>
>         </property>
>    </bean>
> </beans>
Reply | Threaded
Open this post in threaded view
|

RE: pb with applicationContext.xml

Dierk König
All paths are different.

I'll double-check the paths tomorrow.

You know, I try to set up my next cool Grails project at a clients side ;-)

For that project, I'll need to access the db
a) from the webapp and
b) from a second process that runs in parallel

expect more questions ;-)

cheers
Mittie

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]On Behalf
> Of Graeme Rocher
> Sent: Mittwoch, 15. März 2006 21:43
> To: [hidden email]
> Subject: Re: [grails-dev] pb with applicationContext.xml
>
>
> This error occurs when it can't find any groovy files on the path, is
> there anything different about the 2 machines in terms of where you
> placed the app?
>
> Graeme
>
> On 3/15/06, König Dierk (KBRD 11) <[hidden email]> wrote:
> >
> >
> > Hi,
> >
> > I copied a working Grails installation to a second machine (both WinXP).
> >
> > While the original works fine, I get the error below when
> trying to generate
> > a view or controller
> > on the second machine.
> > I also attach the \web-app\WEB-INF\applicationContext.xml,
> > which seems to be correct.
> >
> > Any idea?
> > Mittie
> >
> >      [java]
> > org.springframework.beans.factory.BeanCreationException:
> > Error creating bean with name 'grailsApplication' d
> >
> > efined in class path resource [applicationContext.xml]:
> Initialization of
> > bean failed; nested exception is java.lang.Ill
> >
> > egalStateException: Groovy files are not defined!
> >      [java] java.lang.IllegalStateException: Groovy files are
> not defined!
> >      [java]     at
> >
> org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean.af
> terPropertiesSet(GrailsApplicationF
> >
> > actoryBean.java:43)
> >      [java]     at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableB
> eanFactory.invokeInitMethods(Abstra
> >
> > ctAutowireCapableBeanFactory.java:1059)
> >      [java]     at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableB
> eanFactory.createBean(AbstractAutow
> >
> > ireCapableBeanFactory.java:363)
> >      [java]     at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory.getB
> ean(AbstractBeanFactory.java:226)
> >      [java]     at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory.getB
> ean(AbstractBeanFactory.java:147)
> >      [java]     at
> >
> org.springframework.beans.factory.support.DefaultListableBeanFacto
> ry.preInstantiateSingletons(Default
> >
> > ListableBeanFactory.java:269)
> >      [java]     at
> >
> org.springframework.context.support.AbstractApplicationContext.ref
> resh(AbstractApplicationContext.jav
> >
> > a:320)
> >      [java]     at
> >
> org.springframework.context.support.ClassPathXmlApplicationContext
> .<init>(ClassPathXmlApplicationCont
> >
> > ext.java:87)
> >      [java]     at
> >
> org.springframework.context.support.ClassPathXmlApplicationContext
> .<init>(ClassPathXmlApplicationCont
> >
> > ext.java:72)
> >      [java]     at
> >
> org.springframework.context.support.ClassPathXmlApplicationContext
> .<init>(ClassPathXmlApplicationCont
> >
> > ext.java:63)
> >      [java]     at grails.util.GenerateUtils.main(GenerateUtils.java:51)
> >
> > ----
> > <?xml version="1.0" encoding="UTF-8"?>
> > <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
> > "http://www.springframework.org/dtd/spring-beans.dtd">
> >
> > <beans>
> >         <import resource="spring/resources.xml"/>
> >         <bean id="grailsApplication"
> > class="org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean">
> >                 <description>Grails application factory
> bean</description>
> >                 <property name="groovyFiles">
> >                         <value>**/*.groovy</value>
> >                 </property>
> >         </bean>
> >
> >     <bean id="grailsResourceHolder" singleton="false"
> > class="org.codehaus.groovy.grails.commons.spring.GrailsResourceHolder">
> >
> >         <property name="resources">
> >               <value>**/*.groovy</value>
> >         </property>
> >     </bean>
> >
> >    <bean id="characterEncodingFilter"
> >
> > class="org.springframework.web.filter.CharacterEncodingFilter">
> >         <property name="encoding">
> >           <value>utf-8</value>
> >         </property>
> >    </bean>
> > </beans>