Hi Randy,

Have you evaluated the new DDLUtils project on db.apache.org ? I haven't had time to fully look at it but it seems interesting. Other than that Hibernate has an excellent dynamic schema creation/updating facility, but we couldn't distribute it with Jetspeed because of licensing issues.

DDLUtils uses "Builder" classes instead of velocity templates to generate the scheme, so it might work a bit better.

The project is here : http://db.apache.org/ddlutils/

Regards,
 Serge Huber.

Randy Watler wrote:

Daniel,

For MSSQL, I have edited the Torque files after pulling the source from
svn. To make the process repeatable, I have used patch in our portal
build to capture the edits.

The Torque files are located in /etc/schema/*.xml files. In particular,
you are having problems with the new schema for the DB PageManager. It
is located in phase2-schema.xml. What you probably want to do is edit
the xml attribute onDelete="cascade" to onDelete="setnull" within the
problematic foreign-key tags.

We are considering using a different solution for 2.0-FINAL than torque,
but we are running out of time. At the very least, I will add this to
the JIRA issue for the DB PageManager. The idea is that for the
2.0-FINAL release, we might make these changes manually, (we have
already had to depart from Torque to support Derby).

HTH,

Randy

On Fri, 2005-11-18 at 09:42 +1100, JACKSON, Daniel wrote:
So if I am using the Maven goal j2:quickStart is there a way of
preventing the j2:portal.conf.sql goal from being called? As from what I
see, this is the goal that generates the sql scripts each time the
j2:quickStart goal is called. Do I need to call each of the
j2:quickStart goals individually instead and avoiding calling the
j2:portal.conf.sql goal???

Daniel Jackson
BAE SYSTEMS Australia Limited

-----Original Message-----
From: Frank Villarreal [mailto:[EMAIL PROTECTED] Sent: Wednesday, 16 November 2005 11:11 PM
To: Jetspeed Users List
Subject: RE: MSSQL 2000 Script execution failed

remove the constraints causing the problem ... MSSQL2000 does not allow
circular references ... or even multiple foreign keys that can cause
cascade
delete/update!

-----Original Message-----
From: JACKSON, Daniel [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 15, 2005 11:25 PM
To: [email protected]
Subject: MSSQL 2000 Script execution failed


Assistance required,



I am attempting to run Jetspeed 2 with a MSSQL 2000 database without
success. I have a fresh cut of J2 and my current build.properties file
contains the following



org.apache.jetspeed.production.database.default.name           = mssql

org.apache.jetspeed.production.database.url
= jdbc:JSQLConnect://localhost

org.apache.jetspeed.production.database.user
=
sa

org.apache.jetspeed.production.database.password                =
xxxxxxx

org.apache.jetspeed.production.database.driver
=
com.jnetdirect.jsql.JSQLDriver

org.apache.jetspeed.production.jdbc.drivers.path
=
${org.apache.jetspeed.server.home}/common/lib/JSQLConnect.jar



When I attempt to run the maven goal maven j2:quickStart I receive the
following error...



j2:_db.create:

j2:_process.all.scripts.in.path:

   [echo] Checking for SQL scripts at path
C:/Jetspeed-svn//target/portal-sql/mssql/schema...

   [echo] Running SQL scripts in directory
C:/Jetspeed-svn//target/portal-sql/mssql/schema...

j2:_db.execute:

   [sql] Executing file:
C:\Jetspeed-svn\target\portal-sql\mssql\schema\phase1-schema.sql

   [sql] 23 of 23 SQL statements executed successfully



j2:_db.execute:

   [sql] Executing file:
C:\Jetspeed-svn\target\portal-sql\mssql\schema\phase2-schema.sql

   [sql] [ERROR] Failed to execute: /*
----------------------------------------------------------------------
*/

/* CLUBS                                                      */ /*
----------------------------------------------------------------------
*/ BEGIN ALTER TABLE FOLDER ADD CONSTRAINT FOLDER_FK_1 FOREI

GN KEY (PARENT_ID) REFERENCES FOLDER (FOLDER_ID) ON DELETE CASCADE END



BUILD FAILED

File...... C:\Documents and

Settings\djackson\.maven\cache\maven-jetspeed2-plugin-2.0-M4-SNAPSHOT\pl
ugin.jelly

Element... sql

Line...... 866

Column.... 44

com.jnetdirect.jsql.u: Introducing FOREIGN KEY constraint
'FOLDER_FK_1'
on table 'FOLDER' may cause cycles or multiple cascade paths. Specify
ON
DELETE NO ACTION or ON UPDATE NO ACTION, or modify othe

r FOREIGN KEY constraints.

Total time: 17 seconds

Finished at: Wed Nov 16 15:54:43 EST 2005



Any help would be greatly appreciated.



Regards

Daniel Jackson
Software Engineer
BAE SYSTEMS Australia Limited




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

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




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




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

Reply via email to