In my last article, I've been mentioned about JDBC connectivity with Oracle. I've given proposal to my business owners and they've chosen JDBC instead LS LCX to keep less burden on Domino server.So I'm going to spend some more time in Java :)

Today I've encountered strange network issue in my Lotus designer while accessing some of my U.S servers.I thought there might be some issues with network connectivity ,but everything was fine except my Notes client.After all my troubleshooting I've uninstalled my R8.5 and started installing R8.0(non basic edition).At the end of R8.0 installation , I got pop-up saying some of the features didn't installed but installation was successful. I thought may be some optional stuffs were not installed , Once I've started my Notes Client , It throws another pop-up saying "There is an error encountered , look into the log file under workspace folder in domino directory".I found there was some error in installing/configuring JVM.Soon I've realized my client got corrupted and need to re-install again.It's hard to believe but I've re-installed R8.0 five times but ended up with same error.Finally I moved to R8.0 basic version and it looks fine so far. My first horrible experience in installing domino.

Once everything was done I thought to check my JDBC code whether it works or not , another surprise it got failed with following error ,





After spending an hour found the problem and solution. Here it is,

Reason:Security exceptions are encountered.

Problem:Java agent that utilizes certain classes and are receiving agent security restrictions at run-time. The agent does not run as expected.

Resolving the problem: Because the JVM applies the Java 2 Security Model to Java code running on the Domino server or Notes client, the JVM, or application code, can explicitly enforce access control against what methods can be called at runtime and what actions those methods can perform. This scenario is the most common Java Security error encountered under Domino. For example:


java.security.AccessControlException: access denied
(java.lang.RuntimePermission getClassLoader)


The above is a security exception thrown by the JVM when performing a getClassLoader() call. To correct the error, make an adjustment to the java.policy to grant this code the permissions that it requires. This file is located in \jvm\lib\security\java.policy. You can do this by either granting all permissions by adding the following line:

grant{
permission java.security.AllPermission;
}


Once done ; exit from designer ,restart your server and re-compile your java code.

How new installation has changed my java.policy file or R8.5 provides all permission default ?. Anyway after modification everything works well and good.

To be continued....

1 Response to "JDBC connectivity with Oracle in Domino-Part II"

  1. gravatar Martin Rolph (Oval) Says:

    Did you leave it like that? bit of a security risk!
    I've had to do the same thing to get some external jars to work. Now looking to refine it back to make it more secure again to just grant what it needs.

Leave a Reply

preload preload preload