IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Spring Web Java Discussion :

Erreur "Unexpected exception parsing XML document from class path resource application-context"


Sujet :

Spring Web Java

  1. #1
    Membre régulier
    Homme Profil pro
    Analyste programmeur
    Inscrit en
    Octobre 2010
    Messages
    122
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 49
    Localisation : Belgique

    Informations professionnelles :
    Activité : Analyste programmeur

    Informations forums :
    Inscription : Octobre 2010
    Messages : 122
    Points : 81
    Points
    81
    Par défaut Erreur "Unexpected exception parsing XML document from class path resource application-context"
    Hi,

    Pouvez-vous m'aider ?

    merci

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
     
    25-juil.-2012 12:45:18 org.apache.catalina.core.AprLifecycleListener init
    INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI.ACE\;C:\Program Files\MySQL\MySQL Server 5.5\bin;C:\Program Files\Java\jdk1.6.0_21\bin\;;C:\Program Files\hellios;;.
    25-juil.-2012 12:45:18 org.apache.tomcat.util.digester.SetPropertiesRule begin
    ATTENTION: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:be.crossviewer' did not find a matching property.
    25-juil.-2012 12:45:18 org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["http-bio-8080"]
    25-juil.-2012 12:45:18 org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
    25-juil.-2012 12:45:18 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 695 ms
    25-juil.-2012 12:45:18 org.apache.catalina.core.StandardService startInternal
    INFO: Démarrage du service Catalina
    25-juil.-2012 12:45:18 org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: Apache Tomcat/7.0.28
    25-juil.-2012 12:45:19 org.apache.catalina.core.ApplicationContext log
    INFO: Initializing Spring root WebApplicationContext
    25-juil.-2012 12:45:19 org.springframework.web.context.ContextLoader initWebApplicationContext
    INFO: Root WebApplicationContext: initialization started
    25-juil.-2012 12:45:19 org.springframework.context.support.AbstractApplicationContext prepareRefresh
    INFO: Refreshing org.springframework.web.context.support.XmlWebApplicationContext@1672bbb: display name [Root WebApplicationContext]; startup date [Wed Jul 25 12:45:19 CEST 2012]; root of context hierarchy
    25-juil.-2012 12:45:19 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
    INFO: Loading XML bean definitions from class path resource [ctx/securityContext.xml]
    25-juil.-2012 12:45:19 org.springframework.security.core.SpringSecurityCoreVersion <clinit>
    INFO: You are running with Spring Security Core 3.1.0.RELEASE
    25-juil.-2012 12:45:19 org.springframework.security.core.SpringSecurityCoreVersion <clinit>
    GRAVE: *** Spring Major version '3' expected, but you are running with version: 2.5.2. Please check your classpath for unwanted jar files.
    25-juil.-2012 12:45:19 org.springframework.security.core.SpringSecurityCoreVersion <clinit>
    ATTENTION: **** You are advised to use Spring 3.0.6.RELEASE or later with this version. You are running: 2.5.2
    25-juil.-2012 12:45:19 org.springframework.security.config.SecurityNamespaceHandler <init>
    INFO: Spring Security 'config' module version is 3.1.0.RELEASE
    25-juil.-2012 12:45:19 org.springframework.web.context.ContextLoader initWebApplicationContext
    GRAVE: Context initialization failed
    org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [ctx/securityContext.xml]; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.getLocalName(Lorg/w3c/dom/Node;)Ljava/lang/String;
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:406)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:296)
    	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
    	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
    	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
    	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
    	at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:423)
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:353)
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:254)
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:198)
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4790)
    	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5284)
    	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1595)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1585)
    	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    	at java.util.concurrent.FutureTask.run(Unknown Source)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    	at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.getLocalName(Lorg/w3c/dom/Node;)Ljava/lang/String;
    	at org.springframework.security.config.SecurityNamespaceHandler.parse(SecurityNamespaceHandler.java:69)
    	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1253)
    	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1243)
    	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
    	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:489)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:384)
    	... 23 more
    25-juil.-2012 12:45:19 org.apache.catalina.core.StandardContext listenerStart
    GRAVE: Exception lors de l'envoi de l'évènement contexte initialisé (context initialized) à l'instance de classe d'écoute (listener) org.springframework.web.context.ContextLoaderListener
    org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [ctx/securityContext.xml]; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.getLocalName(Lorg/w3c/dom/Node;)Ljava/lang/String;
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:406)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:296)
    	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
    	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
    	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
    	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
    	at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:423)
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:353)
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:254)
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:198)
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4790)
    	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5284)
    	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1595)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1585)
    	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    	at java.util.concurrent.FutureTask.run(Unknown Source)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    	at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.getLocalName(Lorg/w3c/dom/Node;)Ljava/lang/String;
    	at org.springframework.security.config.SecurityNamespaceHandler.parse(SecurityNamespaceHandler.java:69)
    	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1253)
    	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1243)
    	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
    	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:489)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:384)
    	... 23 more
    25-juil.-2012 12:45:19 org.apache.catalina.core.StandardContext startInternal
    GRAVE: Error listenerStart
    25-juil.-2012 12:45:19 org.apache.catalina.core.StandardContext startInternal
    GRAVE: Erreur de démarrage du contexte [/be.crossviewer] suite aux erreurs précédentes
    25-juil.-2012 12:45:19 org.apache.catalina.core.ApplicationContext log
    INFO: Closing Spring root WebApplicationContext
    25-juil.-2012 12:45:19 org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["http-bio-8080"]
    25-juil.-2012 12:45:19 org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["ajp-bio-8009"]
    25-juil.-2012 12:45:19 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 970 ms
    app context
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
     
    <?xml version="1.0" encoding="UTF-8"?>
     
    <beans:beans xmlns="http://www.springframework.org/schema/security"
        xmlns:beans="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.springframework.org/schema/beans 
                        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                        http://www.springframework.org/schema/security 
                        http://www.springframework.org/schema/security/spring-security-3.1.xsd">
     
    	<http auto-config="true" use-expressions="true" access-denied-page="/error/accessDenied">
    		<intercept-url pattern="/be.crossviewer/*" access="Permitall()" />
    		<intercept-url pattern="/*" access="Permitall()" />
    		<intercept-url pattern="/be.crossviewer/admin/**" access="Permitall()" />
     
    		<form-login login-page="/be.crossviewer/login/Indentifier"
    			authentication-failure-url="/" />
    		<logout logout-url="/log/logout" logout-success-url="/"
    			invalidate-session="true" />
     
    	</http>
     
    	<authentication-manager alias="authentication-manager">
    		<authentication-provider>
    		<jdbc-user-service  data-source-ref="dataSourceSecurity"
    			users-by-username-query="select name, code, activate from person where name=? and activate=true"
    			authorities-by-username-query=
    			"SELECT `name`, CONCAT('ROLE_', UPPER(role)) FROM person INNER JOIN `access-roles` ON 
    			person.person_id = `access-roles`.access_id WHERE `name` = ? AND `access-roles`.activate=TRUE" />
    		</authentication-provider>
    	</authentication-manager>
     
    	<beans:bean id="dataSourceSecurity" class="org.apache.commons.dbcp.BasicDataSource">
    		<beans:property name="driverClassName">
    			<beans:value>com.mysql.jdbc.Driver</beans:value>
    		</beans:property>
    		<beans:property name="url" value="jdbc:mysql://localhost:3306/crossmanager" />
    		<beans:property name="username" value="root" />
    		<beans:property name="password" value="root" />
    	</beans:bean>
     
     
    </beans:beans>

  2. #2
    Membre habitué Avatar de chewing-gum
    Homme Profil pro
    Développeur Java
    Inscrit en
    Novembre 2009
    Messages
    105
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Développeur Java

    Informations forums :
    Inscription : Novembre 2009
    Messages : 105
    Points : 137
    Points
    137
    Par défaut
    Tu n'aurais pas par hasard un fichier nommé "securityContext.xml" dans ton projet ?
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [ctx/securityContext.xml]; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.getLocalName(Lorg/w3c/dom/Node;)Ljava/lang/String;
    On pourrait voir ce fichier ? Il semblerait qu'il y ait une erreur à l'intérieur (peut-être une erreur de syntaxe ?)

  3. #3
    Membre expérimenté
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2004
    Messages
    1 184
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Avril 2004
    Messages : 1 184
    Points : 1 745
    Points
    1 745
    Par défaut
    java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.getLocalName(Lorg/w3c/dom/NodeLjava/lang/String;
    Tu as un souci de version de Sping (Genre la 2.5.X dans le classpath alors que tu est censé avoir la 3.X)


    Edit : en fait tout est dit dans la trace
    You are advised to use Spring 3.0.6.RELEASE or later with this version. You are running: 2.5.2

Discussions similaires

  1. Erreur "java.lang.AssertionError: Unexpected exception parsing XML document..."
    Par ZeRo0Cold dans le forum Persistance des données
    Réponses: 6
    Dernier message: 25/05/2015, 17h48
  2. Réponses: 4
    Dernier message: 12/12/2012, 12h16
  3. [Erreur]Could not parse mapping document from resource
    Par Le Pharaon dans le forum Hibernate
    Réponses: 5
    Dernier message: 17/06/2009, 10h53
  4. [DOM] parsing xml - Document null
    Par burhud dans le forum Format d'échange (XML, JSON...)
    Réponses: 5
    Dernier message: 23/08/2007, 11h50
  5. erreur: Could not parse mapping document from resource
    Par ferrero dans le forum Hibernate
    Réponses: 1
    Dernier message: 16/05/2007, 19h52

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo