A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Problem connecting to Database
Joined: Sep 09, 2008
Oct 11, 2008 13:15:00
While working on a
code today, I got the following exception while creating a connection with Oracle:
: access denied (
After looking through many forums and lots of googling, I found out the solution and added the following line in the .java.policy file:
"127.0.0.1:1521", "connect, resolve";
The code is working fine now, but just wanted to know why this problem started occurring after so many years of coding in JDBC since this wasn't the first time I was creating a connection and
I did not install/uninstall anything at my end.
Joined: Mar 10, 2008
Oct 11, 2008 15:11:00
I guess you're either calling the JDBC driver from inside an
or an application that uses a security manager.
Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
I agree. Here's the link:
subject: Problem connecting to Database
Security & Policy file
access denied (SocketPermission 127.0.0.1:1099 connect,resolve)
Trouble with connection to MySQL in Tomcat
RMI example code fails
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014