[prev] [thread] [next] [Date index for 2004/07/23]
This is a multi-part message in MIME format. ------_=_NextPart_001_01C470C9.23AAAA1C Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi all, Sorry to bother you, particularly if I turn out to be missing something obvious, but I'm having trouble getting Class::DBI to work. I get this error: bash-2.02$ perl cdbi_testcase.pl=20 Can't insert new CDBIShard: Can't set DBI::db=3DHASH(0x2b1efc)->{FetchHashKeyName}: unrecognised attribute at /usr/local/lib/perl5/site_perl/5.005/DBI.pm line 411. at cdbi_testcase.pl line 11 In particular, is Class::DBI dependant on a particular version of the database libraries or drivers? This is the programming I use to get the error: ------------------------------------------------------------------------ -------------------------------------- The SQL table: -- !!!!!!!!! SHARDS !!!!!!!!!!!!!!!!!!!!! create table SHARDS ( ID int unsigned not null auto_increment primary key, NAME char(32), START datetime, PUBLICLY_KNOWN bool ); ------------------------------------------------------------------------ -------------------------------------- bash-2.02$ more cdbi_testcase.pl=20 use CDBIShard; sub ASSERT { my $ok =3D shift; die (@_) unless $ok; } CDBIShard->connection( "DBI:mysql:database=3Dscratch;host=3DXXXX" , "XXXX= ", "XXXX" ); #my $shard =3D create BBC::Plutus::Persist::ActiveRecord::Shard { my $shard =3D create CDBIShard { NAME=3D>"Test Shard $^T", START=3D> "2004-07-23 15:09:09", PUBLICLY_KNOWN=3D> 1 }; ASSERT( $shard->NAME eq "Test Shard $^T" ); ASSERT( $shard->PUBLICLY_KNOWN =3D=3D 1 ); $shard->delete(); ------------------------------------------------------------------------ -------------------------------------- bash-2.02$ more CDBIShard.pm=20 package CDBIShard; use Class::DBI; use base Class::DBI; __PACKAGE__->table("SHARDS"); __PACKAGE__->columns(All=3D> qw/ID NAME START PUBLICLY_KNOWN/); __END__ ------------------------------------------------------------------------ -------------------------------------- And as is customary, here are some versions: Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform: osname=3Dsolaris, osvers=3D2.6, archname=3Dsun4-solaris uname=3D'sunos ops-dev4 5.6 generic_105181-19 sun4u sparc sunw,ultrasparc-iii-cengine ' config_args=3D'-Dprefix=3D/usr/local/perl-5.6.1' hint=3Dprevious, useposix=3Dtrue, d_sigaction=3Ddefine usethreads=3Dundef use5005threads=3Dundef useithreads=3Dundef usemultiplicity=3Dundef useperlio=3Dundef d_sfio=3Dundef uselargefiles=3Ddefine usesocks=3Dun= def use64bitint=3Dundef use64bitall=3Dundef uselongdouble=3Dundef Compiler: cc=3D'gcc', ccflags =3D'-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64', optimize=3D'-O', cppflags=3D'-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64' ccversion=3D'', gccversion=3D'2.95.3 20010315 (release)', gccosandvers=3D'solaris2.8' intsize=3D4, longsize=3D4, ptrsize=3D4, doublesize=3D8, byteorder=3D4= 321 d_longlong=3Ddefine, longlongsize=3D8, d_longdbl=3Ddefine, longdblsiz= e=3D16 ivtype=3D'long', ivsize=3D4, nvtype=3D'double', nvsize=3D8, Off_t=3D'= off_t', lseeksize=3D8 alignbytes=3D8, usemymalloc=3Dy, prototype=3Ddefine Linker and Libraries: ld=3D'gcc', ldflags =3D' -L/usr/local/lib ' libpth=3D/usr/local/lib /usr/lib /usr/ccs/lib libs=3D-lsocket -lnsl -lgdbm -ldl -lm -lc perllibs=3D-lsocket -lnsl -ldl -lm -lc libc=3D/lib/libc.so, so=3Dso, useshrplib=3Dfalse, libperl=3Dlibperl.a= Dynamic Linking: dlsrc=3Ddl_dlopen.xs, dlext=3Dso, d_dlsymun=3Dundef, ccdlflags=3D' ' cccdlflags=3D'-fPIC', lddlflags=3D'-G -L/usr/local/lib' Characteristics of this binary (from libperl):=20 Compile-time options: USE_LARGE_FILES Built under solaris Compiled at May 12 2003 13:03:19 Class::DBI - 0.96 Class-Accessor - 0.19 DBI version 1.13 -- Dr Ian McDonald Software Engineer, Interactive Drama & Entertainment Conquer the Earth! - The Doctor Who monsters game The Rome Game: Do as the Romans do. Lie, cheat, and steal. A300, 56-58 Wood Lane (CH), London W12 7SB 020 822 56162 ian.mcdonald@xxx.xx.xx / "Ian McDonald-ONLINE" (not "Ian MacDonald") http://www.bbc.co.uk/ - World Wide Wonderland This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system.=20 Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received.=20 Further communication will signify your consent to this. ------_=_NextPart_001_01C470C9.23AAAA1C Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3Dus-asci= i"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version 6.0.6503.0= "> <TITLE>unrecognised {FetchHashKeyName} in DBI class - do we have a proble= m?</TITLE> </HEAD> <BODY> <!-- Converted from text/rtf format --> <P><FONT SIZE=3D2 FACE=3D"Arial">Hi all,</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">Sorry to bother you, particularly if I t= urn out to be missing something obvious, but I'm having trouble getting C= lass::DBI to work. I get this error:</FONT></P> <P><FONT SIZE=3D2 FACE=3D"Arial">bash-2.02$ perl cdbi_testcase.pl </FONT>= <BR><FONT SIZE=3D2 FACE=3D"Arial">Can't insert new CDBIShard: Can't set D= BI::db=3DHASH(0x2b1efc)->{FetchHashKeyName}: unrecognised attribute at= /usr/local/lib/perl5/site_perl/5.005/DBI.pm line 411.</FONT></P> <P><FONT SIZE=3D2 FACE=3D"Arial"> at cdbi_testcase.pl line 11</FONT>= </P> <P><FONT SIZE=3D2 FACE=3D"Arial">In particular, is Class::DBI dependant o= n a particular version of the database libraries or drivers?</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">This is the programming I use to get the= error:</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">----------------------------------------= ----------------------------------------------------------------------</F= ONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">The SQL table:</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">-- !!!!!!!!! SHARDS !!!!!!!!!!!!!!!!!!!!= !</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">create table SHARDS (</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> &nb= sp; ID int unsigned not null auto_increment primary key,</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> &nb= sp; NAME char(32),</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> &nb= sp; START datetime,</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> &nb= sp; PUBLICLY_KNOWN bool</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">);</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">---------------------------------------= -----------------------------------------------------------------------</= FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">bash-2.02$ more cdbi_testcase.pl </FONT= > <BR><FONT SIZE=3D2 FACE=3D"Arial">use CDBIShard;</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">sub ASSERT {</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> &nb= sp; my $ok =3D shift;</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> &nb= sp; die (@_) unless $ok;</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">}</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">CDBIShard->connection( "DBI:mysq= l:database=3Dscratch;host=3DXXXX" , "XXXX", "XXXX&quo= t; );</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">#my $shard =3D create BBC::Plutus::Persi= st::ActiveRecord::Shard {</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">my $shard =3D create CDBIShard {</FONT>= <BR><FONT SIZE=3D2 FACE=3D"Arial"> &nb= sp; NAME=3D>"Test Shard $^T",</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> &nb= sp; START=3D> "2004-07-23 15:09:09",</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> &nb= sp; PUBLICLY_KNOWN=3D> 1</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">};</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">ASSERT( $shard->NAME eq "Test Sh= ard $^T" );</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">ASSERT( $shard->PUBLICLY_KNOWN =3D=3D= 1 );</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">$shard->delete();</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">---------------------------------------= -----------------------------------------------------------------------</= FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">bash-2.02$ more CDBIShard.pm </FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">package CDBIShard;</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">use Class::DBI;</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">use base Class::DBI;</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">__PACKAGE__->table("SHARDS"= );</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">__PACKAGE__->columns(All=3D> qw/I= D NAME START PUBLICLY_KNOWN/);</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">__END__</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">---------------------------------------= -----------------------------------------------------------------------</= FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">And as is customary, here are some vers= ions:</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Summary of my perl5 (revision 5.0 versi= on 6 subversion 1) configuration:</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> Platform:</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> osname=3Dsolaris, os= vers=3D2.6, archname=3Dsun4-solaris</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> uname=3D'sunos ops-d= ev4 5.6 generic_105181-19 sun4u sparc sunw,ultrasparc-iii-cengine '</FONT= > <BR><FONT SIZE=3D2 FACE=3D"Arial"> config_args=3D'-Dpre= fix=3D/usr/local/perl-5.6.1'</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> hint=3Dprevious, use= posix=3Dtrue, d_sigaction=3Ddefine</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> usethreads=3Dundef u= se5005threads=3Dundef useithreads=3Dundef usemultiplicity=3Dundef</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> useperlio=3Dundef d_= sfio=3Dundef uselargefiles=3Ddefine usesocks=3Dundef</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> use64bitint=3Dundef = use64bitall=3Dundef uselongdouble=3Dundef</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> Compiler:</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> cc=3D'gcc', ccflags = =3D'-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE= _OFFSET_BITS=3D64',</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> optimize=3D'-O',</FO= NT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> cppflags=3D'-fno-str= ict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS= =3D64'</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> ccversion=3D'', gccv= ersion=3D'2.95.3 20010315 (release)', gccosandvers=3D'solaris2.8'</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> intsize=3D4, longsiz= e=3D4, ptrsize=3D4, doublesize=3D8, byteorder=3D4321</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> d_longlong=3Ddefine,= longlongsize=3D8, d_longdbl=3Ddefine, longdblsize=3D16</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> ivtype=3D'long', ivs= ize=3D4, nvtype=3D'double', nvsize=3D8, Off_t=3D'off_t', lseeksize=3D8</F= ONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> alignbytes=3D8, usem= ymalloc=3Dy, prototype=3Ddefine</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> Linker and Libraries:</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> ld=3D'gcc', ldflags = =3D' -L/usr/local/lib '</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> libpth=3D/usr/local/= lib /usr/lib /usr/ccs/lib</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> libs=3D-lsocket -lns= l -lgdbm -ldl -lm -lc</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> perllibs=3D-lsocket = -lnsl -ldl -lm -lc</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> libc=3D/lib/libc.so,= so=3Dso, useshrplib=3Dfalse, libperl=3Dlibperl.a</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> Dynamic Linking:</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> dlsrc=3Ddl_dlopen.xs= , dlext=3Dso, d_dlsymun=3Dundef, ccdlflags=3D' '</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> cccdlflags=3D'-fPIC'= , lddlflags=3D'-G -L/usr/local/lib'</FONT> </P> <BR> <P><FONT SIZE=3D2 FACE=3D"Arial">Characteristics of this binary (from lib= perl): </FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> Compile-time options: USE_LARGE_= FILES</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> Built under solaris</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> Compiled at May 12 2003 13:03:19= </FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">Class::DBI - 0.96</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Class-Accessor - 0.19</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">DBI version 1.13</FONT> </P> <BR> <BR> <P><FONT COLOR=3D"#808080" SIZE=3D1 FACE=3D"Arial">--</FONT> <BR><FONT COLOR=3D"#808080" SIZE=3D1 FACE=3D"Arial">Dr Ian McDonald</FONT= > <BR><FONT COLOR=3D"#808080" SIZE=3D1 FACE=3D"Arial">Software Engineer, In= teractive Drama & Entertainment</FONT> <BR><FONT COLOR=3D"#808080" SIZE=3D1 FACE=3D"Arial">Conquer the Earth! - = The Doctor Who monsters game</FONT> <BR><FONT COLOR=3D"#808080" SIZE=3D1 FACE=3D"Arial">The Rome Game: Do as = the Romans do. Lie, cheat, and steal.</FONT> <BR><FONT COLOR=3D"#808080" SIZE=3D1 FACE=3D"Arial">A300, 56-58 Wood Lane= (CH), London W12 7SB</FONT> <BR><FONT COLOR=3D"#808080" SIZE=3D1 FACE=3D"Arial">020 822 56162</FONT> <BR><FONT COLOR=3D"#808080" SIZE=3D1 FACE=3D"Arial">ian.mcdonald@xxx.xx.x= k / "Ian McDonald-ONLINE" (not "Ian MacDonald")</FONT= > </P> <BR> <br>http://www.bbc.co.uk/ - World Wide Wonderland<br><br>This e-mail (and= any attachments) is confidential and may contain<br>personal views which= are not the views of the BBC unless specifically<br>stated.<br>If you ha= ve received it in error, please delete it from your system. <br>Do not us= e, copy or disclose the information in any way nor act in<br>reliance on = it and notify the sender immediately. Please note that the<br>BBC monitor= s e-mails sent or received. <br>Further communication will signify your c= onsent to this.</BODY> </HTML>= ------_=_NextPart_001_01C470C9.23AAAA1C--
unrecognised {FetchHashKeyName} in DBI class - do we have a problem?
|
Re: unrecognised {FetchHashKeyName} in DBI class - do we have a problem?
|
RE: unrecognised {FetchHashKeyName} in DBI class - do we have a problem?
|
Re: unrecognised {FetchHashKeyName} in DBI class - do we have a problem?
|
Generated at 11:34 on 01 Dec 2004 by mariachi v0.52