cancel
Showing results for 
Search instead for 
Did you mean: 

WDRuntimeException: Duplicate instance exception

Former Member
0 Kudos

Hello,

I am not able to figure out this exception.


com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Duplicate instance exception: There is already an instance of view CourseDetails in component CourseRegistrationComp.
	at com.sap.tc.webdynpro.progmodel.controller.Component.addViewController(Component.java:137)
	at com.sap.tc.webdynpro.progmodel.view.View.setUsage(View.java:816)
	at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:706)
	at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:579)
	at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:155)
	at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.doOpen(WebDynproWindow.java:295)
	at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.handle(ApplicationWindow.java:258)
	at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.handleWindowEvents(ApplicationWindow.java:238)
	at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:149)
	at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321)
	at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
	at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
	at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
	at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
	at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
	at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
	at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
	at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
	at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
	at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
	at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
	at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
	at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
	at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
	at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
	at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
	at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)

how to fix this...

Thanks

Srinivas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Srinivas,

Please explain what you are try to do.

Is the CourseDetails details view called from within itself? Looks like you are trying to instaniate it again.

Regards,

Kartikaye

Former Member
0 Kudos

Hi Kartikaye,

I am embedding 5 views in a window. There is one home page view. Each view is also embedded in a separate window

downloadView

l

l

scheduleView--


HomeView--


CourseDetailsView

l

l

RegisterStudentView

The links are connected using inbound and outbound plugs

In the HomeView, through a button action, am calling a component Controller method.


//Preparing window object
	 scheduleWindow = wdComponentAPI.getWindowManager().createModalWindow(wdComponentAPI.getComponentInfo().findInWindows("ScheduleCourse"));
	 // setting window position
	 scheduleWindow.setWindowPosition(WDWindowPos.CENTER);
	 scheduleWindow.show();

And in the popup View, through another button action, am calling another component Controller method.


scheduleWindow.destroyInstance();

Any thing wrong here...

Srinivas

Former Member
0 Kudos

Hi Srinivas,

Deplicate View usage is not allowed in Web Dynpro.

You can refer to the post for more info:

Regards,

Kartikaye

Former Member
0 Kudos

Hi Kartikaye,

How to implement this scenario then:

In view 1, on a button click, a pop-up window appears with view2 ?

Former Member
0 Kudos

Hi Srinivas,

Then you dont need to embed view2 in both the windows.

Remove view2 from the default window and embed it only in the window called for the pop up.

Regards,

Kartikaye

Former Member
0 Kudos

Hi Kartikaye,

Thanks, its working, after I also deleted the inbound, outbound plugs.

Former Member
0 Kudos

Hi Srinivas,

Please grant the points for the correct answers.

Thanks,

Kartikaye

Answers (0)