Bonjour,
Je voudrai mettre en place la spring-security-3.1.0.RELEASE.
Mais voilà, lors de la lecture du descripteur j'obtiens les erreurs suivante.
Il m'ai impossible de trouvé les causes, pouvez vous m'aider ?
Merci d'avance.
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140 24-juil.-2012 23:03:46 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;;. 24-juil.-2012 23:03:46 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. 24-juil.-2012 23:03:46 org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["http-bio-8080"] 24-juil.-2012 23:03:46 org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["ajp-bio-8009"] 24-juil.-2012 23:03:46 org.apache.catalina.startup.Catalina load INFO: Initialization processed in 645 ms 24-juil.-2012 23:03:46 org.apache.catalina.core.StandardService startInternal INFO: Démarrage du service Catalina 24-juil.-2012 23:03:46 org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.28 24-juil.-2012 23:03:47 org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext 24-juil.-2012 23:03:47 org.springframework.web.context.ContextLoader initWebApplicationContext INFO: Root WebApplicationContext: initialization started 24-juil.-2012 23:03:47 org.springframework.context.support.AbstractApplicationContext prepareRefresh INFO: Refreshing Root WebApplicationContext: startup date [Tue Jul 24 23:03:47 CEST 2012]; root of context hierarchy 24-juil.-2012 23:03:47 org.springframework.web.context.ContextLoader initWebApplicationContext GRAVE: Context initialization failed java.lang.ExceptionInInitializerError at org.springframework.context.support.AbstractRefreshableApplicationContext.createBeanFactory(AbstractRefreshableApplicationContext.java:195) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:128) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:527) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:441) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) 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.NullPointerException at org.springframework.beans.factory.support.DefaultListableBeanFactory.<clinit>(DefaultListableBeanFactory.java:109) ... 17 more 24-juil.-2012 23:03:47 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 java.lang.ExceptionInInitializerError at org.springframework.context.support.AbstractRefreshableApplicationContext.createBeanFactory(AbstractRefreshableApplicationContext.java:195) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:128) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:527) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:441) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) 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.NullPointerException at org.springframework.beans.factory.support.DefaultListableBeanFactory.<clinit>(DefaultListableBeanFactory.java:109) ... 17 more 24-juil.-2012 23:03:47 org.apache.catalina.core.StandardContext startInternal GRAVE: Error listenerStart 24-juil.-2012 23:03:47 org.apache.catalina.core.StandardContext startInternal GRAVE: Erreur de démarrage du contexte [/be.crossviewer] suite aux erreurs précédentes 24-juil.-2012 23:03:47 org.apache.catalina.core.ApplicationContext log INFO: Closing Spring root WebApplicationContext 24-juil.-2012 23:03:47 org.springframework.context.support.AbstractApplicationContext doClose INFO: Closing Root WebApplicationContext: startup date [Tue Jul 24 23:03:47 CEST 2012]; root of context hierarchy 24-juil.-2012 23:03:47 org.springframework.context.support.AbstractApplicationContext doClose ATTENTION: Exception thrown from ApplicationListener handling ContextClosedEvent java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: Root WebApplicationContext: startup date [Tue Jul 24 23:03:47 CEST 2012]; root of context hierarchy at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:337) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:324) at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1030) at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:993) at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:548) at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:143) at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4830) at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5477) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160) 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) 24-juil.-2012 23:03:47 org.springframework.context.support.AbstractApplicationContext doClose ATTENTION: Exception thrown from LifecycleProcessor on context close java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: Root WebApplicationContext: startup date [Tue Jul 24 23:03:47 CEST 2012]; root of context hierarchy at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:350) at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1038) at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:993) at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:548) at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:143) at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4830) at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5477) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160) 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) 24-juil.-2012 23:03:47 org.apache.catalina.core.StandardContext listenerStop GRAVE: Exception lors de l'envoi de l'évènement contexte détruit (context destroyed) à l'instance de classe d'écoute org.springframework.web.context.ContextLoaderListener java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:172) at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1071) at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1045) at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:993) at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:548) at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:143) at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4830) at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5477) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160) 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) 24-juil.-2012 23:03:47 org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8080"] 24-juil.-2012 23:03:47 org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["ajp-bio-8009"] 24-juil.-2012 23:03:47 org.apache.catalina.startup.Catalina start INFO: Server startup in 716 ms
Application context
Web XML
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 <?xml version="1.0" encoding="UTF-8"?> <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.2.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.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:property name="url" value="jdbc:mysql://localhost:3306/crossmanager" /> <beans:property name="username" value="root" /> <beans:property name="password" value="root" /> </beans:property> </beans:bean> </beans>
Code xml : 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 <?xml version="1.0" encoding="UTF-8"?> <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <display-name>be.crossviewer</display-name> <!-- <listener> <description> Used to cleanup when a session is destroyed</description> <display-name>ZK Session cleaner</display-name> <listener-class>org.zkoss.zk.ui.http.HttpSessionListener</listener-class> </listener> <servlet> <description> The ZK loader for ZUML pages</description> <servlet-name>zkLoader</servlet-name> <servlet-class>org.zkoss.zk.ui.http.DHtmlLayoutServlet</servlet-class> <init-param> <param-name>update-uri</param-name> <param-value>/zkau</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet> <description> The asynchronous update engine for ZK</description> <servlet-name>auEngine</servlet-name> <servlet-class>org.zkoss.zk.au.http.DHtmlUpdateServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>zkLoader</servlet-name> <url-pattern>*.zul</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>zkLoader</servlet-name> <url-pattern>*.zhtml</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>auEngine</servlet-name> <url-pattern>/zkau/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>zkLoader</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> --> <context-param> <param-name>contextConfigLocation</param-name> <param-value> classpath:ctx/securityContext.xml </param-value> </context-param> <listener> <listener-class> org.springframework.security.web.session.HttpSessionEventPublisher</listener-class> </listener> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> <welcome-file>index.zul</welcome-file> </welcome-file-list> </web-app>
Partager