 |
|
 |
Subject: Person doc is created not mail file and I get Notes error: You are not authorized to perform that operation |
 |
 |
 |
Product Area: Other |
 |
Technical Area: Administration |
 |
Platform: Windows |
 |
Release: 8.5.3 |
 |
Reproducible: Always |
 |
 |
 |
 |
My Java program is partially-registering a new user but then throwing:
"NotesException: Notes error: You are not authorized to perform that operation (Smith)". I'd like to know why and if I can ignore it, since the user does seem to be created.
I'm trying to create users in bulk. At the moment, I'm trying to create a single user to test the principle.
On my workstation, I have the Notes, Domino Admin and Domino Designer 8.5.3 clients and I have installed Eclipse Java EE Juno (20120614-1722) and JDK 1.5.0u22. I'm using this because I got it to work quickly and I couldn't get anything to run in the Designer. I am not a Domino developer. Or even a Domino admin, really.
I log into Domino Admin as the original administrator created when I installed Notes. I can register new users using the Admin client.
This is my Java class:
package jlp.domino.utilities;
import lotus.domino.*;
public class personManager implements Runnable
{
public static void main(String[] args)
{
personManager t = new personManager();
NotesThread nt = new NotesThread((Runnable)t);
nt.start();
}
public void run()
{
String idPath = "C:\\Program Files\\IBM\\Lotus\\Notes\\Registrations\\";
String adminPwd = "Passw0rd";
try
{
Session session = NotesFactory.createSession(
(String)null, (String)null, adminPwd);
String p = session.getPlatform();
System.out.println("Platform = " + p);
DateTime expirationDateTime = session.createDateTime("Today");
expirationDateTime.setNow();
expirationDateTime.adjustYear(20);
Registration reg = session.createRegistration();
reg.setRegistrationServer("TESTSERVER1A"); // must call this first
reg.setCreateMailDb(true);
reg.setCertifierIDFile("C:\\Program Files\\IBM\\Lotus\\Notes\\Data\\cert.id");
reg.setExpiration(expirationDateTime);
reg.setIDType(Registration.ID_HIERARCHICAL);
reg.setMinPasswordLength(5);
reg.setNorthAmerican(false);
reg.setRegistrationLog("log.nsf");
reg.setUpdateAddressBook(true);
reg.setStoreIDInAddressBook(false);
reg.setEnforceUniqueShortName(true);
String shortName = "bsmith";
String idFilePath = idPath + shortName + ".id";
System.out.println("ID file path: " + idFilePath);
String mailFilePath = "mail\\" + shortName + ".nsf";
System.out.println("MailFile: " + mailFilePath);
reg.setShortName(shortName);
Boolean result = reg.registerNewUser(
"Smith", // last name
idFilePath, // file to be created
"CN=TESTSERVER1A/O=TST_DOMpp", // mail server
"Bob", // first name
"", // middle initial
"Passw0rd", // certifier password
"", // location field
"", // comment field
mailFilePath, // mail file
"", // forwarding domain
"Passw0rd"); //user password
if (result)
{
System.out.println("Registration succeeded");
}
else
{
System.out.println("Registration failed");
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
The .id file is created but the mail\xxxx.nsf file is not created. The console says "ATTEMPT TO ACCESS DATABASE mail\JDoe.nsf by ... was denied".
 
Feedback number WEBB8YGG5E created by ~Julia Desluvitchgon on 09/25/2012

Status: Open
Comments:

Person doc is created not mail file... (~Julia Desluvit... 25.Sep.12)
. . SOLVED (~Julia Desluvit... 25.Sep.12) |
|  |
|