Solved

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

Posted on 2004-08-04
13
302 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

623 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