Recommended: Sing it, brah! 5 fabulous songs for developers
JW's Top 5
Back to:
www.javaworld.com/javaworld/jw-12-2006/jw-1213-gwt.html.
[ERROR] Unable to instantiate 'com.example.booksearch.server.SearchServiceImpl'
java.lang.ClassNotFoundException: com.example.booksearch.server.SearchServiceImplFrom Log you will see the following:
com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException
Serialization status
Instantiable
Path
'com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException' is reachable as a subtype of type 'class com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException'
Started from 'com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException'also has some issues with the following code snippet which I infact replaced:
private Document getBookListXMLDocument(String searchTerm)
throws IOException, ParserConfigurationException, SAXException {
String url = SEARCH_SITE_URL_BASE + searchTerm;
HttpClient client = new HttpClient();
GetMethod get = new GetMethod(url);The program encounters exception as soon as GetMethod is invoked. Instead I used:
HttpURLConnection urlConnection = (HttpURLConnection) (new URL(url)
.openConnection());
InputStream in = urlConnection.getInputStream();
DocumentBuilder builder = builderFactory.newDocumentBuilder();
return builder.parse(in);