This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Applets and the fly likes  access denied (java.util.PropertyPermission oracle.jserver.version read) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Applets
Bookmark " access denied (java.util.PropertyPermission oracle.jserver.version read) " Watch " access denied (java.util.PropertyPermission oracle.jserver.version read) " New topic
Author

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

mintu kumar
Greenhorn

Joined: Apr 28, 2007
Posts: 10
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30136
    
150

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
mintu kumar
Greenhorn

Joined: Apr 28, 2007
Posts: 10
anyone having knowledge about my problem.
please reply, its urgent.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: access denied (java.util.PropertyPermission oracle.jserver.version read)
 
Similar Threads
java applet-oracle database connection
JDBC, Oracle Thin Client thru Applet
Database ...need to implement
noclassfound error
Really in a hurry!