Hi all,

First off, I am a new user and have built a very simple application.
It works fine under hosted mode.  It compiles with no errors.  When I
deploy it to the web server and point a browser at it, it throws a
ClassNotFoundException.  I suspect this is a really simple problem
(probably caused by a really stupid error).  This is driving me crazy
and I would really appreciate ANY help or suggestions anyone could
throw my way.

I have included a lot of error logs, copies of web.xml, directory
structures etc. below.

Trying to work through this is a learning experience, but I am
stumped.  The fact that the server is able to sort out the URL sent
from the client enough to know the name of the object is
ca.KeithFuller.server.CorpusServiceImpl suggests to me that the server
is finding the web.xml file, which suggests that it should be able to
find the object since I believe that WEB-INF/classes is always on the
search path.  The file CorpusServiceImpl.class is in WEB-INF/classes,
and the corresponding java file starts with:

package ca.KeithFuller.server;

import java.util.*;                              // for Scanner
import java.io.*;                                // for println

import ca.KeithFuller.client.CorpusSearchReturns;
import ca.KeithFuller.client.CorpusSearchService;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;

public class CorpusServiceImpl extends RemoteServiceServlet
implements CorpusSearchService
{
...

A whole pile of details follow:

I use GWT 1.4.61

I use Eclipse 3.2.2

My webserver uses Linux, Tomcat and Apache.

I use FireFox 3.0.1 and the URL is 
http://www.keithfuller.ca:9108/CorpusSearch/CorpusSearch.html

The client code contains:
...
                // Create the proxy object
                final CorpusSearchServiceAsync serviceProxy =
                        (CorpusSearchServiceAsync) 
GWT.create(CorpusSearchService.class);

                // Cast the proxy object to ServiceDefTarget
                String serviceUrl = GWT.getModuleBaseURL() + "corpus-search";
//              if (GWT.isScript()){
//                      serviceUrl = "/corpus-search";
//              }
                
((ServiceDefTarget)serviceProxy).setServiceEntryPoint(serviceUrl);
...



The localhost.2008-09-18.log file contains:
Sep 18, 2008 10:21:04 AM org.apache.catalina.core.ApplicationContext
log
INFO: Marking servlet corpus-search as unavailable
Sep 18, 2008 10:21:04 AM org.apache.catalina.core.ApplicationContext
log
SEVERE: Error loading WebappClassLoader
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
[EMAIL PROTECTED]
 ca.KeithFuller.server.CorpusServiceImpl
java.lang.ClassNotFoundException:
ca.KeithFuller.server.CorpusServiceImpl
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1362)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1208)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:
1068)
        at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:
791)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
127)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
174)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
127)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
117)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
108)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
151)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
874)
        at org.apache.coyote.http11.Http11BaseProtocol
$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:
665)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:
528)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:
81)
        at org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java:689)
        at java.lang.Thread.run(Thread.java:595)
Sep 18, 2008 10:21:04 AM org.apache.catalina.core.StandardWrapperValve
invoke
SEVERE: Allocate exception for servlet corpus-search
java.lang.ClassNotFoundException:
ca.KeithFuller.server.CorpusServiceImpl
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1362)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1208)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:
1068)
        at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:
791)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
127)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
174)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
127)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
117)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
108)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
151)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
874)
        at org.apache.coyote.http11.Http11BaseProtocol
$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:
665)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:
528)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:
81)
        at org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java:689)
        at java.lang.Thread.run(Thread.java:595)

The web server has the directory structure:
apache-tomcat-5.5.25/webapps
        CorpusSearch
                ... a pile of html, rpc, js, html, css, and...
                web.xml
                WEB-INF
                        classes
                                CorpusSearch.class
                                CorpusSearchReturns.class
                                CorpusSearchServiceAsync.class
                                CorpusSearchData.class
                                CorpusSearchService.class
                                CorpusServiceImpl.class
                                web.xml
                        lib
                                gwt-servlet.jar
                        web.xml


The dev machine directory structure is:
Eclipse Workspace
        .metadata
        SearchProject
                ...
                src
                  ca
                    KeithFuller
                        CorpusSearch.gwt.xml
                        client
                                CorpusSearch.java
                                CorpusSearchReturns.java
                                CorpusSearchServiceAsync.java
                                CorpusSearchData.java
                                CorpusSearchService.java
                        server
                                CorpusServiceImpl.java
                        public
                                CorpusSearch.html
                                SearchProject.css

The Eclipse Package Explorer shows:
SearchProject
        src
                ca.KeithFuller
                        client  (a package)
                                CorpusSearch.java
                                CorpusSearchReturns.java
                                CorpusSearchServiceAsync.java
                                CorpusSearchData.java
                                CorpusSearchService.java
                        server  (a package)
                                CorpusServiceImpl.java
                        public  (a folder)
                                CorpusSearch.html
                        CorpusSearch.gwt.xml

CorpusSearch.gwt.xml contains:
<module>

        <!-- Inherit the core Web Toolkit stuff.                  -->
        <inherits name='com.google.gwt.user.User'/>

        <!-- Specify the app entry point class.                   -->
        <entry-point class='ca.KeithFuller.client.CorpusSearch'/>

        <servlet path="/corpus-search"
                 class="ca.KeithFuller.server.CorpusServiceImpl"/>

        <stylesheet src="SearchProject.css"/>

</module>

web.xml (all of them!) contain:
<?xml version="1.0" encoding="UTF-8"?>
<web-app>

        <servlet>
                <servlet-name>corpus-search</servlet-name>
                <servlet-class>ca.KeithFuller.server.CorpusServiceImpl</servlet-
class>
        </servlet>

        <servlet-mapping>
                <servlet-name>corpus-search</servlet-name>
<!--                            <url-pattern>/CorpusSearch</url-pattern>        
        -->
                <url-pattern>/corpus-search</url-pattern>
        </servlet-mapping>

</web-app>

If you got this far and have any ideas, then please let me know.

Thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to