Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Access Control Exception

 
Rejo Varghese
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.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate 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
Eclipse IDE Hibernate 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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic