Solved

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

Posted on 2004-08-04
13
296 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
Comment Utility
>>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
Comment Utility
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:mayankeagle
mayankeagle earned 166 total points
Comment Utility
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
 
LVL 30

Expert Comment

by:mayankeagle
Comment Utility
>> The applet is signed.

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

Expert Comment

by:CEHJ
Comment Utility
>>The applet is signed.

It hasn't been signed with adequate permissions then, as it's denying you read on that property
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 3

Author Comment

by:rotemben
Comment Utility
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
Comment Utility
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
Comment Utility
make sure you have signed all the jars for your applet.
0
 
LVL 3

Author Comment

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

get back to you on that..
0
 
LVL 30

Expert Comment

by:mayankeagle
Comment Utility
Sure..
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
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 arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

744 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

13 Experts available now in Live!

Get 1:1 Help Now