Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

Here is the stored procedure:

PROCEDURE TEST ( PARAM1 IN VARCHAR2, PARAM2 OUT XMLTYPE );

And here is the Perl having trouble:

#!/usr/bin/perl use DBI; use DBD::Oracle qw(:ora_types); use Data::Dumper; my $dbh = DBI->connect( "dsn", "user", "pass", { RaiseError => 1 } ); $dbh->trace(15,"trace"); my $query = $dbh->prepare( qq{BEGIN schema.package.TEST('blah', ?); co +mmit; END;}); my $xml; $query->bind_param_inout(1, \$xml, 32000, { ora_type => ORA_XMLTYPE } +); $query->execute(); $dbh->DESTROY; undef $dbh; print Dumper($xml);

The binding causes a segmentation fault and never returns, even when wrapped in an eval statement. Here is the last text in the trace:

-> bind_param_inout for DBD::Oracle::st (DBI::st=HASH(0x18d6828)~0x18d +67c8 1 SCALAR(0x183ddac) 32000 HASH(0x18d67bc)) dbd_bind_ph(): bind :p1 <== undef (type 0 (DEFAULT (varchar)), inout 0 +x183ddac, maxlen 32000, attribs: HASH(0x18d67bc)) dbd_rebind_ph() (1): rebinding :p1 as NULL (not-utf8, ftype 108 (ORA_X +MLTYPE or SQLT_NTY), csid 0, csform 0, inout 1) in dbd_rebind_ph_xml

Can anyone tell me if I am doing something wrong to get this XMLTYPE out of the stored procedure? I should add that the names of the innocent have been protected in the above code and that I should tell you that this runs in an Apache/MOD Perl environment (I have modified the displayed code to ignore the web bits). Additionally, we are running DBD version 1.42 with Oracle on the 10 version. I should also note that I am able to execute the procedure using Oracle Sql Developer.


In reply to DBD Oracle ORA_XMLTYPE Seg Fault by grump-

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others having an uproarious good time at the Monastery: (16)
    As of 2014-07-22 13:31 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite superfluous repetitious redundant duplicative phrase is:









      Results (113 votes), past polls