Hello all,

it seems I've got bad luck with switching to gwt 2.0. In addition to
the problem described here:
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/6680775a0c925397
the following error does not only occur in development mode but also
with the compiled JavaScript.

Trying to send a simple entity to the server like this

AdminConfiguration cfg = new AdminConfiguration();
cfg.setHelpText("Hello World.");
adminService.save(cfg, new VoidCallbackAdapter<Void>());

causes this odd exception (notice: the name of the missing class is
equal to the String-value):

com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException:
java.lang.ClassNotFoundException: Hello World.
        at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:308)
        at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:166)
        at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:123)
        at
net.anwaltsdatenbank.adb.server.controller.RpcController.processCall(RpcController.java:
37)
        at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
224)
        at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
62)
        at
org.gwtwidgets.server.spring.GWTSpringController.handleRequest(GWTSpringController.java:
85)
        at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:
48)
        at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:
771)
        at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:
716)
        at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:
647)
        at
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:
563)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
487)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
362)
        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:
729)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
405)
        at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
        at
org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:
49)
        at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
        at org.mortbay.jetty.Server.handle(Server.java:324)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
505)
        at org.mortbay.jetty.HttpConnection
$RequestHandler.content(HttpConnection.java:843)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
        at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
395)
        at org.mortbay.thread.QueuedThreadPool
$PoolThread.run(QueuedThreadPool.java:488)
Caused by: com.google.gwt.user.client.rpc.SerializationException:
java.lang.ClassNotFoundException: Hello World.
        at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:
561)
        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:137)
        at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue(ServerSerializationStreamReader.java:
384)
        at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeClass(ServerSerializationStreamReader.java:
658)
        at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeImpl(ServerSerializationStreamReader.java:
704)
        at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:
548)
        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:137)
        at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue(ServerSerializationStreamReader.java:
384)
        at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:296)
        ... 30 more

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 (JPA 2 annotated) entity:

@Entity
@Table(name="ADB_CONFIG")
public class AdminConfiguration implements PersistedEntity<Long> {

        private static final long serialVersionUID = -3641405191548095235L;
        @Id
        @GeneratedValue(strategy=GenerationType.IDENTITY)
        private Long id;
        @Version
        private Long version;
        @Lob
        private String helpText;

        public Long getId() {
                return id;
        }
        public void setId(Long id) {
                this.id = id;
        }
        public void setVersion(Long version) {
                this.version = version;
        }
        public Long getVersion() {
                return version;
        }
        public String getHelpText() {
                return helpText;
        }
        public void setHelpText(String helpText) {
                this.helpText = helpText;
        }
}

This is the remote service:

@Service("administrationService")
public class AdministrationServiceImpl implements
AdministrationService {

        private static final long serialVersionUID = 4214929347647808921L;

        private final Logger log =
LoggerFactory.getLogger(AdministrationServiceImpl.class);

        private final AdminConfigurationDao adminConfigurationDao;

        private final Hibernate3BeanReplicator beanReplicator = new
Hibernate3BeanReplicator();

        @Inject
        public AdministrationServiceImpl(AdminConfigurationDao
adminConfigurationDao) {
                super();
                this.adminConfigurationDao = adminConfigurationDao;
        }

        @Transactional
        public AdminConfiguration loadConfiguration() {
                log.debug("loading configuration.");

                final List<AdminConfiguration> result =
adminConfigurationDao.findAll();
                return result.size() > 0 ? beanReplicator.copy(result.get(0)) : 
new
AdminConfiguration();

        }

        @Transactional
        public void save(AdminConfiguration cfg) {
                log.debug("saving configuration");

                adminConfigurationDao.persist(cfg);
        }
}


Any help is highly appreciated. Thank you.

-- 
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-tool...@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.

Reply via email to