4 Replies Latest reply on Dec 21, 2009 6:17 AM by theute

    GateIn integration with Oracle 11g

    ruphus

      Hello everybody.

      I'm trying to set up an Oracle datasource for GateIn portal 3.0b deployed on JBoss AS 5.1.0GA.

      Configuration settings are shown below:

       

      gatein.ear/02portal.war:/WEB-INF/conf/database/database-configuration.xml

      [Rows 42-47]

      <property name="hibernate.connection.url" value="jdbc:oracle:thin:@localhost:1521:gidb"/>
      <property name="hibernate.connection.driver_class" value="oracle.jdbc.OracleDriver"/>
      <property name="hibernate.connection.autocommit" value="true"/>
      <property name="hibernate.connection.username" value="jbportal"/>
      <property name="hibernate.connection.password" value="jbportal"/>
      <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>

       

      [Row 65]

      <value>jbportalDs${container.name.suffix}</value>

       

      [Rows 78-81]

      <property name="driverClassName" value="oracle.jdbc.OracleDriver"/>
      <property name="url" value="jdbc:oracle:thin:@localhost:1521:gidb"/>
      <property name="username" value="jbportal"/>
      <property name="password" value="jbportal"/>    

       

      gatein.ear/02portal.war:/WEB-INF/conf/jcr/jcr-configuration.xml
      [Rows 40-41]

      <property name="source-name" value="jbportalDs${container.name.suffix}"/>
      <property name="dialect" value="oracle"/>

       

      gatein.ear/02portal.war:/WEB-INF/conf/jcr/repository-configuration.xml

      [Rows 32-33, 79-80, 126, 127]

      <property name="source-name" value="jbportalDs${container.name.suffix}"/>
      <property name="dialect" value="oracle"/>

       

      I put ojdbc6.jar lib driver in [JBOSS_HOME]server/default/lib folder.

       

      The startup console outputs:

       

      INFO  [HibernateServiceImpl] Using dialect Oracle10gDialect
      [...]
      INFO  [DriverManagerConnectionProvider] using driver: oracle.jdbc.OracleDriver at URL: jdbc:oracle:thin:@localhost:1521:RSDSDB
      INFO  [DriverManagerConnectionProvider] connection properties: {user=jbportal, password=****, autocommit=true}
      INFO  [SettingsFactory] RDBMS: Oracle, version: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production With the OLAP option
      [...]
      INFO  [SettingsFactory] JDBC driver: Oracle JDBC driver, version: 11.2.0.1.0
      INFO  [Dialect] Using dialect: org.hibernate.dialect.Oracle10gDialect
      INFO  [DriverManagerConnectionProvider] Using Hibernate built-in connection pool (not for production use!)
      INFO  [DriverManagerConnectionProvider] Hibernate connection pool size: 20
      [...]
      INFO  [DriverManagerConnectionProvider] autocommit mode: true
      INFO  [DriverManagerConnectionProvider] using driver: oracle.jdbc.OracleDriver at URL: jdbc:oracle:thin:@localhost:1521:RSDSDB
      INFO  [DriverManagerConnectionProvider] connection properties: {user=jbportal, password=****, autocommit=true}
      INFO  [SchemaUpdate] updating schema

       

      So far so good, but next I have:

       

      INFO  [JDBCWorkspaceDataContainer] Using a dialect 'Generic'
      ERROR [JDBCWorkspaceDataContainer] Error of init db org.exoplatform.services.jcr.impl.storage.jdbc.init.DBInitializerException:
       Could not create db schema of DataSource: 'system'. Reason: ORA-02000: parola chiave ALWAYS mancante
      ; . Last command: CREATE TABLE JCR_SVALUE(   ID BIGINT generated by default as identity (START WITH 2, INCREMENT BY 1) NOT NULL,    DATA VAR
      BINARY(65535),   ORDER_NUM INTEGER NOT NULL,   PROPERTY_ID VARCHAR(96) NOT NULL,   STORAGE_DESC VARCHAR(512),   CONSTRAINT JCR_PK_SVALUE PRI
      MARY KEY(ID),   CONSTRAINT JCR_FK_SVALUE_PROPERTY FOREIGN KEY(PROPERTY_ID) REFERENCES JCR_SITEM(ID)  )

       

      and many errors of that kind.

       

      I guess that fault is due to the 'Generic' dialect. Actually I don't know how to solve this problem. Am I missing something?

       

      Thank you for your reply.

        • 1. Re: GateIn integration with Oracle 11g
          sorenschmidt

          Ciao Francesco,

           

          Im seeing in the logs you have posted the message

          parola chiave ALWAYS mancante

          (what means "keyword ALWAYS missing". ) A strong sign that an incorrect dialect is used.

           

          This message :

          Using a dialect 'Generic'

          means that you haven't declared a dialect for the datasource.

          Then we see which datasource is meant:

          DataSource: 'system'

           

          I cannot see where the datasource "system" is configured. But it's sure that this datasource has no database dialect attached.

          If I were you I would verify all datasource configurations.

           

          ciao

          Soren

          • 2. Re: GateIn integration with Oracle 11g
            ruphus

            Hi Soren, thank you for your reply. I'm sorry I forgot to translate 'parola mancante' but I see you can handle it.

            Datasource 'system' is that defined for workspace with the same name in gatein.ear/02portal.war:/WEB-INF/conf/jcr/repository-configuration.xml, isn't it?

             

            <workspace name="system">
                 <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
                      <properties>
                           <property name="source-name" value="jbportalDs${container.name.suffix}"/>
                           <property name="dialect" value="oracle"/>
                           <property name="multi-db" value="false"/>
                           <property name="update-storage" value="true"/>
                           <property name="max-buffer-size" value="204800"/>
                           <property name="swap-directory" value="../temp/swap/system${container.name.suffix}"/>
                      </properties>
                      <value-storages>
                           <value-storage id="system" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
                                <properties>
                                     <property name="path" value="../temp/values/system${container.name.suffix}"/>
                                </properties>
                                <filters>
                                     <filter property-type="Binary"/>
                                </filters>
                           </value-storage>
                      </value-storages>
                 </container>
            [...]
            </workspace>
            
            • 3. Re: GateIn integration with Oracle 11g
              sorenschmidt

              Ciao Francesco,

               

              Hi Soren, thank you for your reply. I'm sorry I forgot to translate 'parola mancante' but I see you can handle it.

              (Non fa niente)

              You are saying:

              "Datasource 'system' is that defined for workspace with the same name in gatein.ear/02portal.war:/WEB-INF/conf/jcr/repository-configuration.xml, isn't it?"

               

              <property name="source-name" value="jbportalDs${container.name.suffix}"/>

              "system" here is just the workspace name


              You have to find out the value(s) of :
              jbportalDs${container.name.suffix}

              ... in the different configuration files (and if it the values are different or the same). If they are different the problem comes from there.

               

              I am sorry not being of help here. Hopefully somebody can clarify this.

               

              cu

              Soren

              • 4. Re: GateIn integration with Oracle 11g
                theute

                Francesco,

                 

                As you've seen it's quite cumbersome to change database.

                 

                Hibernate as a mechanism to automatically detect the dialect but eXo JCR requires you to specify it all the time.

                I've open a Jira to mock that detection, it should be fairly easy to implement but it seems that noone had the time so far to look into that issue.

                 

                https://jira.jboss.org/jira/browse/EXOJCR-310

                 

                If you happen to have some time to contribute this, that would be great

                1 of 1 people found this helpful