Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Reflection failing when deployed on Tomcat, works fine in Super Dev Mode

    smartGWT v12.0p_2018-10-27/PowerEdition Deployment (built 2018-10-27)
    Chrome and Firefox
    Deployed on Tomcat 8


    We are setting several list grid field editors using the following commands:

    listGridField1.setFilterEditorType("com.smartgwt.client.widgets.form.fields.TextItem");
    listGridField2.setFilterEditorType("com.smartgwt.client.widgets.form.fields.FloatItem");

    Per the documentation, we must register bean factories, which we have done:

    First we tried:

    GWT.create(BeanFactory.FormItemMetaFactory.class); Then we tried: @BeanFactory.Generate({TextItem.class, IntegerItem.class, FloatItem.class})
    public interface EmptyInterfaceForSmartGWTBeanFactory {

    }

    Both of the above seem to work fine in super dev mode on our local machine.

    When we deploy the application to Tomcat 8, we get the following error:

    [WARN ] Uncaught exception: "No BeanFactory has been registered for: com.smartgwt.client.widgets.form.fields.TextItem". exception stack trace:
    (no trace lines - just blank)


    Adding both the bean factory registration methods above gives the following, which suggests registration is concurring:

    After we added the empty interface above, the log shows the following, which suggest something is happening with the registration:
    ISC_Core.js:1249 *08:40:13.937:WARN:Class$S746:beanClassName 'Class$S746' has already been registered. The existing bean will be replaced.
    isc.B.push.isc.A.addToMasterLog @ ISC_Core.js:1249
    ISC_Core.js:1249 *08:40:13.943:WARN:Class$S747:beanClassName 'Class$S747' has already been registered. The existing bean will be replaced.
    isc.B.push.isc.A.addToMasterLog @ ISC_Core.js:1249
    ISC_Core.js:1249 *08:40:13.962:WARN:Class$S53:beanClassName 'Class$S53' has already been registered. The existing bean will be replaced.


    Do you have any suggestions as to debugging steps we could try?

    Thanks,

    Andrew



    #2
    We took the SGWT 12.0p EE BuiltInDS Project and replaced the onModuleLoad() contents with some very simple code creating a ListGrid with filterEditor and a call to setFilterEditorType("com.smartgwt.client.widgets.form.fields.TextItem") on a ListGridField.

    Everything worked as expected. Without either bean factory registration method, we get the error you reported, as expected, but using either GWT.create() or @BeanFactory.Generate() results in no errors. If both are added, then we get the following:
    Code:
    ISC_Core.js?isc_version=12.0p_2019-02-19.js:1248 *03:30:05.871:WARN:com.smartgwt.client.widgets.form.fields.TextItem:beanClassName 'com.smartgwt.client.widgets.form.fields.TextItem' has already been registered. The existing bean will be replaced.
    Note, importantly, that we're not getting the beanClassName mangled like in your logs, which leads to the conclusion that that's the source of your problem. Something in your setup is mangling that string.

    What we would suggest is to attempt to reproduce your issue as we have, by starting with the BuiltInDS Project, and reporting back what you find. BTW, you should always try with the latest patched build for a branch before reporting a bug, and also let us know what GWT version you're using (2.7.0? 2.8.2?)

    Comment

    Working...
    X