xml - Spring 3.1 : Cannot find the declaration of element 'beans' -
here's applicationcontext.xml:
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:util="http://www.springframework.org/schema/util" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemalocation="http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd"> <bean name="documenttrashcleanerjob" class="org.springframework.scheduling.quartz.jobdetailbean"> <property name="jobclass" value="com.ye.cron.job.documenttrashcleanerjob" /> </bean> <!-- add cron job execution --> <bean id="crontrigger" class="org.springframework.scheduling.quartz.crontriggerbean"> <property name="jobdetail" ref="documenttrashcleanerjob" /><!-- run every night @ 00 --> <property name="cronexpression" value="0 0/5 * * * ?" /> </bean> <!-- registering in scheduler --> <bean class="org.springframework.scheduling.quartz.schedulerfactorybean"> <property name="triggers"> <list> <ref bean="crontrigger" /> </list> </property> </bean>
i don't know why, error ocurring in output (it wasn't occurring, don't know i'm missing...)
caused by: java.io.ioexception: server returned http response code: 403 url: http://www.springframework.org/schema/beans/spring-beans-3.0.xsd @ sun.net.www.protocol.http.httpurlconnection.getinputstream(httpurlconnection.java:1625) @ com.sun.org.apache.xerces.internal.impl.xmlentitymanager.setupcurrententity(xmlentitymanager.java:633) @ com.sun.org.apache.xerces.internal.impl.xmlversiondetector.determinedocversion(xmlversiondetector.java:189) @ com.sun.org.apache.xerces.internal.impl.xs.opti.schemaparsingconfig.parse(schemaparsingconfig.java:582) @ com.sun.org.apache.xerces.internal.impl.xs.opti.schemaparsingconfig.parse(schemaparsingconfig.java:685) @ com.sun.org.apache.xerces.internal.impl.xs.opti.schemadomparser.parse(schemadomparser.java:530) @ com.sun.org.apache.xerces.internal.impl.xs.traversers.xsdhandler.getschemadocument(xsdhandler.java:2155) ... 38 more org.springframework.beans.factory.xml.xmlbeandefinitionstoreexception: line 7 in xml document class path resource [applicationcontext-default-cron.xml] invalid; nested exception org.xml.sax.saxparseexception; linenumber: 7; columnnumber: 225; cvc-elt.1: cannot find declaration of element 'beans'. @ org.springframework.beans.factory.xml.xmlbeandefinitionreader.doloadbeandefinitions(xmlbeandefinitionreader.java:396) @ org.springframework.beans.factory.xml.xmlbeandefinitionreader.loadbeandefinitions(xmlbeandefinitionreader.java:334) @ org.springframework.beans.factory.xml.xmlbeandefinitionreader.loadbeandefinitions(xmlbeandefinitionreader.java:302) @ com.ye.web.appserver.listeners.startupserverlistener.loadplugins(startupserverlistener.java:75) @ com.ye.web.appserver.listeners.startupserverlistener.contextinitialized(startupserverlistener.java:34) @ org.apache.catalina.core.standardcontext.listenerstart(standardcontext.java:4205) @ org.apache.catalina.core.standardcontext.start(standardcontext.java:4704) @ org.apache.catalina.core.containerbase.start(containerbase.java:1053) @ org.apache.catalina.core.standardhost.start(standardhost.java:840) @ org.apache.catalina.core.containerbase.start(containerbase.java:1053) @ org.apache.catalina.core.standardengine.start(standardengine.java:463) @ org.apache.catalina.core.standardservice.start(standardservice.java:525) @ org.apache.catalina.core.standardserver.start(standardserver.java:754) @ org.apache.catalina.startup.catalina.start(catalina.java:595) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:601) @ org.apache.catalina.startup.bootstrap.start(bootstrap.java:289) @ org.apache.catalina.startup.bootstrap.main(bootstrap.java:414) caused by: org.xml.sax.saxparseexception; linenumber: 7; columnnumber: 225; cvc-elt.1: cannot find declaration of element 'beans'. @ com.sun.org.apache.xerces.internal.util.errorhandlerwrapper.createsaxparseexception(errorhandlerwrapper.java:198)
could tell me i'm doing wrong?
as said in comments on question :
the beans
tag not closed in applicationcontext.xml
.
just add </beans>
@ end of file , should work.
Comments
Post a Comment