Results 1 to 4 of 4

Thread: Error with <job> tag

  1. #1
    Join Date
    Jun 2009
    Posts
    23

    Default 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 at 02:46 PM.

  2. #2
    Join Date
    Jun 2009
    Posts
    23

    Default

    Oops... Its a mistake by me.

    Its resolved...


    Thanks guys...

  3. #3
    Join Date
    Jun 2010
    Posts
    13

    Default

    What was the mistake you made?

  4. #4
    Join Date
    Jun 2010
    Posts
    13

    Default

    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>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •