2 Replies Latest reply on Feb 8, 2003 9:21 PM by davidjencks

    DB2 / JBOSS Error

    chadlavy

      Hi,

      When using entity beans to fetch a Collection of data objects, I am getting the following error from DB2:

      The statement is too long or too complex

      The DB2 documentation says that you should increase the DB2 heap size to remedy this. We jacked the heap up quite a bit and still get the error. Alternatively, the documentation says that you should break up your query so that it is not as complex. I have noticed that JBoss seems to create huge SQL statements with a lot of AND's when hitting the database. This occurs despite the fact that the EJBQL describing the statement is pretty simple.

      Has anyone else run into this?

      Is there a way to get JBoss to simplify the queries it issues?

      Thanks In Advance,
      Chad Lavy

        • 1. Re: DB2 / JBOSS Error
          klaust

          Hi Chad,

          this is no jboss-problem and dbheap was not the right parameter. (some default ddparms are to small)

          play with following parms:
          stmtheap = 8192
          perhaps
          applheapsz = 1024
          appl_ctl_heap_sz = 1024
          will also be nessesary. look to the db2-errormsg.

          hope that helps
          klaus

          • 2. Re: DB2 / JBOSS Error
            davidjencks

            You may need to set some jboss read-ahead parameters so it loads for fewer rows at once. Look in the persistence forum, others have had similar problems.