NoClassDefFoundError lors du lancement d'un projet SmartGWT
Bonjour,
je viens de m'initier a GWT, et après m’être senti à l'aise, je passe maintenant à SmartGWT maintenant, seulement, lors du lancement de mon premier projet, j'ai l'erreur suivante :
Code:
1 2 3 4 5 6 7 8 9 10 11
|
Loading modules
com.javacodegeeks.smartgwt.client.SmartGWTIntroProjec
Loading inherited module 'com.javacodegeeks.smartgwt.client.SmartGWTIntroProjec'
Loading inherited module 'com.smartgwt.SmartGwt'
[ERROR] Unexpected error while processing XML
java.lang.NoClassDefFoundError: com/google/gwt/core/ext/linker/AbstractLinker
at java.lang.ClassLoader.findBootstrapClass(Native Method)
....
....
.... |
, la classe existe bel et bien sur le Build Path, et je peux meme l'importer si je veux
Code:
import com.google.gwt.ore.ext.linker.AbstractLinker
d'ailleur c'est NoClassDefFoundError et non ClassNotFoundException, ce que j'ai compris c'est que la JVM trouve le AbstractLinker.java lors du compilation mais ne trouve pas AbstractLinker.class lors de l’interprétation, en cherchant sur les forums j'ai trouvé quje ne suis pas le seul qui souffre de ce problème, seulement, aucun topic n'a résolu le problème.
voila ce que j'ai déja verifié :
- mon gwt-dev.jar est là et ma classe existe bien sur le buildPath
- quand je supprime cette ligne
Code:
<inherits name="com.smartgwt.SmartGwt" />
ça compile mais il ne reconnait plus SmartGWT et ses classes. - j'ai utilisé la version 2.5.0 de GWT et 3.1 de SmartGWT
voila mon module xml : SmartGWTIntroProjec.gwt.xml
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| <?xml version="1.0" encoding="UTF-8"?>
<!-- When updating your version of GWT, you should also update this DTD reference,
so that your app can take advantage of the latest GWT module capabilities. -->
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.0//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/2.5.0/distro-source/core/src/gwt-module.dtd">
<module rename-to='smartgwtintroprojec'>
<inherits name='com.google.gwt.user.User' />
<!-- Other module inherits -->
<inherits name="com.smartgwt.SmartGwt" />
<entry-point
class='com.javacodegeeks.smartgwt.client.client.SmartGWTIntroProjec' />
<!-- Specify the paths for translatable code -->
<source path='client' />
<source path='shared' />
</module> |
et voila ma classe qui me sert de EntryPoint : SmartGWTIntroProjec.java
Code:
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
| package com.javacodegeeks.smartgwt.client.client;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
import com.smartgwt.client.util.SC;
import com.smartgwt.client.widgets.IButton;
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.TextItem;
/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class SmartGWTIntroProjec implements EntryPoint {
public void onModuleLoad() {
final DynamicForm form = new DynamicForm();
final TextItem textItem = new TextItem();
textItem.setTitle("Name");
form.setFields(textItem);
final IButton button = new IButton("Hello");
button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
String name = textItem.getValue().toString();
SC.say("Hello " + name);
}
});
RootPanel.get("formContainer").add(form);
RootPanel.get("buttonContainer").add(button);
}
} |
et finalement voila ma page html :
Code:
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
| <!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="SmartGWTIntroProjec.css">
<title>Web Application Starter Project</title>
<script>
var isomorphicDir = "smartgwtintroproject/sc/";
</script>
<script type="text/javascript" language="javascript"
src="smartgwtintroprojec/smartgwtintroprojec.nocache.js"></script>
</head>
<body>
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1'
style="position: absolute; width: 0; height: 0; border: 0"></iframe>
<noscript>
<div
style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
Your web browser must have JavaScript enabled in order for this
application to display correctly.</div>
</noscript>
<h1>Web Application Starter Project</h1>
<table align="center">
<tr>
<td colspan="2" style="font-weight: bold;">Please enter your
name:</td>
</tr>
<tr>
<td id="formContainer"></td>
<td id="buttonContainer"></td>
</tr>
<tr>
<td colspan="2" style="color: red;" id="errorLabelContainer"></td>
</tr>
</table>
</body>
</html> |
je m'excuse si c'est très long, mais je tiens à tout préciser pour recevoir la bonne démarche, Merci d'avance et énormément