No source code available for Scribe in GWT

霸气de小男生 提交于 2020-01-05 13:44:10

问题


I'm getting this error trying to Compile my GWT Project:

No source code is available for type org.scribe.oauth.OAuthService; did you forget to inherit a required module?

I have included the scribe .jar file in my "war/WEB-INF/lib", and imported it. Maybe I have to add it to the app_name.gwt.xml? I have tried to do it, but Scribe does not contains any .gwt.xml file.


回答1:


I use Scribe with no problems. But it's a server-side library. You should have no references to it in your GWT code.




回答2:


In GWT you are restricted to use only some of the java classes since it is not possible to convert all the java classes to javascript. You can find a list of the allowed classes in this link: List of Classes

And it is not possible use classes related to Threads,IO,Network, etc...because of the compatabilty.




回答3:


You have to have the Java source code for Scribe in order for the GWT compiler to compile it (translate it into javascript). If it is available then you can add it to your source tree and and specify that it is "inherited" in the gwt.xml document.

Of course, check with Google's GWT forum for any updates. I know they are working on a better solution to this problem.

I just checked and Google has OAuth available as an extension to GWT. That is your best solution. Look here:

code.google.com/p/gwt-oauth2/



来源:https://stackoverflow.com/questions/16202565/no-source-code-available-for-scribe-in-gwt

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!