Announcement Announcement Module
No announcement yet.
Spring batch admin doesn't start with xsd validation disabled Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring batch admin doesn't start with xsd validation disabled

    I've embedded spring batch admin in my web application and disabled xsd validation in order to be able to configure some transaction properties (as per ).
    But disabling xsd validation it seems that some bean initialization suffers from missing default values: the application doesn't start complaining
    Caused by: java.lang.IllegalArgumentException: Invalid log level ''. The (case-insensitive) supported values are: FATAL,ERROR,WARN,INFO,DEBUG,TRACE
    at org.springframework.integration.handler.LoggingHan dler.<init>(
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(
    at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(
    at java.lang.reflect.Constructor.newInstance(Construc
    at org.springframework.beans.BeanUtils.instantiateCla ss(
    Steps to reproduce using the spring batch admin sample module:
    * modify the web.xml in order to use a custom class to load the application context from xml
    * build the app
    * deploy and run
    is a web.xml snippet needed to use a custom class to load the xml with no schema validation and
    package com.acme;
    import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
     * XML application context with no xsd validation.
     * @author Davide Cavestro
    public class NovalidationXmlWebApplicationContext extends XmlWebApplicationContext {
    	public NovalidationXmlWebApplicationContext () {
    		// no-op
    	protected void initBeanDefinitionReader(XmlBeanDefinitionReader beanDefinitionReader) {
    		beanDefinitionReader.setValidating (false);
    //the following settings bring to same result: IllegalArgumentException
    //		beanDefinitionReader.setValidationMode (XmlBeanDefinitionReader.VALIDATION_NONE);
    //		beanDefinitionReader.setNamespaceAware (true);
    is the class that disables xsd validation.

    What's wrong with my configuration?
    The main side effect is that my application cannot disable xsd validation and still embed spring batch admin.
    Last edited by d_cavestro; Jul 17th, 2012, 11:00 AM. Reason: Explained the main side effect