1

動作する gwtp アプリケーションがあります。「-strict」タグを付けてコンパイルすると、サーバー側のコードで大量のエラーが発生します (サーバー側のみ):

スーパー開発モードを使用すると、これらのコンパイル エラーが発生しますが、コードは機能します。

Mac 10.8 OS で Juno、GWT 2.5 を使用しています

         [ERROR] Errors in 'file:/tf/server/curl/CurlActionHandler.java'
     [ERROR] Line 16: No source code is available for type com.gwtplatform.dispatch.server.actionhandler.ActionHandler<A,R>; did you forget to inherit a required module?
     [ERROR] Line 19: No source code is available for type javax.servlet.http.HttpServletRequest; did you forget to inherit a required module?
     [ERROR] Line 21: No source code is available for type javax.servlet.ServletContext; did you forget to inherit a required module?
     [ERROR] Line 32: No source code is available for type com.gwtplatform.dispatch.server.ExecutionContext; did you forget to inherit a required module?
  [ERROR] Errors in 'file:/tf/server/database/DataBaseServiceImpl.java'
     [ERROR] Line 18: No source code is available for type java.sql.Connection; did you forget to inherit a required module?
     [ERROR] Line 43: The method forName(String) is undefined for the type Class
     [ERROR] Line 44: No source code is available for type java.sql.DriverManager; did you forget to inherit a required module?
     [ERROR] Line 64: No source code is available for type java.sql.ResultSet; did you forget to inherit a required module?
     [ERROR] Line 68: No source code is available for type java.sql.Statement; did you forget to inherit a required module?
     [ERROR] Line 80: No source code is available for type java.sql.SQLException; did you forget to inherit a required module?
     [ERROR] Line 143: No source code is available for type java.sql.PreparedStatement; did you forget to inherit a required module?
     [ERROR] Line 166: No source code is available for type java.lang.ClassNotFoundException; did you forget to inherit a required module?
     [ERROR] Line 181: No source code is available for type java.io.ObjectInputStream; did you forget to inherit a required module?
     [ERROR] Line 183: No source code is available for  type java.io.ByteArrayInputStream; did you forget to inherit a required module?
  [ERROR] Errors in 'file:/tf/server/flight/results/FlightToServerHandler.java'
     [ERROR] Line 23: No source code is available for type com.gwtplatform.dispatch.server.actionhandler.ActionHandler<A,R>; did you forget to inherit a required module?
     [ERROR] Line 26: No source code is available for type javax.servlet.http.HttpServletRequest; did you forget to inherit a required module?
     [ERROR] Line 28: No source code is available for type javax.servlet.ServletContext; did you forget to inherit a required module?
     [ERROR] Line 39: No source code is available for type com.gwtplatform.dispatch.server.ExecutionContext; did you forget to inherit a required module?
  [ERROR] Errors in 'file:/tf/server/flight/results/FlightbToServerHandler.java'
     [ERROR] Line 23: No source code is available for type com.gwtplatform.dispatch.server.actionhandler.ActionHandler<A,R>; did you forget to inherit a required module?
     [ERROR] Line 26: No source code is available for type javax.servlet.http.HttpServletRequest; did you forget to inherit a required module?
     [ERROR] Line 28: No source code is available for type javax.servlet.ServletContext; did you forget to inherit a required module?
     [ERROR] Line 39: No source code is available for type com.gwtplatform.dispatch.server.ExecutionContext; did you forget to inherit a required module?
  [ERROR] Errors in 'file:/tf/server/flight/results/LoadFlightToServerHandler.java'
     [ERROR] Line 27: No source code is available for type com.gwtplatform.dispatch.server.actionhandler.ActionHandler<A,R>; did you forget to inherit a required module?
     [ERROR] Line 30: No source code is available for type javax.servlet.http.HttpServletRequest; did you forget to inherit a required module?
     [ERROR] Line 32: No source code is available for type javax.servlet.ServletContext; did you forget to inherit a required module?
     [ERROR] Line 43: No source code is available for type com.gwtplatform.dispatch.server.ExecutionContext; did you forget to inherit a required module?
       [ERROR] Errors in 'file:/tf/server/flight/results/parser/AirlinesServer.java'
     [ERROR] Line 53: No source code is available for type java.sql.ResultSet; did you forget to inherit a required module?
     [ERROR] Line 60: No source code is available for type java.sql.SQLException; did you forget to inherit a required module?
  [ERROR] Errors in 'file:/tf/server/flight/results/parser/AirportsServer.java'
     [ERROR] Line 67: No source code is available for type java.sql.ResultSet; did you forget to inherit a required module?
     [ERROR] Line 86: No source code is available for type java.sql.SQLException; did you forget to inherit a required module?
  [ERROR] Errors in 'file:/tf/server/flight/results/parser/DateField.java'
     [ERROR] Line 83: No source code is available for type java.util.TimeZone; did you forget to inherit a required module?
     [ERROR] Line 85: No source code is available for type java.text.DateFormat; did you forget to inherit a required module?
     [ERROR] Line 85: No source code is available for type java.text.SimpleDateFormat; did you forget to inherit a required module?
     [ERROR] Line 157: No source code is available for type java.util.Calendar; did you forget to inherit a required module?
     [ERROR] Line 157: No source code is available for type java.util.GregorianCalendar; did you forget to inherit a required module?
   [ERROR] Errors in 'file:/tf/server/flight/results/timezone/TimezoneUtil.java'
     [ERROR] Line 16: No source code is available for type com.google.gwt.dev.util.collect.HashMap<K,V>; did you forget to inherit a required module?
     [ERROR] Line 70: No source code is available for type java.sql.ResultSet; did you forget to inherit a required module?
     [ERROR] Line 79: No source code is available for type java.sql.SQLException; did you forget to inherit a required module?
  [ERROR] Errors in 'file:/tf/server/flight/search/airport/autocomplete/AutocompleteToServerHandler.java'
     [ERROR] Line 18: No source code is available for type com.gwtplatform.dispatch.server.actionhandler.ActionHandler<A,R>; did you forget to inherit a required module?
     [ERROR] Line 21: No source code is available for type javax.servlet.http.HttpServletRequest; did you forget to inherit a required module?
     [ERROR] Line 23: No source code is available for type javax.servlet.ServletContext; did you forget to inherit a required module?
     [ERROR] Line 34: No source code is available for type com.gwtplatform.dispatch.server.ExecutionContext; did you forget to inherit a required module?
  [ERROR] Errors in 'file:/tf/server/flight/search/airport/nearairport/NearAirportsToServerHandler.java'
     [ERROR] Line 20: No source code is available for type com.gwtplatform.dispatch.server.actionhandler.ActionHandler<A,R>; did you forget to inherit a required module?
     [ERROR] Line 23: No source code is available for type javax.servlet.http.HttpServletRequest; did you forget to inherit a required module?
     [ERROR] Line 25: No source code is available for type javax.servlet.ServletContext; did you forget to inherit a required module?
     [ERROR] Line 36: No source code is available for type com.gwtplatform.dispatch.server.ExecutionContext; did you forget to inherit a required module?
  [ERROR] Errors in 'file:/tf/server/flight/search/airport/popular/PopularToServerHandler.java'
     [ERROR] Line 19: No source code is available for type com.gwtplatform.dispatch.server.actionhandler.ActionHandler<A,R>; did you forget to inherit a required module?
     [ERROR] Line 22: No source code is available for type javax.servlet.http.HttpServletRequest; did you forget to inherit a required module?
     [ERROR] Line 24: No source code is available for type javax.servlet.ServletContext; did you forget to inherit a required module?
     [ERROR] Line 35: No source code is available for type com.gwtplatform.dispatch.server.ExecutionContext; did you forget to inherit a required module?
  [ERROR] Errors in 'file:/tf/server/guice/DispatchServletModule.java'
     [ERROR] Line 7: No source code is available for type com.google.inject.servlet.ServletModule; did you forget to inherit a required module?
     [ERROR] Line 12: No source code is available for type com.gwtplatform.dispatch.server.guice.DispatchServiceImpl; did you forget to inherit a required module?
  [ERROR] Errors in 'file:/tf/server/guice/GuiceServletConfig.java'
     [ERROR] Line 7: No source code is available for type com.google.inject.servlet.GuiceServletContextListener; did you forget to inherit a required module?
     [ERROR] Line 10: No source code is available for type com.google.inject.Injector; did you forget to inherit a required module?
     [ERROR] Line 11: No source code is available for type com.google.inject.Guice; did you forget to inherit a required module?
  [ERROR] Errors in 'file:/tf/server/guice/ServerModule.java'
     [ERROR] Line 19: No source code is available for type com.gwtplatform.dispatch.server.guice.HandlerModule; did you forget to inherit a required module?
  [ERROR] Errors in 'file:/tf/shared/library/CurlUtil.java'
     [ERROR] Line 27: No source code is available for type java.net.URL; did you forget to inherit a required module?
     [ERROR] Line 28: No source code is available for type java.net.HttpURLConnection; did you forget to inherit a required module?
     [ERROR] Line 30: No source code is available for type java.io.InputStreamReader; did you forget to inherit a required module?
     [ERROR] Line 31: No source code is available for type java.io.BufferedReader; did you forget to inherit a required module?
     [ERROR] Line 36: No source code is available for type java.net.MalformedURLException; did you forget to inherit a required module?

私の .xml ファイルに何か関係があるのではないかと思いました

<module rename-to='tf'>
  <!-- Inherit the core Web Toolkit stuff.                        -->
  <inherits name='com.google.gwt.user.User'/>
  <inherits name="com.google.gwt.uibinder.UiBinder" />
  <inherits name="com.google.gwt.inject.Inject" />
  <!-- 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.standard.Standard'/>
  <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
  <!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/>     -->

  <!-- Other module inherits                   -->
  <inherits name='com.gwtplatform.dispatch.Dispatch'/>
  <inherits name='com.gwtplatform.mvp.Mvp'/>

  <!-- Super Dev mode -->
  <add-linker name="xsiframe"/>
  <set-configuration-property name="devModeRedirectEnabled" value="true"/>
  <set-property name="compiler.useSourceMaps" value="true"/>

  <!-- Logging module inherits                                      -->
  <inherits name="com.google.gwt.logging.Logging"/>
  <set-property name="gwt.logging.logLevel" value="INFO"/>          # To change the default logLevel SEVERE
  <!-- 
  <set-property name="gwt.logging.enabled" value="FALSE"/>            # To disable logging
  <set-property name="gwt.logging.consoleHandler" value="DISABLED"/>  # To disable a default Handler
  -->

  <!-- Specify the app entry point class.                         -->
  <entry-point class='com.tf.client.Tf'/>

  <!-- Specify the paths for translatable code                    -->
  <source path='client'/>
  <source path='shared'/>
  <source path='server'/>

  <!-- This is required for Gwt-Platform Proxy's generator -->
  <define-configuration-property name="gin.ginjector" is-multi-valued="false" />
  <set-configuration-property name="gin.ginjector" value="com.tf.client.gin.ClientGinjector" />

  <!-- <set-configuration-property name="CssResource.obfuscationPrefix" value="empty" />     -->
  <set-configuration-property name="CssResource.style" value="pretty"/>
</module>

何か案は?

4

1 に答える 1

6

モジュールの.xmlから次の行を削除してみてください。

<source path='server'/>

ソース要素は、翻訳可能なコード、つまりjavascriptにコンパイルされるコードのパスを指定するため、 JREエミュレーションリファレンスにリストされていないコードを含めないでください。

于 2012-09-06T16:02:45.160 に答える