3 Replies Latest reply on Jan 19, 2007 8:24 PM by jboss.biancashouse.com

    jboss-portal-2.6-ALPHA1-bundled with Oracle

      Hello,

      jboss-portal-2.6-ALPHA1-bundled seems not to work with Oracle (9.2.0.5 Windows).

      The application Server starts up, but when i try to execute http://localhost:8080/portal i get the following exception

      2007-01-18 12:13:08,743 DEBUG [org.hibernate.util.JDBCExceptionReporter] could not execute query [select this_.PK as PK56_1_, this_.PATH as PATH56_1_, this_.NAME as NAME56_1_, this_.PARENT_KEY as PARENT4_56_1_, securityco2_.NODE_KEY as NODE3_3_, securityco2_.PK as PK3_, securityco2_.ROLE as ROLE3_, securityco2_.PK as PK65_0_, securityco2_.ROLE as ROLE65_0_, securityco2_.NODE_KEY as NODE3_65_0_, actions3_.PK as PK4_, actions3_.ACTIONS as ACTIONS4_ from JBP_OBJECT_NODE this_ left outer join JBP_OBJECT_NODE_SEC securityco2_ on this_.PK=securityco2_.NODE_KEY left outer join JBP_OBJECT_NODE_SEC_ACTIONS actions3_ on securityco2_.PK=actions3_.PK where (this_.PATH=?)]
      java.sql.SQLException: ORA-00942: Tabelle oder View nicht vorhanden


      In Oracle the table JBP_OBJECT_NODE is missing.

      On initial startup the Server.log shows no errors when creating the object
      2007-01-18 12:11:51,289 INFO [org.hibernate.cfg.HbmBinder] Mapping class: org.jboss.portal.core.impl.model.portal.ObjectNode -> JBP_OBJECT_NODE
      2007-01-18 12:11:51,289 DEBUG [org.hibernate.cfg.HbmBinder] Mapped property: key -> PK
      2007-01-18 12:11:51,289 DEBUG [org.hibernate.cfg.HbmBinder] Mapped property: path -> PATH
      2007-01-18 12:11:51,299 DEBUG [org.hibernate.cfg.HbmBinder] Mapped property: name -> NAME
      2007-01-18 12:11:51,299 DEBUG [org.hibernate.cfg.HbmBinder] Mapped property: children
      2007-01-18 12:11:51,299 DEBUG [org.hibernate.cfg.HbmBinder] Mapped property: parent -> PARENT_KEY
      2007-01-18 12:11:51,299 DEBUG [org.hibernate.cfg.HbmBinder] Mapped property: object
      2007-01-18 12:11:51,299 DEBUG [org.hibernate.cfg.HbmBinder] Mapped property: securityConstraints


      I can not find any errors in alert.log nor any user traces thrown by database.

      Regards Oliver

        • 1. Re: jboss-portal-2.6-ALPHA1-bundled with Oracle
          • 2. Re: jboss-portal-2.6-ALPHA1-bundled with Oracle

            Hello Julien,

            thx for reply, unfortunatly the new domain.hbm.xml did not work as well, even more tables missing in Oracle Schema

            With the original one i got 79 Tables in Oracle, with the new from you it`s only 66.

            When requesting http://localhost:8080/portal i get a different exception:

            2007-01-19 13:14:24,966 ERROR [org.jboss.portal.server.servlet.PortalServlet] Unexpected exception
            java.lang.NullPointerException
             at org.jboss.portal.core.impl.model.portal.PersistentPortalObjectContainer.getObjectNode(PersistentPortalObjectContainer.java:252)
             at org.jboss.portal.core.impl.model.portal.AbstractPortalObjectContainer.getObject(AbstractPortalObjectContainer.java:125)


            Regards Oliver

            • 3. Re: jboss-portal-2.6-ALPHA1-bundled with Oracle
              jboss.biancashouse.com

              This is a work in progress, but the following is a checklist of things that make Portal work with Oracle.

              Hope it is helpful to you... Ian

              Installed using jem installer 1.2.GA

              Datasource is Oracle thin driver, with username jbportal241

              Portal-2.6-alpha1

              Changes made to get Portal working with Oracle
              ==============================================

              Using oci rather than thin driver
              ---------------------------------

              It is recommeded we use the oci style of connection.

              The latest oci drivers can be downloaded from Oracle.
              You have to unzip the download into a directory and add that directory to the windows path.
              You also have to copy the ojdbc.jar to the lib directoy for your deployment directory.

              If you already had an Oracle client, you'll need to rename a property in your windows
              registry:

              \HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\NLS_LANG

              Use a later version of Apache JackRabbit
              ----------------------------------------
              In portal-cms.sar, replace jackrabbit-core-1.0.jar with jackrabbit-core-1.1.1.jar

              Edited portal-cms.sar/META-INF/jboss-service.xml to make use of OracleFileSystem
              that is now available in the newer jackrabbit API. Note - the oracle username
              and password are found in the new file.

              Moved portal-cms.war into portal-cms.sar


              Workarounds for bugs in Oracle's JDBC driver
              --------------------------------------------

              See http://forum.hibernate.org/viewtopic.php?t=82
              and http://forum.hibernate.org/viewtopic.php?t=930650
              and http://jira.jboss.com/jira/browse/JBAS-191

              Gavin King reminds us that Oracle don't handle out-join-fetching properly, and
              recommends we disable it. So I found how to do this in the Hibernate reference docs:

              http://www.hibernate.org/hib_docs/reference/en/html/session-configuration.html

              3.4.2. Outer Join Fetching
              --------------------------
              If your database supports ANSI, Oracle or Sybase style outer joins, outer join fetching
              will often increase performance by limiting the number of round trips to and from the
              database (at the cost of possibly more work performed by the database itself).
              Outer join fetching allows a whole graph of objects connected by many-to-one, one-to-many,
              many-to-many and one-to-one associations to be retrieved in a single SQL SELECT.

              Gavin King informs us that Oracle doesn't handle out-join-fetching properly, and
              recommends we disable it. So I found how to do this in the Hibernate reference docs:

              http://www.hibernate.org/hib_docs/reference/en/html/session-configuration.html

              Outer join fetching may be disabled globally by setting the property hibernate.max_fetch_depth to 0.
              A setting of 1 or higher enables outer join fetching for one-to-one and many-to-one
              associations which have been mapped with fetch="join".

              See Section 19.1, ?Fetching strategies? for more information.

              So I add the following lines:

              org.hibernate.dialect.Oracle9Dialect
              0

              to hibernate.cfg.xml in these directories:

              jboss-portal.sar/conf/hibernate/instance
              jboss-portal.sar/conf/hibernate/portal
              jboss-portal.sar/conf/hibernate/portlet
              jboss-portal.sar/conf/hibernate/user
              jboss-portal.sar/portal-cms.sar/conf/hibernate/cms


              Bug in SQL generation from Hibernate mappings
              =============================================
              Table JBP_OBJECT_NODE does not get generated due to the following SQl being generated:

              create table JBP_OBJECT_NODE (
              PK number(19,0) not null,
              PATH varchar2(255 char) unique,
              NAME varchar2(255 char),
              PARENT_KEY number(19,0),
              primary key (PK), unique (PATH)
              )

              remove unique="true" from the PATH column mapping in jboss-portal.sar/conf/hibernate/portal/domain.hbm.xml

              This bug also applies to the mapping for JBP_INSTANCE, so remove the same entry from:

              jboss-portal.sar/conf/hibernate/instance/domain.hbm.xml


              Oracle CLOB mapping problem
              ===========================

              Refer to the JIRA: http://jira.jboss.com/jira/browse/JBAS-191

              ... please ensure that you are using the absolute latest Oracle 9.2 JDBC drivers, even if your database is Oracle 8. Also, you must use the
              "OCI" variant if you want to store LOB's greater than about 4k...

              Refer to Oracle's description of the CLOBS: http://www.oracle.com/technology/sample_code/tech/java/codesnippet/jdbc/clob10g/handlingclobsinoraclejdbc10g.html

              I have download the latest oracle 10g R2 jdbc driver 10.2.0.2
              Workaround for Oracle version of JBoss Forums
              ---------------------------------------------

              apply the same as above to hibernate.cfg.xml in jboss-forums.ear/portal-forums.sar/conf


              Jboss Forums ear has a bug - missing Faces listener
              ===================================================

              Add the following listener to jboss-forums.ear/portal-forums.war/WEB-INF/web.xml

              <!-- MyFaces -->

              <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>


              Changed the deployment xml so that ForumsPortlet not deployed - just JSFForumsPortlet



              NOTE - Forums won't work with Portal Alpha1 - class cast exception - waiting for someone to identify that problem - use Portal 2.6DR is you need Forums