i've find all topics about this in gwt groups,but still can't make it
out. who can help me.
everytime i debug the project in eclipse ,the shell tell:
[ERROR] Unable to instantiate 'com.mails.server.MailsBoxServiceImpl'
java.lang.ClassNotFoundException: com.mails.server.MailsBoxServiceImpl
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:279)
at java.lang.ClassLoader.loadClass(ClassLoader.java:236)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:303)
at java.lang.Class.forName(Class.java:164)
at
com.google.gwt.dev.shell.GWTShellServlet.tryGetOrLoadServlet(GWTShellServlet.java:660)
at
com.google.gwt.dev.shell.GWTShellServlet.service(GWTShellServlet.java:165)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
all related files are:
client:
MailsList.java
MailsBox.java
MailsBoxService.java
MailsBoxServiceAsync.java
server:
MailsBoxServiceImpl.java
in MailsList i have:
MailsBoxServiceAsync mailServiceAsync=
(MailsBoxServiceAsync)GWT.create(MailsBoxService.class);
ServiceDefTarget mailServiceDefTarget=
(ServiceDefTarget)mailServiceAsync;
MailList(){
String staticResponseURL = GWT.getModuleBaseURL();
staticResponseURL += "/list";
sd.setServiceEntryPoint(staticResponseURL);
......
......
fetchMail("getPage",startIndex);
}
private void fetchMail(String flag,int startIndex)
{
AsyncCallback callBack = new AsyncCallback(){
public void onSuccess(Object result){
pageArrayList = (ArrayList)result;
update();
}
public void onFailure(Throwable caught){
}
};
mailServiceAsync.getPage(flag,startIndex, callBack);
}
and in the MailsBox.gwt.xml i have
<module>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<!-- Specify the app entry point class. -->
<entry-point class='com.mails.client.MailsBox'/>
<servlet path='/list' class='com.mails.server.MailsBoxServiceImpl'/>
</module>
so,what's wrong with it . i'm so pussel confused. can anyone help me.
Does your server implementation stored in com.mails.server package as
specified into MailsBox.gwt.xml ?
Does the class are in your classpath ?
Do you run your application in web version www not hosted mode with GWT
browser ?
If you do have a web context before www/.... url like
http://localhost:8080/MY_MAIL_CONTEXT/....
if it is the case you have to modify :
1 - you url to retrieve the service with /MY_MAIL_CONTEXT/list into
your MailsBox.gwt.xml config file
2 - the staticResponseURL with staticResponseURL +=
"/MY_MAIL_CONTEXT/list";
:)
Broussalo
after i add /com.mails.MailsBox ,it still don't work,has the same
problem.