Question

I have a gwtp application that works. When I compile it with the "-strict" tag I get alot of error in my server side code (only server side):

When I use super dev mode, I get these compile error but the code works.

I'm using Juno, GWT 2.5, on a Mac 10.8 OS

         [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?

I thought it might have something to do with my .xml file

<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>

Any ideas?

Was it helpful?

Solution

Try to remove this line from your module .xml:

<source path='server'/>

The source elements specify the paths for translatable code, i.e. code to be compiled to javascript, so it should not include any code not listed in the JRE Emulation Reference.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top