Announcement Announcement Module
Collapse
No announcement yet.
task:scheduled-tasks - no declaration can be found for element Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • task:scheduled-tasks - no declaration can be found for element

    The complete error message is:
    org.springframework.beans.factory.xml.XmlBeanDefin itionStoreException xml file is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'task:scheduled-tasks'
    When running the app there is a pause of about 20-30 seconds which I am wondering if it is trying to discover the schema delcarations; I am behind a user auth proxy

    I get the this error when I try to run the spring application from the command line, when I am in Eclipse or RAD 7.5 the application works fine. When I remove the task:scheduled-tasks the application works in command line as well

    Any ideas would be much appreciated, see below for the xml config file

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xmlns:task="http://www.springframework.org/schema/task"
    	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    		http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd">
    
    <!-- 
    The pattern is a list of six single space-separated fields: representing 
    second, minute, hour, day, month, weekday. Month and weekday names can be given as the first three letters of the English names. 
    
    Example patterns: 
    "0 0 * * * *" = the top of every hour of every day.
    "*/10 * * * * *" = every ten seconds.
    "0 0 8-10 * * *" = 8, 9 and 10 o'clock of every day.
    "0 0/30 8-10 * * *" = 8:00, 8:30, 9:00, 9:30 and 10 o'clock every day.
    "0 0 9-17 * * MON-FRI" = on the hour nine-to-five weekdays
    "0 0 0 25 12 ?" = every Christmas Day at midnight
    
     -->
    <task:scheduled-tasks>
    	<task:scheduled ref="ftpRunner" method="run" cron="*/30 * * * * *"/>
    </task:scheduled-tasks>
    
    	<bean id="ftpConnection" name="ftpConnection"
    		class="uk.org.ppa.dispatcher.process.beans.FTPConnection">
    		<property name="host" value="ehicbuild1.ppa.nhs.uk"/>
    		<property name="username" value="ftptest"/>
    		<property name="password" value="ftptest1"/>
    	</bean>
    	
    	<bean id="ftpData" name="ftpData"
    		class="uk.org.ppa.dispatcher.process.beans.FTPData">
    		<property name="source" value="c:/testout/"/> 
    		<property name="destination" value="ftpclienttest/dispatcher/"/>
    		<property name="action" value="WRITE"/>
    		<property name="fileFilter" value=".+"/>
    		<property name="fileType" value="BINARY"/>
    		<property name="keepSource" value="true"/>
    		<property name="createFolder" value="true"/>
    	</bean>
    
    	<bean id="ftpRunner" name="ftpRunner"
    		class="uk.org.ppa.dispatcherapplications.FTPRunner" init-method="init">
    		<property name="scheduled" value="true"></property>
    		<property name="ftpConnection" ref="ftpConnection"></property>
    		<property name="ftpData" ref="ftpData"></property>
    	</bean>
    
    </beans>

  • #2
    Turned out to be a similar problem to a one I've had before; the artifact was built using the maven assembly plugin, which maybe the problem, once I conolidated the spring.schemas and spring.handlers from the spring distro jars and placed them into a src/main/resources folder everything wokred fine

    Comment

    Working...
    X