Reputation: 185
This may be old error but I am stuck here.
I created Java applet to access an Oracle database. I am going to put this applet in Local Network. My applet works fine in Eclipse and Netbeans but when I run through 'appletviewer' it goes at connection string and showing an error:
Error e java.security.AccessControlException: access denied (
"java.util.PropertyPermission" "oracle.net.wallet_location" "read")
I already signed applet using this Oracle technique for Signed Applets.
I used the user of database who has full rights. Also when I run using policy file, it shows the same error.
How do I connect the applet to the database successfully?
The HTML used to load the applet is:
<applet
code=tree.pacg.DrawApplet.class
codebase=c:\tree\pacg
archive=DrawApplet.jar,ojdbc14.jar
height="800"
width="1000">
</applet>
Upvotes: 2
Views: 1842
Reputation: 168825
when i run the applet in ie, it show security warning Java has discovered application components that could indicate a secuirty concern.
Something like this?
BTW - if you click No at this point, the code should not be blocked and should therefore run.
But even seeing that dialog is a nuisance. If it can be confusing to developers, it is bound to be confusing to an end user.
See Mixing Signed and Unsigned Code Ensuring Application and Applet Security for an explanation of this behavior. But see particularly Deploying Signed Applications and Applets Securely Without a Mixed Code Warning for how to allow mixing of unsigned & signed code.
The other alternative - to sign all Jars using the same certificate - also works, but is sometimes forbidden by deployment licenses or other factors.
Me.
3)
ojdbc14.jar
needs to be digitally signed when deploying this way. Isojdbc14.jar
digitally signed?
OP.
3) ojdbc14.jar is a oracle database drivers so that they are already signed
..followed 4 hours later by..
I signed the ojdbc14.jar file and it works !!
Upvotes: 1
Reputation: 185
Its solved !!
I signed the ojdbc14.jar file and it works !!
also I create new policy file and gave it 'All' access permission then it also work through 'appletviewer'
Thanks..Thank you sir..
Upvotes: 1