Solved

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

Posted on 2004-08-04
13
300 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Error in @AspectJ Based AOP with Spring 2 24
What's wrong with this code? 4 36
Java syntax, or is it Selenium 6 43
Html split(text) 2 32
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

696 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