Spring model validation failing in 8.1.3

Hi,

Since I upgraded from 8.1.2 to 8.1.3 I'm unable to rebuild my grails project without errors. The errors occur during the "Validate Spring Model" step of the build and produce the following errors when validating the generated file:

C:\dev\apps\rivendell-grails-1.1.1\web-app\WEB-INF\applicationContext.xml
    Error:Error:line (37)Cannot find matching files
    Error:Error:line (9)Cannot resolve file 'grails.xml'
    Error:Error:line (37)Cannot resolve directory 'grails-app'

I've appended the content of this file to the end of my message. I can't say for sure that the problem was caused by the upgrade to 8.1.3, because I hadn't built the project for a while before upgrading. Presumably I could use the "Exclude from Compile" option on this file to workaround the problem, but I'd like to know if there's another solution, or something wrong with my project setup?

Cheers,
Don


<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">

    <bean id="grailsApplication" >
        <description>Grails application factory bean</description>
        <property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
        <property name="grailsResourceLoader" ref="grailsResourceLoader" />
    </bean>

    <bean id="pluginManager" >
        <description>A bean that manages Grails plugins</description>
        <property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
        <property name="application" ref="grailsApplication" />
    </bean>

    <bean id="pluginMetaManager" >
        <property name="grailsApplication" ref="grailsApplication" />
        <property name="resourcePattern" value="/WEB-INF/plugins/*/plugin.xml" />
    </bean>

    <bean id="grailsConfigurator" >
        <constructor-arg>
            <ref bean="grailsApplication" />
        </constructor-arg>
        <property name="pluginManager" ref="pluginManager" />
    </bean>

    <bean id="grailsResourceLoader" >
        <property name="grailsResourceHolder" ref="grailsResourceHolder" />
    </bean>

    <bean id="grailsResourceHolder" scope="prototype" >
        <property name="resources">
              <value>classpath*:**/grails-app/**/*.groovy</value>
        </property>
    </bean>   
   
   <bean id="characterEncodingFilter"
      >
        <property name="encoding">
          <value>utf-8</value>
        </property>
   </bean>       
</beans>

1 comment
Comment actions Permalink

As a quick fix, please go to Compiler|Validation settings and disable
Spring validation there. The fix will be included in next 8.1.x releases
and 9.0 EAPs. Thank you!

0

Please sign in to leave a comment.