Announcement Announcement Module
Collapse
No announcement yet.
Attribute 'abstract' is not allowed to appear in element 'step'. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Attribute 'abstract' is not allowed to appear in element 'step'.

    Hi,

    I am using spring batch 2.1.8 Release. I had a job with 1 step and everything was working fine till I created a new abstract step. Since then, I am getting the following error when I run the application in websphere:

    Code:
    Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'abstract' is not allowed to appear in element 'step'.
    	at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    	at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
    	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    	at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
    	at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
    	at org.apache.xerces.impl.xs.XMLSchemaValidator.processAttributes(Unknown Source)
    	at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
    	at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
    	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    	at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
    	... 75 more
    My job configuration:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans:beans	xmlns="http://www.springframework.org/schema/batch"
    				xmlns:beans="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-3.0.xsd
    					http://www.springframework.org/schema/batch 
    					http://www.springframework.org/schema/batch/spring-batch-2.1.xsd">
    		
    	<job id="order-job" job-repository="batchJobRepository">
    		<step id="abstractParentStep" abstract="true">
       			<listeners>
          			<listener ref="batchRecordListener"/>
    				<listener ref="batchStepListener"/>
    				<listener ref="batchSkipListener"/>
      			</listeners>
    			<skippable-exception-classes>
               		<include class="java.lang.Exception"/>
               		<exclude class="java.io.FileNotFoundException"/>
           		</skippable-exception-classes>
    		</step>		
    
    		<step id="prepareFileForProcessing" parent="abstractParentStep">
    			<tasklet>
    				<chunk reader="order-reader" writer="processingWriter" commit-interval="1" skip-limit="20">
    					<streams>
    						<stream ref="fileItemReader"/>
    						<stream ref="processingWriter"/>
    					</streams>
    				</chunk>
    			</tasklet>
    		</step>
    	</job>
    This is driving me insane. What is wrong?

  • #2
    are you sure you can define an abstract step inside a job? I think you should define such a step outside any job configuration.

    Comment


    • #3
      Ooops. Thanks Arno!!

      Comment

      Working...
      X