2012-06-08 7 views
7

Więc mam problem podobny do tutaj ...Wiosna 3 Dopasowanie wieloznaczny jest surowe, ale deklaracja nie można znaleźć dla elementu „: Jee-JNDI odnośnika”

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

moich spojrzeń pom jak to

<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" /> 

ale gdy próbuję uruchomić usługę na serwerze WebSphere pojawia się następujący ...

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'. 

Wygląda na to, że różni się od mojego linku, ponieważ już mam schemat w przestrzeni nazw. Jakieś pomysły?

Odpowiedz

24

Uwaga wzór innych przedmiotów w xsi:schemaLocation - każda przestrzeń nazw URI z atrybutu xmlns:* powinny być przestrzegane przez jego odpowiednim miejscu 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"> 
Powiązane problemy