RestDispatch problem with list

74 views
Skip to first unread message

David Nouls

unread,
Mar 25, 2016, 7:03:50 AM3/25/16
to GWTP

I'm trying to migrate using GWTP Rest Dispatch support after running into limitations in RestyGWT. But I did not get much further with GWTP :-S

Any idea why I get this error ?


[INFO]    Adding '1' new generated units
[INFO]       Tracing compile failure path for type 'com.gwtplatform.dispatch.rest.client.serialization.mappers.java_util_List_com_acme_cloud_event_message_MessageMetadata_MapperImpl'
[INFO]          [ERROR] Errors in 'generated://6F90ACC4FB9ED8ACA8CDC1167179DF89/com/gwtplatform/dispatch/rest/client/serialization/mappers/java_util_List_com_acme_cloud_event_message_MessageMetadata_MapperImpl.java'
[INFO]             [ERROR] Line 26: Type mismatch: cannot convert from CollectionJsonSerializer<Collection<?>,capture#1-of ?> to JsonSerializer<List<MessageMetadata>>
[INFO]       See snapshot: C:\Users\dnouls\AppData\Local\Temp\com.gwtplatform.dispatch.rest.client.serialization.mappers.java_util_List_com_acme_cloud_event_message_MessageMetadata_MapperImpl3767844466515430074.java
The generated class:

package com.gwtplatform.dispatch.rest.client.serialization.mappers;

import com.github.nmorel.gwtjackson.client.AbstractObjectMapper;

import com.github.nmorel.gwtjackson.client.JsonDeserializer;

import com.github.nmorel.gwtjackson.client.JsonSerializer;

import com.github.nmorel.gwtjackson.client.deser.collection.ListJsonDeserializer;

import com.github.nmorel.gwtjackson.client.ser.CollectionJsonSerializer;

import com.acme.cloud.event.message.MessageMetadata;

import com.acme.cloud.event.message.MessageMetadataBeanJsonDeserializerImpl;

import com.acme.cloud.event.message.MessageMetadataBeanJsonSerializerImpl;

import java.lang.Override;

import java.util.List;

public final class java_util_List_com_acme_cloud_event_message_MessageMetadata_MapperImpl extends AbstractObjectMapper<List<MessageMetadata>> implements java_util_List_com_acme_cloud_event_message_MessageMetadata_Mapper {

 public java_util_List_com_acme_cloud_event_message_MessageMetadata_MapperImpl() {

   super("List");

 }

  @Override

protected JsonDeserializer<List<MessageMetadata>> newDeserializer() {

   return ListJsonDeserializer.newInstance(new MessageMetadataBeanJsonDeserializerImpl());

 }

  @Override

 protected JsonSerializer<List<MessageMetadata>> newSerializer() {

   return CollectionJsonSerializer.newInstance(new MessageMetadataBeanJsonSerializerImpl());

 }

}



David

unread,
Mar 25, 2016, 12:28:24 PM3/25/16
to GWTP
I moved to a newer version of GWT-Jackson (0.12.0) and now everything works fine.

--
You received this message because you are subscribed to a topic in the Google Groups "GWTP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gwt-platform/Oa9R5iSwChc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gwt-platform...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages