XML : cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element

I do see org.xml.sax.SAXParseException in my project, but I cannot tell why it occurs.

Error Message is like following:

  SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener  org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 17 in XML document from ServletContext resource [/conf/appcontext-datasource.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 17; columnNumber: 100; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'jee:jndi-lookup'.  at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)  at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)  at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)  at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)  at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)  at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)  at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)  at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)  at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)  at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)  at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)  at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)  at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5003)  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5517)  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)  at java.util.concurrent.FutureTask.run(FutureTask.java:266)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  at java.lang.Thread.run(Thread.java:745)  Caused by: org.xml.sax.SAXParseException; lineNumber: 17; columnNumber: 100; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'jee:jndi-lookup'.  at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)  at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)  at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:437)  at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)  at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:325)  at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:458)  at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3237)  at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1917)  at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:766)  at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:356)  at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)  at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)  at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)  at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)  at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)  at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)  at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)  at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)  at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:348)  at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)  at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)  ... 22 more    

Then this is the appcontext-datasource.xml that causes this problem

  <?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:jee="http://www.springframework.org/schema/jee"  xmlns:util="http://www.springframework.org/schema/util"  xsi:schemaLocation="      http://www.springframework.org/schema/jee       http://www.springframework.org/schema/jee/spring-jee-3.2.xsd      http://www.springframework.org/schema/beans       http://www.springframework.org/schema/beans/spring-beans-3.2.xsd              http://www.springframework.org/schema/util       http://www.springframework.org/schema/util/spring-util-3.2.xsd">    <jee:jndi-lookup id="dataSource" jndi-name="jdbc/iasDB" expected-type="javax.sql.DataSource" />    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">      <property name="dataSource" ref="dataSource"/>  </bean>    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">      <property name="dataSource" ref="dataSource" />      <property name="configLocation" value="/conf/sql/alias-context.xml"></property>  </bean>    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">      <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" />      <property name="basePackage" value="com.example.ias.dao" />  </bean>    

As you can see, I specified the schema location of jee, but all it could say is no declaration can be found.

FYI, this project worked perfectly fine until yesterday when I had decided to clean tomcat server for no reason.

Thank you for your help

No comments:

Post a Comment