on 07-25-2006 1:44 PM
Hi,
Every now and then we receive the java stack trace when trying to initalise a custom Web Dynpro application - i.e. navigating to it in our portal.
Anyone have any ideas what is causing it?
[code]com.sap.mw.jco.JCO$Exception: (132) JCO_ERROR_CONCURRENT_CALL: Concurrent call. Connection currently used in another thread.
com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: failed to create or init instance of model 'com.atosorigin.jsg.shape.model.PurchaseModel' in scope APPLICATION_SCOPE with instanceId 'null'
at com.sap.tc.webdynpro.progmodel.model.api.WDModelFactory.getOrCreateModelInstanceFromScopeMaintainer(WDModelFactory.java:340)
at com.sap.tc.webdynpro.progmodel.model.api.WDModelFactory.getModelInstance(WDModelFactory.java:154)
at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModelClass._associatedModel(DynamicRFCModelClass.java:204)
at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModelClass.associatedModelClassInfo(DynamicRFCModelClass.java:218)
at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModelClass.elementIndexForFrontendName(DynamicRFCModelClass.java:1362)
at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModelClass.setAttributeValueAsBoolean(DynamicRFCModelClass.java:532)
at com.atosorigin.jsg.shape.model.Z_Ep_My_Buildings_Input.setDebug_On(Z_Ep_My_Buildings_Input.java:222)
at com.atosorigin.jsg.shape.TripSelCustom.wdDoInit(TripSelCustom.java:283)
at com.atosorigin.jsg.shape.wdp.InternalTripSelCustom.wdDoInit(InternalTripSelCustom.java:310)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingCustomController.doInit(DelegatingCustomController.java:73)
at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.progmodel.controller.Component.getCustomControllerInternal(Component.java:436)
at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:374)
at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:403)
at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.initAttributeMapping(MappedAttributeInfo.java:308)
at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.init(MappedAttributeInfo.java:267)
at com.sap.tc.webdynpro.progmodel.context.NodeInfo.initAttributes(NodeInfo.java:672)
at com.sap.tc.webdynpro.progmodel.context.DataNodeInfo.doInit(DataNodeInfo.java:233)
at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:657)
at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:40)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
at com.sap.tc.webdynpro.progmodel.controller.Component.getCustomControllerInternal(Component.java:436)
at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.createComponentInternal(ComponentUsage.java:161)
at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.createComponent(ComponentUsage.java:110)
at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.createInstanceIfDemanded(ComponentUsage.java:699)
at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.getInterfaceControllerInternal(ComponentUsage.java:340)
at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.getControllerInternal(ComponentUsage.java:381)
at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:408)
at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.initAttributeMapping(MappedAttributeInfo.java:308)
at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.init(MappedAttributeInfo.java:267)
at com.sap.tc.webdynpro.progmodel.context.NodeInfo.initAttributes(NodeInfo.java:672)
at com.sap.tc.webdynpro.progmodel.context.DataNodeInfo.doInit(DataNodeInfo.java:233)
at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:657)
at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:40)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
at com.sap.tc.webdynpro.progmodel.controller.Component.getCustomControllerInternal(Component.java:436)
at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.createComponentInternal(ComponentUsage.java:161)
at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.createComponent(ComponentUsage.java:110)
at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.createInstanceIfDemanded(ComponentUsage.java:699)
at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.getImplementingInterfaceViewInfo(ComponentUsage.java:397)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.getViewManagerFor(ClientComponent.java:295)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.createUninitializedView(ViewManager.java:457)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:523)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:397)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:554)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:421)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:130)
at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:41)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.displayToplevelComponent(ClientComponent.java:135)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:404)
at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:618)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:251)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
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.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java(Compiled Code))
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java(Compiled Code))
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java(Compiled Code))
Caused by: com.sap.tc.webdynpro.progmodel.model.api.WDModelException: failed to create instance of model 'com.atosorigin.jsg.shape.model.PurchaseModel'
at com.sap.tc.webdynpro.progmodel.model.api.WDModelFactory.getNewModelInstance(WDModelFactory.java:391)
at com.sap.tc.webdynpro.progmodel.model.api.WDModelFactory.getOrCreateModelInstanceFromScopeMaintainer(WDModelFactory.java:328)
... 74 more
Caused by: com.sap.mw.jco.JCO$Exception: (132) JCO_ERROR_CONCURRENT_CALL: Concurrent call. Connection currently used in another thread.
at com.sap.mw.jco.JCO$Client.execute(JCO.java(Compiled Code))
at com.sap.mw.jco.JCO$Client.execute(JCO.java:3320)
at com.sap.mw.jco.JCO$Repository.execute(JCO.java:19904)
at com.sap.mw.jco.JCO$Repository.queryFunctionInterface(JCO.java:20263)
at com.sap.mw.jco.JCO$Repository.queryFunctionInterface(JCO.java:19939)
at com.sap.mw.jco.JCO$Repository.getFunctionInterface(JCO.java:20053)
at com.sap.tc.webdynpro.modelimpl.dynamicrfc.RFCMetadataRepository.getJcoMetadataForFunction(RFCMetadataRepository.java:64)
at com.sap.tc.webdynpro.modelimpl.dynamicrfc.metadata.DRFCModelInfo.getOrCreateClassInfo(DRFCModelInfo.java:204)
at com.sap.tc.webdynpro.modelimpl.dynamicrfc.metadata.DRFCModelInfo.<init>(DRFCModelInfo.java:164)
at com.sap.tc.webdynpro.modelimpl.dynamicrfc.metadata.DRFCModelInfo$Cache.getModelInfo(DRFCModelInfo.java:103)
at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModel.<init>(DynamicRFCModel.java:111)
at com.atosorigin.jsg.shape.model.PurchaseModel.<init>(PurchaseModel.java:515)
at com.atosorigin.jsg.shape.model.PurchaseModel.<init>(PurchaseModel.java:490)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java(Compiled Code))
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java(Compiled Code))
at java.lang.reflect.Constructor.newInstance(Constructor.java(Compiled Code))
at java.lang.Class.newInstance3(Class.java(Compiled Code))
at java.lang.Class.newInstance(Class.java(Compiled Code))
at com.sap.tc.webdynpro.progmodel.model.api.WDModelFactory.getNewModelInstance(WDModelFactory.java:385)
... 75 more
[/code]
Hi,
Check this
http://help.sap.com/saphelp_erp2005/helpdata/en/f6/daea401675752ae10000000a155106/frameset.htm
Regards,
Vijayakhanna Raman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> Hi,
> Kill the connection after use.
>
> try {
>
> NewModel model =
> (NewModel)WDModelFactory.getModelInstance(NewModel.cla
> ss);
>
> model.disconnectIfAlive();
>
> }
>
> catch(Exception e)
>
> {
>
> wdComponentAPI.getMessageManager().reportException("Ex
> ception "+e,true);
>
> }
>
> Regards,
> Vijayakhanna Raman
But this should't effect the application when it is first run from the portal which is when we see the error. We never see it whilst using the application - only when it is first initalised.
Gareth.
> hi,
> In case the exception was thrown on the ABAP side,
> , check the function module or BAPI in se37 or se80
>
> Regards,
> Vijayakhanna Raman
Hi,
The exception being raised is related to concurrent JCo connections being used in multiple threads. I don't see what this has to do with ABAP?! As I've said, the applications work correctly most of the time, just every now and then one of them will raise the above exception when first started.
Gareth.
Hi Gareth,
This is not your fault. Its a bug in the Webdynpro runtime, which has since been fixed by SAP. Please move to the late SP and you will not have this problem.
This happens when more than one instances of your application are trying to access the same JCO destinations and running into concurrent access problems. The fix has put a synchronization block around this.
REgards,
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Arun,
1. Is this problem related to data connection or metadata connection?
2. At what object it is necessary to synchronize? ModelClass.class or something else?
Valery Silaev
EPAM Systems
> Arun,
>
> 1. Is this problem related to data connection or
> metadata connection?
> 2. At what object it is necessary to synchronize?
> ModelClass.class or something else?
>
> Valery Silaev
> EPAM Systems
> http://www.NetWeaverTeam.com
Hi Valery,
1. I think it is the model data connection as it seems to fail when trying to first call the backend system as we have some applications that need to call the backend system to get data for their initial screens. So in the wdDoInit of our controller we set up our contexts correctly and then call the backend to populate some drop-downs. 1 in every 1000 times we get the exception.
2. Don't know!
Gareth.
Hi Valery/ Gareth,
This is due to insufficient synchronization when using the JCO destination for loading Adaptive RFC model metadata. As the problem depends on multiple reads
accessing the same resource (like WD application thread 2 tries to access JCO metadata destination which is currently used by WD app thread 1) the occurrence of the problem depends on thread scheduling .
The application doesnt have to worry about the synchronization. This is handled by the framework. But I guess this is available from SP16. Check SAP note #913297
Regards,
Arun
Hi,
Please test the Jco connection using 'testconnection' button on portal. Otherwise remove and create Jco connection.
Kind Regards,
S.Saravanan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.