[ 
https://issues.apache.org/jira/browse/OFBIZ-6746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15076469#comment-15076469
 ] 

Scott Gray commented on OFBIZ-6746:
-----------------------------------

That URL style is used to retrieve a specific view in place of whatever is 
normally defined in the controller.  The javascript method that retrieves the 
UiLabels via ajax is using a relative URL which causes the ajax request to end 
up looking like /partymgr/control/removePartyContent/getJSONuiLabelArray
which causes the target to be triggered again.

The only solutions I can think of are:
1. Change the override view logic to actually do a request redirect rather than 
just render the view, or;
2. Find some way to give the javascript an absolute URL to that ajax target

> removePartyContent request is called twice, 
> --------------------------------------------
>
>                 Key: OFBIZ-6746
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6746
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: Trunk
>            Reporter: Deepak Dixit
>            Priority: Minor
>
> Comments from OFBIZ-6708:
> Not sure why the removePartyContent request is called twice and the 2nd 
> fails, and I have no time to investigate.
> {code}
>  [java] 2015-11-21 22:52:38,110 |http-bio-8443-exec-6 |ControlServlet         
>        |T| [[[removePartyContent(Domain:https://localhost)] Request Begun, 
> encoding=[UTF-8]- total:0.0,since last(Begin):0.0]]
>      [java] 2015-11-21 22:52:38,134 |http-bio-8443-exec-6 |ServiceDispatcher  
>            |T| Sync service [partymgr/removePartyContent] finished in [18] 
> milliseconds
>      [java] 2015-11-21 22:52:38,134 |http-bio-8443-exec-6 |RequestHandler     
>            |I| Ran Event [service:#removePartyContent] from [request], result 
> is [success]
>      [java] 2015-11-21 22:52:38,135 |http-bio-8443-exec-6 |RequestHandler     
>            |I| Rendering View [viewprofile], 
> sessionId=56DBE28A391381E1B44D53CD49968F7E.jvm1
>      [java] 2015-11-21 22:52:38,136 |http-bio-8443-exec-6 |ServiceDispatcher  
>            |T| Sync service [partymgr/getUserPreferenceGroup] finished in [1] 
> milliseconds
>      [java] 2015-11-21 22:52:38,138 |http-bio-8443-exec-6 |ServiceDispatcher  
>            |T| Sync service [partymgr/getVisualThemeResources] finished in 
> [1] milliseconds
>      [java] 2015-11-21 22:52:38,163 |http-bio-8443-exec-6 |ScreenFactory      
>            |I| Got 39 screens in 0.008s from: 
> file:/C:/projectASF-Mars/ofbiz/applications/party/widget/partymgr/PartyScreens.xml
>      [java] 2015-11-21 22:52:38,210 |http-bio-8443-exec-6 |ScreenFactory      
>            |I| Got 4 screens in 0.005s from: 
> file:/C:/projectASF-Mars/ofbiz/applications/party/widget/partymgr/CommonScreens.xml
>      [java] 2015-11-21 22:52:38,216 |http-bio-8443-exec-6 |ScreenFactory      
>            |I| Got 1 screens in 0.005s from: 
> file:/C:/projectASF-Mars/ofbiz/applications/commonext/widget/CommonScreens.xml
>      [java] 2015-11-21 22:52:38,284 |http-bio-8443-exec-6 |ServiceDispatcher  
>            |T| Sync service [partymgr/getLastSystemInfoNote] finished in [17] 
> milliseconds
>      [java] 2015-11-21 22:52:38,286 |http-bio-8443-exec-6 |PrimaryKeyFinder   
>            |I| Returning null because found incomplete primary key in find: 
> [GenericEntity:PartyAcctgPrefAndGroup][partyId,Company
> (java.lang.String)][roleTypeId,null()]
>      [java] 2015-11-21 22:52:38,293 |http-bio-8443-exec-6 |ScreenFactory      
>            |I| Got 24 screens in 0.006s from: 
> file:/C:/projectASF-Mars/ofbiz/framework/common/widget/CommonScreens.xml
>      [java] 2015-11-21 22:52:38,392 |http-bio-8443-exec-6 |ServiceEcaRule     
>            |I| For Service ECA [partyBasePermissionCheck] on [return] got 
> false for condition: [hasPermission][equals][false][true
> ][Boolean]
>      [java] 2015-11-21 22:52:38,393 |http-bio-8443-exec-6 |ServiceDispatcher  
>            |T| Sync service [partymgr/partyBasePermissionCheck] finished in 
> [46] milliseconds
>      [java] 2015-11-21 22:52:38,401 |http-bio-8443-exec-6 |ServiceEcaRule     
>            |I| For Service ECA [partyBasePermissionCheck] on [return] got 
> false for condition: [hasPermission][equals][false][true
> ][Boolean]
>      [java] 2015-11-21 22:52:38,402 |http-bio-8443-exec-6 |ServiceDispatcher  
>            |T| Sync service [partymgr/partyBasePermissionCheck] finished in 
> [1] milliseconds
>      [java] 2015-11-21 22:52:38,419 |http-bio-8443-exec-6 |ServiceDispatcher  
>            |T| Sync service [partymgr/acctgBasePermissionCheck] finished in 
> [12] milliseconds
>      [java] 2015-11-21 22:52:38,421 |http-bio-8443-exec-6 |ServiceEcaRule     
>            |I| For Service ECA [partyBasePermissionCheck] on [return] got 
> false for condition: [hasPermission][equals][false][true
> ][Boolean]
>      [java] 2015-11-21 22:52:38,423 |http-bio-8443-exec-6 |ServiceDispatcher  
>            |T| Sync service [partymgr/acctgBasePermissionCheck] finished in 
> [1] milliseconds
>      [java] 2015-11-21 22:52:38,719 |http-bio-8443-exec-6 |ServiceDispatcher  
>            |T| Sync service [partymgr/getOrderedSummaryInformation] finished 
> in [116] milliseconds
>      [java] 2015-11-21 22:52:38,847 |http-bio-8443-exec-6 |ServerHitBin       
>            |I| Visit delegatorName=default, ServerHitBin delegatorName=default
>      [java] 2015-11-21 22:52:38,847 |http-bio-8443-exec-6 |ControlServlet     
>            |T| [[[removePartyContent(Domain:https://localhost)] Request Done- 
> total:0.737,since last([removePartyConte...):0.737]]
>      [java] 2015-11-21 22:52:38,994 |http-bio-8443-exec-6 |ControlServlet     
>            |T| [[[removePartyContent(Domain:https://localhost)] Request 
> Begun, encoding=[UTF-8]- total:0.0,since last(Begin):0.0]]
>      [java] 2015-11-21 22:52:38,998 |http-bio-8443-exec-6 |ModelService       
>            |E| [ModelService.validate] : {removePartyContent} : (IN) Required 
> test error: org.ofbiz.service.ServiceValidationExcep
> tion: The following required parameter is missing: [IN] 
> [removePartyContent.contentId]The following required parameter is missing: 
> [IN] [removePartyContent.fromDate]The following required parameter is missing
> : [IN] [removePartyContent.partyContentTypeId]The following required 
> parameter is missing: [IN] [removePartyContent.partyId]
>      [java] 2015-11-21 22:52:38,998 |http-bio-8443-exec-6 |ServiceDispatcher  
>            |E| Incoming context (in runSync : removePartyContent) does not 
> match expected requirements
>      [java] org.ofbiz.service.ServiceValidationException: The following 
> required parameter is missing: [IN] [removePartyContent.contentId]The 
> following required parameter is missing: [IN] [removePartyContent.
> fromDate]The following required parameter is missing: [IN] 
> [removePartyContent.partyContentTypeId]The following required parameter is 
> missing: [IN] [removePartyContent.partyId]
>      [java]     at 
> org.ofbiz.service.ModelService.validate(ModelService.java:636) 
> ~[ofbiz-service.jar:?]
>      [java]     at 
> org.ofbiz.service.ModelService.validate(ModelService.java:578) 
> ~[ofbiz-service.jar:?]
>      [java]     at 
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:376) 
> [ofbiz-service.jar:?]
>      [java]     at 
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:227) 
> [ofbiz-service.jar:?]
>      [java]     at 
> org.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88)
>  [ofbiz-service.jar:?]
>      [java]     at 
> org.ofbiz.webapp.event.ServiceEventHandler.invoke(ServiceEventHandler.java:340)
>  [ofbiz-webapp.jar:?]
>      [java]     at 
> org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:759) 
> [ofbiz-webapp.jar:?]
>      [java]     at 
> org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:476) 
> [ofbiz-webapp.jar:?]
>      [java]     at 
> org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:213) 
> [ofbiz-webapp.jar:?]
>      [java]     at 
> org.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:88) 
> [ofbiz-webapp.jar:?]
>      [java]     at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:646) 
> [servlet-api-3.0.jar:?]
>      [java]     at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:727) 
> [servlet-api-3.0.jar:?]
>      [java]     at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
>  [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>  [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:323) 
> [ofbiz-webapp.jar:?]
>      [java]     at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>  [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>  [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
>  [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
>  [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
>  [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) 
> [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) 
> [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
>  [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956) 
> [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) 
> [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
>  [tomcat-7.0.64-tomcat-coyote.jar:7.0.64]
>      [java]     at 
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
>  [tomcat-7.0.64-tomcat-coyote.jar:7.0.64]
>      [java]     at 
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
>  [tomcat-7.0.64-tomcat-coyote.jar:7.0.64]
>      [java]     at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  [?:1.8.0_51]
>      [java]     at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  [?:1.8.0_51]
>      [java]     at 
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>  [tomcat-7.0.64-tomcat-coyote.jar:7.0.64]
>      [java]     at java.lang.Thread.run(Thread.java:745) [?:1.8.0_51]
>      [java] 2015-11-21 22:52:38,998 |http-bio-8443-exec-6 |ServiceDispatcher  
>            |T| [[Sync service failed...- total:0.0,since last(Begin):0.0]] - 
> 'partymgr / removePartyContent'
>      [java] 2015-11-21 22:52:38,998 |http-bio-8443-exec-6 |TransactionUtil    
>            |I| Transaction rolled back
>      [java] 2015-11-21 22:52:38,998 |http-bio-8443-exec-6 |TransactionUtil    
>            |W| Not committing transaction, status is No Transaction (6)
>      [java] 2015-11-21 22:52:38,998 |http-bio-8443-exec-6 |RequestHandler     
>            |I| Ran Event [service:#removePartyContent] from [request], result 
> is [error]
>      [java] 2015-11-21 22:52:38,999 |http-bio-8443-exec-6 |RequestHandler     
>            |W| Could not find response in request [removePartyContent] for 
> event return [error]
>      [java] 2015-11-21 22:52:38,999 |http-bio-8443-exec-6 |RequestHandler     
>            |I| Rendering View [EditPartyContents], 
> sessionId=56DBE28A391381E1B44D53CD49968F7E.jvm1
>      [java] 2015-11-21 22:52:39,001 |http-bio-8443-exec-6 |ServiceDispatcher  
>            |T| Sync service [partymgr/getVisualThemeResources] finished in 
> [1] milliseconds
>      [java] 2015-11-21 22:52:39,002 |http-bio-8443-exec-6 |PrimaryKeyFinder   
>            |I| Returning null because found incomplete primary key in find: 
> [GenericEntity:Content][contentId,null()]
>      [java] 2015-11-21 22:52:39,002 |http-bio-8443-exec-6 |PrimaryKeyFinder   
>            |I| Returning null because found incomplete primary key in find: 
> [GenericEntity:Party][partyId,null()]
>      [java] 2015-11-21 22:52:39,002 |http-bio-8443-exec-6 |PrimaryKeyFinder   
>            |I| Returning null because found incomplete primary key in find: 
> [GenericEntity:Person][partyId,null()]
>      [java] 2015-11-21 22:52:39,002 |http-bio-8443-exec-6 |PrimaryKeyFinder   
>            |I| Returning null because found incomplete primary key in find: 
> [GenericEntity:PartyGroup][partyId,null()]
>      [java] 2015-11-21 22:52:39,006 |http-bio-8443-exec-6 |PrimaryKeyFinder   
>            |I| Returning null because found incomplete primary key in find: 
> [GenericEntity:PartyAcctgPrefAndGroup][partyId,Company
> (java.lang.String)][roleTypeId,null()]
>      [java] 2015-11-21 22:52:39,037 |http-bio-8443-exec-6 |ServiceEcaRule     
>            |I| For Service ECA [partyBasePermissionCheck] on [return] got 
> false for condition: [hasPermission][equals][false][true
> ][Boolean]
>      [java] 2015-11-21 22:52:39,037 |http-bio-8443-exec-6 |ServiceDispatcher  
>            |T| Sync service [partymgr/partyBasePermissionCheck] finished in 
> [1] milliseconds
>      [java] 2015-11-21 22:52:39,042 |http-bio-8443-exec-6 |ServiceEcaRule     
>            |I| For Service ECA [partyBasePermissionCheck] on [return] got 
> false for condition: [hasPermission][equals][false][true
> ][Boolean]
>      [java] 2015-11-21 22:52:39,042 |http-bio-8443-exec-6 |ServiceDispatcher  
>            |T| Sync service [partymgr/partyBasePermissionCheck] finished in 
> [1] milliseconds
>      [java] 2015-11-21 22:52:39,043 |http-bio-8443-exec-6 |ServiceEcaRule     
>            |I| For Service ECA [partyBasePermissionCheck] on [return] got 
> false for condition: [hasPermission][equals][false][true
> ][Boolean]
>      [java] 2015-11-21 22:52:39,043 |http-bio-8443-exec-6 |ServiceDispatcher  
>            |T| Sync service [partymgr/partyBasePermissionCheck] finished in 
> [1] milliseconds
>      [java] 2015-11-21 22:52:39,072 |http-bio-8443-exec-6 |PrimaryKeyFinder   
>            |I| Returning null because found incomplete primary key in find: 
> [GenericEntity:StatusItem][statusId,null()]
>      [java] 2015-11-21 22:52:39,072 |http-bio-8443-exec-6 |PrimaryKeyFinder   
>            |I| Returning null because found incomplete primary key in find: 
> [GenericEntity:DataResource][dataResourceId,null()]
>      [java] 2015-11-21 22:52:39,089 |http-bio-8443-exec-6 |ServerHitBin       
>            |I| Visit delegatorName=default, ServerHitBin delegatorName=default
>      [java] 2015-11-21 22:52:39,090 |http-bio-8443-exec-6 |ControlServlet     
>            |T| [[[removePartyContent(Domain:https://localhost)] Request Done- 
> total:0.096,since last([removePartyConte...):0.096
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to