1 Reply Latest reply on Jul 15, 2011 11:11 AM by adymlincoln

    Could not read column value from result set: could not deserialize

    adymlincoln

      Hi,


      New to SEAM, but well versed in Java...We are trying to use SEAM 2.1.2 along with SQL Server 2008.  I am using the seam command line tool (at the moment) to try and generate (reverse engineer) our database (4 tables) into CRUD components.  Part of a quick proto-type.


      Our Application Stack is:



      • JDK 1.6.0, 12

      • SEAM 2.1.2.GA

      • JBoss 4.2.3.GA

      • SQL Server 2008




      We consistently keep getting the following error in our SEAM web application after generating entities on the tables, all four generated entities/tables get the same error:




      08:52:41,850 INFO  [STDOUT] Hibernate: 
          select
              top 26 swcmanufac0_.mfg_guid as mfg1_1_,
              swcmanufac0_.mfg_name as mfg2_1_,
              swcmanufac0_.num_discovered_products as num3_1_,
              swcmanufac0_.num_discovered_installs as num4_1_,
              swcmanufac0_.last_discovery_date as last5_1_,
              swcmanufac0_.restricted as restricted1_,
              swcmanufac0_.restriction_group as restrict7_1_,
              swcmanufac0_.restriction_on as restrict8_1_,
              swcmanufac0_.restriction_by as restrict9_1_,
              swcmanufac0_.reviewed_on as reviewed10_1_,
              swcmanufac0_.reviewed_by as reviewed11_1_,
              swcmanufac0_.source_system as source12_1_,
              swcmanufac0_.source_guid as source13_1_,
              swcmanufac0_.source_key as source14_1_,
              swcmanufac0_.excluded as excluded1_,
              swcmanufac0_.entered_on as entered16_1_,
              swcmanufac0_.entered_by as entered17_1_,
              swcmanufac0_.modified_on as modified18_1_,
              swcmanufac0_.modified_by as modified19_1_ 
          from
              swc.dbo.swc_manufacturers swcmanufac0_
      
      08:52:41,884 INFO  [SerializableType] could not read column value from result set: mfg2_1_; could not deserialize 
      



      The remaining StackTrace is large, but the key lines in it are:


      javax.el.ELException: /SwcManufacturersList.xhtml: Error reading 'resultList' on type com.lmig.swc.action.SwcManufacturersList_$$_javassist_seam_3
      ...
      Caused by: javax.persistence.PersistenceException: org.hibernate.type.SerializationException: could not deserialize
      ...
      Caused by: org.hibernate.type.SerializationException: could not deserialize
      ...
      Caused by: java.io.StreamCorruptedException: invalid stream header: 2D005800
      ...
      



      The initial SQL statement listed in the StackTrace can actually be run against the database without issues.  So it appears like the reverse engineering is working.  We are also able to build, deploy and run the SEAM examples (booking, contactlist) that came with 2.1.2, so it looks like the SEAM/JBoss stack is working OK.  Also, I went and defined a simple table on our SQL Server database of two columns (varchar(64)).  I successfully reverse engineered this ONE table and that ONE table appears to be working in our SEAM web application.


      Doesn't matter whether we deploy as EAR or WAR, same result.


      The only difference I noticed between the table I defined and the other tables is the use of varchar() on my table and nvarchar() on the other 4 tables.


      Can anyone give guideance on how we can pinpoint why this error is happening?  Are there known issues with SEAM and SQL Server?



      tia,


      adym