Skip to main content
1-Visitor
October 13, 2011
Question

LoadFromFile : ACL rules loading error

  • October 13, 2011
  • 2 replies
  • 6966 views

Hello,

In my Windchill configuration (9.1M060), I have only 1 site and 1 organization.

I want to load some ACL for my organization directly in command line with the LoadFromFile command within a WindchillShell.

First step

Create the XML file csv file with the CSV2XML utility : it's ok.

Following, a sample of the xml file created

<?xml version="1.0" ?><!DOCTYPE NmLoader SYSTEM "standardX10.dtd">

<NmLoader>

<csvAccessRule handler="wt.load.LoadUser.createAccessRule" >

<csvuser>wcadmin</csvuser>

<csvdomain>/Default</csvdomain>

<csvtypeId>wt.epm.EPMDocument</csvtypeId>

<csvpermission>+</csvpermission>

<csvprincipal>MEMBERS</csvprincipal>

<csvpermissionList>7/15</csvpermissionList>

<csvstate>OBSOLETE</csvstate>

</csvAccessRule>

</NmLoader>

Second Step

Load the rules

From a windchill shell, i launch the folowing command :

windchill wt.load.LoadFromFile -d D:\ptc\Windchill\src\loadFiles\CDA_LoaderACL.xml -u <pwd> -p <pwd>

So, I obtain the error :

Principal "MEMBERS" not found.

Méthode de chargement wt.load.LoadUser. createAccessRule a signalé une erreur.

Aucun objet n'a été importé en raison d'une erreur.

Problème inattendu lors de l'exportation/importation.

Exception imbriquée: wt.util.WTException: Méthode de chargement wt.load.LoadUser. createAccessRule a signalé une erreur. E

data file = <D:\ptc\Windchill\src\loadFiles\CDA_LoaderACL.xml,D:\ptc\Windchill\src\loadFiles\CDA_LoaderACL.xml>

map file = <null,null>

token separator = <null,null>

method = <null,create>

user = <null>

Command line = <{}>

Problème inattendu lors de l'exportation/importation.

Exception imbriquΘeá: wt.util.WTException: Méthode de chargement wt.load.LoadUser. createAccessRule a signalé une erreur.

I don''t undestand the first message concerning MEMBERS : the key MEMBERS exist in the file RoleRB.RB.ser

I have open a PTC call the 11th-Oct-2011. No answer today.

I hope for better luck with the forum.

Thanks for your help

2 replies

1-Visitor
October 18, 2011

I don't think there's a site level principal (group) named MEMBERS. Look in the loadfiles and loadxmlfiles directories. loadfiles/ddl/VariantSpecACL.xml, for example. Under AccessControlRule, there's a WTPrincipalReference entry.

1-Visitor
March 1, 2013

Hi Matthew,

I tried VariantSpec example and I am getting the following errors:


D:\ptc\Windchill_10.1\Windchill>windchill wt.load.LoadFromFile -d "D:\ptc\Windch
ill_10.1\Windchill\loadFiles\Option Manager.xml" -CONT_PATH/
3

D:\ptc\Windchill_10.1\Windchill>windchill wt.load.LoadFromFile -d "D:\ptc\Windch
ill_10.1\Windchill\loadFiles\Option Manager.xml -CONT_PATH/"
Data file not readable "D:\ptc\Windchill_10.1\Windchill\loadFiles\Option Manager
.xml -CONT_PATH/". Error loading data from file.
data file = <D:\ptc\Windchill_10.1\Windchill\loadFiles\Option Manager.xml -CONT_
PATH/,null>
map file = <null,null>
token separator = <null,null>
method = <null,null>
user = <null>
Command line = <{}>
Data file not readable "D:\ptc\Windchill_10.1\Windchill\loadFiles\Option Manager
.xml -CONT_PATH/".

D:\ptc\Windchill_10.1\Windchill>

Can you enlighten?

1-Visitor
March 4, 2013

Hi Vincent,

Please try the following,

<?xml version="1.0" ?><!DOCTYPE NmLoader SYSTEM standardX10.dtd>

<NmLoader>

<csvAccessRule handler="wt.load.LoadUser.createAccessRule" >

<csvuser>wcadmin</csvuser>

<csvdomain>/Default</csvdomain>

<csvtypeId>wt.epm.EPMDocument</csvtypeId>

<csvpermission>+</csvpermission>

<csvprincipal>teamMembers</csvprincipal>

<csvpermissionList>7/15</csvpermissionList>

<csvstate>OBSOLETE</csvstate>

</csvAccessRule>

</NmLoader>

also, Please load the ACL against of any context (Product or Library).

The below you can try it as .xml file.

<?xml version="1.0" encoding="UTF-8"?>

<Rule>

<AccessControlRule>

<domainName>/Default</domainName>

<externalTypeId>wt.epm.EPMDocument</externalTypeId>

<lifecycleState>OBSOLETE</lifecycleState>

<WTPrincipalReference isInternal="true">

<groupName>teamMembers</groupName>

<groupType>teamMembers</groupType>

</WTPrincipalReference>

<grantPermissionSet>

<AccessPermissionSet>

<permissionField name="READ"/>

<permissionField name="DOWNLOAD"/>

</AccessPermissionSet>

</grantPermissionSet>

</AccessControlRule>

</Rule>

this will also work for you.

BR

MKR

1-Visitor
March 4, 2013

Hi MKR,

I m still getting the error which Vincent had.

What has to be written in <csvprincipal> tag? Group name or role name?

1-Visitor
March 4, 2013

FYI , I tried the snippet of xml code which u had provided..It still didnt work..giving the same errors