Results 1 to 3 of 3

Thread: IllegalStateException: No Scope registered for scope 'job'

  1. #1
    Join Date
    Feb 2006
    Location
    Paris
    Posts
    35

    Default IllegalStateException: No Scope registered for scope 'job'

    Hello,

    I have an error with my spring configuration at startup
    when i have one applicationContext.xml that use spring Batch
    Code:
    	<context-param>
    		<param-name>contextConfigLocation</param-name>
    		<param-value>classpath:applicationContext.xml</param-value>
    	</context-param>
    with a job
    Code:
    	<job id="myJob">
    		<listeners>
    			<listener>
    				<beans:bean
    					class="xxx.listener.LogInfoJobListener"
    					scope="job">
    				</beans:bean>
    			</listener>
    		</listeners>
    		<step id="myJobStep1">
    			<tasklet>
    				...
    			</tasklet>
    		</step>
    	</job>
    It works well
    but if i added a second applicationContext-ws.xml (that used CXF - but even empty)
    Code:
    	<context-param>
    		<param-name>contextConfigLocation</param-name>
    		<param-value>classpath:applicationContext.xml,classpath:applicationContext-ws.xml</param-value>
    	</context-param>
    I get at startup
    Caused by: java.lang.IllegalStateException: No Scope registered for scope 'job'

    Have you an idea ?
    Thanks

  2. #2
    Join Date
    May 2012
    Posts
    1

    Default

    Hi there. Not sure if this could help solve your problem, but in your second context config location, you have a comma separating your xml files. Try removing that comma and bring the second xml file down a line. See if you get the same error.

  3. #3
    Join Date
    Feb 2006
    Location
    Paris
    Posts
    35

    Default

    Hello,

    I try this solution, but it changes nothing.
    I think the scope "job" does'nt exist in spring batch documentation.
    So maybe if i just remove it, it works and it seems to have no other effect.
    Do you confirm ?

Posting Permissions

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