[ic] Status of server error generating bug in rpc mode?

interch interchange-users@interchange.redhat.com
Thu Nov 15 17:43:01 2001


Found it....

The problem is in dummy_database in Data.pm.  backup is defined as an
anonymous sub it looks like for some reason which I didn't bother to
follow, and I don't completely understand what is going on here it looks
like it is trying to get the structure here or something for it and of
course it doesn't exist, so $class is then undefined and it bombs.  I
changed the die to a logDebug and a next and that is working as a
temporary fix until someone that knows more than me can fix it correctly.
Here is the fix I put in that seems to work.



sub dummy_database {
        my ($name, $data);
    while (($name,$data) = each %{$Vend::Cfg->{Database}}) {
                if (defined $Vend::Cfg->{SaveDatabase}{$name}) {
                        $Vend::Database{$name} =
$Vend::Cfg->{SaveDatabase}{$name};
                        next;
                }
                my $class = $db_config{$data->{Class}}->{Class};
                unless ($class) {
                        ::logDebug("no class found for database %s",
$name);
                        next;
                }
                $Vend::Database{$name} =
                                new $class ($data);
        }
        update_productbase();
}

Chris


On Thu, 15 Nov 2001, Mike Heins wrote:

> Quoting interch (interch@client.paymentonline.com):
> >
> > Some more info on this I am just starting to debug it myself.
> >
> > >From the catalog error log:
> > 63.228.109.101 HnAmZ8HI:63.228.109.101 - [15/November/2001:12:29:56 -0800]
> > paymentonline /paymentonline/admin/page_edit search error: your search
> > file a valid database reference, was 'backup'.
> >
> > >From the server error log:
> >
> > 63.228.109.101 - - [15/November/2001:12:30:00 -0800] paymentonline
> > /paymentonline/admin/page_save.html Died in server spawn: Can't call
> > method "new" on an undefined value at
> > /usr/local/interchange/lib/Vend/Data.pm line 674.
> >
> >
> > I will post a fix once I find it if no one else has it figured out
> > already.
>
> We have been unable to isolate this one (because no one has been able
> to give me a recipe for duplication). The current suspect
> is a bad build of MySQL or Postgres.
>
> Avoid the Red Hat-built package of MySQL and try the one from
> www.mysql.com and see what happens.
>
> --
> Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH  45013
> phone +1.513.523.7621      <mheins@redhat.com>
>
> Prove you aren't stupid.  Say NO to Passport.
> _______________________________________________
> interchange-users mailing list
> interchange-users@interchange.redhat.com
> http://interchange.redhat.com/mailman/listinfo/interchange-users
>