Friday, April 29, 2011

Re: Trying to send image to server

Hi,

Thanks.
So I should have the Email class in the shared folder?
Also should the module.gwt.xml file be updated?

Actually I am trying to implement the functionality of sending email
from my gwt application.
I have the functionality up and running on the server. All it needs is
the
email addresses from the client and the image that should be sent from
the client to the server.
Hence the need for class email which has all these attributes
enclosed.
From what I read gwt allows the user defined classes to be sent to the
server provided they are serialized.
Really appreciate your help.

Cheers,
Sayali

On Apr 29, 8:36 am, Alan Chaney <a...@mechnicality.com> wrote:
> You need to make sure that your client class is in the *server's* classpath. The exception below
> indicates that its not.
>
> I make it a practice to have a 'shared' package hierarchy parallel to my client packages and ensure
> that:
>
> A. shared is declared in the module gwt.xml file
>
> B. shared is also available to the server C/P
>
> HTH
>
> Alan
>
> On 4/29/2011 6:25 AM, Patssay wrote:
>
>
>
>
>
>
>
>
>
> > Hi,
>
> > I am trying to send an image from client to server.
> > I have used ImageResources on client side to load images.
> > but now i want to send the image to server side and send mail
> > from the server side?
>
> > I tried creating class on client side and made it seriablizable.
> > but it throws errors.
>
> > aused by: java.lang.ClassNotFoundException:
> > umd.hci.greetingcardmaker.client.Email
> >    at java.lang.ClassLoader.findClass(Unknown Source)
> >    at java.lang.ClassLoader.loadClass(Unknown Source)
> >    at java.lang.ClassLoader.loadClass(Unknown Source)
> >    at
> > org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java :
> > 352)
> >    at
> > org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java :
> > 337)
> >    at java.lang.Class.forName0(Native Method)
> >    at java.lang.Class.forName(Unknown Source)
> >    at
> > com.google.gwt.user.server.rpc.RPC.getClassFromSerializedName(RPC.java:
> > 700)
> >    at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:290)
> >    ... 22 more
>
> > Email is my defined client side class.
>
> > Thanks
> > Sayali
>
> --
> Alan Chaney
> CTO and Founder, Mechnicality, Inc.www.mechnicality.com

--
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 google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment