2 Replies Latest reply on Sep 7, 2006 10:34 AM by Jean-Pol Landrain

    JBoss 4.0.3 CMP Oracle BLOBs

    Dirk Müller Newbie

      Hello,

      I face a problem with a BLOB field in Oracle 8.1.7. Maybe this has been asked a thousand times, but I can't find a solution / question via "search". ;-)

      I want to use Entity Beans to access this field via CMP.

      The entity methods have "Object" as types since this is specified for BLOBs in the standardjbosscmp-jdbc.xml.

      Any time I set entitybean.setStoredData(s) where s is a java.lang.String it seems to run perfect since no exception appears.

      But it just does not store the data in the field. I checked this with TOAD. Other fields stored in the same transaction in the same row (same entity bean) are changed. I can see the update query in the server.log and also TOAD shows the changed values of the other fields.

      Has anyone an idea?

      Thank you.

      Dirk

        • 1. Re: JBoss 4.0.3 CMP Oracle BLOBs
          Jean-Pol Landrain Newbie

           

          "pflapf" wrote:
          I face a problem with a BLOB field in Oracle 8.1.7. Maybe this has been asked a thousand times, but I can't find a solution / question via "search". ;-)

          I want to use Entity Beans to access this field via CMP.


          I have the same problem with CLOB, CMP entity beans and Oracle 9i for an application we're migrating from Weblogic to JBoss 4.0.3SP1.

          I've found this come from the fact that, until Oracle 10g, Oracle doesn't support the standard interfaces java.sql.Clob and java.sql.Blob. If you were not doing it in a CMP entity bean, you would receive an "unsupported feature" exception when you try to access your LOBs from these interfaces. To solve that, you would then have to cast your java.sql.Clob into oracle.sql.CLOB or java.sql.Blob into oracle.sql.BLOB respectively and then you would have to call proprietary Oracle methods to access it.

          Weblogic had special tags in the deployment descriptors for OracleClob and OracleBlob in CMP entity beans. I can't manage to find the same in JBoss. If ever I can find it, I'll keep you informed.

          Regards.

          • 2. Re: JBoss 4.0.3 CMP Oracle BLOBs
            Jean-Pol Landrain Newbie

            I've found a workaround: use the OCI driver. It works then.