pb with applicationContext.xml

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

pb with applicationContext.xml

Dierk König
FW: 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>