I can dynamically add a local portlet to a dynamically added portal page via this code just fine, but when I try to add a remote portlet it displays "This portlet is temporarily disabled." and the log says:

ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: WSRP proxy portlet. Exception thrown : javax.servlet.ServletException: java.lang.IllegalArgumentException: A ObjectID must be provided.
    at com.ibm.ws.portletcontainer.invoker.impl.PortletService.doDispatch(PortletService.java:369)

The code I am using is:

final Context ctx = new InitialContext();
final Name uniqueName = new CompositeName("portal:uniquename");
ObjectID oidForUniqueName = (ObjectID) ctx.lookup(uniqueName);
com.ibm.portal.dynamicui.DynamicUICtrl DynamicUICtrl = dynamicUIManagerFactoryService.getDynamicUICtrl(request, response, EXTENSION_NODE_FOR_UNIQUE_NAME);
ObjectID launchedPortletID = DynamicUICtrl.addPortlet(oidForUniqueName, new LocalizedImpl("Remote Portlet", "Testing Remote Portlet"), null);
RedirectURLGenerator redirector = redirectService.getURLGenerator(request, response);
EngineURL redirectURL = redirector.createPortletURL(launchedPortletID);

The portlet is being added to the page, but it is just erroring. Any information would be greatly appreciated.

Thank you.