Solved

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

Posted on 2004-08-04
13
299 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
more than one jdk and one jre 1 50
factorial example 4 47
tomcat not starting 6 62
Detect Closed Loops (circles, figure-8s, etc) in PNG Images 6 56
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 last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

766 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