Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

spring

I am getting following error while deploying my application to glassfish 3.1 server,

Exception while loading the app :

java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 20 in XML document from ServletContext resource [/WEB-INF/applicationContext.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 'jms:listener-container'..
Please see server.log for more details.

like image 416
user2094445 Avatar asked Jan 12 '23 23:01

user2094445


1 Answers

  1. Your question is a pain to read. When you want to get help, make some efforts to make yourself understood.

  2. Your applicationContexnt.xml file probably miss JMS namespace declaration (see Spring JMS documentation).

From Spring documentation, your XML file header needs to be at least (pay attention to JMS part) :

<?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:jms="http://www.springframework.org/schema/jms"
       xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-2.5.xsd">

<!-- <bean/> definitions here -->

</beans>

You may have others namespace declarations such as aop, util, context, etc.

like image 102
Guillaume Darmont Avatar answered Jan 23 '23 00:01

Guillaume Darmont