• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC Connctivity through Swing Application via java webstart

 
Pradeep Gupta
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have my swing application in which I have connected to JDBC as:
class.forName("oracle.jdbc.driver.oracleDriver");
con=DriverManager.getConnection
("jdbc racle ci8:@testdb,<user>,<password> ;
We are using oracle9i & JDK1.4.2 on Linux machine.
On running in console by java..............., it runs successfully &
there is no problem.
But when we use Webstart to run the application on same linux machine
( using Tomcat as web server) . It gives the error:
Access Denied (java.util.PropertyPermission oracle.jserver.version
read)
Later I have modified my java.policy file by adding ----
grant {
permission
java.util.PropertyPermission "oracle.jserver.version","read,write"; };
grant {
permission java.net.SocketPermission "<ip
addr>", "accept,connect,listen,resolve";};
Now on the same machine, it gives the error---
Access Denied (java.lang.RuntimePermission loadLibrary.ocijdbc9)
Now I have also added in java.policy file---
grant {
permission java.lang.RuntimePermission "use Policy";};
& in java.security I have added
grant codeBase "http://localhost:8080/menu-example/*"
{
permission
java.util.PropertyPermission "oracle.jserver.version","read,write"; };
but nothing is happened.
I am not understanding what's the problem.
Also, there is one more problem---
If instead of using same linux machine as client I have used a
Windows machine ( not having oracle) ,
The error is same ie
Access Denied (java.util.PropertyPermission oracle.jserver.version
read)
I have modify all the above things in the client machine also, but
nothing is happening.
Plz tell me the solution ASAP.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic