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

Applet JDBC connection to a Different Host Than the Web Server

 
Deepak Prasanna R
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

We are connecting to a remote DB Server different from the hosted Web Server. We sign our Jar file using JarSigner - VeriSign for enabling Copy Paste functionality in Applet. I thought this Signed Jar will solve the DB connectivity Problem too, but it is not solving am getting the java.security.AccessControlException: access denied (java.net.SocketPermission "server-name" resolve) in java Console.

I do know that there is another workaround by using Oracle Connection Manager. But I would like to know why signed Applet is not working for my application. I am currently using Type 4 JDBC Oracle Thin Driver.

Please suggest me on how to go about solving this Signed Applet problem.

Thanks & Regards
Deepak
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

That's strange. You might either have a cached version of the jar file (make sure you have the signed one), or might you be invoking this from JavaScript? Then it would not be trusted after all, as unsigned JavaScript in considered insecure, no matter what.

If neither of those is the case, try running the offending code as privileged code, as is described here.
[ April 24, 2006: Message edited by: Ulf Dittmer ]
 
Deepak Prasanna R
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dittmer

Thanks for the reply. I have checked the jar file for cache and it is taking only the signed jar and we are not using any JavaScript in our application.

The problem which I am facing is not able to connect to an external DB. I am able to access client resources after signing the applet. Can you please suggest based on this scenario.

Thanks & Regards
Deepak
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried running it as privileged code?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic