google-code-export / gwt-test-utils

Automatically exported from code.google.com/p/gwt-test-utils
1 stars 0 forks source link

Error during instanciation gwtbootstrap components #175

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Trying to run test 
@ContextConfiguration(locations = {"classpath:context.xml"}, loader = 
GwtTestContextLoader.class)
@GwtModule("home.GwtModule")
public class GwtModuleTest extends GwtSpringTest {

    private MyEntryPoint app;

    @Before
    public void setupGwtTestSample() {
        app = new MyEntryPoint();
        app.onModuleLoad();

    }

    @Test
    public void simpleTest() {
        assertTrue(true);
    }
}

2.In onModuleLoad() application try to init next class:
public class CompositeExample extends Composite {
        public CompositeExample() {
        initWidget(uiBinder.createAndBindUi(this));
            //some code
    }
//some code
}
3.In CompositeExample.ui.xml I have gwtbootstrap component 
<b:TabPanel tabPosition="top" ui:field="tabPanel">

What is the expected output? What do you see instead?
Test fails with exception:
com.google.gwt.event.shared.UmbrellaException: Exception caught: Error during 
instanciation of 'com.github.gwtbootstrap.client.ui.TabPanel'. Constructor 
threw exception
    at com.github.gwtbootstrap.client.ui.TabPanel.setHandlerFunctions(Native Method)
    at com.github.gwtbootstrap.client.ui.TabPanel.<init>(TabPanel.java:223)
    at com.github.gwtbootstrap.client.ui.TabPanel.<init>(TabPanel.java:205)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at com.googlecode.gwt.test.utils.GwtReflectionUtils.instantiateClass(GwtReflectionUtils.java:518)
    at com.googlecode.gwt.test.uibinder.UiObjectTag.instanciate(UiObjectTag.java:246)
    at com.googlecode.gwt.test.uibinder.UiObjectTag.startTag(UiObjectTag.java:276)
    at com.googlecode.gwt.test.uibinder.UiTagBuilder.createUiTag(UiTagBuilder.java:154)
    at com.googlecode.gwt.test.uibinder.UiTagBuilder.startTag(UiTagBuilder.java:124)
    at com.googlecode.gwt.test.uibinder.UiXmlContentHandler.startElement(UiXmlContentHandler.java:70)
    at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at com.googlecode.gwt.test.uibinder.UiBinderParser.createUiComponent(UiBinderParser.java:50)
    at com.googlecode.gwt.test.uibinder.UiBinderInvocationHandler.createAndBindUi(UiBinderInvocationHandler.java:83)
    at com.googlecode.gwt.test.uibinder.UiBinderInvocationHandler.invoke(UiBinderInvocationHandler.java:34)
    at home.client.$Proxy110.createAndBindUi(Unknown Source)
    at home.client.CompositeExample.<init>(CompositeExample.java:79)
    at home.client.MyEntryPoint.goToExample(MyEntryPoint.java:29)
    at home.client.MyEntryPoint.onValueChange(MyEntryPoint.java:45)
    at com.google.gwt.event.logical.shared.ValueChangeEvent.dispatch(ValueChangeEvent.java:128)
    at com.google.gwt.event.logical.shared.ValueChangeEvent.dispatch(ValueChangeEvent.java:25)
    at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
    at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
    at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
    at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
    at com.google.gwt.user.client.impl.HistoryImpl.fireEvent(HistoryImpl.java:80)
    at com.google.gwt.event.logical.shared.ValueChangeEvent.fire(ValueChangeEvent.java:43)
    at com.google.gwt.user.client.impl.HistoryImpl.fireHistoryChangedImpl(HistoryImpl.java:87)
    at com.google.gwt.user.client.History.fireCurrentHistoryState(History.java:131)
    at home.client.MyEntryPoint.onModuleLoad(MyEntryPoint.java:25)
    at GwtModuleTest.setupGwtTestSample(GwtModuleTest.java:26)

What version of the product are you using? On what operating system?
                <dependency>
            <groupId>com.googlecode.gwt-test-utils</groupId>
            <artifactId>gwt-test-utils</artifactId>
            <version>0.45</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.googlecode.gwt-test-utils</groupId>
            <artifactId>gwt-test-utils-gwtbootstrap</artifactId>
            <version>0.45</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.gwtbootstrap</groupId>
            <artifactId>gwt-bootstrap</artifactId>
            <version>2.2.1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-servlet</artifactId>
            <version>${gwtVersion}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-user</artifactId>
            <version>${gwtVersion}</version>
            <scope>provided</scope>
        </dependency>
Operation system - ubuntu 12.04

Original issue reported on code.google.com by alex.ped...@gmail.com on 14 Nov 2013 at 12:45

GoogleCodeExporter commented 9 years ago
I've resolve my problem by creating Patcher for 
com.github.gwtbootstrap.client.ui.TabPanel

Original comment by alex.ped...@gmail.com on 14 Nov 2013 at 1:08