3 Replies Latest reply on Sep 11, 2012 8:33 AM by Randall Hauch

    Modeshape 2.8.2 JPA connector and Oracle 11g issue.

    cedric_cr Newbie


      I'm new to JCR and Modeshape, I have an issue with the jpa connector and oracle 11g database. I try to add a nt:file node in the repository. If the size of the file is biger than the db_block_size parameter (from oracle) I get the following exception  during the session.save() call :


      org.modeshape.graph.connector.RepositorySourceException: org.modeshape.graph.connector.RepositorySourceException: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: 
      Request is frozen and may not be changed: create '/{}file' (in 'workspace1' workspace) with properties [{http://www.jcp.org/jcr/1.0}primaryType = {http://www.jcp.org/jcr/nt/1.0}file,
      {http://www.jcp.org/jcr/1.0}uuid = b75625ed-7cda-4f88-96f7-72e3dc4ca825,
      http://www.modeshape.org/internal/1.0}nodeDefinition = {http???www.modeshape.org?1.0}root/?/{http???www.jcp.org?jcr?nt?1.0}base] by appending at org.modeshape.graph.session.GraphSession.save(GraphSession.java:1052)
              at org.modeshape.jcr.SessionCache.save(SessionCache.java:476)
              ... 37 more


      Here is my JPA connector source config:

      <mode:source jcr:name="oracle"
                                    mode:description="The database store for our content"
                                    mode:username="######" mode:password="######" mode:retryLimit="3"
                                    mode:updatesAllowed="true" />


      I don't encounter this problem with postgre.


      what your thoughts about this ?

        • 1. Re: Modeshape 2.8.2 JPA connector and Oracle 11g issue.
          Randall Hauch Master

          I know we've not had a problem with adding files to Oracle 9i and 10g that are larger than the block size, but I've not used 11g. Perhaps someone else can comment on their experience. But IIUC, Oracle's "db_block_size" simply defines the size of the (internal) blocks, and this does not limit the size of the values. For example, Oracle will use this value to determine if it can inline any LOB value small enough to fit into the same page as the rest of the row data; if not, it will store the LOB "out of line" on (multiple) other pages by breaking the LOB into chunks.


          Perhaps you can check the database schema, and verify that the "DATA" column on the "MODE_SIMPLE_LARGE_VALUES" table has an appropriate length. When ModeShape creates this table (via Hibernate) in Oracle, SQL Server, Sybase, MySQL, PostgreSQL, Informix, and Teradata, the length is set to the database's default size for BLOBs. When using DB2 and Derby, ModeShape creates the column to have a length of 1GB.


          You should be able to change the length of this column using the DB tools, and there isn't anything to configure in ModeShape.

          1 of 1 people found this helpful
          • 2. Re: Modeshape 2.8.2 JPA connector and Oracle 11g issue.
            cedric_cr Newbie

            Thanks for the quick answer,

            after checking the data base structure I decided to try manually the query that hibernate does, and they are working. So the problem is not coming from Modeshape, but from the jdbc driver. My mistake was to use the last ojdbc driver available in the maven dependencies. Once I've changed ojdbc for ojdbc6 from Oracle the problem disappeared.