Hide Forgot
Description of problem: When accessing the Export/Import gadget from a custom portal container and a Javascript alert with the error message "Failed to load sites available for export. See server log for more details." should appear. In the logs we can see the following error: ERROR [org.gatein.management.gadget.mop.exportimport.server.IdentityFilter] (http-/127.0.0.1:8080-5) Conversation state not found. This typically means the GWT Gadget application is either being access anonymously or from outside the portal. How reproducible: Easy to reproduce using the quickstarts Steps to Reproduce: 1. Deploy the sample-portal container in JPP 6.0 2. Access the new container and log in as root 3. Access the site Export/Import gadget in URI /g/:platform:administrators/administration/siteExportImport Actual results: A Javascript alert with the error message "Failed to load sites available for export. See server log for more details." will appear. In the logs we can see the following error: Expected results: Gadget working and able to export/import sites. Additional info: It starts with a 401 in gwtGadgets/exportimport/GateInService Request URL:http://localhost:8080/gwtGadgets/exportimport/GateInService Request Method:POST Status Code:401 Unauthorized Which is causing this is the servlet filter in [1]. It's is set in file [2]. Seems that A ConversationState isn't being created for this container. [1] https://fisheye.exoplatform.org/browse/gatein-portal/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/IdentityFilter.java?r=6d4f317a757437a77343db50339200de94e5fc8d ConversationRegistry conversationRegistry = (ConversationRegistry) container.getComponentInstanceOfType(ConversationRegistry.class); ConversationState state = conversationRegistry.getState(stateKey); if (state == null) { log.error("Conversation state not found. This typically means the GWT Gadget application is either being access anonymously or from outside the portal."); handleError(httpRequest, httpResponse, 401); return; } [2] gwtGadgets.war/WEB-INF/web.xml <!-- Important to ensure secure access to the gadget --> <filter> <filter-name>IdentityFilter</filter-name> <filter-class>org.gatein.management.gadget.mop.exportimport.server.IdentityFilter</filter-class> <!-- Allows users with the specific role to access the gadget --> <init-param> <param-name>role</param-name> <param-value>administrators</param-value> </init-param> <!-- Uncomment to allow members of the following group access to gadget. --> <!--<init-param> <param-name>group</param-name> <param-value>/platform/administrators</param-value> </init-param>--> <!-- Uncomment to allow a specific user access to gadget. --> <!--<init-param> <param-name>user</param-name> <param-value>root</param-value> </init-param>-->
siteExportImport does not exist in JPP 6.1 anymore and was replaced by /g/:platform:administrators/administration/siteRedirects. I cannot reproduce this with siteRedirects.
As noticed by Bolek, the Export/Import gadget is still there in JPP 6.1 although it is not placed in any page by default. I tried to place it on a random page e.g. /sample-portal/classic/home but I have nort experienced the reported problems. Steps to Reproduce: 1. Deploy the sample-portal container in JPP 6.0 2. Access the new container and log in as root 3. Import Applications in Group > Administration > Application Registry 4. Edit the /sample-portal/classic/home page, add Export/Import gadget to it, save 5. Access /sample-portal/classic/home where everything works as expected in the Export/Import gadget
A correction of comment #3: The issue is reproducible on JPP 6.1.0 GA using steps named in comment #3. It is not reproducible on the upcoming JPP 6.1.1 DR1.
I wasn't able to reproduce this issue on 6.1.0.GA and 6.1.1.DR1.