• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Access Control Exception

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I tried to change my jre from 1.4 to 1.6. But after changing that i am not able to connect to database. Whenever i try to connect to the database it throws an error when DriverManager.getConnection(connString,dbUser,dbPassword) is called.

java.security.AccessControlException: access denied (java.net.SocketPermission crestctdbd09.comfin.ge.com resolve)
java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
java.security.AccessController.checkPermission(AccessController.java:401)
java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
java.lang.SecurityManager.checkConnect(SecurityManager.java:1023)
java.net.InetAddress.getAllByName0(InetAddress.java:1000)
java.net.InetAddress.getAllByName0(InetAddress.java:981)
java.net.InetAddress.getAllByName(InetAddress.java:975)
java.net.InetAddress.getByName(InetAddress.java:889)
java.net.InetSocketAddress.<init>(InetSocketAddress.java:114)
java.net.Socket.<init>(Socket.java:124)
oracle.net.nt.TcpNTAdapter.connect(Unknown Source)
oracle.net.nt.ConnOption.connect(Unknown Source)
oracle.net.nt.ConnStrategy.execute(Unknown Source)
oracle.net.resolver.AddrResolution.resolveAndExecute(Unknown Source)
oracle.net.ns.NSProtocol.establishConnection(Unknown Source)
oracle.net.ns.NSProtocol.connect(Unknown Source)
oracle.jdbc.ttc7.TTC7Protocol.connect(TTC7Protocol.java:1258)
oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:215)
oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:307)
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:442)
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:321)
java.sql.DriverManager.getConnection(DriverManager.java:512)
java.sql.DriverManager.getConnection(DriverManager.java:171)
DBManager.DBmanager.getConnect(Unknown Source)

i have the classes12.jar added to my build path.

Thanks in advance for any help.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
classes12.jar (if I remember right) is Oracle 8 driver file for 1.2 jdks (that you could also use for 1.3 jdks). You should really swap to a much newer driver; this one was obsolete long ago.
 
Rejo Varghese
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,
Its working now.. there was some problem with my workspace. when i got into another workspace and tried running the same it worked fine.... strange workspace :confused:

Thanks for your reply.. how abt using ojdbc14.jar? is that fine?
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like a classpath issue.


how abt using ojdbc14.jar? is that fine?


Personally, I'd use the latest Oracle driver (which is ojdbc6.jar I think).
 
Time is mother nature's way of keeping everything from happening at once. And this is a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic