Hi everyone, I'm integrating the task namespace in my configuration, but the parser complain about the 'pool-size' attribute name of lt;task:scheduler /gt;...Code:
lt;task:scheduler id=quot;schedulerquot; pool-size=quot;5quot; /gt; gives error
lt;task:scheduler id=quot;schedulerquot; size=quot;5quot; /gt; ok
I'm validating against
schem...pring-task.xsd
and it clearly states that the attribute name should be called 'pool-size', but I keep on getting this errorCode:
cvc-complex-type.3.2.2: Attribute 'pool-size' is not allowed to appear in element 'task:scheduler'.
The code completition suggest me to call the attribute just 'size' (if I do, the error goes away).
Any hint?
Thanks.
Pool-size works for me. What version of Spring do you have in your classpath (check for duplicates)? And what does you schema declaration look like in the XML root element?
I'm working with Spring 3 RC2, and my XML looks like belowCode:
lt;?xml version=quot;1.0quot; encoding=quot;UTF-8quot;?gt;
lt;beans xmlns=quot;schema/beansquot; xmlns:context=quot;schema/contextquot; xmlns:tx=quot;schema/txquot; xmlns:task=quot;schema/taskquot; xmlns:xsi=quot;2001/XMLSchema-instancequot; xsi:schemaLocation=quot;schema/beans schema/beans/spring-beans.xsd schema/context schema/context/spring-context.xsd schema/tx schema/tx/spring-tx.xsd schema/task schema/task/spring-task.xsdquot;gt;
lt;bean id=quot;myTaskquot; class=quot;com.MyTaskquot; /gt; lt;task:scheduler id=quot;schedulerquot; pool-size=quot;5quot; /gt; lt;task:scheduled-tasks scheduler=quot;schedulerquot;gt; lt;task:scheduled ref=quot;myTaskquot; method=quot;aMethodquot; fixed-delay=quot;5000quot; /gt; lt;/task:scheduled-tasksgt;lt;/beansgt;Resolved after upgrade to the last version of Spring IDE (2.2.8). |