Bom dia,
Criamos uma widget que preenche combos a partir de dados de datasets customizados. De forma intermitente, recebemos um erro de cross domain. Alguém ja viu isso ? vale lembrar que via ECLIPSE, consigo consultar o dataset normalmente.
Erro no console do chrome: wcm_global_pt_BR.js?v=f1.5.12-EP4:7 Ocorreu um erro ao processar a widget: wcmConsultivo_1375 wcmConsultivo.instance() DOMException: Blocked a frame with origin "http://187.94.56.75:8080" from accessing a cross-origin frame. at Object.loadDatasetValues (http://187.94.56.75:8080/SIGAJURI_Consultivo/resources/js/SIGAJURI_Consultivo_pt_BR.js?v=f1.5.12-EP4:85:21) at Object.updateDatatableCons (http://187.94.56.75:8080/SIGAJURI_Consultivo/resources/js/SIGAJURI_Consultivo_pt_BR.js?v=f1.5.12-EP4:499:11) at Object.init (http://187.94.56.75:8080/SIGAJURI_Consultivo/resources/js/SIGAJURI_Consultivo_pt_BR.js?v=f1.5.12-EP4:18:12) at Object.instance (http://187.94.56.75:8080/portal/resources/js/wcm_global_pt_BR.js?v=f1.5.12-EP4:15:21735) at HTMLDivElement. (http://187.94.56.75:8080/portal/resources/js/wcm_global_pt_BR.js?v=f1.5.12-EP4:7:263729) at Function.each (http://187.94.56.75:8080/portal/resources/js/wcm_global_pt_BR.js?v=f1.5.12-EP4:3:2900) at n.fn.init.each (http://187.94.56.75:8080/portal/resources/js/wcm_global_pt_BR.js?v=f1.5.12-EP4:3:848) at TLib.loadWidgets (http://187.94.56.75:8080/portal/resources/js/wcm_global_pt_BR.js?v=f1.5.12-EP4:7:262690) at loadWidgets (http://187.94.56.75:8080/portal/p/01/pag_conf_sigajuri:594:10) at http://187.94.56.75:8080/portal/p/01/pag_conf_sigajuri:597:2
Pilha erro fluig:
09:54:24,389 ERROR [com.totvs.technology.ecm.services.dataset.DatasetRest] (http-pool-threads - 81) Erro ao obter o dataset: dsAssJur.: java.lang.NullPointerException at com.totvs.technology.ecm.services.rest.ECMRest.getCompanyId(ECMRest.java:61) [ecm-rest-1.5.12.jar:] at com.totvs.technology.ecm.services.dataset.DatasetRest.datasets(DatasetRest.java:431) [ecm-rest-1.5.12.jar:] at com.totvs.technology.ecm.services.dataset.DatasetRest$Proxy$$$_WeldClientProxy.datasets(DatasetRest$Proxy$$$_WeldClientProxy.java) [ecm-rest-1.5.12.jar:] at sun.reflect.GeneratedMethodAccessor2183.invoke(Unknown Source) [:1.7.0_76] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_76] at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_76] at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:168) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:] at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:] at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:] at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:561) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:543) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:128) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:] at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1] at com.totvs.technology.foundation.common.FluigLoggingFilter.doFilter(FluigLoggingFilter.java:58) [foundation-common-1.5.12.jar:] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1] at com.totvs.technology.ecm.filter.ECMPipeline.doFilter(ECMPipeline.java:28) [classes:] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1] at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.5.3.Final-redhat-2.jar:7.5.3.Final-redhat-2] at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.5.3.Final-redhat-2.jar:7.5.3.Final-redhat-2] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:512) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1] at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.3.Final-redhat-2.jar:7.5.3.Final-redhat-2] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1] at org.jboss.as.web.sso.ClusteredSingleSignOn.invoke(ClusteredSingleSignOn.java:384) [jboss-as-web-7.5.3.Final-redhat-2.jar:7.5.3.Final-redhat-2] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1] at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:511) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1] at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33) [jboss-threads-2.1.2.Final-redhat-1.jar:2.1.2.Final-redhat-1] at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:808) [jboss-threads-2.1.2.Final-redhat-1.jar:2.1.2.Final-redhat-1] at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45) [jboss-threads-2.1.2.Final-redhat-1.jar:2.1.2.Final-redhat-1] at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:849) [jboss-threads-2.1.2.Final-redhat-1.jar:2.1.2.Final-redhat-1] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_76] at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.2.Final-redhat-1.jar:2.1.2.Final-redhat-1]
complementando. Usamos REST para acessar o dataset. Aparentemente o erro está na composição da url do serviço: parentOBJ.ECM.restUrl. Ao digitar isso no console do chrome, ao invés de retornar a string, ja recebo a mensagem de erro de cross domain.
parentOBJ.ECM.restUrl VM451:1 Uncaught DOMException: Blocked a frame with origin "http://187.94.56.75:8080" from accessing a cross-origin frame. at :1:10
— André Spirigoni Pinto 17 de Apr de 2017