dictyBase / Modware-Loader

Various data munging and loading scripts for genome database
2 stars 1 forks source link

modware-import error: stockcollection table does not exist #122

Closed biodavidjm closed 9 years ago

biodavidjm commented 10 years ago

Running modware-import dictyplasmid2chado -c configuration.yaml throws the following error:

DBIx::Class::ResultSet::count(): DBI Exception: DBD::Oracle::db prepare_cached failed: ORA-00942: table or view does not exist (DBD ERROR: error possibly near <*> indicator at char 23 in 'SELECT COUNT( * ) FROM <*>stockcollection me WHERE ( name = :p1 ) ') [for Statement "SELECT COUNT( * ) FROM stockcollection me WHERE ( name = ? ) "] at /Library/Perl/5.16/Modware/Role/Stock/Import/DataStash.pm line 370
DBIx::Class::Carp::__ANON__(): A DBIx::Class::Storage::TxnScopeGuard went out of scope without explicit commit or error. Rolling back. at /System/Library/Perl/Extras/5.16/DBIx/Class/Storage/TxnScopeGuard.pm line 132

Pre-diagnosis It seems that the stockcollection table that Modware/Role/Stock/Import/DataStash.pm should create, it is not working. This is the subroutine involved in the incident:

sub create_stockcollection {
    my ( $self, $name, $type_id ) = @_;
    my $stockcollection_rs
        = $self->schema->resultset('Stock::Stockcollection')->create(
        {   type_id    => $type_id,
            name       => $name,
            uniquename => $self->utils->nextval( 'stockcollection', 'DSC' )
        }
        );
    if ($stockcollection_rs) {
        return $stockcollection_rs->stockcollection_id;
    }
    return;
}
cybersiddhu commented 10 years ago

The assumption for test based software development is if the unit test passes then you are done with your code. It should work with real data. If it is not then fix the unit test or add more condition to it.

I would try to follow the steps

So, my first strong suggestion is