Hi Ivan,

As Jason mentioned below, there is an issue where the Google Eclipse Plugin
does not automatically copy the artifacts from web app projects that your
project depends on into the server's WEB-INF/lib directory. This means that
classes from these projects will not be available to the server at runtime,
which is why you're getting a "No Such Servlet" error.

We're planning on addressing this in a future version of the plugin. For
now, you can work around the problem via the suggestions that Jason
mentioned.


Rajeev

On Mon, May 4, 2009 at 8:23 AM, Ivan M <[email protected]> wrote:

>
> Could you (or somebody) be more specific about this?. I can't run the
> project in hosted mode, I get the following error:
>
> java.lang.IllegalStateException: No such servlet: GwtLoginService
>
> The service is in another project and it looks like it isn't started
> when starting the main project. I have ticked the GwtLogin in
> Eclipse's Project References of the main project. Also, I have added
> this to the "web.xml" of the main project:
>
>    <servlet>
>        <servlet-name>gwtLoginServiceImpl</servlet-name>
>        <servlet-class>x.gwtlogin.server.GwtLoginServiceImpl</servlet-
> class>
>    </servlet>
>
>    <servlet-mapping>
>        <servlet-name>GwtLoginService</servlet-name>
>        <url-pattern>/gwtlogin/GwtLoginService</url-pattern>
>    </servlet-mapping>
>
> I have copied the module from GwtLogin to the main project, excluding
> the server implementation.
> Thank you,
> Ivan
>
>
> On 17 abr, 17:31, Jason Parekh <[email protected]> wrote:
> > BTW, another related issue when dealing with dependentprojectsis
> > ensuring GWT inheritance is defined properly.
> >
> > For example, imagine project A has a GWT module MA and project B has a
> > GWT module MB.  If the types in MA refer to the types in MB then MA
> > must inherit from MB.
> >
> > To properly configure, please ensure that:
> > - the Java project A depends on the Java project B in Eclipse, and
> > - MA's XML file declares its inheritance of MB
> >
> > jason
> >
> >
> >
> > On Fri, Apr 17, 2009 at 11:19 AM, Jason Parekh <[email protected]>
> wrote:
> > > Hey Joe,
> >
> > > It looks like you're hitting an issue where the Eclipse plugin does
> > > not include a dependent project's compiled classes into the packaged
> > > WAR that is deployed to the server.  We're aware of the issue and it
> > > will be fixed in a future release.
> >
> > > There are a couple workarounds, one of which you've tried (package the
> > > dependent project into a JAR, and statically link that into the main
> > > project).  The other is to set the dependent project's output
> > > directory to the main project's output directory.  When the hosted
> > > mode server runs (or the app engine tools upload to app engine), all
> > > classes in this directory will be included (including the dependent
> > > project's).
> >
> > > jason
> >
> > > On Fri, Apr 17, 2009 at 8:31 AM, Joe Hudson <[email protected]> wrote:
> >
> > >> Thank you Salvador for your reply,
> >
> > >> I am have tried that (I think) and that was when I experience
> > >> described above.  Please let me explain how I am doing that because
> > >> maybe I am doing something wrong:
> >
> > >> 1) Open the Run Configurations menu
> > >> 2) Select my target under "Web Application" (with the google icon)
> > >> 3) Go to the "Classpath" tab, select "User Entries", click "Add
> > >> Project" and select my project
> > >> 4) Go to the "Source" tab, click "Add", select "Java Project" and
> > >> select my project
> > >> 5) Click "Apply"
> >
> > >> So, this is what I have tried and I get errors when Istartup the app
> > >> that it can not find the source of the classes from my server
> > >> project.  Any ideas?
> >
> > >> Thanks
> >
> > >> Joe
> >
> > >> On Apr 17, 4:13 am, Salvador Diaz <[email protected]> wrote:
> > >>> Add the other project to the classpath instead of adding the jar
> >
> > >>> On Apr 17, 7:10 am, Joe Hudson <[email protected]> wrote:
> >
> > >>> > Hi,
> >
> > >>> > I have a separate eclipse project containing code used on the
> server-
> > >>> > side of the RPC.  When I use the google plugin to recompile my GWT
> > >>> > app, I get the error messages saying that the source code can't be
> > >>> > found.  I can get this to work by exporting the project to a jar
> (with
> > >>> > source) and referencing the jar (as opposed to the project
> directly)
> > >>> > in the classpath of the GWT project.
> >
> > >>> > This is do-able but I would really like to know if this is possible
> > >>> > and if there is anything special that has to be done for the plugin
> to
> > >>> > recognize the source from another project.
> >
> > >>> > I am pretty sure that the plugin sees the classpath as it is not
> > >>> > giving an error that the imported gwt.xml file can not be found.
> >
> > >>> > Thank you very much for any help you might have to offer.
> >
> > >>> > Joe- Ocultar texto de la cita -
> >
> > - Mostrar texto de la cita -
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
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