Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.ClassCastException: com.google.gwt.user.client.Element$$EnhancerByMockitoWithCGLIB$$4fca3809 cannot be cast to com.google.gwt.dom.client.TableElement #32

Closed
manstis opened this issue Jun 6, 2014 · 8 comments

Comments

@manstis
Copy link

manstis commented Jun 6, 2014

I found #4 when Googling for help. I suspect this could be related.

I am trying to run a test that includes a CellTable and hit the following error.

java.lang.ClassCastException: com.google.gwt.user.client.Element$$EnhancerByMockitoWithCGLIB$$4fca3809 cannot be cast to com.google.gwt.dom.client.TableElement
    at com.google.gwt.user.cellview.client.CellTable.<init>(CellTable.java:613)
    at com.google.gwt.user.cellview.client.CellTable.<init>(CellTable.java:581)
    at com.github.gwtbootstrap.client.ui.CellTable.<init>(CellTable.java:110)
    at com.github.gwtbootstrap.client.ui.CellTable.<init>(CellTable.java:117)
    at com.github.gwtbootstrap.client.ui.CellTable.<init>(CellTable.java:121)
    at com.github.gwtbootstrap.client.ui.CellTable.<init>(CellTable.java:133)
    at com.github.gwtbootstrap.client.ui.CellTable.<init>(CellTable.java:105)

The Widget I'm attempt to test looks like this.

public class MyScreen extends Composite  {

    @UiField(provided = true)
    CellTable<String> table = new CellTable<String>();

The test code looks like this.

@RunWith(GwtMockitoTestRunner.class)
public class MyScreenTest {

    @GwtMock
    private CellTable<String> table;

I've tried with 1.1.3 but to no avail.

I could be doing something wrong; to be honest I'm new to GwtMockito, so wouldn't put user error out of the question.

@ekuefler
Copy link
Collaborator

ekuefler commented Jun 8, 2014

I've fixed a few issues lately related to CellTable support, probably after 1.1.3 was released. Can you try running against the latest snapshot to see if you're still having trouble?

@manstis
Copy link
Author

manstis commented Jun 9, 2014

Hello,

I can confirm with 1.1.4-SNAPSHOT built from source the problem has gone :)

Do you have a time-frame for releasing 1.1.4 (we can't use SNAPSHOTs in our non-SNAPSHOT releases).

Thanks,

Mike

@ekuefler
Copy link
Collaborator

I'll try to push out the next version in another week or so if I don't hear any other feedback before then.

@manstis
Copy link
Author

manstis commented Jun 16, 2014

Thank-you Erik. I will keep an eye open for it.

@manstis
Copy link
Author

manstis commented Jul 7, 2014

Hello Erik,

Are you able to release the next version yet?

Thanks,

Mike

@ekuefler
Copy link
Collaborator

Yep, new version should be coming in the next couple of days.

On Mon Jul 07 2014 at 2:16:09 AM, Michael Anstis [email protected]
wrote:

Hello Erik,

Are you able to release the next version yet?

Thanks,

Mike


Reply to this email directly or view it on GitHub
#32 (comment).

@ekuefler
Copy link
Collaborator

I just pushed v1.1.4 to Maven Central - should be available in a few hours. Let me know if you have any issues with it.

@manstis
Copy link
Author

manstis commented Jul 11, 2014

Thanks Erik.

Works like a charm.

With kind regards,

Mike

On 11 July 2014 08:16, Erik Kuefler [email protected] wrote:

I just pushed v1.1.4 to Maven Central - should be available in a few
hours. Let me know if you have any issues with it.


Reply to this email directly or view it on GitHub
#32 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants