No source code is available for type java.io.FileNotFoundException

193 views
Skip to first unread message

Ankur Agrawal

unread,
Nov 5, 2011, 10:29:22 AM11/5/11
to Google Web Toolkit
Hi,
When i am trying to use File Handling at client side and so for the
same i have to use FileNotFoundException handling. But i am getting
following error:
No source code is available for type java.io.FileNotFoundException;
did you forget to inherit a required module?

It seems that the Emulated GWT JRE library doesn't include this
Exception class. How can i fix this error. Please suggest ?

Thanks,
Ankur

Brandon Donnelson

unread,
Nov 5, 2011, 11:37:47 AM11/5/11
to google-we...@googlegroups.com
Some Java classes are not emulated on the client side or translated into javascript. You'll have to use that in the .server.* side area. 

Brandon

Kevin Jordan

unread,
Nov 6, 2011, 10:24:07 AM11/6/11
to Google Web Toolkit
Are you talking about using the HTML 5 File API? If so, you should
never run into a FileNotFoundException there if that's one you're
adding since you can't directly open a file, it has to be done with
either a request to the server or through user interaction with a file
dialog or drag and drop. If it's the server that's going to be
throwing that error during an RPC function or something, I think the
client would just get an InvocationException anyways if you're
checking instanceof or something on the exception in the onFailure
method
Reply all
Reply to author
Forward
0 new messages