[Bioperl-l] error running load_seqdatabase.pl
Chris Fields
cjfields at uiuc.edu
Fri Jan 13 12:53:55 EST 2006
So here's what I found:
* Running t\Exception.t with or without Error.pm installed didn't reveal
any errors.
C:\Documents and Settings\Administrator\My Documents\CVS\bioperl-live>perl
-I -w t\Exception.t
1..7
ok 1
ok 2
Setting test data (Eeny meeny miney moe.)
ok 3
Executing method bar() in TestObject
Throwing a Bio::TestException
ok 4
ok 5
ok 6
ok 7
* Running the example scripts (exceptions[1-4].pl) with or w/o Error.pm
showed no difference (I checked with diff).
* Changing "throw $class" to "Error::throw $class" in Root.pm didn't do
anything, which is strange (I did this with and w/o Error.pm installed). I
thought at this point, that Activestate may have Error.pm as part of their
core modules, but it isn't included anywhere in the Perl directory tree or
under PERL5LIB. It also isn't listed as CORE in their modules list
(http://ppm.activestate.com/BuildStatus/5.8-E.html); the core modules are
usually under '/lib' instead of '/site/lib'. So why would "Error::throw"
even work? I also tried 'perl -e "require Error" and didn't get errors, so
it has to be around somewhere.
* Even stranger, when changing "throw $class" to "Error::throw $class" in
Root.pm, load_seqdatabase.pl works fine, just like when "throw $class" is
changed to "throw $class,". Oi!!
* Changing load_seqdatabase.pl to include the line "INIT {
$DONT_USE_ERROR=1; }" also didn't do anything; only changes to Root.pm made
a difference.
Lesson: Windows is flaky. I think that much of this behavior is just
ActivePerl-specific, which may be why it hasn't been seen elsewhere. I
don't know much about ActivePerl and exception handling, so I may delve into
it a bit more to see if there is something else there. I also dropped
Activestate an email asking about Error.pm and their core distribution.
So, the question is, should Root.pm be changed in bioperl-live? Obviously
this would need to be well tested out before committing any changes. I
could try it out on Mac OS X.
Christopher Fields
Postdoctoral Researcher - Switzer Lab
Dept. of Biochemistry
University of Illinois Urbana-Champaign
> -----Original Message-----
> From: bioperl-l-bounces at portal.open-bio.org [mailto:bioperl-l-
> bounces at portal.open-bio.org] On Behalf Of Steve Chervitz
> Sent: Friday, January 13, 2006 4:26 AM
> To: Hilmar Lapp
> Cc: Chris Fields; bioperl-l at portal.open-bio.org; Steve Chervitz
> Subject: Re: [Bioperl-l] error running load_seqdatabase.pl
>
> looks like the trouble is when Bio::Root::Root::throw() tries to call
> Error::throw(). Perhaps there is some windows-specific problem with
> Error.pm? Can't say I've seen this before since I don't use perl on
> windows.
>
> Some things to try, in this order:
>
> * Verify that Error.pm is installed for perl on your system.
> * Try running t/Exception.t and
> the examples/root/exceptions[1-4].pl scripts and see if they
> produce the expected behavior.
> * Try changing the 'throw $class ...' statements in Root.pm to
> 'Error::throw $class ...'
> * If Error.pm seems to be installed but isn't working right, either
> uninstall it or get in the habit of putting this line in your main
> scripts: INIT { $DONT_USE_ERROR=1; }
>
> Steve
>
> On Wed, 11 Jan 2006, Hilmar Lapp wrote:
>
> > Date: Wed, 11 Jan 2006 15:12:45 -0800
> > From: Hilmar Lapp <hlapp at gmx.net>
> > To: Chris Fields <cjfields at uiuc.edu>,
> > Steve Chervitz <Steve_Chervitz at affymetrix.com>
> > Cc: bioperl-l at portal.open-bio.org
> > Subject: Re: [Bioperl-l] error running load_seqdatabase.pl
> >
> > Interesting. That posting didn't receive much attention did it. So he
> states:
> >
> > <quote>
> > The script failed on throw() in loading Bio/Root/Root.pm on Windows.
> > The problem lines are those "throw $class (...". After I put comma
> > after $class as "throw $class, (...", the BioSQL tests and load scripts
> > are succeeded
> > </quote>
> >
> > Can anyone of those who wrote the Root exception and warning code
> > comment? Maybe Steve?
> >
> > -hilmar
> >
> > On 1/11/06, Chris Fields <cjfields at uiuc.edu> wrote:
> > > Hilmar,
> > >
> > > As an update on what's going on:
> > >
> > > I've run into a few problems with load_seqdatabase.pl and bioperl-db
> on
> > > cygwin which I'll try to hash through this week; I'll post if I can't
> figure
> > > it out soon. It's not as buggy as trying to run it using the latest
> > > ActivePerl on WinXP, but it still has issues.
> > >
> > > I'm also looking through the ActiveState documentation for the latest
> > > version of perl they have (5.8.7), which I am running. AFAIK, they
> enable
> > > dynamic loading when building. I'll send them an email directly to
> see what
> > > they say. There may be some Win32-specific way of configuring a
> script for
> > > dynamic loading of perl modules which isn't needed in other
> environments.
> > >
> > > There was also this previous email on bioperl-l:
> > >
> > > http://portal.open-bio.org/pipermail/bioperl-l/2005-May/018937.html
> > >
> > > Baohua Wang seemed to narrow it down somewhat, but I'm not sure if
> changing
> > > the modules is a solution until I figure out why he made the changes.
> They
> > > seem mainly geared towards getting load_seqdatabase to work with
> MsSQL, but
> > > if he got it to work on Windows, then he may be onto something. The
> > > modified Bio* modules can be found at:
> > >
> > > ftp://ftp.tc.cornell.edu/Outgoing/bwang/BioSQL-On-Windows
> > >
> > > I'll check them out to see if they work out and see what specific
> > > modifications he made (they're not detailed).
> > >
> > > Christopher Fields
> > > Postdoctoral Researcher - Switzer Lab
> > > Dept. of Biochemistry
> > > University of Illinois Urbana-Champaign
> > > -----Original Message-----
> > > From: bioperl-l-bounces at portal.open-bio.org
> > > [mailto:bioperl-l-bounces at portal.open-bio.org] On Behalf Of Chris
> Fields
> > > Sent: Friday, January 06, 2006 1:28 PM
> > > To: 'Hilmar Lapp'
> > > Cc: bioperl-l at portal.open-bio.org
> > > Subject: RE: [Bioperl-l] error running load_seqdatabase.pl
> > >
> > > I'll try installing bioperl-db using Cygwin. I know that I can
> connect to
> > > the native Windows mysql database from inside cygwin, so perhaps this
> will
> > > do as a short term workaround. I'll also try using a different native
> win32
> > > Perl version (maybe 5.6) and look into the dynamic loading issue. I
> know
> > > that the AS Perl has given errors like this before and not had
> problems (I
> > > think it was also cranky with older versions bioperl), but this one is
> > > pretty serious.
> > >
> > > Christopher Fields
> > > Postdoctoral Researcher - Switzer Lab
> > > Dept. of Biochemistry
> > > University of Illinois Urbana-Champaign
> > > -----Original Message-----
> > > From: Hilmar Lapp [mailto:hlapp at gmx.net]
> > > Sent: Friday, January 06, 2006 12:02 PM
> > > To: Chris Fields
> > > Cc: bioperl-l at portal.open-bio.org
> > > Subject: Re: [Bioperl-l] error running load_seqdatabase.pl
> > >
> > >
> > > On Jan 6, 2006, at 9:20 AM, Chris Fields wrote:
> > >
> > > > Hilmar,
> > > >
> > > > Did this ever get resolved? I tried to reinstall a biosql database
> > > > using
> > > > bioperl-db and got the same problems. I'll list out everything I
> ran
> > > > into
> > > > and what I pan on trying, as it's been a long time since I've tried
> > > > this.
> > > >
> > > > Currently, I'm using ActiveState Perl 5.8.7.813 on WinXP and MySQL
> > > > 4.1.14.
> > > > Using nmake and installing worked fine. Loading the biosql schema
> and
> > > > loading taxonomy info also worked fine, although I had to manually
> > > > untar the
> > > > taxonomy archive so load_ncbi_taxonomy.pl could find the files
> (stupid
> > > > windows). However, this is what happens when using
> > > > load_seqdatabase.pl:
> > > >
> > > > C:\Perl\Scripts>load_seqdatabase.pl -dbname dihydroorotase -dbuser
> root
> > > > NP_249092.gpt
> > > > Loading NP_249092.gpt ...
> > > > Undefined subroutine &Bio::Root::Root::debug called at
> > > > C:/Perl/site/lib/Bio/DB/BioSQL/BasePersistenceAdaptor.pm line 1537,
> > > > <GEN0>
> > > > line 65.
> > > >
> > > > If I removed all args except the sequence file, it gives the same
> > > > response,
> > > > which means it happens before the connection is made to the
> database:
> > > >
> > >
> > > This happens indeed before a connection is made because it happens at
> > > the point it tries to dynamically load the BioSQL driver for the
> > > adaptor:
> > >
> > > $self->debug("attempting to load driver for adaptor class
> > > $class\n");
> > >
> > > The BioSQL driver is loaded before the DBD driver is loaded.
> > >
> > > The module in which this happens (i.e., the persistence adaptor) has
> > > been loaded dynamically as well.
> > >
> > > Bio::Root::Root is in the 'use' statements, and the debug() method
> > > clearly exists. I'm at a loss as to why perl complains on certain
> > > Windows platforms. If somebody can tell me what, if anything, can be
> > > done to make this work on those platforms too I'll be glad to
> implement
> > > it.
> > >
> > > > [...]
> > > > Here's the error messages from that first test (warning it's very
> > > > messy):
> > > >
> > > > C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0,
> > > > 'bl
> > > > ib\lib', 'blib\arch')" t\01dbadaptor.t t\02species.t t\03simpleseq.t
> > > > t\04swiss.t t\05seqfeature.t t\06comment.t t\07dblink.t
> t\08genbank.t
> > > > t\09fuzzy2.t t\10ensembl.t t\11locuslink.t t\12ontology.t
> t\13remove.t
> > > > t\14query.t t\15cluster.t
> > > > t\01dbadaptor.....ok 1/19Subroutine new redefined at
> > > > [...]
> > > > Subroutine debug redefined at C:/Perl/site/lib/Bio\Root\Root.pm line
> > > > 356.
> > >
> > > So obviously it is there, right? So why doesn't perl see it a minute
> > > later?
> > >
> > > > [...]
> > > > I'll end with that. At this moment, I can't see it working with the
> > > > current
> > > > setup. I was using perl 5.8 with the old setup but I upgraded mysql
> > > > at some
> > > > point when working with gbrowse (I can't remember what the old
> version
> > > > was);
> > > > I'll try upgrading to the newest ActiveState version to see what
> > > > happens.
> > > > Could it be the MySQL version?
> > >
> > > I don't think it has anything to do with the MySQL version, or the DBD
> > > driver for that matter. Instead, it looks like on issue with dynamic
> > > loading of perl modules on your particular platform.
> > >
> > > -hilmar
> > >
> > > >
> > > > Christopher Fields
> > > > Postdoctoral Researcher - Switzer Lab
> > > > Dept. of Biochemistry
> > > > University of Illinois Urbana-Champaign
> > > >
> > > > _______________________________________________
> > > > Bioperl-l mailing list
> > > > Bioperl-l at portal.open-bio.org
> > > > http://portal.open-bio.org/mailman/listinfo/bioperl-l
> > > >
> > > >
> > > --
> > > -------------------------------------------------------------
> > > Hilmar Lapp email: lapp at gnf.org
> > > GNF, San Diego, Ca. 92121 phone: +1-858-812-1757
> > > -------------------------------------------------------------
> > >
> > >
> > > _______________________________________________
> > > Bioperl-l mailing list
> > > Bioperl-l at portal.open-bio.org
> > > http://portal.open-bio.org/mailman/listinfo/bioperl-l
> > >
> > >
> >
> >
> > --
> > ----------------------------------------------------------
> > : Hilmar Lapp -:- San Diego, CA -:- hlapp at gmx dot net :
> > ----------------------------------------------------------
> >
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at portal.open-bio.org
> > http://portal.open-bio.org/mailman/listinfo/bioperl-l
> >
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
More information about the Bioperl-l
mailing list