This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • 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
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

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).
 
Liar, liar, pants on fire! refreshing plug:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
https://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!