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
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4004097#4004097
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4004097
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user