Когда я создаю проект веб-приложения в Eclipse для создания учетной записи пользователя с использованием Provisioning API, я получаю следующие ошибки

#java #gwt

#java #gwt

Вопрос:

 [DEBUG] [createuser] - Validating newly compiled units
    [ERROR] [createuser] - Errors in 'file:/D:/Neha_workspace/CreateUser/src/com/shared/AppsForYourDomainClient.java'
        [ERROR] [createuser] - Line 324: No source code is available for type java.net.URL; did you forget to inherit a required module?
        [ERROR] [createuser] - Line 1059: The method exit(int) is undefined for the type System
    [ERROR] [createuser] - Errors in 'file:/D:/Neha_workspace/CreateUser/src/com/shared/api/gbase/client/AttributeHistogram.java'
        [ERROR] [createuser] - Line 340: No source code is available for type org.xml.sax.Attributes; did you forget to inherit a required module?
    [ERROR] [createuser] - Errors in 'file:/D:/Neha_workspace/CreateUser/src/com/shared/api/gbase/client/ConversionUtil.java'
        [ERROR] [createuser] - Line 239: No source code is available for type com.google.common.collect.Multimap<K,V>; did you forget to inherit a required module?
    [ERROR] [createuser] - Errors in 'file:/D:/Neha_workspace/CreateUser/src/com/shared/api/gbase/client/FeedURLFactory.java'
        [ERROR] [createuser] - Line 35: No source code is available for type java.net.URL; did you forget to inherit a required module?
        [ERROR] [createuser] - Line 75: No source code is available for type java.net.MalformedURLException; did you forget to inherit a required module?
        [ERROR] [createuser] - Line 117: No source code is available for type java.net.URLEncoder; did you forget to inherit a required module?
    [ERROR] [createuser] - Errors in 'file:/D:/Neha_workspace/CreateUser/src/com/shared/api/gbase/client/GmAttributes.java'
        [ERROR] [createuser] - Line 142: No source code is available for type org.xml.sax.Attributes; did you forget to inherit a required module?
    [ERROR] [createuser] - Errors in 'file:/D:/Neha_workspace/CreateUser/src/com/shared/api/gbase/client/GmDisapproved.java'
        [ERROR] [createuser] - Line 59: No source code is available for type org.xml.sax.Attributes; did you forget to inherit a required module?
    [ERROR] [createuser] - Errors in 'file:/D:/Neha_workspace/CreateUser/src/com/shared/api/gbase/client/GmPublishingPriority.java'
        [ERROR] [createuser] - Line 122: No source code is available for type org.xml.sax.Attributes; did you forget to inherit a required module?
  

Комментарии:

1. Вы забыли наследовать требуемый модуль?

2. Вам нужно добавить более подробную информацию здесь

Ответ №1:

Вы использовали классы, которые не поддерживаются на стороне клиента GWT. Вы должны переместить их на сторону сервера (например, сервлеты GWT RPC) и вызвать их из клиентского кода, используя асинхронные обратные вызовы. Классы, которые могут использоваться на стороне клиента GWT, перечислены здесь:http://code.google.com/intl/pl-PL/webtoolkit/doc/2.2/RefJreEmulation.html .