Hi,

I don't have a solution to your problem, but since you aren't even
persisting user2 with the entity manager, will the JPA annotations
even apply? Isn't it just a POJO until you do that - maybe you can try
it with a similar object without any JPA annotations!

Chris

On Feb 28, 10:38 pm, tekbe <[email protected]> wrote:
> Hi,
>
> maybe my problem is related 
> tohttp://code.google.com/p/google-web-toolkit/issues/detail?id=4140
>
> The gwt remote call to the following service works for getUser1() but
> fails for getUser2():
>
> @Service("testService")
> public class TestServiceImpl implements TestService {
>
>         public User getUser1() {
>                 User u = new User();
>                 u.setGroups(new HashSet<Group>());
>                 u.setId(0);
>                 u.setPassword("pw");
>                 u.setUsername("name");
>                 return u;
>         }
>
>         public User getUser2() {
>                 return new User();
>         }
>
> }
>
> User is a simple JPA annotated entity. I'm using gwt 2.0.3, JPA 2,
> spring 3.0.1 and the GWTSpringController of gwt-sl 1.0. Before
> switching to gwt 2.0 everything worked fine.
>
> This is the exception thrown:
>
> Something other than an int was returned from JSNI method
> '....@com.google.gwt.user.client.rpc.impl.clientserializationstreamreader::readI
>  nt()':
> JS value of type undefined, expected int
> com.google.gwt.dev.shell.HostedModeException: Something other than an
> int was returned from JSNI method
> '....@com.google.gwt.user.client.rpc.impl.clientserializationstreamreader::readI
>  nt()':
> JS value of type undefined, expected int        at
> com.google.gwt.dev.shell.JsValueGlue.getIntRange(JsValueGlue.java:266)
>         at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:144)     
>   at
> com.google.gwt.dev.shell.ModuleSpace.invokeNativeInt(ModuleSpace.java:
> 242)    at
> com.google.gwt.dev.shell.JavaScriptHost.invokeNativeInt(JavaScriptHost.java :
> 75)     at
> com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.readInt 
> (ClientSerializationStreamReader.java)
>         at
> com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.readStr 
> ing(ClientSerializationStreamReader.java:
> 107)    at
> net.anwaltsdatenbank.adb.client.domain.jforum.User_FieldSerializer.deserial 
> ize(User_FieldSerializer.java:
> 42) (...)
>
> Hope someone can help here.

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

Reply via email to