views:

116

answers:

3

I have been trying to build a GWT / Google App Engine web app using the mvp4g framework.

I keep getting an error about Failing to create an instance of my Service via deferred binding.

My Acebankroll.gwt.xml file looks like:

<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='acebankroll'>
    <inherits name='com.google.gwt.user.User'/>
    <inherits name="com.google.gwt.i18n.I18N"/>
    <inherits name='com.google.gwt.user.theme.standard.Standard'/>  
    <inherits name='com.mvp4g.Mvp4gModule'/>
    <entry-point class='com.softamo.acebankroll.client.AceBankroll'/>
     <source path='client'/>  
</module>

My Entry Module looks like:

public class AceBankroll implements EntryPoint {
    public void onModuleLoad() {
        Mvp4gModule module = (Mvp4gModule)GWT.create( Mvp4gModule.class );
        module.createAndStartModule();
        RootPanel.get().add((Widget)module.getStartView());
    }
}

Error Trace

I post the complete error trace as an answer.

FAQ and Trials

I have read that the next list of common mistakes may cause this error:

  • The ServiceAsync interfaces have methods with return values. This is wrong, all methods need to return void.

  • The Service interfaces don't extend the RemoteService interface.

  • The methods in the ServiceAsync interfaces miss the final argument of AsyncCallback.

  • The methods on the two interfaced, ExampleService and ExampleServiceAsync, don't match up exactly (other than the return value and AsyncCallback argument)

I have checked all the above conditions and did not find the problem.

How do you insert your services in the presenters?

Here is a snippet illustrating how I do inject the service in my presenter classes.

protected MainServiceAsync service = null;
@InjectService
public void setService( MainServiceAsync service ) {
    this.service = service;
}

Do you have the required libraries?

Yes, I have commons-configuration-1.6.jar, commons-lang-2.4.jar and mvp4g-1.1.0.jar in my lib directory.

Does your project compiles?

Yes, it does compile. I use Eclipse with GWT/Google App Engine plugin. Next I post my .classpath

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="src" output="test-classes" path="test"/>
    <classpathentry kind="con" path="com.google.appengine.eclipse.core.GAE_CONTAINER"/>
    <classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
    <classpathentry kind="lib" path="lib/commons-configuration-1.6.jar"/>
    <classpathentry kind="lib" path="lib/commons-lang-2.4.jar"/>
    <classpathentry kind="lib" path="lib/mvp4g-1.1.0.jar"/>
    <classpathentry kind="lib" path="test/lib/emma.jar"/>
    <classpathentry kind="lib" path="test/lib/junit-4.5.jar"/>
    <classpathentry kind="lib" path="C:/Users/sdelamo/Programms/eclipse/plugins/com.google.appengine.eclipse.sdkbundle.1.3.1_1.3.1.v201002101412/appengine-java-sdk-1.3.1/lib/testing/appengine-testing.jar"/>
    <classpathentry kind="lib" path="C:/Users/sdelamo/Programms/eclipse/plugins/com.google.appengine.eclipse.sdkbundle.1.3.1_1.3.1.v201002101412/appengine-java-sdk-1.3.1/lib/impl/appengine-api.jar"/>
    <classpathentry kind="lib" path="C:/Users/sdelamo/Programms/eclipse/plugins/com.google.appengine.eclipse.sdkbundle.1.3.1_1.3.1.v201002101412/appengine-java-sdk-1.3.1/lib/impl/appengine-api-labs.jar"/>
    <classpathentry kind="lib" path="C:/Users/sdelamo/Programms/eclipse/plugins/com.google.appengine.eclipse.sdkbundle.1.3.1_1.3.1.v201002101412/appengine-java-sdk-1.3.1/lib/impl/appengine-api-stubs.jar"/>
    <classpathentry kind="lib" path="C:/Users/sdelamo/Programms/eclipse/plugins/com.google.appengine.eclipse.sdkbundle.1.3.1_1.3.1.v201002101412/appengine-java-sdk-1.3.1/lib/impl/appengine-local-runtime.jar"/>
    <classpathentry kind="output" path="war/WEB-INF/classes"/>
</classpath>

Are your Bean Serializable?

Yes, they are serializable. They implements the next interface:

public interface BasicBean extends Serializable  {
    public String getId();      
    public void copy(BasicBean ob); 
}

They all have an empty argument constructor. Some of them have two constructors. One without arguments and one with arguments.

Some of them implement this interface

public interface NameObject extends BasicBean, BaseOwnedObject, Comparable<NameObject>   { 
    public String getName();
    public void setName(String name);       
    public abstract int compareTo(NameObject ob);
}

Can the Comparable cause problems?

How does your service code looks like?

I post my service code:

MainService

@RemoteServiceRelativePath( "main" )
public interface MainService extends RemoteService {
    public List<UserBean> getUsers();    
    public void deleteUser(UserBean user);    
    public void createUser(UserBean user);    
    public void updateUser( UserBean user );        
    public String authenticate(String username, String password);       
    public boolean isSessionIdStillLegal(String sessionId);     
    public void signOut();      
    public boolean userAlreadyExists(String email);     
    public UserBean getByEmail(String email);       
    public void confirmUser(String email);          
    public UserBean getUserById(String id);
}

MainServiceAsync

public interface MainServiceAsync {
    public void getUsers(AsyncCallback<List<UserBean>> callback);    
    public void deleteUser(UserBean user, AsyncCallback<Void> callback);    
    public void createUser(UserBean user, AsyncCallback<Void> callback);    
    public void updateUser( UserBean user, AsyncCallback<Void> callback);       
    public void authenticate(String username, String password, AsyncCallback<String> callback);     
    public void isSessionIdStillLegal(String sessionId, AsyncCallback<Boolean> callback);       
    public void signOut(AsyncCallback<Void> callback);      
    public void userAlreadyExists(String email, AsyncCallback<Boolean> callback);       
    public void getByEmail(String email, AsyncCallback<UserBean> callback );            
    public void confirmUser(String email, AsyncCallback<Void> callback );           
    public void getUserById(String id, AsyncCallback<UserBean> callback);
}

Basic Bean

import java.io.Serializable;    
public interface BasicBean extends Serializable  {
    public String getId();      
    public void copy(BasicBean ob); 
}

User Bean

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class UserBean implements BasicBean {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    protected Long ident;       
    @Persistent
    private String name = null;     
    @Persistent
    private String email = null;        
    @Persistent
    private boolean confirmed = false;      
    @Persistent
    private String password = null;

    public UserBean() { }

    public String getId() {
        if( ident == null ) return null;
        return ident.toString();
    }
    public void setId(String id) {
        this.ident = Long.parseLong(id);
    }           
    public String getEmail( ) { return email; }
    public void setEmail(String email) { this. email = email; }     
    public String getName() { return name; }
    public void setName(String name) { this. name = name; }     
    public String getPassword() { return password; }    
    public void setPassword(String password) {  this.password = password;}      
    public boolean isConfirmed() { return confirmed;}
    public void setConfirmed(boolean confirmed) {this.confirmed = confirmed;}       
    public void copy(BasicBean ob) {
         UserBean user = (UserBean) ob;
        this.name = user.name;
        this.email = user.email;
        this.password = user.password;      
    }
}

Next I post an extract of web.xml
Note. I have 7 other services. I am using the module functionality of MVP4G. I have other servlets defined for each module in web.xml

<servlet>
    <servlet-name>mainServlet</servlet-name>
    <servlet-class>com.softamo.acebankroll.server.MainServiceImpl</servlet-class>
</servlet>

<servlet-mapping>
    <servlet-name>mainServlet</servlet-name>
    <url-pattern>/acebankroll/main</url-pattern>
</servlet-mapping>

Server

BaseServiceImpl

public abstract class BaseServiceImpl extends RemoteServiceServlet {
    protected Map users = new HashMap();
    protected static final MemcacheService memcache = MemcacheServiceFactory.getMemcacheService();
    protected static final Logger log = Logger.getLogger(BaseServiceImpl.class.getName());    
    protected String getSessionId() {
        return getThreadLocalRequest().getSession().getId();
    }    
    protected String getCurrentUserId() {
        String id = getSessionId();
        UserBean user = (UserBean) users.get(id);
        if(user!=null) 
            return user.getId();
        return null;
    }    
    protected void saveBaseObject(BasicBean ob) {
        PersistenceManager pm = JdoUtil.getPm();
        String sessionId = getSessionId();      
        UserBean user = (UserBean) users.get(sessionId);
        if(user!=null) {
            String user_id = user.getId();
            ((BaseOwnedObject)ob).setUserId(user_id);
            pm.makePersistent(ob);
        }           
    }    
    protected void deleteBaseObject(Class classname, String id) {
        PersistenceManager pm = JdoUtil.getPm();                
        pm.deletePersistent( pm.getObjectById(classname, Long.parseLong(id) ));     
    }    
    protected List getAll(Class class_name) {
        PersistenceManager pm = JdoUtil.getPm();
        pm.setDetachAllOnCommit(true);

        Query q = pm.newQuery(class_name);          
        if(q==null) 
            return new ArrayList<BasicBean>();
        q.setFilter("userId == userIdParam");
        q.declareParameters("String userIdParam");          
        String userId = getCurrentUserId();
        return (List) q.execute(userId);
    }    
    public boolean isSessionIdStillLegal(String sessionId) {
        return (users.containsKey(sessionId))? true : false;
    }    
    public void signOut() {
        String id = getSessionId();
        synchronized(this) {
            users.remove(id);
        }
    }    
    public BasicBean getObjectById(Class classname, String id) {
        BasicBean result = null;
        PersistenceManager pm = JdoUtil.getPm();
        pm.setDetachAllOnCommit(true);
        result = pm.getObjectById(classname, Long.parseLong(id) );
        return result;
    }
}

MainServiceImpl

public class MainServiceImpl extends BaseServiceImpl implements MainService {       
    public MainServiceImpl() {}     
    public String authenticate(String username, String password) {
        PersistenceManager pm = JdoUtil.getPm();

        UserBean user = getByEmail(username);
        if(user==null || !user.isConfirmed())
            return null;
        String hashFromDB = user.getPassword();
        boolean valid = BCrypt.checkpw(password, hashFromDB);
        if(valid) { 
            String id = getSessionId();
            synchronized( this ) {
                users.put(id, user) ;
            }
            return id;  
        }
        return null;
    }    
    public void deleteUser(UserBean user) {
        deleteBaseObject(UserBean.class, user.getId());
    }
    public List<UserBean> getUsers() {
        PersistenceManager pm = JdoUtil.getPm();
        pm.setDetachAllOnCommit(true);
        Query q = pm.newQuery(UserBean.class);          
        if(q==null) 
            return new ArrayList<UserBean>();           
        return (List) q.execute();      
    }    
    public boolean userAlreadyExists(String email) {
        return (getByEmail(email)!=null) ? true : false;        
    }    
    public void updateUser(UserBean object) {
        saveBaseObject(object);
    }    
    public void confirmUser(String email) {
        PersistenceManager pm = JdoUtil.getPm();        
        UserBean user = getByEmail(email);
        if(user!=null) {
            user.setConfirmed(true);
            pm.makePersistent(user);
        }   
    }    
    public void createUser(UserBean user) {
        PersistenceManager pm = JdoUtil.getPm();
        String sessionId = getSessionId();
        // Only store it if it does not exists
        if( (getByEmail(user.getEmail()))==null) {
            String hash = BCrypt.hashpw(user.getPassword(), BCrypt.gensalt());
            user.setPassword(hash);
            pm.makePersistent(user);
            synchronized( this ) {
                users.put(sessionId, user);              
            }           
        }       
    }    
    public UserBean getByEmail(String email) {
        return new MyAccountServiceImpl().getByEmail(email);
    }    
    public UserBean getUserById(String id) {
        return new MyAccountServiceImpl().getUserById(id);
    }
}

SOLUTION

Apparently the Google App Engine Annotations in my Bean classes were causing the problem. Removing the annotation from the client side code solved the issue. What I do know if I have the classes with the JDO notation in the server side. That it is to say the beans are plain data transfere object which get cloned into object with JDO annotations in the server side.

I am literally stacked. I do not know what to try. Any help is really appreciated!

+1  A: 

If your service methods contains POJO's they can cause you problems, they must have a zero argument constructor or no constructor defined. Also they must implement either IsSerializable or Serializable.

You can trie to create the service manually with:

MainServiceAsync service = GWT.create(MainService.class);

And maybe post the MainService classes.

Edited:

This is an output from the treelogger with a deferred binding failing, and it is outputed into the console when you do a gwt compile. You can also see this output in the devmode console if you run in hosted mode. Always check the first error, because the others are most of the time caused by the first error.

Compiling module se.pathed.defa.DefaultGwtProject
   Scanning for additional dependencies: file:/C:/Users/Patrik/workspace/skola-workspace/DefaultGwtProject/src/se/pathed/defa/client/DefaultGwtProject.java
      Computing all possible rebind results for 'se.pathed.defa.client.GreetingService'
         Rebinding se.pathed.defa.client.GreetingService
            Invoking com.google.gwt.dev.javac.StandardGeneratorContext@16c6a55
               Generating client proxy for remote service interface 'se.pathed.defa.client.GreetingService'
                  [ERROR] se.pathed.defa.shared.UserBean is not default instantiable (it must have a zero-argument constructor or no constructors at all) and has no custom serializer. (reached via se.pathed.defa.shared.UserBean)
                  [ERROR] se.pathed.defa.shared.UserBean has no available instantiable subtypes. (reached via se.pathed.defa.shared.UserBean)
                     [ERROR]    subtype se.pathed.defa.shared.UserBean is not default instantiable (it must have a zero-argument constructor or no constructors at all) and has no custom serializer. (reached via se.pathed.defa.shared.UserBean)
   [ERROR] Errors in 'file:/C:/Users/Patrik/workspace/skola-workspace/DefaultGwtProject/src/se/pathed/defa/client/DefaultGwtProject.java'
      [ERROR] Line 37:  Failed to resolve 'se.pathed.defa.client.GreetingService' via deferred binding
   Scanning for additional dependencies: jar:file:/C:/eclipse/plugins/com.google.gwt.eclipse.sdkbundle.2.0.3_2.0.3.v201002191036/gwt-2.0.3/gwt-user.jar!/com/google/gwt/core/client/impl/SchedulerImpl.java
      [WARN] The following resources will not be created because they were never committed (did you forget to call commit()?)
         [WARN] C:\Users\Patrik\AppData\Local\Temp\gwtc301646733929273376.tmp\se.pathed.defa.DefaultGwtProject\compiler\se.pathed.defa.client.GreetingService.rpc.log
      [WARN] For the following type(s), generated source was never committed (did you forget to call commit()?)
         [WARN] se.pathed.defa.client.GreetingService_Proxy
   [ERROR] Cannot proceed due to previous errors
pathed
If I create the serivce Manually. It faisl the same way
Sergio del Amo
All my Beans are serializable. I added more code. I hope it clarifies things
Sergio del Amo
The stacktrace sais that the gwt-compiler cant create your MainService, so the error is on the client side. Gwt uses its treelogger to report what whent wrong in the compilation and its there you should check. You should find the output from the treelogger right before the stacktrace.
pathed
Where do I find the output from treelogger? I posted some more info in a answer below.
Sergio del Amo
The first line in the ERROR TRACE that you posted seems to come from the treelogger, where an stacktrace has been logged. Check for errors before that.
pathed
A: 

ERROR TRACE

Here is the complete error stake trace.

20:16:24.800 [ERROR] [acebankroll] Failed to create an instance of 'com.softamo.acebankroll.client.main.MainService' via deferred binding com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit. at com.google.gwt.dev.js.ast.JsVisitor.translateException(JsVisitor.java:462) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:448) at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:421) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.js.JsToStringGenerationVisitor.visit(JsToStringGenerationVisitor.java:169) at com.google.gwt.dev.js.ast.JsArrayLiteral.traverse(JsArrayLiteral.java:65) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:446) at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:421) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.js.JsToStringGenerationVisitor.visit(JsToStringGenerationVisitor.java:537) at com.google.gwt.dev.shell.Jsni$JsSourceGenWithJsniIdentFixup.visit(Jsni.java:224) at com.google.gwt.dev.js.ast.JsInvocation.traverse(JsInvocation.java:64) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:446) at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:421) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.shell.Jsni$JsSourceGenWithJsniIdentFixup.visit(Jsni.java:219) at com.google.gwt.dev.js.ast.JsInvocation.traverse(JsInvocation.java:64) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:446) at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:421) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.js.JsToStringGenerationVisitor.visit(JsToStringGenerationVisitor.java:379) at com.google.gwt.dev.js.ast.JsExprStmt.traverse(JsExprStmt.java:37) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:446) at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:421) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.js.JsToStringGenerationVisitor.printJsBlock(JsToStringGenerationVisitor.java:873) at com.google.gwt.dev.js.JsSourceGenerationVisitor.visit(JsSourceGenerationVisitor.java:48) at com.google.gwt.dev.js.ast.JsBlock.traverse(JsBlock.java:43) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:446) at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:421) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.shell.Jsni.generateJavaScriptForHostedMode(Jsni.java:253) at com.google.gwt.dev.shell.Jsni.getJavaScriptForHostedMode(Jsni.java:240) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.createNativeMethods(ModuleSpaceOOPHM.java:46) at com.google.gwt.dev.shell.CompilingClassLoader.injectJsniMethods(CompilingClassLoader.java:1214) at com.google.gwt.dev.shell.CompilingClassLoader.findClass(CompilingClassLoader.java:1039) at java.lang.ClassLoader.loadClass(ClassLoader.java:303) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316) at com.softamo.acebankroll.client.main.MainService_Proxy.(MainService_Proxy.java:14) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at com.google.gwt.dev.shell.ModuleSpace.loadClassFromSourceName(ModuleSpace.java:580) at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:415) at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:39) at com.google.gwt.core.client.GWT.create(GWT.java:98) at com.mvp4g.client.Mvp4gModuleImpl.createAndStartModule(Mvp4gModuleImpl.java:183) at com.softamo.acebankroll.client.AceBankroll.onModuleLoad(AceBankroll.java:12) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:369) at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:185) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:380) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.NullPointerException: null at com.google.gwt.dev.shell.rewrite.RewriteSingleJsoImplDispatches.getResourceName(RewriteSingleJsoImplDispatches.java:251) at com.google.gwt.dev.shell.rewrite.RewriteSingleJsoImplDispatches.computeAllInterfaces(RewriteSingleJsoImplDispatches.java:230) at com.google.gwt.dev.shell.rewrite.RewriteSingleJsoImplDispatches.computeAllInterfaces(RewriteSingleJsoImplDispatches.java:245) at com.google.gwt.dev.shell.rewrite.RewriteSingleJsoImplDispatches.visit(RewriteSingleJsoImplDispatches.java:168) at com.google.gwt.dev.asm.ClassAdapter.visit(ClassAdapter.java:63) at com.google.gwt.dev.asm.ClassAdapter.visit(ClassAdapter.java:63) at com.google.gwt.dev.shell.rewrite.RewriteJsniMethods.visit(RewriteJsniMethods.java:340) at com.google.gwt.dev.asm.ClassReader.accept(ClassReader.java:553) at com.google.gwt.dev.asm.ClassReader.accept(ClassReader.java:420) at com.google.gwt.dev.shell.rewrite.HostedModeClassRewriter.rewrite(HostedModeClassRewriter.java:244) at com.google.gwt.dev.shell.CompilingClassLoader.findClassBytes(CompilingClassLoader.java:1157) at com.google.gwt.dev.shell.CompilingClassLoader.findClass(CompilingClassLoader.java:985) at java.lang.ClassLoader.loadClass(ClassLoader.java:303) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.getDeclaredMethods(Class.java:1791) at com.google.gwt.dev.shell.DispatchClassInfo.lazyInitTargetMembersUsingReflectionHelper(DispatchClassInfo.java:183) at com.google.gwt.dev.shell.DispatchClassInfo.lazyInitTargetMembers(DispatchClassInfo.java:146) at com.google.gwt.dev.shell.DispatchClassInfo.getMemberId(DispatchClassInfo.java:55) at com.google.gwt.dev.shell.CompilingClassLoader$DispatchClassInfoOracle.getDispId(CompilingClassLoader.java:166) at com.google.gwt.dev.shell.CompilingClassLoader.getDispId(CompilingClassLoader.java:930) at com.google.gwt.dev.shell.Jsni$JsSourceGenWithJsniIdentFixup.visit(Jsni.java:105) at com.google.gwt.dev.js.ast.JsNameRef.traverse(JsNameRef.java:120) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:446) at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:421) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.js.JsToStringGenerationVisitor.visit(JsToStringGenerationVisitor.java:169) at com.google.gwt.dev.js.ast.JsArrayLiteral.traverse(JsArrayLiteral.java:65) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:446) at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:421) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.js.JsToStringGenerationVisitor.visit(JsToStringGenerationVisitor.java:537) at com.google.gwt.dev.shell.Jsni$JsSourceGenWithJsniIdentFixup.visit(Jsni.java:224) at com.google.gwt.dev.js.ast.JsInvocation.traverse(JsInvocation.java:64) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:446) at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:421) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.shell.Jsni$JsSourceGenWithJsniIdentFixup.visit(Jsni.java:219) at com.google.gwt.dev.js.ast.JsInvocation.traverse(JsInvocation.java:64) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:446) at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:421) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.js.JsToStringGenerationVisitor.visit(JsToStringGenerationVisitor.java:379) at com.google.gwt.dev.js.ast.JsExprStmt.traverse(JsExprStmt.java:37) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:446) at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:421) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.js.JsToStringGenerationVisitor.printJsBlock(JsToStringGenerationVisitor.java:873) at com.google.gwt.dev.js.JsSourceGenerationVisitor.visit(JsSourceGenerationVisitor.java:48) at com.google.gwt.dev.js.ast.JsBlock.traverse(JsBlock.java:43) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:446) at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:421) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.shell.Jsni.generateJavaScriptForHostedMode(Jsni.java:253) at com.google.gwt.dev.shell.Jsni.getJavaScriptForHostedMode(Jsni.java:240) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.createNativeMethods(ModuleSpaceOOPHM.java:46) at com.google.gwt.dev.shell.CompilingClassLoader.injectJsniMethods(CompilingClassLoader.java:1214) at com.google.gwt.dev.shell.CompilingClassLoader.findClass(CompilingClassLoader.java:1039) at java.lang.ClassLoader.loadClass(ClassLoader.java:303) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316) at com.softamo.acebankroll.client.main.MainService_Proxy.(MainService_Proxy.java:14) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at com.google.gwt.dev.shell.ModuleSpace.loadClassFromSourceName(ModuleSpace.java:580) at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:415) at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:39) at com.google.gwt.core.client.GWT.create(GWT.java:98) at com.mvp4g.client.Mvp4gModuleImpl.createAndStartModule(Mvp4gModuleImpl.java:183) at com.softamo.acebankroll.client.AceBankroll.onModuleLoad(AceBankroll.java:12) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:369) at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:185) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:380) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222) at java.lang.Thread.run(Thread.java:619) at java.lang.Thread.run(Thread.java:619)

20:16:24.944 [ERROR] [acebankroll] Unable to load module entry point class com.softamo.acebankroll.client.AceBankroll (see associated exception for details) com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit. at com.google.gwt.dev.js.ast.JsVisitor.translateException(JsVisitor.java:462) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:448) at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:421) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.js.JsToStringGenerationVisitor.visit(JsToStringGenerationVisitor.java:734) at com.google.gwt.dev.js.ast.JsReturn.traverse(JsReturn.java:45) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:446) at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:421) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.js.JsToStringGenerationVisitor.printJsBlock(JsToStringGenerationVisitor.java:873) at com.google.gwt.dev.js.JsSourceGenerationVisitor.visit(JsSourceGenerationVisitor.java:48) at com.google.gwt.dev.js.ast.JsBlock.traverse(JsBlock.java:43) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:446) at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:421) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.shell.Jsni.generateJavaScriptForHostedMode(Jsni.java:253) at com.google.gwt.dev.shell.Jsni.getJavaScriptForHostedMode(Jsni.java:240) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.createNativeMethods(ModuleSpaceOOPHM.java:46) at com.google.gwt.dev.shell.CompilingClassLoader.injectJsniMethods(CompilingClassLoader.java:1214) at com.google.gwt.dev.shell.CompilingClassLoader.findClass(CompilingClassLoader.java:1039) at java.lang.ClassLoader.loadClass(ClassLoader.java:303) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316) at com.google.gwt.core.client.impl.Impl.exit(Impl.java:207) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:374) at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:185) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:380) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.NullPointerException: null at com.google.gwt.dev.shell.rewrite.RewriteSingleJsoImplDispatches.getResourceName(RewriteSingleJsoImplDispatches.java:251) at com.google.gwt.dev.shell.rewrite.RewriteSingleJsoImplDispatches.computeAllInterfaces(RewriteSingleJsoImplDispatches.java:230) at com.google.gwt.dev.shell.rewrite.RewriteSingleJsoImplDispatches.computeAllInterfaces(RewriteSingleJsoImplDispatches.java:245) at com.google.gwt.dev.shell.rewrite.RewriteSingleJsoImplDispatches.visit(RewriteSingleJsoImplDispatches.java:168) at com.google.gwt.dev.asm.ClassAdapter.visit(ClassAdapter.java:63) at com.google.gwt.dev.asm.ClassAdapter.visit(ClassAdapter.java:63) at com.google.gwt.dev.shell.rewrite.RewriteJsniMethods.visit(RewriteJsniMethods.java:340) at com.google.gwt.dev.asm.ClassReader.accept(ClassReader.java:553) at com.google.gwt.dev.asm.ClassReader.accept(ClassReader.java:420) at com.google.gwt.dev.shell.rewrite.HostedModeClassRewriter.rewrite(HostedModeClassRewriter.java:244) at com.google.gwt.dev.shell.CompilingClassLoader.findClassBytes(CompilingClassLoader.java:1157) at com.google.gwt.dev.shell.CompilingClassLoader.findClass(CompilingClassLoader.java:985) at java.lang.ClassLoader.loadClass(ClassLoader.java:303) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at com.google.gwt.dev.shell.CompilingClassLoader$DispatchClassInfoOracle.getClassFromBinaryName(CompilingClassLoader.java:236) at com.google.gwt.dev.shell.CompilingClassLoader$DispatchClassInfoOracle.getClassFromBinaryOrSourceName(CompilingClassLoader.java:266) at com.google.gwt.dev.shell.CompilingClassLoader$DispatchClassInfoOracle.getClassInfoFromClassName(CompilingClassLoader.java:288) at com.google.gwt.dev.shell.CompilingClassLoader$DispatchClassInfoOracle.getDispId(CompilingClassLoader.java:146) at com.google.gwt.dev.shell.CompilingClassLoader.getDispId(CompilingClassLoader.java:930) at com.google.gwt.dev.shell.Jsni$JsSourceGenWithJsniIdentFixup.visit(Jsni.java:105) at com.google.gwt.dev.js.ast.JsNameRef.traverse(JsNameRef.java:120) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:446) at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:421) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.js.JsToStringGenerationVisitor.visit(JsToStringGenerationVisitor.java:734) at com.google.gwt.dev.js.ast.JsReturn.traverse(JsReturn.java:45) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:446) at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:421) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.js.JsToStringGenerationVisitor.printJsBlock(JsToStringGenerationVisitor.java:873) at com.google.gwt.dev.js.JsSourceGenerationVisitor.visit(JsSourceGenerationVisitor.java:48) at com.google.gwt.dev.js.ast.JsBlock.traverse(JsBlock.java:43) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:446) at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:421) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.shell.Jsni.generateJavaScriptForHostedMode(Jsni.java:253) at com.google.gwt.dev.shell.Jsni.getJavaScriptForHostedMode(Jsni.java:240) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.createNativeMethods(ModuleSpaceOOPHM.java:46) at com.google.gwt.dev.shell.CompilingClassLoader.injectJsniMethods(CompilingClassLoader.java:1214) at com.google.gwt.dev.shell.CompilingClassLoader.findClass(CompilingClassLoader.java:1039) at java.lang.ClassLoader.loadClass(ClassLoader.java:303) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316) at com.google.gwt.core.client.impl.Impl.exit(Impl.java:207) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:374) at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:185) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:380) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222) at java.lang.Thread.run(Thread.java:619)

Sergio del Amo
A: 

I executed Eclipse "Debug As" with GWT logging set to All.

Just before

21:06:19.577 [ERROR] [acebankroll] Failed to create an instance of 'com.softamo.acebankroll.client.main.MainService' via deferred binding 

I get:

21:06:19.167 [DEBUG] [acebankroll] Relinking module 'acebankroll'
21:06:19.204 [TRACE] [acebankroll] Invoking relink on Linker RPC policy file manifest
21:06:19.238 [TRACE] [acebankroll] Invoking relink on Linker Standard
21:06:19.272 [TRACE] [acebankroll] Invoking relink on Linker Export CompilationResult symbol maps
21:06:19.306 [TRACE] [acebankroll] Invoking relink on Linker Emit compile report artifacts
21:06:19.341 [TRACE] [acebankroll] Linking compilation into C:\Users\sdelamo\workspace\AceBankroll\war\acebankroll
21:06:19.375 [DEBUG] [acebankroll] Emitting resource CC1DCE0696446CA8A019447AC701D5C6.gwt.rpc
21:06:19.412 [DEBUG] [acebankroll] Emitting resource com.softamo.acebankroll.client.main.MainService.rpc.log
    21:06:19.446 [DEBUG] [acebankroll] Rebind result was com.softamo.acebankroll.client.main.MainService_Proxy

Any idea?

Sergio del Amo