[Pljava-dev] java.lang.SecurityException

From: Luca(dot)Rasconi at students(dot)cefriel(dot)it (Luca Rasconi)
To:
Subject: [Pljava-dev] java.lang.SecurityException
Date: 2005-04-20 10:15:26
Message-ID: 2276557F1C7668499FF59EC75B84624FC7A6B3@salsa.cefriel.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

I wrote a litlle class test to see pljava in action. This class named
test.jar and the jar name used in the install routine is test_luca.

My procedure is very simple:

public class Test {

public static String test() {

String ret = "nu cazz!!!!!!!!";

try {


Class.forName("org.postgresql.Driver");

String url =
"jdbc:postgresql://myhost/mydb";

Properties props = new Properties();

props.setProperty("user", "user");

props.setProperty("password",
"password");

Connection conn =
DriverManager.getConnection(url, props);

Statement s =
conn.createStatement();

int uid = 13;

String _url = "some url";

String sql = "insert into
request(UID, url) values(" + uid + ", '" + _url + "')";

s.execute(sql);

s.close();

s = conn.createStatement();

sql = "select * from request where
uid = 13";

ResultSet rs = s.executeQuery(sql);

rs.first();

ret = rs.getString("url");

rs.close();

conn.close();

} catch (ClassNotFoundException e) {

// TODO Auto-generated catch block

ret = "non ho trovato la classe del
dirver jdbc!!";

//e.printStackTrace();

} catch (SQLException e1) {

ret = e1.getMessage();

//e1.printStackTrace();

}

return ret;

}

}

when I try to execute this is the result:

SELECT test_luca();

ERROR: java.lang.SecurityException: read on \C:\Program
Files\PostgreSQL\8.0\jdbc\postgresql-8.0-310.jdbc3.jar

Some body can help me?

Thanks in advance,

Luca

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20050420/7e4d1b18/attachment.html>

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Thomas Hallgren 2005-04-20 10:20:17 [Pljava-dev] java.lang.SecurityException
Previous Message Thomas Hallgren 2005-04-20 10:13:47 [Pljava-dev] SecurityException read file