Re: java in the database (10gR2 & 11gR2)
From: bdbafh <bdbafh_at_gmail.com>
Date: Sat, 5 Feb 2011 04:41:37 -0800 (PST)
Message-ID: <3497fa16-854d-40b2-becb-a1cca3cf445b_at_j11g2000yqh.googlegroups.com>
On Feb 5, 6:44 am, Jeremy <jeremy0..._at_gmail.com> wrote:
> Hi
>
> This is on 10gR2 / 11gR2
>
> We have a simple "hello world" type java proc in the database which we
> can access via a pl/sql wrapper - works fine.
>
> Ouside of the database, we downloaded some java code (lets call it jc)
> which provides methods for interacting with a specific web service. We
> wrote a simple harness in a Java IDE and this works perfectly.
>
> So far so good.
>
> Now we want to be able to run jc from pl/sql.
>
> So I think the logical thing to do is to load the jc code into the
> database.
>
> However as soon as we try to run our harness (which we also compiled
> into the db and we know executes without any references to jc) we get
> errors.
>
> At this point I am aware that it is customary to add details of code
> samples and the error messages we received - I do not have these to hand
> and in fact that is not really the question....
>
> Because the question is: are there any specific stpes that need to be
> taken to enable (any) jc we load into the db to be able to access for
> example lower-level stuff like utl_http for example? Are there any
> difference between 10g and 11g in this respect (as we will need to make
> this work in both versions)?
>
> The schema into which we loaded jc and are working is able to
> successfully execute (from within pl/sql) UTL_HTTP and get responses
> from remote servers.
>
> Thanks for any pointers.
>
> --
> jeremy
Date: Sat, 5 Feb 2011 04:41:37 -0800 (PST)
Message-ID: <3497fa16-854d-40b2-becb-a1cca3cf445b_at_j11g2000yqh.googlegroups.com>
On Feb 5, 6:44 am, Jeremy <jeremy0..._at_gmail.com> wrote:
> Hi
>
> This is on 10gR2 / 11gR2
>
> We have a simple "hello world" type java proc in the database which we
> can access via a pl/sql wrapper - works fine.
>
> Ouside of the database, we downloaded some java code (lets call it jc)
> which provides methods for interacting with a specific web service. We
> wrote a simple harness in a Java IDE and this works perfectly.
>
> So far so good.
>
> Now we want to be able to run jc from pl/sql.
>
> So I think the logical thing to do is to load the jc code into the
> database.
>
> However as soon as we try to run our harness (which we also compiled
> into the db and we know executes without any references to jc) we get
> errors.
>
> At this point I am aware that it is customary to add details of code
> samples and the error messages we received - I do not have these to hand
> and in fact that is not really the question....
>
> Because the question is: are there any specific stpes that need to be
> taken to enable (any) jc we load into the db to be able to access for
> example lower-level stuff like utl_http for example? Are there any
> difference between 10g and 11g in this respect (as we will need to make
> this work in both versions)?
>
> The schema into which we loaded jc and are working is able to
> successfully execute (from within pl/sql) UTL_HTTP and get responses
> from remote servers.
>
> Thanks for any pointers.
>
> --
> jeremy
Jeremy,
> Are there any
> difference between 10g and 11g in this respect (as we will need to make
> this work in both versions)?
Part of upgrading a database to 11g (11.2.0.2 at this point) is to
create access control lists for the UTL packages, i.e. UTL_SMTP using
the package DBMS_NETWORK_ACL_ADMIN.
http://www.oracle-base.com/articles/11g/FineGrainedAccessToNetworkServices_11gR1.php
This would not likely have affected 10g R2, but possibly it was
backported into the 10.2.0.5 patchset?
You might want to list more detailed version info.
hth.
-bdbafh Received on Sat Feb 05 2011 - 06:41:37 CST