Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hi,
I am getting the following error while creating a link between a checked out working copy of a part and a child part.
(wt.vc.wip.wipResource/0) wt.vc.wip.WorkInProgressException: The object was improperly initialized (i.e., it was null).
at wt.method.RemoteMethodServer.invoke(RemoteMethodServer.java:795)
at wt.services.ServiceFactory$ClientInvocationHandler.invoke(ServiceFact
ory.java:349)
at $Proxy8.checkout(Unknown Source)
at com.injector.Injector_Test.main(Injector_Test.java:201)
Any suggestions on how to solve this error ?
Code for reference :
WTPart part = WTPart.newWTPart(
"Part1", "MyPart");PersistenceHelper.
manager.save(part);WTPart childPart = WTPart.newWTPart(
"CPart1", "MyChildPart");PersistenceHelper.
manager.save(childPart);WTPart Workingcopy = (WTPart)WorkInProgressHelper.
service.checkout(part, null, null).getWorkingCopy();PersistenceHelper.
manager.save(link);WorkInProgressHelper.
service.checkin(Workingcopy,null);WTPartUsageLink link = WTPartUsageLink.newWTPartUsageLink(Workingcopy, (WTPartMaster) childPart.getMaster());