[SOLVED] Error when upgrading to G2 beta2 from beta1

sittingduck

Joined: 2005-04-08
Posts: 19
Posted: Wed, 2005-04-13 12:04

Hello all again

I'm trying to upgrade to beta 2 from beta 1. During the upgrading of the core modules, I get the following error message

Quote:
Stack Trace:
Error (ERROR_STORAGE_FAILURE)

* in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 1236 (gallerystatus::error)
* in modules/core/classes/GalleryStorage.class at line 261 (mysqldatabasestorage::addmapentry)
* in modules/core/classes/interfaces/GalleryMimeTypeMap.inc at line 96 (gallerystorage::addmapentry)
* in modules/core/classes/helpers/GalleryMimeTypeHelper_simple.class at line 213 (gallerymimetypemap::addmapentry)
* in modules/core/CoreModuleExtras.inc at line 343 (gallerymimetypehelper_simple::initializemimetypes)
* in modules/core/module.inc at line 515 (coremoduleextras::upgrade)
* in modules/core/classes/GalleryModule.class at line 137 (coremodule::upgrade)
* in upgrade/steps/UpgradeCoreModuleStep.class at line 72 (coremodule::installorupgrade)
* in upgrade/index.php at line 152 (upgradecoremodulestep::processrequest)

Debug Output:

(mysql): SHOW TABLES

file_exists(/array/gallery//versions.dat)
file(/array/gallery//versions.dat, )
file_exists(/usr/local/apache/htdocs/gallery2/modules/core/classes/GalleryStorage/../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/platform/mysql)
opendir(/usr/local/apache/htdocs/gallery2/modules/core/classes/GalleryStorage/../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/platform/mysql)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
closedir(Resource id #47)

(mysql): SHOW TABLES

(mysql): SELECT g_name, g_major, g_minor FROM g2_Schema

(mysql): DELETE FROM g2_PluginParameterMap WHERE g_pluginType='modules'
AND g_pluginId='core' AND g_itemId=0 AND
g_parameterName='misc.useShortUrls'

mysql error: [1062: Duplicate entry 'z' for key 1] in EXECUTE("INSERT INTO
g2_MimeTypeMap (g_extension, g_mimeType, g_viewable) VALUES
('z','application/x-compress',0)")

(mysql): INSERT INTO g2_MimeTypeMap (g_extension, g_mimeType,
g_viewable) VALUES ('z', 'application/x-compress', 0)

1062: Duplicate entry 'z' for key 1

adodb_mysql._execute(INSERT INTO
g2_MimeTypeMap (g_extension, g_mimeType, g_viewable)...) % line 818, file: adodb.inc.php
adodb_mysql.execute(INSERT INTO g2_MimeTypeMap
(g_extension, g_mimeType, g_viewable)..., Array[3]) % line 1233, file: DatabaseStorage.class
mysqldatabasestorage.addmapentry(GalleryMimeTypeMap,
Array[3]) % line 261, file: GalleryStorage.class
gallerystorage.addmapentry(GalleryMimeTypeMap,
Array[3]) % line 96, file: GalleryMimeTypeMap.inc
gallerymimetypemap.addmapentry(Array[3]) % line 213, file: GalleryMimeTypeHelper_simple.class

realpath(/usr/local/apache/htdocs/gallery2/modules/core/classes/../../../)

Tracked the problem down, to the fact it is trying to add Duplicate enteries into g2_MimeTypeMap, so I deleted all data from g2_MimeTypeMap, this has seemed to fix the error and let the upgrade process

Hope this info helps

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-04-13 14:35

thanks for the report.
was your beta 1 a straight beta 1 release or a nightly snapshot (from what date)?

 
tobiasly

Joined: 2003-08-31
Posts: 18
Posted: Wed, 2005-04-13 19:27

The same thing happened to me. The first time I tried to upgrade the core module, the progress bar stopped and the page quit loading. I tried to re-run the upgrade and got the exact same errors. So I emptied out the new "MimeTypeMap" table and was able to continue.

The page also stopped loading while I was trying to upgrade the "other" modules. I'm using Firefox 1.0.2 on Windows, if that helps.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-04-13 19:39

tobiasly, what was your previous version? beta 1 or beta 1++ (nightly snapshots, cvs?)?

 
sittingduck

Joined: 2005-04-08
Posts: 19
Posted: Wed, 2005-04-13 20:11

it was a straight beta 1 release

 
tobiasly

Joined: 2003-08-31
Posts: 18
Posted: Thu, 2005-04-14 01:17

I'm *pretty sure* it was a straight beta-1. I had been using CVS during alpha version, but once the short URLs started requiring that "v" in the middle I switched to beta-1 and stuck with it. So I can't promise I didn't have any tables from the nightlies in there, but I don't think that's the case.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-04-14 01:46

the thing with the "v" won't change. probably we will offer another short url in future, but it will be considerably slower than the current mod_rewrite solution.

 
syntheticdna

Joined: 2005-01-22
Posts: 3
Posted: Sat, 2005-04-16 07:41
Quote:
Tracked the problem down, to the fact it is trying to add Duplicate enteries into g2_MimeTypeMap, so I deleted all data from g2_MimeTypeMap, this has seemed to fix the error and let the upgrade process

Thanks for the tip! I got my installation working again!

For those who may not know, you can use phpMyAdmin to delete the data from that table.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-04-16 13:11

could you both give us your system information? we tested beta 1 -> beta 2 upgrading on a few setups, none had this problem. perhaps we can find the problem, when we compare the setups of you two.

g2 version, php version, mysql version, webserver version ?

thank you very much!