Skip to main content
November 25, 2010
Question

how to create groups using LoadFromFile utility

  • November 25, 2010
  • 8 replies
  • 2902 views

hi,

I tried to create a groups by LoadFromFile Utility, but i got the errors like
these,

C:\ptc\Windchill_9\Windchill\loadFiles>windchill wt.load.LoadFromFile -d groups.xml

Error detected in createUserGroup <ast authors=">
Loader method wt.load.LoadUser.createUserGroup reported a failure
No objects were imported due to the error.
Unexpected problem in export/import process.
Nested exception is: wt.util.WTException: Loader method wt.load.LoadUser.createUserGroup reported a failure Error loading data from file.
data file = <groups.xml,c:\ptc\windchill_9\windchill\loadfiles\groups.xml>
map file = <null,null>
token separator = <null,null>
method = <null,create>
user = <null>
Command line = <{}>
Unexpected problem in export/import process.
Nested exception is: wt.util.WTException: Loader method wt.load.LoadUser.createUserGroup reported a failure

and my groups.xml file :


<nmloader>
<csvusergroup handler="wt.load.LoadUser.createUserGroup">
<csvuser></csvuser>
<csvgroupname>Authors</csvgroupname>
<csvusername>ast</csvusername>
</csvusergroup>
<csvusergroup handler="wt.load.LoadUser.createUserGroup">
<csvuser></csvuser>
<csvgroupname>Authors</csvgroupname>
<csvusername>ddb</csvusername>
</csvusergroup>
</nmloader>


What am I missing?


- Shreyas Atre

8 replies

November 26, 2010

Shreyas

The xml you're using is supposed to add existing user to existing group. So you're probably getting the error because you have no 'ast' user and/or have no 'Authors' group in the container you're trying to load data (Site level in your case, since you're not using the -CONT_PATH)

To just create a group, use the following:

<nmloader>
<csvgroup handler="wt.load.LoadUser.createGroup">
<csvuser></csvuser>
<csvgroupname>TestGroup</csvgroupname>
<csvdescription>TestDataLoadGroup</csvdescription>
</csvgroup>
</nmloader>

November 26, 2010

thanks Dmitry,

Now I m able to create group, but how to add existing user to group I am using

<nmloader>
<csvgroup handler="wt.load.LoadUser.createGroup">

<csvuser></csvuser>
<csvgroupname>TestGroup</csvgroupname>
<csvdescription>TestDataLoadGroup</csvdescription>
<csvusername>approver1</csvusername>
</csvgroup>
</nmloader>

it gives error

C:\ptc\Windchill_9\Windchill\loadFiles>windchill wt.load.LoadFromFile -d groups.xml -u wcadmin -p wcadmin -CONT_PATH \"/wt.inf.container.OrgContainer=Royal"

Error in XML input file Error loading data from file.

data file = <groups.xml,c:\ptc\windchill_9\windchill\loadfiles\cust\groups.xml>

map file = <null,null>

token separator = <null,null>

method = <null,create>

user = <null>

Command line = <{CONT_PATH=/wt.inf.container.OrgContainer=Royal}>

Error in XML input file

Approver1 is existing user in Royal org,what I am missing?

- Shreyas

1-Visitor
November 26, 2010
Try createGroupGroup example of usage in sample load files.

Everything you need to know is in the example xml load files, just open them up and you'll figure this out in no time.


Sent from my Verizon Wireless BlackBerry
1-Visitor
November 27, 2010
Sheyas,

Try this for loading users into groups.

<csvusergroup handler="wt.load.LoadUser.createUserGroup">
<csvuser></csvuser>
<csvgroupname>PDMLink Users</csvgroupname>
<csvusername>cd03882</csvusername>
<csvdirectoryservice></csvdirectoryservice>
</csvusergroup>


This is what I used to load users into groups.

HTH,

Alexius C. Chukwuka
JDPS Division SAP BASIS Team
John Deere Power Systems
November 27, 2010

Shreyas, use


<nmloader>
<csvusergroup handler="wt.load.LoadUser.createUserGroup">
<csvuser></csvuser>
<csvgroupname>TestGroup</csvgroupname>
<csvusername>approver1</csvusername>
</csvusergroup>
</nmloader>

to add existing user to existing group.

Also, since you're using -CONT_PATH \"/wt.inf.container.OrgContainer=Royal" when adding approver1 to the group TestGroup, make sure you have the group created in the Royal org, not on the Site level.


In Reply to Shreyas Atre:

thanks Dmitry,

Now I m able to create group, but how to add existing user to group I am using

<nmloader>
<csvgroup handler="wt.load.LoadUser.createGroup">

<csvuser></csvuser>
<csvgroupname>TestGroup</csvgroupname>
<csvdescription>TestDataLoadGroup</csvdescription>
<csvusername>approver1</csvusername>
</csvgroup>
</nmloader>

it gives error

Approver1 is existing user in Royal org,what I am missing?

- Shreyas


November 30, 2010
Thanks Dmitry Tsarev,Alexius Chukwuka your suggestion works for me.
1-Visitor
May 17, 2013

Hi All,



I'm trying to load and existing user to an existing group using the LoadFrom File utility and i'm getting an error



G:\PTC\Windchill_10.0\Windchill\loadFiles>windchill wt.load.LoadFromFile -d C:\Kiran\User_List\05-16-2013\testgroup.xml
Error detected in createUserGroup <emp00264 norma_applications_engineers=">
Loader method wt.load.LoadUser.createUserGroup reported a failure
No objects were imported due to the error.
Unexpected problem in export/import process.
Nested exception is: wt.util.WTException: Loader method wt.load.LoadUser.createUserGroup reported a failure Error loading data from file.
data file = <c:\kiran\user_list\05-16-2013\testgroup.xml,c:\kiran\user_list\05-16-2013\testgroup.xml>
map file = <null,null>
token separator = <null,null>
method = <null,create>
user = <null>
Command line = <{}>
Unexpected problem in export/import process.
Nested exception is: wt.util.WTException: Loader method wt.load.LoadUser.createUserGroup reported a failure




This is my xml file.





<nmloader>

<csvusergroup handler="wt.load.LoadUser.createUserGroup">
<csvuser></csvuser>
<csvgroupname>NORMA_Applications_Engineers</csvgroupname>
<csvusername>emp00264</csvusername>
<csvdirectoryservice></csvdirectoryservice>
</csvusergroup>

</nmloader>



Any suggestions would be helpful.



Thanks,



Kiran Lakshminarayanan

20-Turquoise
May 17, 2013
On 05/17/13 11:59, Kiran Lakshminarayanan wrote:
>
> Hi All,
>
> I'm trying to load and existing user to an existing group using the LoadFrom File utility and i'm
> getting an error
>
> G:\PTC\Windchill_10.0\Windchill\loadFiles>windchill wt.load.LoadFromFile -d
> C:\Kiran\User_List\05-16-2013\testgroup.xml
> Error detected in createUserGroup <emp00264 norma_applications_engineers=">
> Loader method wt.load.LoadUser.createUserGroup reported a failure
> No objects were imported due to the error.
> Unexpected problem in export/import process.
> Nested exception is: wt.util.WTException: Loader method wt.load.LoadUser.createUserGroup reported
> a failure Error loading data from file.
> data file = <c:\kiran\user_list\05-16-2013\testgroup.xml,c:\kiran\user_list\05-16-2013\testgroup.xml>
> map file = <null,null>
> token separator = <null,null>
> method = <null,create>
> user = <null>
> Command line = <{}>
> Unexpected problem in export/import process.
> Nested exception is: wt.util.WTException: Loader method wt.load.LoadUser.createUserGroup reported
> a failure
>
> This is my xml file.
>
>
>
> <nmloader>
>
> <csvusergroup handler="wt.load.LoadUser.createUserGroup">
> <csvuser></csvuser>
> <csvgroupname>NORMA_Applications_Engineers</csvgroupname>
> <csvusername>emp00264</csvusername>
> <csvdirectoryservice></csvdirectoryservice>
> </csvusergroup>
>
> </nmloader>
>
> Any suggestions would be helpful.
>

Leave out the csvDirectoryService?
When I loaded existing users into existing groups I used the following format for csvUserGroup

<csvusergroup handler="wt.load.LoadUser.createUserGroup">
<csvuser></csvuser>
<csvgroupname>Corporate</csvgroupname>
<csvusername>dougjone</csvusername>
</csvusergroup>

> Thanks,
>
> Kiran Lakshminarayanan
>
>
> -----End Original Message-----


--
------------------------------------------------------------------------
Randy Jones
Systems Administrator
Great Plains Mfg., Inc.
1525 E North St
PO Box 5060
Salina, KS USA 67401
email: -
Phone: 785-823-3276
Fax: 785-667-2695
------------------------------------------------------------------------