Announcement Announcement Module
Collapse
No announcement yet.
GAE + Spring 3.x + JSR 303 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • GAE + Spring 3.x + JSR 303

    I have run into problems using Spring 3 running on my development server under an eclipse App Engine project. It appears to me the problem lies with the configuration file and in particular the
    Code:
    <mvc:annotation-driven />
    tag. Without this tag everything was running fine.

    So because I'm not very familiar with Spring I am just trying to narrow down where the problem is occurring, whether it is Spring, GAE or maybe I am missing a jar. Has anybody got this working, is there a work-around for app engine?

    The exception is being thrown on the start of the development server in debug mode.

    Code:
    SEVERE: Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.validation.beanvalidation.LocalValidatorFactoryBean#0': Invocation of init method failed; nested exception is javax.validation.ValidationException: Unable to find a default provider
    I have found a similar issue for Spring 2.5.x but doesn't apply if you don't subclass SimpleFormController. I have also noticed that Spring 3.x is conspicuously absent from Will it play in app engine?.

    Thanks for any pointers

  • #2
    Bumping

    This is my complete spring-servlet.xml

    Code:
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xmlns:context="http://www.springframework.org/schema/context"
    	xmlns:mvc="http://www.springframework.org/schema/mvc"
    	xsi:schemaLocation="
    
    		http://www.springframework.org/schema/beans	http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    
    		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
    
    		http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"> 
    
    	<mvc:annotation-driven /> 
    
    	<context:component-scan base-package="com.example.controller" /> 
     
    	<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> 
    		<property name="suffix" value=".jsp"/> 
    	</bean> 
    </beans>

    Comment


    • #3
      If you are using Maven, you must add a dependency to the Hibernate Validator Annotation Processor.

      Code:
          <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator-annotation-processor</artifactId>
            <version>4.1.0.Final</version>
          </dependency>
      You can find it in the JBoss repository :

      Code:
          <repository>
            <id>JBoss Repository</id>
            <url>https://repository.jboss.org/nexus/content/repositories/releases</url>
            <name>JBoss Repository</name>
          </repository>

      Comment

      Working...
      X