0 Replies Latest reply on Feb 20, 2002 5:42 PM by Alberto

    Problem retrieving an Object

    Alberto Newbie

      I use Jboss 2.4.3. with Windows 2000 and Jetty3.1.3.
      I have an CMP entity bean with a persistent variable Var which is an Object and the following mapping in jaws:


      <sql-type>varbinary(8000) NULL</sql-type>

      <sql-type>varchar(256) NULL</sql-type>


      The problem is that I store a object from the class String in Var. It maps it to a varbinary. Then I close Jboss and start it again. I retrive the Object contained by Var. And when i try to cast it to a String again as it originally was it gives me a ClassCastException.

      Is the anyway to fix it so that I can save a object of any class as an Object with CMP and then get the original object (to its own class) with a cast or anything?

      Thanks in advance, and excuse me because of my bad english (i'm improving it)