cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

LoadFromFile : ACL rules loading error

VincentSion
1-Visitor

LoadFromFile : ACL rules loading error

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

9 REPLIES 9

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.

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?

rmk
7-Bedrock
7-Bedrock
(To:VincentSion)

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

ptc-4698385
1-Visitor
(To:rmk)

Hi MKR,

I m still getting the error which Vincent had.

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

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

rmk
7-Bedrock
7-Bedrock
(To:ptc-4698385)

Hi Sweta,

I have tested the following code for a test product, it works great.

My WC is 10.1 M20.

1. Please paste the following code as xml file

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

<NmLoader>

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

<csvuser></csvuser>

<csvdomain>/Default</csvdomain>

<csvtypeId>WCTYPE|wt.fc.WTObject</csvtypeId>

<csvpermission>+</csvpermission>

<csvprincipal>MEMBERS</csvprincipal>

<csvpermissionList>0/6/10/12/13/14</csvpermissionList>

<csvstate>OBSOLETE</csvstate>

<csvallExceptPrincipal></csvallExceptPrincipal>

</csvAccessRule>

</NmLoader>

2. Place the file under %wt_home%\loadFiles\testing

3. Run the command.

windchill wt.load.LoadFromFile -d %wt_home%\loadFiles\testing\test_acl.xml -CONT_PATH \"/wt.inf.container.OrgContainer=MDT_Test/wt.pdmlink.PDMLinkProduct=Product_101\"

i tested the above code, it work fine.Please attach the log file.

in case any issue, please drop a call.

MKR

9611343094

ptc-4698385
1-Visitor
(To:rmk)

Hi MKR,

I tried this code..It worked fine..However I was looking for creating ACLs at the Organization level. So for that I am trying

to load using this command:

windchill wt.load.LoadFromFile -d %wt_home%\loadFiles\testing\test_acl.xml -CONT_PATH \"/wt.inf.container.OrgContainer=MDT_Test"

using the same XML...

But its is throwing this error : MEMBERS not found. Kindly guide.

Hello,

The error Principal "MEMBERS" not found is known issue and the workaround exist with a shared team.


Create the share team on org lvl with the roles for which you would like to load the ACL.

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

If the share team exist the roles are found and ACL are loaded on org lvl.

Best Regards

Petr Helesic.

It is not working for a particular role say" Author" or "Option Engineer"

Announcements


Top Tags