2012-06-08 19 views
7

Así que estoy teniendo un problema similar al aquí ...Spring 3 El wildcard es estricta, pero ninguna declaración se puede encontrar para el elemento 'Jee: jndi-lookup'

Spring 3.0 Error: The matching wildcard is strict, but no declaration can be found for element

mi aspecto pom como esto

<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop" 
xmlns:p="http://www.springframework.org/schema/p" xmlns:mvc="http://www.springframework.org/schema/mvc" 
xmlns:tx="http://www.springframework.org/schema/tx" 
xmlns:jee="http://www.springframework.org/schema/jee" 
xsi:schemaLocation="http://www.springframework.org/schema/beans 
     http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
     http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-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/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd 
     http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd 
     http://www.springframework.org/schema/jee/spring-jee-2.5.xsd"> 
... 
<jee:jndi-lookup id="dataSource" jndi-name="jdbc/db" resource-ref="true" /> 

Pero cuando trato de ejecutar el servicio en WebSphere me sale el siguiente ...

Line 16 in XML document from ServletContext resource [/WEB-INF/context/loyalty-servlet.xml] 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 'jee:jndi-lookup'. 

Parece que esto es diferente de mi enlace porque ya tengo el esquema en el espacio de nombres. ¿Algunas ideas?

Respuesta

24

Nota el patrón de otros artículos en xsi:schemaLocation - cada URI de espacio de xmlns:* atributo debe ser seguido por su respectiva ubicación XSD:

xsi:schemaLocation=" 
    http://www.springframework.org/schema/beans 
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd  
    http://www.springframework.org/schema/mvc 
    http://www.springframework.org/schema/mvc/spring-mvc-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/aop 
    http://www.springframework.org/schema/aop/spring-aop-3.0.xsd  
    http://www.springframework.org/schema/tx 
    http://www.springframework.org/schema/tx/spring-tx.xsd  
    http://www.springframework.org/schema/jee 
    http://www.springframework.org/schema/jee/spring-jee-2.5.xsd"> 
Cuestiones relacionadas