Google Groups

Re: [objectify-appengine] Re: DeferredTask always gives NotSerialisable exception


Jeff Schnitzer Apr 8, 2012 5:59 PM
Posted in group: Google App Engine
I suggest restating the problem and being as clear as possible.  I
can't understand what you are asking - sorry.

Jeff

On Sun, Apr 8, 2012 at 7:04 PM, Deepak Singh <deepaks...@gmail.com> wrote:
> I am still stuck with the issue....
>
>
> On Sun, Apr 8, 2012 at 2:03 AM, Deepak Singh <deepaks...@gmail.com>
> wrote:
>>
>> Hi,
>>
>> I am doing some database operation on GAE-JAVA using Objectify 3.0.1
>> through Deferedtask as follows,
>>
>>  class TaskOp implements DeferredTask, Serializable {
>>
>> @Override
>> public void run() {
>> try{
>> enq.setStatus(Constant.CANCELLED_ENQUIRY);
>> objectify.put(enq);
>> List<PackageConversationDTO> convList =
>> objectify.query(PackageConversationDTO.class).filter("leadId",
>> enq.getId()).list();
>> for(PackageConversationDTO convDto : convList) {
>> convDto.setStatus(Constant.CANCELLED_TRIP_PACKAGE_CONVERSATION);
>> objectify.put(convDto);
>> }
>> List<HolidayInvoiceDTO> list =
>> objectify.query(HolidayInvoiceDTO.class).filter("tripId",
>> enq.getId()).list();
>> for(HolidayInvoiceDTO holiday : list) {
>> holiday.setStatus(Constant.INVOICE_GENERATED_THEN_TRIP_CANCELLED);
>> objectify.put(holiday);
>> }
>> }catch (Exception e) {
>> System.out
>> .println("CommonRpcServiceImpl.cancelTripEnquiry(...).TaskOp.run()
>> "+e.getMessage());
>> }
>> }
>>
>> }
>>
>>
>>
>>                try{
>> TaskOptions taskOpt = TaskOptions.Builder.withPayload(new TaskOp());
>> Queue defQueue = QueueFactory.getDefaultQueue();
>> defQueue.add(taskOpt);
>> }catch (Exception e) {
>> System.out.println("CommonRpcServiceImpl.cancelTripEnquiry()
>> "+e.getMessage());
>> }
>>
>> It always throws this exception
>>
>> CommonRpcServiceImpl.cancelTripEnquiry() java.io.NotSerializableException:
>> com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy
>>
>> I make sure that all the object being used here are serializable.
>>
>>
>> Thanks in advance
>> Deepak Singh
>
>
>
>
> --
> Deepak Singh