Re: using a JPA annotated class in a RPC call yelds IncompatibleRemoteServiceException

2009-10-12 Thread Mohsen Saboorian
And here is Datanucleus's answer:
http://www.jpox.org/servlet/forum/viewthread_thread,5438

On Mon, Oct 12, 2009 at 5:35 PM, Mohsen Saboorian  wrote:

> See this related material:
> https://projects.azoth.eu/jreactor/wiki/jdoAndGWT
>
> You JDO impl actually
> enhances Java byte code which then cannot be serialized by GWT.
>
> You should see in your JDO impl documentation if there is some way to
> bypass this kind of bytecode enhancement. The best place would be your JDO
> impl mailing list to continue the discussion.
>
> Mohsen
>
>
> On Sun, Oct 11, 2009 at 1:52 AM, Alexandru Ioan Cucu <
> alexandruioan.c...@gmail.com> wrote:
>
>>
>>
>> On Sun, Oct 11, 2009 at 12:29 AM, Alexandru Ioan <
>> alexandruioan.c...@gmail.com> wrote:
>>
>>> I came across this strage problem...
>>>
>>> If I remove the @Id and @GeneratedValue annotations, all runs fine...
>>>
>>
>>
>> Hello,
>>
>> sorry, I forgot to mention. I use google web application, datanucleus as
>> JPA implementation. If I use Hibernate, it doesn't reproduce.
>> Also, debugging through the GWT sources, I came across this:
>>
>> in
>> com.google.gwt.user.server.rpc.impl.SerializabilityUtil.generateSerializationSignature
>> when iterating over the bean's fields, an
>> protected java.lang.Object[]
>> com.dinc.bandmplace.client.model.User.jdoDetachedState
>> appears.
>>
>> thx
>>
>>
>>
>>
>> >>
>>
>

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: using a JPA annotated class in a RPC call yelds IncompatibleRemoteServiceException

2009-10-12 Thread Mohsen Saboorian
See this related material:https://projects.azoth.eu/jreactor/wiki/jdoAndGWT

You JDO impl actually
enhances Java byte code which then cannot be serialized by GWT.

You should see in your JDO impl documentation if there is some way to bypass
this kind of bytecode enhancement. The best place would be your JDO impl
mailing list to continue the discussion.

Mohsen

On Sun, Oct 11, 2009 at 1:52 AM, Alexandru Ioan Cucu <
alexandruioan.c...@gmail.com> wrote:

>
>
> On Sun, Oct 11, 2009 at 12:29 AM, Alexandru Ioan <
> alexandruioan.c...@gmail.com> wrote:
>
>> I came across this strage problem...
>>
>> If I remove the @Id and @GeneratedValue annotations, all runs fine...
>>
>
>
> Hello,
>
> sorry, I forgot to mention. I use google web application, datanucleus as
> JPA implementation. If I use Hibernate, it doesn't reproduce.
> Also, debugging through the GWT sources, I came across this:
>
> in
> com.google.gwt.user.server.rpc.impl.SerializabilityUtil.generateSerializationSignature
> when iterating over the bean's fields, an
> protected java.lang.Object[]
> com.dinc.bandmplace.client.model.User.jdoDetachedState
> appears.
>
> thx
>
>
>
>
> >
>

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: using a JPA annotated class in a RPC call yelds IncompatibleRemoteServiceException

2009-10-12 Thread Dariusz

I don't know for sure if it's required or not, but what about your
table annotation?

@Entity
@Table(name = "user")
public class User implements IsSerializable{
   ...





On Oct 10, 11:29 pm, Alexandru Ioan 
wrote:
> I came across this strage problem...
>
> I have this entity bean
>
> @Entity
> public class User implements IsSerializable{
>
> private static final long serialVersionUID = 1L;
>
> @Id
> @GeneratedValue
> private Long id;
>
> @Column
> private String name;
>
> @Column
> private String password;
>
> //... getters and setters...
>
> }
>
> If I send this bean over an RPC call, I get an
>
> com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException:
> Invalid type signature for com.dinc.bandmplace.client.model.User
> at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:298)
> at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall
> (RemoteServiceServlet.java:164)
> at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
> (RemoteServiceServlet.java:86)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
> 487)
> at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> (ServletHandler.java:1093)
> at
> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
> (TransactionCleanupFilter.java:43)
> at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> (ServletHandler.java:1084)
> at com.google.appengine.tools.development.StaticFileFilter.doFilter
> (StaticFileFilter.java:121)
> at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> (ServletHandler.java:1084)
> at org.mortbay.jetty.servlet.ServletHandler.handle
> (ServletHandler.java:360)
> at org.mortbay.jetty.security.SecurityHandler.handle
> (SecurityHandler.java:216)
> at org.mortbay.jetty.servlet.SessionHandler.handle
> (SessionHandler.java:181)
> at org.mortbay.jetty.handler.ContextHandler.handle
> (ContextHandler.java:712)
> at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
> 405)
> at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle
> (DevAppEngineWebAppContext.java:54)
> at org.mortbay.jetty.handler.HandlerWrapper.handle
> (HandlerWrapper.java:139)
> at com.google.appengine.tools.development.JettyContainerService
> $ApiProxyHandler.handle(JettyContainerService.java:313)
> at org.mortbay.jetty.handler.HandlerWrapper.handle
> (HandlerWrapper.java:139)
> at org.mortbay.jetty.Server.handle(Server.java:313)
> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> 506)
> at org.mortbay.jetty.HttpConnection$RequestHandler.content
> (HttpConnection.java:844)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
> at org.mortbay.io.nio.SelectChannelEndPoint.run
> (SelectChannelEndPoint.java:396)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run
> (BoundedThreadPool.java:442)
> Caused by: com.google.gwt.user.client.rpc.SerializationException:
> Invalid type signature for com.dinc.bandmplace.client.model.User
> at
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.validateTypeVersions
> (ServerSerializationStreamReader.java:737)
> at
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize
> (ServerSerializationStreamReader.java:492)
> at
> com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject
> (AbstractSerializationStreamReader.java:61)
> at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader
> $ValueReader$8.readValue(ServerSerializationStreamReader.java:131)
> at
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue
> (ServerSerializationStreamReader.java:372)
> at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:287)
>
> If I remove the @Id and @GeneratedValue annotations, all runs fine...
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



using a JPA annotated class in a RPC call yelds IncompatibleRemoteServiceException

2009-10-11 Thread Alexandru Ioan

I came across this strage problem...

I have this entity bean

@Entity
public class User implements IsSerializable{

private static final long serialVersionUID = 1L;

@Id
@GeneratedValue
private Long id;

@Column
private String name;

@Column
private String password;

//... getters and setters...
}

If I send this bean over an RPC call, I get an


com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException:
Invalid type signature for com.dinc.bandmplace.client.model.User
at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:298)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall
(RemoteServiceServlet.java:164)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
(RemoteServiceServlet.java:86)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1093)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
(TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
at com.google.appengine.tools.development.StaticFileFilter.doFilter
(StaticFileFilter.java:121)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
405)
at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle
(DevAppEngineWebAppContext.java:54)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:139)
at com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:313)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
506)
at org.mortbay.jetty.HttpConnection$RequestHandler.content
(HttpConnection.java:844)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:396)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run
(BoundedThreadPool.java:442)
Caused by: com.google.gwt.user.client.rpc.SerializationException:
Invalid type signature for com.dinc.bandmplace.client.model.User
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.validateTypeVersions
(ServerSerializationStreamReader.java:737)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize
(ServerSerializationStreamReader.java:492)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject
(AbstractSerializationStreamReader.java:61)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader
$ValueReader$8.readValue(ServerSerializationStreamReader.java:131)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue
(ServerSerializationStreamReader.java:372)
at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:287)



If I remove the @Id and @GeneratedValue annotations, all runs fine...

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: using a JPA annotated class in a RPC call yelds IncompatibleRemoteServiceException

2009-10-11 Thread Alexandru Ioan Cucu
On Sun, Oct 11, 2009 at 12:29 AM, Alexandru Ioan <
alexandruioan.c...@gmail.com> wrote:

> I came across this strage problem...
>
> If I remove the @Id and @GeneratedValue annotations, all runs fine...
>


Hello,

sorry, I forgot to mention. I use google web application, datanucleus as JPA
implementation. If I use Hibernate, it doesn't reproduce.
Also, debugging through the GWT sources, I came across this:

in
com.google.gwt.user.server.rpc.impl.SerializabilityUtil.generateSerializationSignature
when iterating over the bean's fields, an
protected java.lang.Object[]
com.dinc.bandmplace.client.model.User.jdoDetachedState
appears.

thx

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---