How to solve GWT compiler error of '[ERROR] The Ginjector xxx does not have a get() method returning'

How to solve GWT compiler error of ‘[ERROR] The Ginjector xxx does not have a get() method returning’

If you get a GWT compiler error of something like:
gwt does not have a get() method returning
See below for exact details. Here is how to fix it:

Also, ensure provider (as defined in your xxx.client.gin MyGinjector presenter (ie. Provider getMainPagePresenter();
HomePresenter.java class) has proxy defined as @ProxyStandard not @ProxyCodeSplit

public static final String nameToken = “main”;
private final DispatchAsync dispatcher;
private PlaceManager placeManager;

@ProxyStandard <-- should not be @ProxyCodeSplit
@NameToken(nameToken)
public interface MyProxy extends Proxy, Place {
}

All other presenters shuold have @ProxyCodeSplit like:

public class Contribute1Presenter extends
Presenter {

public static final String nameToken = “contribute1″;

private final PlaceManager placeManager;

@ProxyCodeSplit
@NameToken(nameToken)
public interface MyProxy extends Proxy, Place {
}

during gwt compiler exception, if you get the following:

Compiling module com.google.musicstore.Siloverse1
Scanning for additional dependencies: generated://760956920BB2959A003B9A3F7AC8B56B/com/google/musicstore/client/gin/MyGinjectorImpl.java
Computing all possible rebind results for ‘com.google.musicstore.client.presenter.Contribute1Presenter.MyProxy’
Rebinding com.google.musicstore.client.presenter.Contribute1Presenter.MyProxy
Invoking com.google.gwt.dev.javac.StandardGeneratorContext@18cc39e
[ERROR] The Ginjector ‘com.google.musicstore.client.gin.MyGinjector’ does not have a get() method returning ‘Provider‘. This is required when using @ProxyStandard.
Computing all possible rebind results for ‘com.google.musicstore.client.presenter.HomePresenter.MyProxy’
Rebinding com.google.musicstore.client.presenter.HomePresenter.MyProxy
Invoking com.google.gwt.dev.javac.StandardGeneratorContext@18cc39e
[ERROR] The Ginjector ‘com.google.musicstore.client.gin.MyGinjector’ does not have a get() method returning ‘AsyncProvider‘. This is required when using @ProxyCodeSplit.
[WARN] For the following type(s), generated source was never committed (did you forget to call commit()?)
[WARN] com.google.musicstore.client.presenter.HomePresenterMyProxyImpl
[WARN] com.google.musicstore.client.presenter.Contribute1PresenterMyProxyImpl
[ERROR] Errors in ‘generated://760956920BB2959A003B9A3F7AC8B56B/com/google/musicstore/client/gin/MyGinjectorImpl.java’
[ERROR] Line 253: Failed to resolve ‘com.google.musicstore.client.presenter.Contribute1Presenter.MyProxy’ via deferred binding
[ERROR] Line 291: Failed to resolve ‘com.google.musicstore.client.presenter.HomePresenter.MyProxy’ via deferred binding
[ERROR] Cannot proceed due to previous errors

This can be caused by conflicts if the nameToken is duplicate in any presenters

Also defined in MyPlaceManager:

package com.google.musicstore.client.place;

import com.google.inject.Inject;
import com.google.musicstore.client.presenter.Contribute1Presenter;
import com.google.musicstore.client.presenter.HomePresenter;
import com.gwtplatform.mvp.client.EventBus;
import com.gwtplatform.mvp.client.proxy.PlaceManagerImpl;
import com.gwtplatform.mvp.client.proxy.PlaceRequest;
import com.gwtplatform.mvp.client.proxy.TokenFormatter;

public class MyPlaceManager extends PlaceManagerImpl {

@Inject
public MyPlaceManager(EventBus eventBus, TokenFormatter tokenFormatter) {
super(eventBus, tokenFormatter);
}

@Override
public void revealDefaultPlace() {
// “main”
revealPlace(new PlaceRequest(HomePresenter.nameToken));
//revealPlace(new PlaceRequest(Contribute1Presenter.nameToken));
}

How would you build an indie trading business?

Signup now and receive an email as I implement the next steps

I will never give away, trade or sell your email address. You can unsubscribe at any time.

About caustic

Hi i there My name is Bryan Downing. I am part of a company called QuantLabs.Net This is specifically a company with a high profile blog about technology, trading, financial, investment, quant, etc. It posts things on how to do job interviews with large companies like Morgan Stanley, Bloomberg, Citibank, and IBM. It also posts different unique tips and tricks on Java, C++, or C programming. It posts about different techniques in learning about Matlab and building models or strategies. There is a lot here if you are into venturing into the financial world like quant or technical analysis. It also discusses the future generation of trading and programming Specialties: C++, Java, C#, Matlab, quant, models, strategies, technical analysis, linux, windows P.S. I have been known to be the worst typist. Do not be offended by it as I like to bang stuff out and put priorty of what I do over typing. Maybe one day I can get a full time copy editor to help out. Do note I prefer videos as they are much easier to produce so check out my many video at youtube.com/quantlabs

Leave a Reply

Your email address will not be published. Required fields are marked *


*