Я занимаюсь разработкой простого приложения (использующего GWT RPC и Hibernate) для вставки данных в базу данных и их извлечения.С добавлением пользовательского метода все работало нормально.
Теперь я пишу метод для извлечения данных из базы данных и отображения.Это вызывает ошибки исходного пути, когда модуль загружается в браузер.
Структура проекта в Eclipse:
-src
-user.hbm.xml
-hibernate.cfg.xml
->rpctest
->Rpctest.gwt.xml
->rpctest.hibDomain
->User.java
->rpctest.client
->Rpctest.java
->service interfaces
->rpctest.server
->service implementation
->HibernateUtil.java
Вот трассировка стека:
[DEBUG] [rpctest] - Validating newly compiled units
[TRACE] [rpctest] - Finding entry point classes
[ERROR] [rpctest] - Unable to find type 'rpctest.client.Rpctest'
[ERROR] [rpctest] - Hint: Previous compiler errors may have made this type unavailable
[ERROR] [rpctest] - Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
[ERROR] [rpctest] - Failed to load module 'rpctest' from user agent 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)' at 127.0.0.1:49465
Rpctest.gwt.xml
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='rpctest'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.clean.Clean'/>
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits -->
<!-- Specify the app entry point class. -->
<entry-point class='rpctest.client.Rpctest'/>
<!-- Specify the paths for translatable code -->
<source path='rpctest.client.Rpctest'/>
<source path='server'/>
<source path='hibDomain.User'/>
</module>