Novell is now a part of Micro Focus

Using Java Beans for Novell Services, I've created...

Articles and Tips: qna

01 Jun 2002


Q.

Using Java Beans for Novell Services, I've created a Home Directory, restricted the directory's size, and added a trustee to the directory, all without any problem.

But when I set the Home Directory property to the user, I get the error, "NWNamingException." I'm not sure if it's a syntax error with NWValuePath object or not.

The code looks like this:

NWValuePath hd = new
NWValuePath(nwdirbean1,"NDS:\\\\tree_
		name\\context\\volume_name",
		"dir1\\dir2", (long)com.novell.
		beans.NWDir.NWValuePath.DS_OS2);
		entry.setFieldValue("Home 
		Directory",		hd);
entries.addElement(entry);   
		// NWNaming exeption.

A.

This is just a syntax issue. The correct syntax of the Volume name must be given in DOT format. It can be fixed as follows:

NWValuePath hd = new NWValuePath
		(nwdirbean1,"context.volume_name",
		"dir1\\dir2", (long)com.novell.
		beans.NWDir.NWValuePath.DS_OS2);
		entry.setFieldValue("Home 
		Directory",		hd);

(Taken from the Beans for Novell Services DeveloperNet Newsgroup.)

* Originally published in Novell AppNotes


Disclaimer

The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.

© Copyright Micro Focus or one of its affiliates