3 Replies Latest reply on Dec 5, 2007 12:00 PM by dhartford

    java.sql.Date, Seam-GWT remoting with EJB3/hibernate/JPA

    dhartford

      Hey all,
      After a lot of digging, finally found where I am having an issue with some DTO transports using the SEAM-GWT remoting.

      First, the (not useful) error on the client/browser side:
      =========================

      com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: This application is out of date, please click the refresh button on your browser
      
      com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException
      

      =========================

      Second, where the problem is originating from:
      ===========
      DTO.java:
       @Temporal(TemporalType.DATE)
       private java.util.Date dateField;
      

      ===========


      And third, the actual class that is returned (by hibernate):
      ============
      datefield type:java.sql.Date

      ============

      What is returned by the JPA layer, in this case Hibernate, is causing problems within SEAM when trying to transfer the DTO to the GWT client side.

      Manually creating the DTO (without hibernate) with a regular java.util.Date works correctly, but changing it to java.sql.Date causes problems as seen in the error above.

      Tested with jboss 4.2.1, seam 2.0.0.GA (GWT 1.4.60).

      HTH,
      -D