This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC Problem.... Why no Answer

 
suresh subramanian
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
I am using Lotus Domino 5.0 and Lotus Domino JDBC Driver 1.1. When I run my applet in JView (MS Applet viewer)I don't have any problem. But When I tried in appletviewer, I am getting the following error.
Error Occured:Unable to load native library: access denied (java.lang.RuntimePer
mission loadLibrary.)
java.sql.SQLException: Unable to load native library: access denied (java.lang.R
untimePermission loadLibrary.)
at lotus.jdbc.domino.DominoEnvCLI.<init>(DominoEnvCLI.java)
at lotus.jdbc.domino.DominoDriver.<init>(DominoDriver.java)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:42)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:30)
at java.lang.reflect.Constructor.newInstance(Constructor.java:277)
at java.lang.Class.newInstance0(Class.java:301)
at java.lang.Class.newInstance(Class.java:254)
at sTest.fnGetNotesServer(sTest.java:39)
at sTest.init(sTest.java:16)
at sun.applet.AppletPanel.run(AppletPanel.java:344)
at java.lang.Thread.run(Thread.java:539)
***************************************
My Code is
import java.sql.*;
import java.util.*;
import java.applet.Applet;
import java.lang.*;
import java.awt.*;
import javax.swing.JApplet;
import lotus.jdbc.domino.*;
public class sTest extends Applet
{
protected String strMessage = new String("Initializing");
public void init()
{
strMessage = "Initializing";
fnGetNotesServer();
}
public void paint(Graphics g)
{
g.drawString(strMessage, 10, 30);
}
public void fnGetNotesServer()
{
java.sql.Connection con;
java.sql.DriverPropertyInfo[] outprops;
java.util.Properties inProps;
java.sql.Driver drv;
String strServerName = new String("local");
String strConnectionString = new String("jdbc omino:/Test.nsf/Sapphire/Personal");
Properties connProp = new Properties();
connProp = null;
try
{
try
{
drv = (Driver) Class.forName("lotus.jdbc.domino.DominoDriver").newInstance();
con = DriverManager.getConnection(strConnectionString);
if(con != null)
{
strMessage = "Connection Success";
repaint();
}
else
{
strMessage = "Connection Failure";
repaint();
}
}
catch(ClassNotFoundException e)
{
System.out.println("Error Occured:" + e.getMessage());
e.printStackTrace();
}
}
catch(Exception e)
{
System.out.println("Error Occured:" + e.getMessage());
e.printStackTrace();
}
}
}
*****************************************
The applet is signed.
Thanks in advance
Thanks & Regards
Suresh Subramanian
***************************************
[ January 03, 2002: Message edited by: suresh subramanian ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic