Project

General

Profile

Actions

Bug #2705

closed

Rudder webapp crashed with an XML parse error for applicationContext-security.xml file

Added by Nicolas PERRON over 12 years ago. Updated over 12 years ago.

Status:
Released
Priority:
3
Category:
Architecture - Dependencies
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

In order to actualize indexes, I've made somes actions:

/etc/init.d/slapd stop
/opt/rudder/sbin/slapindex
/etc/init.d/slapd start
/etc/init.d/jetty restart

But jetty wasn't able to start the application, here was the /var/log/rudder/webapp/XXXX_XX_XX.stderrout.log:

[...]
012-07-26 06:24:08.543:INFO::Deployable added: /opt/rudder/jetty7/contexts/rudder.xml
2012-07-26 06:24:09.098:INFO::Extract jar:file:/opt/rudder/jetty7/webapps/rudder.war!/ to /tmp/jetty-127.0.0.1-8080-rudder.war-_rudder-any-/webapp
Use configuration file defined by JVM property -Dlogback.configurationFile : /opt/rudder/etc/logback.xml
2012-07-26 06:24:19.422:INFO:/rudder:Initializing Spring root WebApplicationContext
[2012-07-26 06:24:40] WARN  org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Ignored XML validation warning
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/beans/spring-beans-3.1.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195) ~[na:1.6.0_26]
[2012-07-26 06:24:40] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 37 in XML document from class path resource [applicationContext-security.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans:beans'.
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396) ~[spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]
Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans:beans'.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195) ~[na:1.6.0_26]
2012-07-26 06:24:40.819:WARN::Failed startup of context o.e.j.w.WebAppContext{/rudder,file:/tmp/jetty-127.0.0.1-8080-rudder.war-_rudder-any-/webapp/},/opt/rudder/jetty7/webapps/rudder.war
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 37 in XML document from class path resource [applicationContext-security.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans:beans'.
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
[...]

After that I've restarted jetty and all works perfectly now.

I'm not sure that reproductible.
It was on Debian Squeeze 64 bits.

Actions #1

Updated by Nicolas PERRON over 12 years ago

  • Subject changed from Rudder 2.4.0~beta3 was not able to be started after a slapindex to Rudder webapp crashed with an XML parse error for applicationContext-security.xml file
  • Status changed from New to Rejected

We were not able to reproduce it.

Actions #2

Updated by Nicolas CHARLES over 12 years ago

  • Category set to Architecture - Dependencies
  • Status changed from Rejected to New
  • Assignee set to Nicolas CHARLES

Nice catch
The reason of the problem is described here :
http://stackoverflow.com/questions/8100965/cannot-find-the-declaration-of-element-beans-in-internet-offline-mode

Here, we use springsecurity 3.1, which depends (for some unexplainable reason) on spring-beans 3.0.6
But the validator is :

    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
                        http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">

Actions #3

Updated by Nicolas CHARLES over 12 years ago

  • Status changed from New to Pending technical review
  • % Done changed from 0 to 100
Actions #4

Updated by François ARMAND over 12 years ago

  • Status changed from Pending technical review to Released
Actions

Also available in: Atom PDF