Solved

CachedRowSetImpl causing Applet Security exception when calling it's .properties

Posted on 2004-08-04
13
298 Views
Last Modified: 2010-03-31
Hi All,
When using the new rowset.jar inside an applet, i'm getting the following exception:

java.security.AccessControlException: access denied (java.util.PropertyPermission rowset.properties read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at javax.sql.rowset.spi.SyncFactory.initMapIfNecessary(Unknown Source)
at javax.sql.rowset.spi.SyncFactory.getInstance(Unknown Source)

I'v gone to alot of trouble not having to change the policy files, but it seems rowset has to get it's properies file.

what i don't get is if the file is inside the jar that comes with the applet, why do i get the security exception?

Fix: the problem is it's using System.Property which lits up the java security...

any help would be great.

tnx!

Rotem
0
Comment
Question by:rotemben
  • 3
  • 3
  • 2
  • +1
13 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 168 total points
ID: 11717675
>>I'v gone to alot of trouble not having to change the policy files

I fear you're going to have to do that or sign it, in order to read

>>java.util.PropertyPermission rowset.properties read
0
 
LVL 3

Author Comment

by:rotemben
ID: 11717862
Hi,

The applet is signed.

there is no option of changing the policy file of each user who will see this applet.

So i'm not using a connection to a db, but calling an xml, which made this possible not to change the policy file.

Only this iritating CachedRowSetImpl calling System.Property on me ruins everything.

I need to find another way to create a resultset from an xml, not using the cached one.

Tnx

Rotem
0
 
LVL 30

Assisted Solution

by:Mayank S
Mayank S earned 166 total points
ID: 11717878
That's not a problem with the CachedRowSet. CEHJ is right, you'll need to sign the Applet with a test-certificate.

http://www.mindprod.com/jgloss/signedapplets.html

http://personal.vsnl.com/sureshms/javasign1.html

Another quick option is to modify the policy but that's not a good approach.
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 30

Expert Comment

by:Mayank S
ID: 11717892
>> The applet is signed.

Ah, sorry that message was not there when I posted my comment.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 11718016
>>The applet is signed.

It hasn't been signed with adequate permissions then, as it's denying you read on that property
0
 
LVL 3

Author Comment

by:rotemben
ID: 11718205
Hi,
As far as i know, when you sign an applet, you don't get to set permissions.

this should be done in the policy file....

please correct me if i am wrong.

Rotem
0
 
LVL 92

Expert Comment

by:objects
ID: 11721994
Changing the policy won't do you much good as anyone wanting to use it would need to do the same.
0
 
LVL 92

Assisted Solution

by:objects
objects earned 166 total points
ID: 11722021
make sure you have signed all the jars for your applet.
0
 
LVL 3

Author Comment

by:rotemben
ID: 11723795
Hm..
that i need to check, i have 3-4 other jars.

get back to you on that..
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 11725545
Sure..
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need to track down Infection in a Server 2008 domain user profile 7 51
servlet example issue 6 38
tomcat startup error 5 59
maven module vs maven project 3 21
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now