[ 
http://jira.codehaus.org/browse/MRM-1157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=177320#action_177320
 ] 

Maria Odea Ching commented on MRM-1157:
---------------------------------------

You would need to re-create the database because of the changes in MRM-836.. 

The primary keys for the following tables were changed to a different auto 
generated id field, which caused the errors above. The old primary keys that 
were replaced by the new id field in the patch for MRM-836 actually contains 
auto-generated ids (unique sequential numbers but in String format) that's why 
in the case of MRM-836, the value displayed for the organization is a "number" 
instead of the actual organization name set in the pom.
* ARCHIVA_CIMANAGEMENT (old primary key was the 'url' field)
* ARCHIVA_ORGANIZATION (old primary key was the 'name' field)
* ARCHIVA_ISSUE_MANAGEMENT (old primary key was the 'url' field)
* ARCHIVA_INDIVIDUALS (old primary key was the 'email' field)

The old data now had 'null' primary keys and also the FK constraints were 
broken because of the change.

If it is really not an option to re-create the database, the other solution I 
could think of is either to create a tool for migrating the data OR revert the 
above tables to their old primary keys then add another column to contain the 
unsaved values (e.g. the ciManagement & issueManagement urls, the organization 
name and the individual email). The second option is easier to do and the user 
doesn't have to do anything, the only drawback is that we have to retain the 
column names of the old primary keys (url, name and email) which is a bit 
misleading because their values are just sequential numbers in String format.

Thoughts or comments anyone?

> Update from 1.1.3 to 1.2 fails with create table error
> ------------------------------------------------------
>
>                 Key: MRM-1157
>                 URL: http://jira.codehaus.org/browse/MRM-1157
>             Project: Archiva
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: CentOS Linux 5.2, JDK 1.6.0_07 64-Bit, MySQL 5.0.67, 
> Tomcat 6.0.18
>            Reporter: Dennis Kieselhorst
>            Assignee: Maria Odea Ching
>            Priority: Blocker
>             Fix For: 1.2.1
>
>
> After updating from 1.1.3 to 1.2 the following exception is thrown contiously:
> [pool-1-thread-1] ERROR JPOX.RDBMS  - An exception was thrown while 
> adding/validating class(es) : Can't create table 
> './archiva/#sql-474f_847bb9.frm' (errno: 150)
> java.sql.SQLException: Can't create table './archiva/#sql-474f_847bb9.frm' 
> (errno: 150)
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
>         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
>         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
>         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
>         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
>         at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536)
>         at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465)
>         at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:734)
>         at 
> org.apache.tomcat.dbcp.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
>         at 
> org.jpox.store.rdbms.table.AbstractTable.executeDdlStatement(AbstractTable.java:614)
>         at 
> org.jpox.store.rdbms.table.TableImpl.validateForeignKeys(TableImpl.java:463)
>         at 
> org.jpox.store.rdbms.table.TableImpl.validateConstraints(TableImpl.java:388)
>         at 
> org.jpox.store.rdbms.table.ClassTable.validateConstraints(ClassTable.java:2875)
>         at 
> org.jpox.store.rdbms.RDBMSManager$ClassAdder.performTablesValidation(RDBMSManager.java:3123)
>         at 
> org.jpox.store.rdbms.RDBMSManager$ClassAdder.addClassTablesAndValidate(RDBMSManager.java:3326)
>         at 
> org.jpox.store.rdbms.RDBMSManager$ClassAdder.run(RDBMSManager.java:2567)
>         at 
> org.jpox.store.rdbms.RDBMSManager$MgmtTransaction.execute(RDBMSManager.java:2419)
>         at org.jpox.store.rdbms.RDBMSManager.addClasses(RDBMSManager.java:824)
>         at org.jpox.store.rdbms.RDBMSManager.addClass(RDBMSManager.java:838)
>         at 
> org.jpox.AbstractPersistenceManager.newObjectIdInstance(AbstractPersistenceManager.java:2393)
>         at 
> org.apache.maven.archiva.database.jdo.JdoAccess.getObjectById(JdoAccess.java:426)
>         at 
> org.apache.maven.archiva.database.jdo.JdoProjectModelDAO.getProjectModel(JdoProjectModelDAO.java:73)
>         at 
> org.apache.maven.archiva.consumers.database.ProjectModelToDatabaseConsumer.getProjectModelFromDatabase(ProjectModelToDatabaseConsumer.java:203)
>         at 
> org.apache.maven.archiva.consumers.database.ProjectModelToDatabaseConsumer.processArchivaArtifact(ProjectModelToDatabaseConsumer.java:133)
>         at 
> org.apache.maven.archiva.database.updater.ProcessArchivaArtifactClosure.execute(ProcessArchivaArtifactClosure.java:48)
>         at 
> org.apache.commons.collections.CollectionUtils.forAllDo(CollectionUtils.java:388)
>         at 
> org.apache.maven.archiva.database.updater.JdoDatabaseUpdater.updateUnprocessed(JdoDatabaseUpdater.java:150)
>         at 
> org.apache.maven.archiva.database.updater.JdoDatabaseUpdater.updateAllUnprocessed(JdoDatabaseUpdater.java:87)
>         at 
> org.apache.maven.archiva.scheduled.executors.ArchivaDatabaseUpdateTaskExecutor.executeTask(ArchivaDatabaseUpdateTaskExecutor.java:69)
>         at 
> org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRunnable$1.run(ThreadedTaskQueueExecutor.java:116)
>         at 
> edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
>         at 
> edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
>         at 
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987)
>         at 
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528)
>         at java.lang.Thread.run(Thread.java:619)
> Caused by: javax.jdo.JDODataStoreException: Error(s) were found while 
> auto-creating/validating the datastore for classes. The errors are printed in 
> the log, and are attached to this exception.
> NestedThrowables:
> java.sql.SQLException: Can't create table './archiva/#sql-474f_847bba.frm' 
> (errno: 150)
> java.sql.SQLException: Can't create table './archiva/#sql-474f_847bba.frm' 
> (errno: 150)
> java.sql.SQLException: Can't create table './archiva/#sql-474f_847bba.frm' 
> (errno: 150)
>         at 
> org.jpox.store.rdbms.RDBMSManager$ClassAdder.verifyErrors(RDBMSManager.java:3285)
>         at 
> org.jpox.store.rdbms.RDBMSManager$ClassAdder.addClassTablesAndValidate(RDBMSManager.java:3335)
>         at 
> org.jpox.store.rdbms.RDBMSManager$ClassAdder.run(RDBMSManager.java:2567)
>         at 
> org.jpox.store.rdbms.RDBMSManager$MgmtTransaction.execute(RDBMSManager.java:2419)
>         at org.jpox.store.rdbms.RDBMSManager.addClasses(RDBMSManager.java:824)
>         at org.jpox.store.rdbms.RDBMSManager.addClass(RDBMSManager.java:838)
>         at 
> org.jpox.AbstractPersistenceManager.newObjectIdInstance(AbstractPersistenceManager.java:2393)
>         at 
> org.apache.maven.archiva.database.jdo.JdoAccess.getObjectById(JdoAccess.java:426)
>         ... 19 more
> Caused by: java.sql.SQLException: Can't create table 
> './archiva/#sql-474f_847bba.frm' (errno: 150)
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
>         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
>         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
>         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
>         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
>         at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536)
>         at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465)
>         at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:734)
>         at 
> org.apache.tomcat.dbcp.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
>         at 
> org.jpox.store.rdbms.table.AbstractTable.executeDdlStatement(AbstractTable.java:614)
>         at 
> org.jpox.store.rdbms.table.TableImpl.validateForeignKeys(TableImpl.java:463)
>         at 
> org.jpox.store.rdbms.table.TableImpl.validateConstraints(TableImpl.java:388)
>         at 
> org.jpox.store.rdbms.table.ClassTable.validateConstraints(ClassTable.java:2875)
>         at 
> org.jpox.store.rdbms.RDBMSManager$ClassAdder.performTablesValidation(RDBMSManager.java:3123)
>         at 
> org.jpox.store.rdbms.RDBMSManager$ClassAdder.addClassTablesAndValidate(RDBMSManager.java:3326)
>         ... 25 more
> Archiva is successful proxying artifacts but release deployments fail with 
> "Error deploying artifact: Read timed out".

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to