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

Hi All,
When using the new rowset.jar inside an applet, i'm getting the following exception: access denied (java.util.PropertyPermission read)
at Source)
at 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.


Who is Participating?
CEHJConnect With a Mentor Commented:
>>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 read
rotembenAuthor Commented:

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.


Mayank SConnect With a Mentor Associate Director - Product EngineeringCommented:
That's not a problem with the CachedRowSet. CEHJ is right, you'll need to sign the Applet with a test-certificate.

Another quick option is to modify the policy but that's not a good approach.
The new generation of project management tools

With’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Mayank SAssociate Director - Product EngineeringCommented:
>> The applet is signed.

Ah, sorry that message was not there when I posted my comment.
>>The applet is signed.

It hasn't been signed with adequate permissions then, as it's denying you read on that property
rotembenAuthor Commented:
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.

Changing the policy won't do you much good as anyone wanting to use it would need to do the same.
objectsConnect With a Mentor Commented:
make sure you have signed all the jars for your applet.
rotembenAuthor Commented:
that i need to check, i have 3-4 other jars.

get back to you on that..
Mayank SAssociate Director - Product EngineeringCommented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.