[Catalyst] Error while going through tutorial using Oracle
Jason Crummack
jason.crummack at easysoft.com
Fri Aug 18 10:51:32 CEST 2006
That's my point for the column_info call in DBD::Oracle to work the case
has to matched the stored case
http://search.cpan.org/~pythian/DBD-Oracle-1.18a/Oracle.pm#column_info()
i.e.
create table "user" (p1 integer ....)
To retrieve column_info for that table the table name must be lowercase
in the column_info call.
Jason
Hartmaier Alexander wrote:
> The table names aren't uppercased when defining the table class but just for the column_info DBI call.
>
> -Alex
>
>
>
>> -----Original Message-----
>> From: catalyst-bounces at lists.rawmode.org [mailto:catalyst-
>> bounces at lists.rawmode.org] On Behalf Of Jason Crummack
>> Sent: Friday, August 18, 2006 10:15 AM
>> To: The elegant MVC web framework
>> Subject: [***SPAM*** Score/Req: 11.00/6.0] Re: [Catalyst] Error while
>> going through tutorial using Oracle
>>
>> Hi Hartmaier
>>
>> Thats going to cause me problems when the next release hits the streets,
>> if you're automatically uppercasing table names how will it then handle
>> reserved word table names where case is important? (e.g "user").
>>
>> Jason
>>
>> Hartmaier Alexander wrote:
>>
>>> Hi!
>>>
>>> Use the current svn version which will become 0.07001 soon, it has my
>>>
>> Storage::Oracle patch for uppercasing the table names which wasn't
>> included in 0.07.
>>
>>> It's best you specify the sequence names for each auto-inc pk
>>>
>> yourself, so you avoid the magic on startup which saves you some time.
>>
>>> -Alex
>>>
>>>
>>>
>>>
>>>> -----Original Message-----
>>>> From: catalyst-bounces at lists.rawmode.org [mailto:catalyst-
>>>> bounces at lists.rawmode.org] On Behalf Of Jason Crummack
>>>> Sent: Friday, August 18, 2006 1:38 AM
>>>> To: The elegant MVC web framework
>>>> Subject: Re: [Catalyst] Error while going through tutorial using
>>>>
>> Oracle
>>
>>>> Jason Crummack wrote:
>>>>
>>>> Sorry Alex I also forgot to mention that the underlying column_info
>>>>
>> call
>>
>>>> that happens (assuming your using DBD::Oracle) is case sensitive, so
>>>> you'll probably also need to upper case the table name (don't think
>>>>
>> its
>>
>>>> necessary with the actual column names).
>>>>
>>>> e.g. __PACKAGE__->table('BOOKS');
>>>>
>>>> If you created the table unquoted in oracle it will have
>>>>
>> automatically
>>
>>>> uppercased the table and column names, this caused me a few problems
>>>> with a reserved word table name i've been dealing with where i've had
>>>>
>> to
>>
>>>> define the quote and seperator characters on connect and use exact
>>>>
>> case
>>
>>>> for table and column names.
>>>>
>>>> Jason
>>>>
>>>>
>>>>
>>>>> Alex Boster wrote:
>>>>>
>>>>> Hi Alex,
>>>>>
>>>>> For oracle I think you need to set the sequence name for auto-
>>>>>
>>>>>
>>>> increments
>>>>
>>>>
>>>>> e.g.
>>>>>
>>>>> __PACKAGE__->load_components (qw/PK::Auto Core/);
>>>>> __PACKAGE__->sequence ('{NAME OF YOUR SEQUENCE HERE}');
>>>>>
>>>>> I think that's right
>>>>>
>>>>> Jason
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> I am part way through the tutorial using Oracle and have gotten
>>>>>>
>>>>>>
>>>> stuck.
>>>>
>>>>
>>>>>> I have create sequences and before insert triggers to replace
>>>>>>
>> mySQL's
>>
>>>>>> autoincrements. However, I now get:
>>>>>>
>>>>>> |Caught exception in MyApp::Controller::Books->url_create "Can't
>>>>>>
>> use
>>
>>>> an undefined value as a HASH reference at
>>>> /u01/glue/share/perl5/lib/site_perl/5.8.8/DBIx/Class/ResultSource.pm
>>>> line 197."||
>>>>
>>>>
>>>>>> |when I try out the formless submission example. On a suggestion,
>>>>>>
>> I
>>
>>>> removed the "PK::Auto" from the load_components bit of the table
>>>>
>> modules
>>
>>>> (i.e., from:
>>>>
>>>>
>>>>>> __PACKAGE__->load_components(qw/PK::Auto Core/);
>>>>>> ). This had no affect.
>>>>>>
>>>>>> Any pointers? Server output and error page follows.
>>>>>>
>>>>>> Thanks,
>>>>>> AB
>>>>>>
>>>>>> Server stderr/stdout:
>>>>>>
>>>>>> [Template::Provider] creating cache of unlimited slots for [
>>>>>> CODE(0x9f829a4) ]
>>>>>> [debug] Debug messages enabled
>>>>>> [debug] Loaded plugins:
>>>>>> .------------------------------------------------------------------
>>>>>>
>> --
>>
>>>> --------.
>>>>
>>>>
>>>>>> | Catalyst::Plugin::ConfigLoader
>>>>>> 0.12 |
>>>>>> | Catalyst::Plugin::StackTrace
>>>>>> 0.06 |
>>>>>> | Catalyst::Plugin::Static::Simple
>>>>>> 0.14 |
>>>>>> '------------------------------------------------------------------
>>>>>>
>> --
>>
>>>> --------'
>>>>
>>>>
>>>>>> [debug] Loaded dispatcher "Catalyst::Dispatcher"
>>>>>> [debug] Loaded engine "Catalyst::Engine::HTTP"
>>>>>> [debug] Found home "/home/aboster/dev/catalyst/MyApp"
>>>>>> [debug] Loaded Config "/home/aboster/dev/catalyst/MyApp/myapp.yml"
>>>>>> [debug] Loaded components:
>>>>>> .-----------------------------------------------------------------
>>>>>>
>> +--
>>
>>>> --------.
>>>>
>>>>
>>>>>> | Class |
>>>>>> Type |
>>>>>> +-----------------------------------------------------------------
>>>>>>
>> +--
>>
>>>> --------+
>>>>
>>>>
>>>>>> | MyApp::Controller::Books |
>>>>>> instance |
>>>>>> | MyApp::Controller::Root |
>>>>>> instance |
>>>>>> | MyApp::Model::MyAppDB |
>>>>>> instance |
>>>>>> | MyApp::Model::MyAppDB::Author |
>>>>>> class |
>>>>>> | MyApp::Model::MyAppDB::Book |
>>>>>> class |
>>>>>> | MyApp::Model::MyAppDB::BookAuthor |
>>>>>> class |
>>>>>> | MyApp::View::TT |
>>>>>> instance |
>>>>>> '-----------------------------------------------------------------
>>>>>>
>> +--
>>
>>>> --------'
>>>>
>>>>
>>>>>> [debug] Loaded Private actions:
>>>>>> .----------------------+--------------------------------------+----
>>>>>>
>> --
>>
>>>> --------.
>>>>
>>>>
>>>>>> | Private | Class |
>>>>>> Method |
>>>>>> +----------------------+--------------------------------------+----
>>>>>>
>> --
>>
>>>> --------+
>>>>
>>>>
>>>>>> | /default | MyApp::Controller::Root |
>>>>>> default |
>>>>>> | /end | MyApp::Controller::Root |
>>>>>> end |
>>>>>> | /books/url_create | MyApp::Controller::Books |
>>>>>> url_create |
>>>>>> | /books/index | MyApp::Controller::Books |
>>>>>> index |
>>>>>> | /books/list | MyApp::Controller::Books |
>>>>>> list |
>>>>>> '----------------------+--------------------------------------+----
>>>>>>
>> --
>>
>>>> --------'
>>>>
>>>>
>>>>>> [debug] Loaded Path actions:
>>>>>> .-------------------------------------+----------------------------
>>>>>>
>> --
>>
>>>> --------.
>>>>
>>>>
>>>>>> | Path |
>>>>>> Private |
>>>>>> +-------------------------------------+----------------------------
>>>>>>
>> --
>>
>>>> --------+
>>>>
>>>>
>>>>>> | /books/list |
>>>>>> /books/list |
>>>>>> | /books/url_create |
>>>>>> /books/url_create |
>>>>>> '-------------------------------------+----------------------------
>>>>>>
>> --
>>
>>>> --------'
>>>>
>>>>
>>>>>> [info] MyApp powered by Catalyst 5.7001
>>>>>> You can connect to your server at
>>>>>>
>>>>>>
>>>> http://darkwind003.989studios.com:3000
>>>>
>>>>
>>>>>> [info] *** Request 1 (0.200/s) [1065] [Thu Aug 17 10:32:58 2006]
>>>>>>
>> ***
>>
>>>>>> [debug] "GET" request for "books/url_create/TCPIP_Illustrated_Vol-
>>>>>>
>>>>>>
>>>> 2/5/4"
>>>>
>>>>
>>>>>> from "172.31.30.76"
>>>>>> [debug] Path is "books/url_create"
>>>>>> [debug] Arguments are "TCPIP_Illustrated_Vol-2/5/4"
>>>>>> [error] Caught exception in MyApp::Controller::Books->url_create
>>>>>>
>>>>>>
>>>> "Can't
>>>>
>>>>
>>>>>> use an undefined value as a HASH reference at
>>>>>>
>>>>>>
>> /u01/glue/share/perl5/lib/site_perl/5.8.8/DBIx/Class/ResultSource.pm
>>
>>>>>> line 197."
>>>>>> [info] Request took 1.681834s (0.595/s)
>>>>>> .----------------------------------------------------------------+-
>>>>>>
>> --
>>
>>>> --------.
>>>>
>>>>
>>>>>> | Action |
>>>>>> Time |
>>>>>> +----------------------------------------------------------------+-
>>>>>>
>> --
>>
>>>> --------+
>>>>
>>>>
>>>>>> | /books/url_create |
>>>>>> 1.656821s |
>>>>>> | /end |
>>>>>> 0.000262s |
>>>>>> '----------------------------------------------------------------+-
>>>>>>
>> --
>>
>>>> --------'
>>>>
>>>>
>>>>>> Error page:
>>>>>>
>>>>>> |Caught exception in MyApp::Controller::Books->url_create "Can't
>>>>>>
>> use
>>
>>>> an
>>>>
>>>>
>>>>>> undefined value as a HASH reference at
>>>>>>
>>>>>>
>> /u01/glue/share/perl5/lib/site_perl/5.8.8/DBIx/Class/ResultSource.pm
>>
>>>>>> line 197."|
>>>>>>
>>>>>>
>>>>>> Stack Trace
>>>>>>
>>>>>>
>> <http://darkwind003:3000/books/url_create/TCPIP_Illustrated_Vol-
>>
>>>> 2/5/4#>
>>>>
>>>>
>>>>>> Package Line File
>>>>>> MyApp::Controller::Books 66
>>>>>> /home/aboster/dev/catalyst/MyApp/lib/MyApp/Controller/Books.pm
>>>>>>
>>>>>> | 63: 64: # Call create() on the book model object. Pass the table
>>>>>>
>>>>>>
>>>> 65: #
>>>>
>>>>
>>>>>> columns/field values we want to set as hash values * 66: my $book =
>>>>>> $c->model('MyAppDB::Book')->create({ * 67: title => $title, 68:
>>>>>>
>>>>>>
>>>> rating
>>>>
>>>>
>>>>>> => $rating 69: }); |
>>>>>>
>>>>>>
>>>>>> Request
>>>>>>
>>>>>>
>> <http://darkwind003:3000/books/url_create/TCPIP_Illustrated_Vol-
>>
>>>> 2/5/4#>
>>>>
>>>>
>>>>>> bless({
>>>>>> action => "books/url_create",
>>>>>> address => "172.31.30.76",
>>>>>> arguments => ["TCPIP_Illustrated_Vol-2", 5, 4],
>>>>>> base => bless(do{\(my $o =
>>>>>>
>>>>>>
>>>> "http://darkwind003:3000/")}, "URI::http"),
>>>>
>>>>
>>>>>> body_parameters => {},
>>>>>> captures => [],
>>>>>> cookies => {},
>>>>>> headers => bless({
>>>>>> "accept" =>
>>>>>>
>>>>>>
>> "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/pla
>>
>>>> in;q=0.8,image/png,*/*;q=0.5",
>>>>
>>>>
>>>>>> "accept-charset" => "ISO-8859-1,utf-
>>>>>>
>>>>>>
>>>> 8;q=0.7,*;q=0.7",
>>>>
>>>>
>>>>>> "accept-encoding" => "gzip,deflate",
>>>>>> "accept-language" => "en-us,en;q=0.5",
>>>>>> connection => "keep-alive",
>>>>>> host => "darkwind003:3000",
>>>>>> "keep-alive" => 300,
>>>>>> "user-agent" => "Mozilla/5.0 (X11; U; Linux
>>>>>>
>>>>>>
>>>> i686; en-US; rv:1.8.0.2) Gecko/20060419 CentOS/1.5.0.2-3.c4.centos
>>>> Firefox/1.5.0.2",
>>>>
>>>>
>>>>>> }, "HTTP::Headers"),
>>>>>> hostname => "sceapdsd-172-31-30-76.989studios.com",
>>>>>> match => "books/url_create",
>>>>>> method => "GET",
>>>>>> parameters => {},
>>>>>> path => "books/url_create/TCPIP_Illustrated_Vol-
>>>>>>
>> 2/5/4",
>>
>>>>>> protocol => "HTTP/1.0",
>>>>>> query_parameters => {},
>>>>>> secure => 0,
>>>>>> uploads => {},
>>>>>> uri => bless(do{\(my $o =
>>>>>>
>>>>>>
>>>> "http://darkwind003:3000/books/url_create/TCPIP_Illustrated_Vol-
>>>> 2/5/4")}, "URI::http"),
>>>>
>>>>
>>>>>> user => undef,
>>>>>> }, "Catalyst::Request")
>>>>>>
>>>>>>
>>>>>> Response
>>>>>>
>>>>>>
>> <http://darkwind003:3000/books/url_create/TCPIP_Illustrated_Vol-
>>
>>>> 2/5/4#>
>>>>
>>>>
>>>>>> bless({
>>>>>> body => "",
>>>>>> cookies => {},
>>>>>> headers => bless({
>>>>>> "content-type" => "text/html; charset=utf-8",
>>>>>> "x-catalyst" => "5.7001",
>>>>>> }, "HTTP::Headers"),
>>>>>> status => 200,
>>>>>> }, "Catalyst::Response")
>>>>>>
>>>>>>
>>>>>> Stash
>>>>>>
>>>>>>
>> <http://darkwind003:3000/books/url_create/TCPIP_Illustrated_Vol-
>>
>>>> 2/5/4#>
>>>>
>>>>
>>>>>> {}
>>>>>>
>>>>>>
>>>>>> Config
>>>>>>
>>>>>>
>> <http://darkwind003:3000/books/url_create/TCPIP_Illustrated_Vol-
>>
>>>> 2/5/4#>
>>>>
>>>>
>>>>>> do {
>>>>>> my $a = {
>>>>>> home => "/home/aboster/dev/catalyst/MyApp",
>>>>>> name => "MyApp",
>>>>>> root => bless({
>>>>>> dirs => ["", "home", "aboster", "dev", "catalyst",
>>>>>>
>> "MyApp",
>>
>>>> "root"],
>>>>
>>>>
>>>>>> file_spec_class => undef,
>>>>>> volume => "",
>>>>>> }, "Path::Class::Dir"),
>>>>>> stacktrace => { context => 3, verbose => 0 },
>>>>>> static => {
>>>>>> debug => 1,
>>>>>> dirs => [],
>>>>>> ignore_dirs => [],
>>>>>> ignore_extensions => ["tmpl", "tt", "tt2", "html",
>>>>>>
>>>>>>
>>>> "xhtml"],
>>>>
>>>>
>>>>>> include_path => ['fix'],
>>>>>> mime_types => {},
>>>>>> no_logs => 1,
>>>>>> },
>>>>>> };
>>>>>> $a->{static}{include_path}[0] = $a->{root};
>>>>>> $a;
>>>>>> }
>>>>>>
>>>>>>
>>>>>> MyApp on Catalyst 5.7001
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> List: Catalyst at lists.rawmode.org
>>>>>> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
>>>>>> Searchable archive: http://www.mail-
>>>>>>
>>>>>>
>>>> archive.com/catalyst at lists.rawmode.org/
>>>>
>>>>
>>>>>> Dev site: http://dev.catalyst.perl.org/
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> _______________________________________________
>>>>> List: Catalyst at lists.rawmode.org
>>>>> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
>>>>> Searchable archive: http://www.mail-
>>>>>
>>>>>
>>>> archive.com/catalyst at lists.rawmode.org/
>>>>
>>>>
>>>>> Dev site: http://dev.catalyst.perl.org/
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>> _______________________________________________
>>>> List: Catalyst at lists.rawmode.org
>>>> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
>>>> Searchable archive: http://www.mail-
>>>> archive.com/catalyst at lists.rawmode.org/
>>>> Dev site: http://dev.catalyst.perl.org/
>>>>
>>>>
>>>
>> *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"
>> *"*"*
>>
>>> T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
>>> Handelsgericht Wien, FN 79340b
>>>
>>>
>> *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"
>> *"*"*
>>
>>> Notice: This e-mail contains information that is confidential and may
>>>
>> be privileged.
>>
>>> If you are not the intended recipient, please notify the sender and
>>>
>> then delete this e-mail immediately.
>>
>> *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"
>> *"*"*
>>
>>> _______________________________________________
>>> List: Catalyst at lists.rawmode.org
>>> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
>>> Searchable archive: http://www.mail-
>>>
>> archive.com/catalyst at lists.rawmode.org/
>>
>>> Dev site: http://dev.catalyst.perl.org/
>>>
>>>
>>>
>>>
>> _______________________________________________
>> List: Catalyst at lists.rawmode.org
>> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
>> Searchable archive: http://www.mail-
>> archive.com/catalyst at lists.rawmode.org/
>> Dev site: http://dev.catalyst.perl.org/
>>
>
> *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
> T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
> Handelsgericht Wien, FN 79340b
> *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
> Notice: This e-mail contains information that is confidential and may be privileged.
> If you are not the intended recipient, please notify the sender and then delete this e-mail immediately.
> *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
>
>
>
More information about the Catalyst
mailing list