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

Unable to create a Object in Windchill due to access policy.

Highlighted
Level 4

Unable to create a Object in Windchill due to access policy.

Hi Friends,

 

I have started learning customizations and wasabout to create a Customized Object however it failing with message the "Domain administered Object is not assigned with the Domain"

 

com.infoengine.util.IEException; nested exception is: 
wt.util.WTRuntimeException: The domain administered object has no assigned domain.  Cannot check policy access.
 
I had assigned the Domain and Confainer reference as below still the issue.
WTContainerRef containerRef = WTContainerHelper.service.getByPath("wt.inf.container.OrgContainer=Test1/wt.pdmlink.PDMLinkProduct=Prod_1");
//pet.setContainerReference(containerRef);
pet.setContainerReference(containerRef);
AdministrativeDomain adminDomain = containerRef.getContainer().getDefaultDomain();
AdminDomainRef ref_admi = AdminDomainRef.newAdminDomainRef(adminDomain);
//pet.setContainer(adminDomain);
pet.setDomainRef(ref_admi);
SessionHelper.manager.setPrincipal("wcadmin");
Tags (1)
1 REPLY 1

Re: Unable to create a Object in Windchill due to access policy.

You can turn off the access control:

 

boolean accessEnforced = SessionServerHelper.manager.setAccessEnforced(false);
try {
....
} finally {
SessionServerHelper.manager.setAccessEnforced(accessEnforced);
}