2 Replies Latest reply on Nov 26, 2001 11:36 AM by Neil Lamoureux

    Updates to CMP Bean not stored in Oracle (intermittent)

    Neil Lamoureux Newbie

      I am running JBoss 2.4.0 with Tomcat 3.2.3 and Oracle 8.1.7.0.1.

      I am getting an intermittent problem when I create a CMP bean: on occasion, the bean is not stored in the database. I thought at first the bean was being cached, and would be stored eventually, but even after shutting down JBoss, the bean was not stored. In the logs, there is no SQL INSERT statement. On most runs, the SQL INSERT statements run as soon as I create the bean.

      This happens about once a day, usually first thing in the morning (I don't shut the server down overnight). I thought it may be some sort of initialization problem, but it doesn't always occur after I shut down JBoss, clean out the database table, and rerun JBoss.

      On my last test where this failed (earlier today) I created 100 CMP entity beans. The first 17 were not stored, and the rest were. Each bean is created in an identical loop, and my messages in the log indicate they are being created -- but never stored.


      I cannot reliably duplicate this error, so I am really stumped. Does anyone have a solution?

        • 1. Re: Updates to CMP Bean not stored in Oracle (intermittent)
          David Jencks Master

          If this only occurs after long periods of inactivity, possibly your connections are timing out. I would expect an exception to appear due to the broken connection... but you might try setting idle timeout up. I can't remember all the nonsense you have to go throught in pre -3 jboss to do this... I think you need IdleTimeoutEnabled=true, GCEnabled=true, IdleTimeoutMillis=(30 min in millis), GCIntervalMillis=(maybe 10 min in millis). That might be enough...

          • 2. Re: Updates to CMP Bean not stored in Oracle (intermittent)
            Neil Lamoureux Newbie

            Thanks -- I'll look into this some more.
            I noticed over the weekend that the beans I am having a problem with are the only ones I haven't defined in jaws.xml (there was no need). This resulted in JBoss attempting to create existing tables:

            [JAWS] java.sql.SQLException: ORA-00955: name is already used by an existing object

            This is likely because JBoss is doing a case-sensitive search for tables to see if they exist, and not finding them in Oracle.

            I'm hoping this will put an end to the original problem I posted.