Announcement Announcement Module
Collapse
No announcement yet.
Error with <job> tag Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error with <job> tag

    Hi,

    I am getting following error in my SampleBatch.xml

    Code:
    cvc-complex-type.2.4.a: Invalid content was found starting with element 'job'. One of '{"http:// www.springframework.org/schema/beans":import, "http://www.springframework.org/schema/beans":alias, 
     "http://www.springframework.org/schema/beans":bean, WC[##other:"http://www.springframework.org/ schema/beans"]}' is expected.
    My xml is
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:batch="http://www.springframework.org/schema/batch" xmlns:aop="http://www.springframework.org/schema/aop"
    	xmlns:tx="http://www.springframework.org/schema/tx" xmlns:p="http://www.springframework.org/schema/p"
    	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.1.xsd
    		http://www.springframework.org/schema/batch 
    http://www.springframework.org/schema/batch/spring-batch-2.1.xsd
    		http://www.springframework.org/schema/aop 
    http://www.springframework.org/schema/aop/spring-aop-2.1.xsd
    		http://www.springframework.org/schema/tx 
    http://www.springframework.org/schema/tx/spring-tx-2.1.xsd">
    	<import resource="applicationContext.xml" />
    	<job id="sampleJob">
                .....
                steps
                ......
    	</job>
    Am i missing something here?

    Thanks
    Mahesh
    Last edited by MaheshRM; Apr 14th, 2010, 02:46 PM.

  • #2
    Oops... Its a mistake by me.

    Its resolved...


    Thanks guys...

    Comment


    • #3
      What was the mistake you made?

      Comment


      • #4
        I have this, seems to work fine:

        Code:
        <?xml version="1.0" encoding="UTF-8"?>
        <beans xmlns="http://www.springframework.org/schema/beans"
            xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
            xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:util="http://www.springframework.org/schema/util"
        	
            xsi:schemaLocation="
         http://www.springframework.org/schema/beans http://www.springframework.org/schem...-beans-2.0.xsd
         http://www.springframework.org/schema/aop http://www.springframework.org/schem...ng-aop-2.0.xsd
         http://www.springframework.org/schema/tx http://www.springframework.org/schem...ing-tx-2.0.xsd
         http://www.springframework.org/schema/util http://www.springframework.org/schem...g-util-2.0.xsd
         http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.0.xsd">
        and

        Code:
        job id="PST_request_details" xmlns="http://www.springframework.org/schema/batch"> <!-- NOTICE THE xmlns -->
            <step id="step1">
                <tasklet>
                    <chunk reader="reader" writer="writer" commit-interval="2"/>
                </tasklet>
            </step>
        </job>

        Comment

        Working...
        X