2 Replies Latest reply on Nov 16, 2001 8:00 AM by Kai

    SQL Error preloading data for key 42

    Kai Newbie

      I am running Jboss with Hypersonic.
      SQL Error preloading data for key ...
      I get this error message all the time if jboss tries to read in a data set from the database containing a char.
      Although I receive this error, Jboss loads the data in.
      Only if the server runs over some time (1 or 2 days),
      some data sets cannot be read anymore.
      Can anybody help??

        • 1. Re: SQL Error preloading data for key 42
          Dan Christopherson Newbie

          Really what that message means is that you're using read-ahead and JBoss got an error trying to load all of the entities data at the time the finder was called. It then falls back on the innefficient two-phase load (find identifies the key set and a separate load is issued for each entity effected).

          The 'char' is a member of your bean (i mean, do you have a CMP field of type char)? There are some problems with char fields, IIRC. But then why does a regular load work.

          What version of JBoss? Assuming 2.4.x, not 3.0, I'll look at the code this evening.

          • 2. Re: SQL Error preloading data for key 42
            Kai Newbie

            I found the error. seems that Jboss 2.4.x is not able to retieve CMP fields from the database if they are 'char' in the java code. I changed the char to a String. Works perfectly. Also, I tried Jboss 3.0, the char worked there.

            Thanks again...