This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jul 7, 2011, 9:12 PM
298 Posts
topic has been resolvedResolved

Using the DB2 jar files with XPages

  • Category: Other
  • Platform: Windows
  • Release: 8.5.2
  • Role: Developer
  • Tags:
  • Replies: 6
I was experimenting with using DB2 from an XPage... Got it working just fine when I put the two DB2 jars into the jvm\lib\ext directory in either the server or client (for a local preview). But, moving the jars to the Web-INF\lib folder does not seem to work unless I change the java security to grant all permissions like:

grant {
permission java.security.AllPermission;

};



Obviously this is not a safe way to do this... I was trying to figure out a way to craft the security permissions to be more specific. I see in the error log a line that says
java.lang.SecurityException: not allowed to access system properties

I tried using the following permission in the java.policy file but that did not work:

grant codebase "xspnsf://server:0/test.nsf/WEB-INF/lib/-" {
permission java.security.AllPermission;
};

Has anyone figured out the right permissions to allow the DB2 jars to work if stored in the NSF?

thanks,

Howard
Jul 11, 2011, 5:11 PM
6 Posts
Try this
Haven't verified it, but this should work: grant codeBase "xspnsf://server:0/test.nsf/-" { permission java.security.AllPermission; }; Thomas - IBM
Jul 11, 2011, 8:22 PM
298 Posts
Were you missing an open curly brace?
I think the starting open curly brace was needed: grant codeBase "xspnsf://server:0/test.nsf/-" { permission java.security.AllPermission; }; But, even after adding that it still did not work. Howard
Jul 12, 2011, 5:50 PM
6 Posts
*Sorry; Yes, the opening brace needs to be there.
Jul 20, 2011, 2:35 PM
298 Posts
solved
The database name in the java.policy file has to be all lower case regardless of the case in the actual file name. Howard
Oct 16, 2014, 11:24 AM
1 Posts
Exact lines to modify java.policy

Hi All,

Thanks for sharing your experience. I am also facing same problem and unable to understand exactly where to add the brackets in the lines.

Please reply with the exact lines to be added. My database information is like:

Server: abc.com

DB Path: DB2/import.nsf

Thanks in advance.

Regards

Mahesh


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal