Touchkit addon - The server cannot be reached


I have problem with touchkit addon.
Touchkit has OfflineModeEntrypoint class. In that class is timer scheduled for 5 seconds and after that if applicaiton didn’t start the followed message is shown:
“The server cannot be reached
The application didn’t start properly”
Could someone please tell me what should I do to increase this time or disable this message?

Best regards,

Unfortunately the 5 second timeout is not directly configurable. What you can do though, is use
GWT’s deferred binding
and replace the entry point with your own custom class. So, in your *.gwt.xml, do something like:

<replace-with class="com.example.client.MyCustomOfflineModeEntrypoint">
    <when-type-is class="com.vaadin.addon.touchkit.gwt.client.offlinemode.OfflineModeEntrypoint" />

And then implement MyCustomOfflineModeEntrypoint with whatever timeout you prefer.

Thank you fo reply.
I have alredy tried this and this didn’t work and I don’t know why.

I tried to do this in two ways.
Common file is MyCustomOfflineModeEntrypoint (except package which wolud be change):

package com.vaadin.addon.touchkit.gwt.client.offlinemode;


public class MyCustomOfflineModeEntrypoint implements EntryPoint {

public void onModuleLoad() {
    System.out.println("Here I am!");

In my *.gwt.xml I added:

<replace-with class="com.example.client.MyCustomOfflineModeEntrypoint"> <when-type-is class="com.vaadin.addon.touchkit.gwt.client.offlinemode.OfflineModeEntrypoint" /> </replace-with> And I have following error during building:

[INFO] Compiling module ui.widgetset.DashboardfrontendWidgetset [INFO] Validating units: [INFO] Ignored 1 unit with compilation errors in first pass. [INFO] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors. [INFO] [ERROR] Unexpected internal compiler error [INFO] java.lang.NoClassDefFoundError: com.example.client.MyCustomOfflineModeEntrypoint [INFO] at [INFO] at [INFO] at [INFO] at [INFO] at [INFO] at [INFO] at [INFO] at [INFO] at [INFO] at$ [INFO] at [INFO] at [INFO] at 2)
In my *.gwt.xml I added:

<replace-with class="com.vaadin.addon.touchkit.gwt.client.offlinemode.MyCustomOfflineModeEntrypoint"> <when-type-is class="com.vaadin.addon.touchkit.gwt.client.offlinemode.OfflineModeEntrypoint" /> </replace-with> During project building I got following message:

 Compiling module ui.widgetset.MyWidgetset
    Validating units:
       Ignored 1 unit with compilation errors in first pass.
 Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
 Could not find module entry point class 'com.vaadin.addon.touchkit.gwt.client.offlinemode.OfflineModeEntrypoint'

Do you have any idea why these errors are shown?

Best regards

With deferred binding you always have to extend the class you’re replacing, just implementing the same interfaces isn’t enough. Sorry if I was unclear on that earlier. So, instead of public class MyCustomOfflineModeEntrypoint implements EntryPoint { do this:

public class MyCustomOfflineModeEntrypoint extends OfflineModeEntrypoint { Then it should compile just fine.

As for the package names, they shouldn’t matter as long as the class is in the source path of your module. If I were you though, I’d use the default source path which is the
package inside the package your *.gwt.xml file is in.

It works!
Thanky you very much for help :slight_smile: