Bonjour, je suis en train de faire des tests pour savoir si il vaut mieux utiliser le couple (Hibernate/Spring/JSF/Maven) ou le couple (Hibernate/Spring/GWT/Maven).
Sur le test avec GWT, j'ai un problème d’instanciation de classes pour les dialectes Hibernate avec la BDD (que je n'ai pas avec le projet de test avec JSF).
Comment j'en suis arrivé là, c'est un peu compliqué donc je me permets juste de mettre le lien des problèmes précédents (ici).

Bon, en ce moment, le POM ressemble à ça:
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
 
<?xml version="1.0" encoding="UTF-8"?>
<project
  xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
  <!-- POM file generated with GWT webAppCreator -->
  <modelVersion>4.0.0</modelVersion>
  <groupId>projet</groupId>
  <artifactId>projet</artifactId>
  <packaging>war</packaging>
  <version>0.1</version>
  <name>GWT Maven Archetype</name>
 
  <properties>
    <!-- Convenience property to set the GWT version -->
    <gwtVersion>2.0.0</gwtVersion>
    <!-- GWT needs at least java 1.5 -->
    <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 
    <!-- Les versions pour les libs projets -->
    <!-- JUnit -->
	<org.junit.bom.version>4.8.1</org.junit.bom.version>
 
	<!-- Hibernate version -->
	<org.hibernate.bom.version>4.1.0.Final</org.hibernate.bom.version>
	<!-- Hibernate annotations -->
	<org.hibernate.bom.version.annotations>3.5.6.Final</org.hibernate.bom.version.annotations>
 
	<!-- Commmon dbcp -->
	<org.commons.dbcp.bon.version>20030825.184428</org.commons.dbcp.bon.version>
 
	<!-- Common pools -->
	<org.commons.dbcp.pools.version>20030825.183949</org.commons.dbcp.pools.version>
 
	<!-- Driver JDBC MYSQL -->
	<org.jdbc.driver.mysql.bom.version>5.1.18</org.jdbc.driver.mysql.bom.version>
 
	<!-- spring general -->
	<org.spring.bom.version>3.1.0.RELEASE</org.spring.bom.version>
	<!-- Spring ORM -->
	<org.spring.orm.bom.version>3.1.0.RELEASE</org.spring.orm.bom.version>
 
	<!-- Validation -->
	<org.validation.bom.version>1.0.0.GA</org.validation.bom.version>
	<!-- Lib server (JSF...) compile for Tomcat, provided for JBoss -->
	<com.lib.scope>compile</com.lib.scope>	
  </properties>
 
 
  <repositories>
		<!-- JBoss-->
		<repository>
			<id>jboss richfaces</id>
			<name>jboss repository</name>
			<url>http://repository.jboss.org/nexus/content/groups/public-jboss/</url>
		</repository>
	</repositories>
 
  <dependencies>
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-servlet</artifactId>
      <version>${gwtVersion}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-user</artifactId>
      <version>${gwtVersion}</version>
      <scope>provided</scope>
    </dependency>
 
    <!-- Librairies du projet -->
    <!-- Junit -->
	<dependency>
		<groupId>junit</groupId>
		<artifactId>junit</artifactId>
		<version>${org.junit.bom.version}</version>
		<scope>test</scope>
	</dependency>
 
	<!-- Hibernate -->
	<dependency> 
		<groupId>org.hibernate</groupId> 
		<artifactId>hibernate-core</artifactId> 
		<version>${org.hibernate.bom.version}</version> 
		<scope>${com.lib.scope}</scope> 
		<exclusions>
			<exclusion>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
			</exclusion>
		</exclusions>		
	</dependency>
 
	<dependency> 
		<groupId>org.hibernate</groupId> 
		<artifactId>hibernate-entitymanager</artifactId> 
		<version>${org.hibernate.bom.version}</version> 
		<scope>${com.lib.scope}</scope> 
	</dependency>  
 
	<dependency> 
		<groupId>org.hibernate</groupId> 
		<artifactId>hibernate-validator</artifactId> 
		<version>4.2.0.Final</version> 
		<scope>${com.lib.scope}</scope> 
	</dependency>  
 
	<!-- Validation  -->
	<dependency>
        <groupId>javax.validation</groupId>
        <artifactId>validation-api</artifactId>
        <version>${org.validation.bom.version}</version>
        <scope>${com.lib.scope}</scope> 
	</dependency>
 
	<!-- SLF4J Log -->
	<dependency>
		<groupId>org.slf4j</groupId>
		<artifactId>slf4j-log4j12</artifactId>
		<version>1.6.4</version>
		<scope>compile</scope> 
	</dependency>
 
	<!-- Common dbcp -->
	<dependency>
		<groupId>commons-dbcp</groupId>
		<artifactId>commons-dbcp</artifactId>
		<version>${org.commons.dbcp.bon.version}</version>
		<scope>compile</scope>
	</dependency>
 
	<!-- MySQL driver -->
	<dependency>
		<groupId>mysql</groupId>
		<artifactId>mysql-connector-java</artifactId>
		<version>${org.jdbc.driver.mysql.bom.version}</version>
		<scope>compile</scope>
	</dependency>
 
	<!-- Commons pools -->
	<dependency>
		<groupId>commons-pool</groupId>
		<artifactId>commons-pool</artifactId>
		<version>${org.commons.dbcp.pools.version}</version>
		<scope>compile</scope>
	</dependency>
 
	 <!-- Java injection (JSR-330) -->
	<dependency>
		<groupId>javax.inject</groupId>
		<artifactId>javax.inject</artifactId>
		<version>1</version>
		<scope>${com.lib.scope}</scope>
	</dependency>
 
	<!-- Spring core -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-core</artifactId>
			<version>${org.spring.bom.version}</version>
			<scope>compile</scope>
			<optional>false</optional>
		</dependency>
		<!-- Spring context -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>${org.spring.bom.version}</version>
			<scope>compile</scope>
			<optional>false</optional>
		</dependency>
 
		<!-- Spring JDBC -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jdbc</artifactId>
			<version>${org.spring.bom.version}</version>
			<scope>compile</scope>
			<optional>false</optional>
		</dependency>
 
 
		<!-- Spring ORM -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-orm</artifactId> 
			<version>${org.spring.orm.bom.version}</version>
			<scope>compile</scope>
			<optional>false</optional>
		</dependency>
 
		<!-- spring web -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
			<version>${org.spring.bom.version}</version>
			<scope>compile</scope>
			<optional>false</optional>
		</dependency>
 
		<!-- spring test -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<version>${org.spring.bom.version}</version>
			<scope>test</scope>
		</dependency>
 
  </dependencies>
 
  <build>
    <!-- Generate compiled stuff in the folder used for developing mode -->
    <outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
 
    <plugins>
 
      <!-- GWT Maven Plugin -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <version>2.4.0</version>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <goal>test</goal><!-- 
              <goal>i18n</goal>
              <goal>generateAsync</goal>-->
            </goals>
          </execution>
        </executions>
        <!-- Plugin configuration. There are many available options, see 
          gwt-maven-plugin documentation at codehaus.org -->
        <configuration>
          <runTarget>projet.html</runTarget>
          <hostedWebapp>${webappDirectory}</hostedWebapp>
          <i18nMessagesBundle>com.projet.client.Messages</i18nMessagesBundle>
        </configuration>
      </plugin>
 
      <!-- Copy static web files before executing gwt:run -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.1.1</version>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals><!-- 
              <goal>exploded</goal>-->
            </goals>
          </execution>
        </executions>
        <configuration>
          <webappDirectory>${webappDirectory}</webappDirectory>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>      
    </plugins>
  </build>
 
</project>
Et le fichier Spring pour les accès à la BDD à ça:
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
 
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:context="http://www.springframework.org/schema/context"
	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-2.5.xsd
     http://www.springframework.org/schema/context 
     http://www.springframework.org/schema/context/spring-context-2.5.xsd
     http://www.springframework.org/schema/context 
     http://www.springframework.org/schema/context/spring-context.xsd">
 
   <context:annotation-config />
 
   <context:component-scan base-package="com.projet.server.hibernate.service.impl" /> 
   <context:component-scan base-package="com.projet.server.jdbc.service.impl" /> 	
 
   <!-- Data source -->
   <bean id="dataSource" scope="singleton"
   		class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
   		<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
		<property name="url" value="jdbc:mysql://localhost/datbase_1"/>
		<property name="username" value="root"/>
		<property name="password" value="admin"/>
   </bean>   
 
   <!-- Hibernate Session Factory -->
   <bean id="sessionFactory" scope="singleton" 
   		class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
   		<property name="dataSource" ref="dataSource"/>
   		<property name="hibernateProperties">
	        <props>
	            <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
	            <prop key="hibernate.show_sql">true</prop>
	        </props>
	    </property>
	    <property name="annotatedPackages">
	    	<list>
	    		<value>com.projet.server.persistance.entity.impl</value>
	    	</list>
	    </property>
   </bean>
 
   <!-- Hibernate Template -->
   <bean id="hibernateTemplate" scope="singleton"
   		class="org.springframework.orm.hibernate3.HibernateTemplate">
   		<property name="sessionFactory" ref="sessionFactory"/>
   </bean>
 
   <!-- JDBC Template -->
   <bean id="jdbcTempate" scope="singleton"
   		class="org.springframework.jdbc.core.JdbcTemplate">
   		<property name="dataSource" ref="dataSource"/>
   </bean>
 
 
 
</beans>
Je ne sais pas si c'est utile, mais je donne au cas où le 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
 
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
 
  <!-- Servlets -->
  <servlet>
  	<servlet-name>GlobalisService</servlet-name>
  	<servlet-class>com.projet.server.gwt.service.CCMGlobalisServiceServlet</servlet-class>
  </servlet>
 
  <servlet-mapping>
  	<servlet-name>GlobalisService</servlet-name>
  	<url-pattern>/projet/globalisService</url-pattern>
  </servlet-mapping>
 
  <!-- Default page to serve -->
  <welcome-file-list>
    <welcome-file>projet.html</welcome-file>
  </welcome-file-list>
 
  <!-- Spring -->
  <listener>
	<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>
 
  <listener>
    <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
  </listener>
 
 <context-param>
    <param-name>contextConfigLocation</param-name>
        <!-- Chargement de tout fichier xml commençant par applicationContext -->
    <param-value>/WEB-INF/applicationContext*.xml</param-value>
 </context-param>
 
</web-app>
Comme il s'agit du mode hosted de google, je donne aussi le jetty-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
 
<?xml version="1.0" encoding="UTF-8"?>
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
	<Set name="systemClasses">
		<Array type="java.lang.String">
 
			<!--
				we copied these paths from jetty WebAppContext source code ...
			-->
			<Item>java.</Item>
			<Item>javax.servlet.</Item>
			<Item>javax.xml.</Item>
			<Item>org.mortbay.</Item>
			<Item>org.xml.</Item>
			<Item>org.w3c.</Item>
			<Item>org.apache.commons.logging.</Item>
			<Item>org.apache.log4j.</Item>
 
			<!-- and ... added slf4j -->
			<Item>org.slf4j.</Item>
			<!--
				File to fix hosted mode bug We must promote slf4j to system classes,
				otherwise gwt hosted mode will not allow loading them due to a
				policy that don't allow server classes to be loaded from the outside
				world (see gwt JettyLauncher source code).
 
				http://osdir.com/ml/GoogleWebToolkit/2009-04/msg01034.html Issue :
				http://code.google.com/p/google-web-toolkit/issues/detail?id=3496
			-->
 
		</Array>
	</Set>
</Configure>
El l'erreur: ça ressemble à ça:
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
 
Loading modules
   com.projet.projet
      Validating <servlet> tags for module 'projet'
      For additional info see: file:/C:/Eclipe_maven_gwt/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/doc/helpInfo/servletMappings.html
         [WARN] Module declares a servlet class 'com.google.gwt.junit.server.JUnitHostImpl', but the web.xml has no corresponding declaration; please add the following lines to your web.xml:
<servlet>
  <servlet-name>jUnitHostImpl</servlet-name>
  <servlet-class>com.google.gwt.junit.server.JUnitHostImpl</servlet-class>
</servlet>
<servlet-mapping>
  <servlet-name>jUnitHostImpl</servlet-name>
  <url-pattern>/projet/junithost</url-pattern>
</servlet-mapping>
[WARN] Server class 'org.springframework.web.context.ContextLoaderListener' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Eclipe_maven_gwt/eclipse/org/springframework/spring-web/3.1.0.RELEASE/spring-web-3.1.0.RELEASE.jar' to the web app classpath for this session
   For additional info see: file:/C:/Eclipe_maven_gwt/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
[WARN] Server class 'org.springframework.core.io.Resource' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Eclipe_maven_gwt/eclipse/org/springframework/spring-core/3.1.0.RELEASE/spring-core-3.1.0.RELEASE.jar' to the web app classpath for this session
   For additional info see: file:/C:/Eclipe_maven_gwt/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
[WARN] Server class 'org.springframework.context.ApplicationContextException' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Eclipe_maven_gwt/eclipse/org/springframework/spring-context/3.1.0.RELEASE/spring-context-3.1.0.RELEASE.jar' to the web app classpath for this session
   For additional info see: file:/C:/Eclipe_maven_gwt/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
[WARN] Server class 'org.springframework.beans.FatalBeanException' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Eclipe_maven_gwt/eclipse/org/springframework/spring-beans/3.1.0.RELEASE/spring-beans-3.1.0.RELEASE.jar' to the web app classpath for this session
   For additional info see: file:/C:/Eclipe_maven_gwt/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[WARN] Server class 'javax.inject.Provider' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Eclipe_maven_gwt/eclipse/javax/inject/javax.inject/1/javax.inject-1.jar' to the web app classpath for this session
   For additional info see: file:/C:/Eclipe_maven_gwt/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
[WARN] Server class 'org.springframework.asm.ClassVisitor' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Eclipe_maven_gwt/eclipse/org/springframework/spring-asm/3.1.0.RELEASE/spring-asm-3.1.0.RELEASE.jar' to the web app classpath for this session
   For additional info see: file:/C:/Eclipe_maven_gwt/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
[WARN] Server class 'javax.persistence.EntityManagerFactory' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Eclipe_maven_gwt/eclipse/org/hibernate/javax/persistence/hibernate-jpa-2.0-api/1.0.1.Final/hibernate-jpa-2.0-api-1.0.1.Final.jar' to the web app classpath for this session
   For additional info see: file:/C:/Eclipe_maven_gwt/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
[WARN] Server class 'org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Eclipe_maven_gwt/eclipse/org/springframework/spring-orm/3.1.0.RELEASE/spring-orm-3.1.0.RELEASE.jar' to the web app classpath for this session
   For additional info see: file:/C:/Eclipe_maven_gwt/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
[WARN] Server class 'org.springframework.expression.PropertyAccessor' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Eclipe_maven_gwt/eclipse/org/springframework/spring-expression/3.1.0.RELEASE/spring-expression-3.1.0.RELEASE.jar' to the web app classpath for this session
   For additional info see: file:/C:/Eclipe_maven_gwt/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
[WARN] Server class 'org.apache.commons.dbcp.BasicDataSource' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Eclipe_maven_gwt/eclipse/commons-dbcp/commons-dbcp/20030825.184428/commons-dbcp-20030825.184428.jar' to the web app classpath for this session
   For additional info see: file:/C:/Eclipe_maven_gwt/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
[WARN] Server class 'org.springframework.jdbc.core.JdbcTemplate' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Eclipe_maven_gwt/eclipse/org/springframework/spring-jdbc/3.1.0.RELEASE/spring-jdbc-3.1.0.RELEASE.jar' to the web app classpath for this session
   For additional info see: file:/C:/Eclipe_maven_gwt/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
[WARN] Server class 'org.apache.commons.pool.impl.GenericObjectPool' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Eclipe_maven_gwt/eclipse/commons-pool/commons-pool/20030825.183949/commons-pool-20030825.183949.jar' to the web app classpath for this session
   For additional info see: file:/C:/Eclipe_maven_gwt/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
[WARN] Server class 'org.hibernate.cfg.NamingStrategy' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Eclipe_maven_gwt/eclipse/org/hibernate/hibernate-core/4.1.0.Final/hibernate-core-4.1.0.Final.jar' to the web app classpath for this session
   For additional info see: file:/C:/Eclipe_maven_gwt/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
[WARN] Server class 'org.dom4j.DocumentException' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Eclipe_maven_gwt/eclipse/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar' to the web app classpath for this session
   For additional info see: file:/C:/Eclipe_maven_gwt/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
[WARN] Server class 'org.hibernate.annotations.common.reflection.ReflectionManager' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Eclipe_maven_gwt/eclipse/org/hibernate/common/hibernate-commons-annotations/4.0.1.Final/hibernate-commons-annotations-4.0.1.Final.jar' to the web app classpath for this session
   For additional info see: file:/C:/Eclipe_maven_gwt/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
[WARN] Server class 'org.jboss.logging.BasicLogger' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Eclipe_maven_gwt/eclipse/org/jboss/logging/jboss-logging/3.1.0.CR2/jboss-logging-3.1.0.CR2.jar' to the web app classpath for this session
   For additional info see: file:/C:/Eclipe_maven_gwt/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
[WARN] Server class 'javax.transaction.SystemException' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Eclipe_maven_gwt/eclipse/org/jboss/spec/javax/transaction/jboss-transaction-api_1.1_spec/1.0.0.Final/jboss-transaction-api_1.1_spec-1.0.0.Final.jar' to the web app classpath for this session
   For additional info see: file:/C:/Eclipe_maven_gwt/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
[WARN] Server class 'com.mysql.jdbc.Driver' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Eclipe_maven_gwt/eclipse/mysql/mysql-connector-java/5.1.18/mysql-connector-java-5.1.18.jar' to the web app classpath for this session
   For additional info see: file:/C:/Eclipe_maven_gwt/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
[WARN] Server class 'org.apache.commons.collections.CursorableLinkedList' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Eclipe_maven_gwt/eclipse/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar' to the web app classpath for this session
   For additional info see: file:/C:/Eclipe_maven_gwt/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
[WARN] Server class 'org.springframework.dao.DataAccessException' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Eclipe_maven_gwt/eclipse/org/springframework/spring-tx/3.1.0.RELEASE/spring-tx-3.1.0.RELEASE.jar' to the web app classpath for this session
   For additional info see: file:/C:/Eclipe_maven_gwt/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
Starting Jetty on port 8888
   [WARN] Failed startup of context com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload@198527{/,C:\dev_nico\GWT\projet\src\main\webapp}
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext-hibernate-jdbc.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Could not instantiate dialect class
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:567)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:384)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
	at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:543)
	at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
	at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
	at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513)
	at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
	at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:468)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
	at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
	at org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
	at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
	at org.mortbay.jetty.Server.doStart(Server.java:222)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
	at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:672)
	at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
	at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
	at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
	at com.google.gwt.dev.DevMode.main(DevMode.java:311)
Caused by: org.hibernate.HibernateException: Could not instantiate dialect class
	at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.constructDialect(DialectFactoryImpl.java:82)
	at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:64)
	at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:146)
	at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
	at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:71)
	at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2273)
	at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2269)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1738)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1778)
	at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:184)
	at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:314)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
	... 30 more
Caused by: java.lang.ClassCastException: org.hibernate.dialect.MySQLDialect cannot be cast to org.hibernate.dialect.Dialect
	at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.constructDialect(DialectFactoryImpl.java:73)
	... 44 more
   [WARN] Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext-hibernate-jdbc.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Could not instantiate dialect class:
java.lang.ClassCastException: org.hibernate.dialect.MySQLDialect cannot be cast to org.hibernate.dialect.Dialect
	at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.constructDialect(DialectFactoryImpl.java:73)
	at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:64)
	at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:146)
	at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
	at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:71)
	at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2273)
	at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2269)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1738)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1778)
	at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:184)
	at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:314)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:567)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:384)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
	at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:543)
	at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
	at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
	at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513)
	at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
	at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:468)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
	at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
	at org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
	at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
	at org.mortbay.jetty.Server.doStart(Server.java:222)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
	at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:672)
	at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
	at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
	at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
	at com.google.gwt.dev.DevMode.main(DevMode.java:311)
L'exception qui va me rendre chèvre est (à mon avis):
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 
java.lang.ClassCastException: org.hibernate.dialect.MySQLDialect cannot be cast to org.hibernate.dialect.Dialect
Or, je ne comprend rien, cette classe est présente car j'ai téléchargé Hibernate-core via Maven.

Si quelqu'un a des idées, merci d'avance.