This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes JDBC security violation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC security violation" Watch "JDBC security violation" New topic
Author

JDBC security violation

Krishna Chaitanya Reddy Kuninti
Greenhorn

Joined: May 29, 2007
Posts: 13
Hi all,

I have a query....

I read a java article saying that any JDBC driver that uses native code to access DB causes security violation exception in Applets.

My doubt is, Why the security violation exception occur in Applets when a JDBC driver (Type1 and Type2) uses native code to access DB?

I will be very glad if any one could clear my doubt.

regards,
Krishna
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41034
    
  43
That's one of the restrictions of the sandbox in which the JVM runs applet as a security measure. Since the JVM has no control over what native code does (as opposed to to what Java code does, which the JVM can control), it forbids any execution of native code. More information about the sandbox can be found here.

The way around the restriction is either to sign the applet, or to relax the local security policy; both approaches are described here.
[ September 11, 2007: Message edited by: Ulf Dittmer ]

Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC security violation
 
Similar Threads
Doubt on using third party driver?
problems on applet in jdbc
jdbc connectivity in applet
Assertion doubt in K&B
Applet connecting Database Error