Re: java in the database (10gR2 & 11gR2)

From: Thomas Olszewicki <ThomasO_at_cpas.com>
Date: Mon, 7 Feb 2011 14:30:22 -0800 (PST)
Message-ID: <65cb4389-1532-49e2-a815-1f9484300334_at_1g2000yqq.googlegroups.com>



On Feb 5, 10:25 am, Jeremy <jeremy0..._at_gmail.com> wrote:
> In article <3497fa16-854d-40b2-becb-
> a1cca3cf4..._at_j11g2000yqh.googlegroups.com>, bdb..._at_gmail.com says...
>
> > 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/FineGrainedAccessToNetworkSer...
>
> > 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.
>
> Thanks for that - DB in which we are evaluating "jc" is running
> 11.2.0.1.0 on Windows Server 2003.
>
> We are able to access e.g. utl_smtp and utl_http from within PL/SQL no
> problems there.
>
> Question really at this stage is whether there are any explicit access
> rights that need to be granted in order for java code to be able to
> access these kinds of network functions.
>
> --
> jeremy

Jeremy,
Oracle 11g r2 has introduced many new security requirements. You may need also to "grand" Java classes access to specific internet resources:
Example:
dbms_java.grant_permission( <Your Schema>, 'SYS:java.net.SocketPermission', '127.0.0.1:9999', 'connect,resolve' );
Change 'SYS:java.net.SocketPermission' to the class name used to access internet.
Change '127.0.0.1:9999' to the ip or url required. Look at this explanation:
http://download.oracle.com/docs/cd/E11882_01/java.112/e10588/chten.htm#BABFBDGG

hth
Thomas Received on Mon Feb 07 2011 - 16:30:22 CST

Original text of this message