Skip to content

TaskExecutor not initialized in task namespace [SPR-6444] #11110

@spring-projects-issues

Description

@spring-projects-issues

Dave Syer opened SPR-6444 and commented

TaskExecutor not initialized in task namespace. Adding this to the ExecutorBeanDefinitionPasrserTests:

FutureTask<String> task = new FutureTask<String>(new Callable<String>() {
     public String call() throws Exception {
          return "foo";
     }
});
((ThreadPoolTaskExecutor)executor).execute(task);
assertEquals("foo", task.get());

results in

java.lang.IllegalStateException: ThreadPoolTaskExecutor not initialized
	at org.springframework.util.Assert.state(Assert.java:384)
	at org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor.getThreadPoolExecutor(ThreadPoolTaskExecutor.java:217)
	at org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor.execute(ThreadPoolTaskExecutor.java:239)
	at org.springframework.scheduling.config.ExecutorBeanDefinitionParserTests.defaultExecutor(ExecutorBeanDefinitionParserTests.java:61)
...

Affects: 3.0 RC2

Referenced from: commits e101611

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions