Assignment
Priority:
Assigned To:
unassigned
Ticket # 10
This ticket is open
Severity:
Normal
Category:
Blocker (prevents feature)
Entered by:
Simon Vass
12/25/2007, 3:45 PM
Last modified:
Simon Vass
12/29/2007, 3:42 AM
Attachments:
3 file(s)
Description
When upgrading from 4.1.3 to 5.0 SVN At revision 24739.
I get the following error running upgrade_v41-50.sh
BUILD FAILED
/home/svass/branch-50-community/build.xml:1683: Scrip t Error: java.sql.SQLException: ERROR: there is no un ique constraint matching given keys for referenced ta ble "role"
Solution
A solution hasn't been entered
File Attachments
Ticket Activity
Date | Event |
---|---|
Simon Vass 12/25/2007, 3:45 PM | [ Ticket Opened ] |
Simon Vass 12/25/2007, 3:45 PM | [ Ticket is unassigned ] |
Simon Vass 12/25/2007, 3:45 PM | [ Severity set to Normal ] |
Jason Graff 12/26/2007, 11:16 AM |
Hi Simon, Is there any output previous to the 'BUILD FAILED' when running 'sh bin/upgrade_v41-50.sh'? Need to track down which individual script is giving you trouble. Thanks, -jason |
Simon Vass 12/27/2007, 10:16 AM |
Here is the full run through. svass@svasslaptop:~/branch-50-community$ sudo ./bin/upgrade_v41-50.sh Buildfile: build.xml init.buildfile.exists: init.buildfile.type: init.home.setup: init.buildfile.create: init.loadproperties: init.classpath.uptodate: init.environment: init.servlet.type: init.servlet6.exists: init.servlet6.set: init.servlet4.exists: init.servlet4.set: init.servlet5.exists: init.servlet5.set: [echo] Web Server: Tomcat 5.x init.weblogic.exists: init.weblogic.set: init.geronimo10.exists: init.geronimo10.set: init.geronimo11.exists: init.geronimo11.set: init.jboss24.exists: init.jboss24.set: init.websphere.exists: init.websphere.set: init.classpath: [echo] Class Dir: /usr/local/tomcat//common/lib/servlet-api.jar init.axis.exists: init.axis.missing: [echo] [echo] Apache Axis: Web Service Provider Missing. Centric Web Services will not [echo] be available. [echo] Please refer to the readme file for instructions on enabling web services. [echo] init.axis: init: [echo] Project: Concourse Suite Community Edition [echo] Date: 2007-12-27 03:14:39 PM [echo] User: root [echo] System: Linux i386 2.6.22-14-generic [echo] Ant version: Apache Ant version 1.7.0 compiled on August 29 2007 [echo] Java version: 1.6.0_03 [echo] Container Type: catalina [echo] Source path: /home/svass/branch-50-community [echo] Destination path: /usr/local/tomcat/webapps/centric [echo] Properties file: /opt/centric_crm/fileLibrary/build.properties [echo] File Library path: /opt/centric_crm/fileLibrary [echo] Locale: en_US log.upgradedb: taskdef.upgradeDatabase: centric_crm taskdef.jasper: upgradedb.name: upgradedb.site: [input] Enter database to upgrade: upgradedb.uptodate: compile.checkdelete: compile.delete: compile: jar: build: upgradedb: [upgradeDatabase] Files: 86 [upgradeDatabase] File: /home/svass/branch-50-community/src/sql/postgresql/upgrade/2007-01-30-script01-zhenya.sql [upgradeDatabase] SQL Script executing: /home/svass/branch-50-community/src/sql/postgresql/upgrade/2007-01-30-script01-zhenya.sql [upgradeDatabase] DatabaseUtils-> executeSQL: /home/svass/branch-50-community/src/sql/postgresql/upgrade/2007-01-30-script01-zhenya.sql [upgradeDatabase] Executed 3 total statements [upgradeDatabase] SQL Script complete: /home/svass/branch-50-community/src/sql/postgresql/upgrade/2007-01-30-script01-zhenya.sql [upgradeDatabase] [upgradeDatabase] File: /home/svass/branch-50-community/src/sql/postgresql/upgrade/2007-01-19-script01-olga.sql [upgradeDatabase] SQL Script executing: /home/svass/branch-50-community/src/sql/postgresql/upgrade/2007-01-19-script01-olga.sql [upgradeDatabase] DatabaseUtils-> executeSQL: /home/svass/branch-50-community/src/sql/postgresql/upgrade/2007-01-19-script01-olga.sql [upgradeDatabase] Executed 4 total statements [upgradeDatabase] SQL Script complete: /home/svass/branch-50-community/src/sql/postgresql/upgrade/2007-01-19-script01-olga.sql [upgradeDatabase] [upgradeDatabase] File: /home/svass/branch-50-community/src/sql/postgresql/upgrade/2007-06-07-script01-mr-gk.sql [upgradeDatabase] SQL Script executing: /home/svass/branch-50-community/src/sql/postgresql/upgrade/2007-06-07-script01-mr-gk.sql [upgradeDatabase] DatabaseUtils-> executeSQL: /home/svass/branch-50-community/src/sql/postgresql/upgrade/2007-06-07-script01-mr-gk.sql [upgradeDatabase] Executed 1 total statements [upgradeDatabase] SQL Script complete: /home/svass/branch-50-community/src/sql/postgresql/upgrade/2007-06-07-script01-mr-gk.sql [upgradeDatabase] [upgradeDatabase] File: /home/svass/branch-50-community/src/sql/postgresql/upgrade/2007-03-09-script01-mr.sql [upgradeDatabase] SQL Script executing: /home/svass/branch-50-community/src/sql/postgresql/upgrade/2007-03-09-script01-mr.sql [upgradeDatabase] DatabaseUtils-> executeSQL: /home/svass/branch-50-community/src/sql/postgresql/upgrade/2007-03-09-script01-mr.sql [upgradeDatabase] Executed 1 total statements [upgradeDatabase] SQL Script complete: /home/svass/branch-50-community/src/sql/postgresql/upgrade/2007-03-09-script01-mr.sql [upgradeDatabase] [upgradeDatabase] File: /home/svass/branch-50-community/src/sql/postgresql/upgrade/2007-02-01-script01-ayarotski.sql [upgradeDatabase] SQL Script executing: /home/svass/branch-50-community/src/sql/postgresql/upgrade/2007-02-01-script01-ayarotski.sql [upgradeDatabase] DatabaseUtils-> executeSQL: /home/svass/branch-50-community/src/sql/postgresql/upgrade/2007-02-01-script01-ayarotski.sql [upgradeDatabase] DatabaseUtils-> ERROR(1), line: 23 message: ERROR: there is no unique constraint matching given keys for referenced table "role" [upgradeDatabase] SQL ERROR: ERROR: there is no unique constraint matching given keys for referenced table "role" [upgradeDatabase] java.lang.Exception: java.sql.SQLException: ERROR: there is no unique constraint matching given keys for referenced table "role" [upgradeDatabase] at org.aspcfs.ant.tasks.UpgradeDatabaseTask.executeSql(Unknown Source) [upgradeDatabase] at org.aspcfs.ant.tasks.UpgradeDatabaseTask.execute(Unknown Source) [upgradeDatabase] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) [upgradeDatabase] at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) [upgradeDatabase] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [upgradeDatabase] at java.lang.reflect.Method.invoke(Method.java:597) [upgradeDatabase] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) [upgradeDatabase] at org.apache.tools.ant.Task.perform(Task.java:348) [upgradeDatabase] at org.apache.tools.ant.Target.execute(Target.java:357) [upgradeDatabase] at org.apache.tools.ant.Target.performTasks(Target.java:385) [upgradeDatabase] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) [upgradeDatabase] at org.apache.tools.ant.Project.executeTarget(Project.java:1298) [upgradeDatabase] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) [upgradeDatabase] at org.apache.tools.ant.Project.executeTargets(Project.java:1181) [upgradeDatabase] at org.apache.tools.ant.Main.runBuild(Main.java:698) [upgradeDatabase] at org.apache.tools.ant.Main.startAnt(Main.java:199) [upgradeDatabase] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) [upgradeDatabase] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) [upgradeDatabase] Caused by: java.sql.SQLException: ERROR: there is no unique constraint matching given keys for referenced table "role" [upgradeDatabase] at org.aspcfs.utils.DatabaseUtils.executeSQL(Unknown Source) [upgradeDatabase] at org.aspcfs.utils.DatabaseUtils.executeSQL(Unknown Source) [upgradeDatabase] ... 18 more BUILD FAILED /home/svass/branch-50-community/build.xml:1683: Script Error: java.sql.SQLException: ERROR: there is no unique constraint matching given keys for referenced table "role" Total time: 9 seconds ... Execute ant upgradedb.help manually ... Add any necessary default permissions manually using the application svass@svasslaptop:~/branch-50-community$ |
Simon Vass 12/27/2007, 10:32 AM |
I decided to create the sql code to add primary keys according those missing as compared to a new db installation. ALTER TABLE role ADD PRIMARY KEY (role_id); ALTER TABLE permission_category ADD PRIMARY KEY (category_id); ALTER TABLE sync_client ADD PRIMARY KEY (client_id); ALTER TABLE sync_table ADD PRIMARY KEY (table_id); ALTER TABLE opportunity_component ADD PRIMARY KEY (id); ALTER TABLE lookup_opportunity_types ADD PRIMARY KEY (code); ALTER TABLE custom_field_record ADD PRIMARY KEY (record_id); ALTER TABLE custom_field_info ADD PRIMARY KEY (field_id); ALTER TABLE action_step ADD PRIMARY KEY (step_id); ALTER TABLE lookup_account_types ADD PRIMARY KEY (code); ALTER TABLE lookup_contact_types ADD PRIMARY KEY (code); The upgrade script proceeds a little further and now stops at. BUILD FAILED /home/svass/branch-50-community/build.xml:1683: Script Error: Sourced file: /home/svass/branch-50-community/s rc/sql/upgrade/2007-02-19-artemz.bsh : Method Invocation permission.insert Total time: 8 seconds ... Execute ant upgradedb.help manually ... Add any necessary default permissions manually using the application root@svasslaptop:/home/svass/branch-50-community# I have attached the full log file showing the upgrade plus the running the SQL file to add the missing primary keys. |
Jason Graff 12/28/2007, 12:04 PM |
Hi Simon, I removed some scripts trying to set permissions for things that don't exist from the PostgreSQL upgrade script in branch-50-community Subversion HEAD. Please update to the latest source and report whether that change now allows you to upgrade. Thanks, -jason |
Simon Vass 12/29/2007, 3:42 AM |
I now go a little bit further and get to BUILD FAILED /home/svass/branch-50-community/build.xml:1683: Script Error: Sourced file: /hom e/svass/branch-50-community/src/sql/upgrade/2007-05-17-script01-holub.bsh : Type d variable declaration : Object constructor Total time: 12 seconds ... Execute ant upgradedb.help manually ... Add any necessary default permissions manually using the application See my attached log file. I have also attached the primary.sql code which I think might need submission also? Simon |
Distribution List |
---|
Simon V., Roy T. |