deserialization problem

15 views
Skip to first unread message

guvenc

unread,
Jul 7, 2011, 4:25:17 AM7/7/11
to dpHibernate
Hi,
I configured dphibernate to work with our project which has spring 3,
hibernate 3.6, java 1.6 and blazeds in it. I have spring-flex
integration as well.

I can do lazy load and proxy objects, and then send it to flex client.
I can see that my many-to-one related fields are proxied. However,
When I send my object back to java backend, it deserializes the
remoting message incorrectly !! And I get a message invocation error
"2 arguments were sent, 1 expected".

What might be the problem ?
Thanks in advance.

Kind regards,
Guvenc

Marty Pitt

unread,
Jul 7, 2011, 7:48:21 AM7/7/11
to dphib...@googlegroups.com
Can you please show a code snippet that reproduces your scenario?

How are you sending the object back?

Note: unless youre sending the object to be updated, I'd normally just recommend sending the primary key, and fetching the matching entity on the server.

If you are trying to update the entity, I'd suggest using the .save () method, which will manage the serialisation efficently for you.

Sent from Samsung Mobile

guvenc <guvenc....@gmail.com> wrote:

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

guvenc

unread,
Jul 18, 2011, 3:50:01 AM7/18/11
to dpHibernate
Hi Marty,

I've read some other posts related to this issue and I see that
dpHibernate supports save and update methods for hibernate objects,
but the problem is we already have lots of codes in our project, so it
wouldn't be easy to replace them all and test again. Apart from that,
we have some methods which does more than an update method does. We
really have to pass these objects to the java methods.

When an object goes to flex client and then comes back to java with a
method call, deserializer tries to call the correct java method with
incorrect parameters, I don't know what is happening in the
deserializer !!

Here is the flex code we have, but I think this is an ordinary code.

--------------------------------

var myService:HibernateRemoteObject = new
HibernateRemoteObject("myFlexService");
myService.destination="myFlexService";

var selectedItem:MyObject = myDataGrid.selectedItem as MyObject;
var myToken:AsyncToken = myService.updateMyObject(selectedItem);
myToken.addResponder(new
AsyncResponder(updateMyObjectHandler,baseFaultHandler));

--------------------------------

myDataGrid has been provided with an ArrayList fetched from the java
backend. The ArrayList has proxied objects in it.

Kind Regards,
Guvenc
Reply all
Reply to author
Forward
0 new messages