Monday, March 28, 2011

The domain type Foo_$$_javassist_45 cannot be sent to the client

Hi Guys,

I am having an issue using GWT 2.2 RequestFactory and Hibernate 3.6.
My domain model is looks like this:

class Bar {
Long id;
String title;
Foo foo;
}

class Foo {
Long.id;
String title;
}

So, I am trying to populate a CellTable using request factory with
Bar.id, Bar.title, Bar.foo.id. The domain model is constructed from
the database using JPA/Hibernate. The problem I am getting is:

com.google.gwt.requestfactory.server.UnexpectedException: The domain
type Foo_$$_javassist_45 cannot be sent to the client
at
com.google.gwt.requestfactory.server.ServiceLayerDecorator.die(ServiceLayerDecorator.java:
185)
at
com.google.gwt.requestfactory.server.ResolverServiceLayer.resolveClientType(ResolverServiceLayer.java:
91)
at
com.google.gwt.requestfactory.server.ServiceLayerDecorator.resolveClientType(ServiceLayerDecorator.java:
122)
at
com.google.gwt.requestfactory.server.ServiceLayerDecorator.resolveClientType(ServiceLayerDecorator.java:
122)

It appears that Hibernate enhances Foo producing a class is called Foo_
$$_javassist_45. However, the RequestFactory cannot associate the
enhanced class with FooProxy.

Is there a way around it ?

Thanks
Stefan

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment