Issue Details (XML | Word | Printable)

Key: CONTINUUM-2100
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Maria Catherine Tan
Reporter: Wendy Smoak
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Continuum

Unable to import data that includes installations

Created: 27/Feb/09 02:06 PM   Updated: 09/Dec/09 12:45 PM   Resolved: 28/Mar/09 12:18 AM
Return to search
Component/s: Data Management
Affects Version/s: 1.2.3.1, 1.3.1
Fix Version/s: 1.3.3

Time Tracking:
Not Specified

File Attachments: 1. XML File builds.xml (7 kB)
2. Text File CONTINUUM-2100.patch (8 kB)

Issue Links:
Duplicate
 
Related

Complexity: Intermediate


 Description  « Hide

When importing builds.xml data into 1.3.1, I get the following error:

ERROR 23505: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'INSTALLATION_PK' defined on 'INSTALLATION'.

To reproduce, create a 'backups' directory, save the attached builds.xml file into it, and execute:

java -Xmx512m -jar data-management-cli-1.3.1-app.jar -buildsJdbcUrl jdbc:derby:/path/to/apache-continuum-1.3.1/data/databases/continuum/ -mode IMPORT -directory backups

The attached builds.xml was exported from a Continuum 1.2 instance using data-management 1.2.3.1.

If you edit builds.xml and delete the <installations> ... </installations> then the import will complete without error.



Wendy Smoak added a comment - 27/Feb/09 07:51 PM

I'm also getting this error using the 1.2.3.1 Data Management release to import the attached builds.xml into Continuum 1.2.x.


Jose Morales Martinez added a comment - 26/Mar/09 08:51 PM

The error is generated when insert the profile. This patch correct the bug. It repaces the installations associated to installations for persisted intallations.


Maria Catherine Tan added a comment - 28/Mar/09 12:18 AM

Fixed in revision 759430 with slight modification ( fixed test )

Thanks Jose!


Luca added a comment - 19/Aug/09 05:05 AM

the 1912 issue was closed so...

if I try to use 1.3.3 version I get:

0 [main] INFO org.apache.maven.continuum.management.DataManagementCli - Processing Continuum database...
63124 [main] WARN JPOX.MetaData - No manager for annotations was found in the CLASSPATH so all annotations are ignored.
Exception in thread "main" javax.jdo.JDODataStoreException: Error executing JDOQL query "SELECT 'org.apache.maven.continuum.model.project.BuildResult' AS JPOXMETADATA,`THIS`.`BUILD_DEFINITION_ID_OID`,`THIS`.`BUILD_NUMBER`,`THIS`.`BUILD_URL`,`THIS`.`END_TIME`,`THIS`.`ERROR`,`THIS`.`EXIT_CODE`,`THIS`.`ID`,`THIS`.`LAST_CHANGED_DATE`,`THIS`.`MODEL_ENCODING`,`THIS`.`PROJECT_ID_OID`,`THIS`.`START_TIME`,`THIS`.`RESULTSTATE`,`THIS`.`SUCCESS`,`THIS`.`RESULTTRIGGER` FROM `BUILDRESULT` `THIS`" : Unknown column 'THIS.BUILD_URL' in 'field list'.
at org.jpox.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:636)
at org.jpox.store.rdbms.query.JDOQLQuery.performDeletePersistentAll(JDOQLQuery.java:659)
at org.jpox.store.query.Query.deletePersistentAll(Query.java:1120)
at org.jpox.store.query.Query.deletePersistentAll(Query.java:1075)
at org.jpox.store.query.Query.deletePersistentAll(Query.java:1049)
at org.codehaus.plexus.jdo.PlexusJdoUtils.removeAll(PlexusJdoUtils.java:444)
at org.apache.continuum.dao.DaoUtilsImpl.eraseDatabase(DaoUtilsImpl.java:85)
at org.apache.maven.continuum.management.JdoDataManagementTool.eraseDatabase(JdoDataManagementTool.java:232)
at org.apache.maven.continuum.management.DataManagementCli.processDatabase(DataManagementCli.java:287)
at org.apache.maven.continuum.management.DataManagementCli.main(DataManagementCli.java:180)
NestedThrowablesStackTrace:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'THIS.BUILD_URL' in 'field list'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.Util.getInstance(Util.java:381)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
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:2542)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1885)
at org.jpox.store.rdbms.RDBMSManager.executeStatementQuery(RDBMSManager.java:640)
at org.jpox.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:594)
at org.jpox.store.rdbms.query.JDOQLQuery.performDeletePersistentAll(JDOQLQuery.java:659)
at org.jpox.store.query.Query.deletePersistentAll(Query.java:1120)
at org.jpox.store.query.Query.deletePersistentAll(Query.java:1075)
at org.jpox.store.query.Query.deletePersistentAll(Query.java:1049)
at org.codehaus.plexus.jdo.PlexusJdoUtils.removeAll(PlexusJdoUtils.java:444)
at org.apache.continuum.dao.DaoUtilsImpl.eraseDatabase(DaoUtilsImpl.java:85)
at org.apache.maven.continuum.management.JdoDataManagementTool.eraseDatabase(JdoDataManagementTool.java:232)
at org.apache.maven.continuum.management.DataManagementCli.processDatabase(DataManagementCli.java:287)
at org.apache.maven.continuum.management.DataManagementCli.main(DataManagementCli.java:180)

the target db belongs to 1.2.3 version....


Wendy Smoak added a comment - 23/Sep/09 09:12 AM

Luca, this issue is also closed... can you open a new issue for your last comment? It doesn't look the same as the original issue here.


Luca added a comment - 18/Nov/09 07:47 AM

ok, CONTINUUM-2408
thanks