Error migrating from 0.8.4 to 1.0

Submitted by pasnox on 2012-02-03

Hi,

I have tried to migrate my web issues server from 0.8.4 to 1.0.
Reading the doc, it tell 0.8.5 needed to migrate, so i updated successfully to 0.8.5.
Then i try to migrate to 1.0 but it fails on importing old data with this message:

"Unexpected Error

An unexpected error occured while processing the request.

Reason: One of the dependent objects no longer exists."

I found the doc very basic concerning the migration from old server, we don't know what to keep, what to delete before copying files from 1.0 server.

Please help me :)

Thanks,

Funny thing, my post id is 404 xD shame on me.

EDIT: i'm using postgresql server.
EDIT2: I debuggued a bit and it seem WI is trying to query bad tables when importing server data.
In fact i can read this with my debug: query (42P01): SELECT server_name, server_uuid, db_version FROM wi10_server
Of course, this table not yet exists at the time of calling, and removing the prefix correctly show something from old server.
By the way it seem strange that an unknown error is not catched correctly leading to showing an error not accurate.

--
Monkey Studio IDE, a cross paltform IDE written in Qt.
Support for all relating Qt4 project type (php-qt, pyqt, qmake/c++) with powerfull plugin system.
Assistant & Designer integrated, more infos on the official web page : http://monkeystudio.org

The process of migration is basically the same as installing a new instance of the server, so you should basically delete everything (except for attachments, which you need to move into correct location after the installation) and copy the new files. Then point the installer to the "old" data.

The error message "One of the dependent objects no longer exists" basically means that there is a constraint error in your old data. This can happen, because the old version did not have foreign keys and integrity checks. You need to find the exact table causing the problem and delete the incorrect data. See this thread for more information.

Regards,
Michał

Hi,

The returned error is not the one i got because the error i got ( table not exists ) is not catched in your postgresql error handler (you can see the error number in my previous post )).

At some point in the process of importing data, a call to a non existing table is done, which break the import.

I'm trying to debug but as i'm not knowing good the code i'm a bit lost :(

EDIT: i give up i can't find the source of the problem - i'm sure my 0.8.5 server is ok and working fine.
Hope you can help because i want not to lost all my issues :/

[2012-02-04 00:03:42, 88.180.255.42]

*** Unhandled System_Core_SetupException: Configuration file for site 'default' does not exist in /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/core/site.inc.php on line 143
Stack trace:
#0 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/core/application.inc.php(274): System_Core_Site->loadSiteConfig()
#1 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/core/application.inc.php(204): System_Core_Application->initializeSite()
#2 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/bootstrap.inc.php(124): System_Core_Application->run()
#3 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/index.php(109): System_Bootstrap::run('Common_Applicat...', 'Index')
#4 {main}

[2012-02-04 00:04:07, 88.180.255.42]

*** Unhandled System_Db_Exception: relation "wi10_server" does not exist in /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/db/pgsql/engine.inc.php on line 226
Stack trace:
#0 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/db/pgsql/engine.inc.php(86): System_Db_Pgsql_Engine->sendQuery('SELECT server_n...', Array)
#1 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/db/pgsql/engine.inc.php(76): System_Db_Pgsql_Engine->executeQuery('SELECT server_n...', Array)
#2 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/db/connection.inc.php(248): System_Db_Pgsql_Engine->query('SELECT server_n...', Array)
#3 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/db/connection.inc.php(314): System_Db_Connection->queryArgs('SELECT server_n...', Array)
#4 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/db/connection.inc.php(301): System_Db_Connection->queryRowArgs('SELECT server_n...', Array)
#5 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/api/servermanager.inc.php(52): System_Db_Connection->queryRow('SELECT server_n...')
#6 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/common/pagelayout.inc.php(44): System_Api_ServerManager->getServer()
#7 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/web/component.inc.php(100): Common_PageLayout->execute()
#8 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/web/view.inc.php(223): System_Web_Component->run()
#9 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/web/component.inc.php(102): System_Web_View->render()
#10 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/web/view.inc.php(223): System_Web_Component->run()
#11 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/web/component.inc.php(102): System_Web_View->render()
#12 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/web/application.inc.php(77): System_Web_Component->run()
#13 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/core/application.inc.php(210): System_Web_Application->execute()
#14 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/bootstrap.inc.php(124): System_Core_Application->run()
#15 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/admin/setup/install.php(455): System_Bootstrap::run('Common_Applicat...', 'Admin_Setup_Ins...')
#16 {main}

[2012-02-04 00:04:28, 88.180.255.42]

*** Unhandled System_Db_Exception: insert or update on table "wi10_attr_values" violates foreign key constraint "wi10_attr_values_issue_id_fk" in /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/db/pgsql/engine.inc.php on line 224
Stack trace:
#0 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/db/pgsql/engine.inc.php(86): System_Db_Pgsql_Engine->sendQuery('INSERT INTO wi1...', Array)
#1 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/db/pgsql/engine.inc.php(71): System_Db_Pgsql_Engine->executeQuery('INSERT INTO wi1...', Array)
#2 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/db/connection.inc.php(207): System_Db_Pgsql_Engine->execute('INSERT INTO wi1...', Array)
#3 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/db/connection.inc.php(178): System_Db_Connection->executeArgs('INSERT INTO {at...', Array)
#4 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/admin/setup/installer.inc.php(570): System_Db_Connection->execute('INSERT INTO {at...')
#5 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/admin/setup/install.php(401): Admin_Setup_Installer->importData('')
#6 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/admin/setup/install.php(147): Admin_Setup_Install->installDatabase()
#7 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/admin/setup/install.php(56): Admin_Setup_Install->processForm()
#8 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/web/component.inc.php(100): Admin_Setup_Install->execute()
#9 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/web/application.inc.php(77): System_Web_Component->run()
#10 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/core/application.inc.php(210): System_Web_Application->execute()
#11 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/system/bootstrap.inc.php(124): System_Core_Application->run()
#12 /data/web/77/23/0d/webissues.monkeystudio.org/htdocs/admin/setup/install.php(455): System_Bootstrap::run('Common_Applicat...', 'Admin_Setup_Ins...')
#13 {main}

--
Monkey Studio IDE, a cross paltform IDE written in Qt.
Support for all relating Qt4 project type (php-qt, pyqt, qmake/c++) with powerfull plugin system.
Assistant & Designer integrated, more infos on the official web page : http://monkeystudio.org

It's the last error, insert or update on table "wi10_attr_values" violates foreign key constraint "wi10_attr_values_issue_id_fk", that breaks the import. It means that there are some attribute values without a matching issue, so it's the same error as the one in the other thread that I provided a link to.

Other errors - missing configuration file and missing table - are logged, but they are correctly handled by the application and they do not cause any problems (although the term "Unhandled" may be a bit misleading).

Regards,
Michał

Damn i read too quickly the post and did not seen the link !
I will check that.

Thanks.

EDIT: SOLVED ;)
--
Monkey Studio IDE, a cross paltform IDE written in Qt.
Support for all relating Qt4 project type (php-qt, pyqt, qmake/c++) with powerfull plugin system.
Assistant & Designer integrated, more infos on the official web page : http://monkeystudio.org