Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

access denied (java.util.PropertyPermission oracle.jserver.version read)

 
mintu kumar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i have already connected my applet with excess database by signing applet with self signed certificate.
but i m getting following error when connecting to oracle database.

access denied (java.util.PropertyPermission oracle.jserver.version read)

can anyone solve my problem.

my applet code is:

import java.sql.*;

// Import the java classes used in applets
import java.awt.*;
import java.io.*;
import java.util.*;
/*<applet code="MyJdbcApplet.class" archive=ojdbc14.jar,MyJdbcApplet.jar width=300 height=400>
</applet>*/
public class MyJdbcApplet extends java.applet.Applet
{

// The connect string
static final String connect_string =
"jdbcracle:thin:scott/tiger@anant:1521:student";


static final String query = "select 'Hello JDBC: ' || sysdate from dual";


// The button to push for executing the query
Button execute_button;

// The place where to dump the query result
TextArea output;

// The connection to the database
Connection conn;

// Create the User Interface
public void init ()
{
this.setLayout (new BorderLayout ());
Panel p = new Panel ();
p.setLayout (new FlowLayout (FlowLayout.LEFT));
execute_button = new Button ("Hello JDBC");
p.add (execute_button);
this.add ("North", p);
output = new TextArea (10, 60);
this.add ("Center", output);
}

public boolean action (Event ev, Object arg)
{
if (ev.target == execute_button)
{
try
{

if (conn == null)
{
DriverManager.registerDriver (new oracle.jdbc.OracleDriver());

Connection con = DriverManager.getConnection
("jdbcracle:thin:@anant:1521:student", "scott", "tiger");
}

Statement stmt = conn.createStatement ();

output.appendText ("Executing query " + query + "\n");
ResultSet rset = stmt.executeQuery (query);
while (rset.next ())
output.appendText (rset.getString (1) + "\n");

output.appendText ("done.\n");
}
catch (Exception e)
{
output.appendText (e.getMessage () + "\n");
}
return true;
}
else
return false;
}
}
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34179
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mintu,
I think this question is more about Applet configuration than JDBC so I'm moving it to our applets forum. If it winds up being more about JDBC, someone can move it back.
 
mintu kumar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anyone having knowledge about my problem.
please reply, its urgent.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic