Dan Moore wrote:

Hi David,

--- David Sean Taylor <[EMAIL PROTECTED]> wrote:


Dan Moore wrote:


In order to get the PSML working in Oracle, from the 1.5 binary
distribution of Jetspeed, in addition to following the instructions
here regarding importing,
http://portals.apache.org/jetspeed-1/psml_db.html, I also had to

make

some changes to class files and sql files.

You need both the src and binary distributions. There's a diff of

the

relevant files below.

Modify the java files:
Add _SEQ onto the value in setPrimaryKeyMethodInfo in each of the
org/apache/jetspeed/om/dbpsml/map/Jetspeed* files.


The files that are you recommended for patching are not in the CVS.
They are Torque generated files.


To use Oracle, or any other database besides Hypersonic with
Jetspeed-1, follow the steps here:


http://portals.apache.org/jetspeed-1/database.html


I'm certainly no Torque expert.  Thanks for the link.  I followed the
instructions on that page.

I changed Torque.properties:
torque.database.default.adapter=oracle

Did you see step #1: edit project.properties ?
After doing that, run

maven torque:sql

just to see what your DDL looks like
Go to target/classes/sql/dbpsml-schema.sql
It should look something like this:
(disclaimer: im using 1.6-dev from the cvs head)

DROP TABLE JETSPEED_USER_PROFILE CASCADE CONSTRAINTS;
DROP SEQUENCE JETSPEED_USER_PROFILE_SEQ;

CREATE TABLE JETSPEED_USER_PROFILE
(
PSML_ID NUMBER NOT NULL,
USER_NAME VARCHAR2 (32) NOT NULL,
MEDIA_TYPE VARCHAR2 (99),
LANGUAGE VARCHAR2 (2),
COUNTRY VARCHAR2 (2),
PAGE VARCHAR2 (99),
PROFILE LONG RAW,
CONSTRAINT JETSPEED_USER_PROFILE_UNIQUE UNIQUE (USER_NAME, MEDIA_TYPE, LANGUAGE, COUNTRY, PAGE)
);


ALTER TABLE JETSPEED_USER_PROFILE
    ADD CONSTRAINT JETSPEED_USER_PROFILE_PK
PRIMARY KEY (PSML_ID);


CREATE SEQUENCE JETSPEED_USER_PROFILE_SEQ INCREMENT BY 1 START WITH 1 NOMAXVALUE NOCYCLE NOCACHE ORDER;


I didn't change the other config in Torque.properties yet--my database
is down at the moment.  Does Torque need to connect to the db to
generate the sql?  (I hope not.)

no


Anyway, maven dist did generate new sql files here: jetspeed-1.5/target/jetspeed-1.5/src/jetspeed-1.5/src/sql/external

check the time stamp
i beleve even with 1.5 we started writing to the target/classes/sql directory

This sounds like a fantastic idea!


Any volunteers? ;)


-- David Sean Taylor Bluesunrise Software [EMAIL PROTECTED] [office] +01 707 773 4646 [mobile] +01 707 529 9194

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to