clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay_33_g $(...)。style_86_g $不是函数

时间:2016-03-12 17:57:18

标签: gwt gwtp

嗯,突然间一切似乎都被打破了。我不记得我改变了什么。我清理整个项目,我检查了它的旧版本,我删除了所有代码服务器编译的文件,重新启动Eclipse等,但我在这里收到以下错误:

Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) : this.get_clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay_17_g$(...).style_48_g$ is not a function
ConsoleLogger.java:32 TypeError: this.get_clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay_17_g$(...).style_48_g$ is not a function
    at Jmg_g$ [as build_style_17_g$] (HomeView_BinderImpl.java:74)
    at Dmg_g$ (HomeView_BinderImpl.java:43)
    at ymg_g$ [as createAndBindUi_17_g$] (HomeView_BinderImpl.java:31)
    at zmg_g$ [as createAndBindUi_0_g$] (HomeView_BinderImpl.java:28)
    at tmg_g$ (HomeView.java:20)
    at qng_g$ [as com$mz$client$application$admin$home$HomeView_com$mz$client$application$admin$home$HomeView_methodInjection_0_g$] (com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java:116)
    at xng_g$ [as get_Key$type$com$mz$client$application$admin$home$HomeView$_annotation$$none$$_0_g$] (com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java:106)
    at ung_g$ [as get_Key$type$com$mz$client$application$admin$home$HomePresenter$MyView$_annotation$$none$$_0_g$] (com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java:30)
    at vng_g$ [as get_Key$type$com$mz$client$application$admin$home$HomePresenter$_annotation$$none$$_0_g$] (com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java:57)
    at Gng_g$ [as get_27_g$] (com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java:78)
    at Hng_g$ [as get_21_g$] (com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java:77)
    at I5f_g$ [as get_16_g$] (StandardProvider.java:47)
    at b7d_g$ [as getPresenter_0_g$] (ProxyImpl.java:44)
    at lag_g$ [as handleRequest_0_g$] (ProxyPlaceAbstract.java:263)
    at xag_g$ [as onPlaceRequest_0_g$] (ProxyPlaceAbstract.java:201)
    at L6d_g$ [as dispatch_54_g$] (PlaceRequestInternalEvent.java:130)
    at K6d_g$ [as dispatch_1_g$] (PlaceRequestInternalEvent.java:129)
    at W6b_g$ [as dispatch_0_g$] (GwtEvent.java:76)
    at Ngc_g$ (EventBus.java:40)
    at rhc_g$ [as doFire_0_g$] (SimpleEventBus.java:193)
    at yhc_g$ [as fireEventFromSource_0_g$] (SimpleEventBus.java:96)
    at x4d_g$ [as fireEvent_1_g$] (PlaceManagerImpl.java:158)
    at v4d_g$ [as doRevealPlace_0_g$] (PlaceManagerImpl.java:133)
    at R4d_g$ [as revealPlace_1_g$] (PlaceManagerImpl.java:354)
    at Q4d_g$ [as revealPlace_0_g$] (PlaceManagerImpl.java:335)
    at Jxg_g$ [as redirectToLoggedOnPage_0_g$] (LoginPresenter.java:169)
    at Mug_g$ [as loggedInAndInitialized_0_g$] (LoginPresenter.java:125)
    at Vug_g$ [as done_1_g$] (LoginPresenter.java:115)
    at Wce_g$ [as onChildRequestFailure_0_g$] (ParallelRequest.java:144)
    at Xce_g$ [as onChildRequestSuccess_0_g$] (ParallelRequest.java:120)
    at gde_g$ [as onSuccess_0_g$] (Request.java:68)
    at Lfd_g$ [as onResponseReceived_0_g$] (RequestCallbackAdapter.java:232)
    at pjc_g$ [as fireOnResponseReceived_0_g$] (Request.java:250)
    at xkc_g$ [as onReadyStateChange_0_g$] (RequestBuilder.java:412)
    at XMLHttpRequest.<anonymous> (XMLHttpRequest.java:329)
    at DI_g$ (Impl.java:233)
    at GI_g$ (Impl.java:285)
    at XMLHttpRequest.<anonymous> (Impl.java:71)

现在我正在登录并显示如下所在的家庭地点:

private void revealAdminHomePlace() {
    this.placeManager.revealPlace(new PlaceRequest.Builder()
            .nameToken(AdminNameTokens.home)
            .build());
}

这是HomeModule:

public class HomeModule extends AbstractPresenterModule {
    @Override
    protected void configure() {
        this.bindPresenter(HomePresenter.class, HomePresenter.MyView.class,
                HomeView.class, HomePresenter.MyProxy.class);
    }
}

HomePresenter

public class HomePresenter extends Presenter<HomePresenter.MyView, HomePresenter.MyProxy> {

    private final static Logger LOGGER = Logger.getLogger(HomePresenter.class.getName());

    public interface MyView extends View {
    }

    @ProxyStandard
    @NameToken(AdminNameTokens.home)
    public interface MyProxy extends ProxyPlace<HomePresenter> {
    }

    @Inject
    public HomePresenter(EventBus eventBus, MyView view, MyProxy proxy) {
        super(eventBus, view, proxy, AdminToolPresenter.SLOT_AdminToolMainContent);
    }

    @Override
    protected void onReveal() {
        LOGGER.fine("HomePresenter.onReveal()");
        super.onReveal();
    }
}

HomeView:

public class HomeView extends ViewImpl implements HomePresenter.MyView {

    public interface Binder extends UiBinder<Widget, HomeView> {
    }

    @Inject
    public HomeView(Binder uiBinder) {
        this.initWidget(uiBinder.createAndBindUi(this));
    }
}

与HomeView.ui.xml文件一样:

<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
    xmlns:g="urn:import:com.google.gwt.user.client.ui"
    xmlns:m="urn:import:gwt.material.design.client.ui"
    xmlns:m.addins="urn:import:gwt.material.design.addins.client.ui">
    <ui:style>

    </ui:style>
    <g:HTMLPanel>
        <m:MaterialLabel text="Welcome home!"/>
    </g:HTMLPanel>
</ui:UiBinder> 

我不知道这里有什么问题,我似乎无法弄清问题。我完全不知道这是什么突然......

4 个答案:

答案 0 :(得分:1)

在我的情况下,这似乎是由于在小部件的import logging logging.basicConfig() from elasticsearch import Elasticsearch as ES print "Setup connection..." es=ES(['localhost:8080']) print "Done!" print "Count number of users..." print es.count(index='users') 中包含了一些现代CSS导致的。。。不知道这是怎么引起错误的,但是我怀疑令人讨厌的行是:{u'count': 836780, u'_shards': {u'successful': 5, u'failed': 0, u'total': 5 ... ... }} 。一旦将这种样式放入普通的CSS文件中,一切就可以正常工作。

答案 1 :(得分:0)

我也碰到了这个,结果我的浏览器仍然打开了SuperDev模式,我重新编译了整个项目。

关闭SuperDev模式,问题就消失了。

答案 2 :(得分:0)

确保您已启用

<generateJsInteropExports>true</generateJsInteropExports>

使用gwt-maven-plugin时。

答案 3 :(得分:0)

是,此错误是由<ui:style>元素引起的。
通过单击“清理”按钮,您可能只需要在SuperDevMode下清除代码服务器的缓存。 enter image description here