Bug 1038029 - NoSuchDataException is thrown after importing pages through export/import tool
Summary: NoSuchDataException is thrown after importing pages through export/import tool
Alias: None
Product: JBoss Enterprise Portal Platform 6
Classification: JBoss
Component: Portal
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: DR02
: 6.1.1
Assignee: Peter Palaga
QA Contact: Tomas Kyjovsky
Depends On:
TreeView+ depends on / blocked
Reported: 2013-12-04 09:47 UTC by Martin Weiler
Modified: 2019-01-01 03:40 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
It was discovered that a "NoSuchDataException" was thrown when the Site Import feature ran, causing the process to fail. The fix clears the POMSessionManager cache before site import begins. If there is stale data, a message prompts the user to refresh the browser before continuing.
Clone Of:
Last Closed:
Type: Bug

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat One Jira Issue Tracker GTNMGMT-25 Major Open NoSuchDataException when trying to edit navigation after import of classic portal 2015-05-27 14:38:33 UTC
Red Hat One Jira Issue Tracker GTNPORTAL-2072 Major Resolved NoSuchDataException is thrown after importing pages through export/import tool. 2015-05-27 14:38:33 UTC

Description Martin Weiler 2013-12-04 09:47:36 UTC
Description of problem:
Platform issue for https://issues.jboss.org/browse/GTNPORTAL-2072

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1) Login and go to Group -> Administration -> Site Export/Import. (If this is not a fresh install, add the Export/Import gadget to a page on the portal).
2) Expand the sites and portal nodes in the tree nav on the left. Select the site classic, hit the export button, and save the zip file to local filesystem.
4) Hit the import link and upload zip file previously exported. Check the overwrite existing data checkbox, and hit the import button.
5) Navigate back to the home page. Click Edit Page, you should see errors and similar stacktrace in server logs.

Actual results:
'Unknown Error' popup and ERROR in the log:
Caused by: org.exoplatform.portal.config.NoSuchDataException: Can not find 1c42bec77f0000011076449207f5d085
	at org.exoplatform.portal.pom.config.POMSession.findCustomizationById(POMSession.java:214)
	at org.exoplatform.portal.pom.config.tasks.PreferencesTask$Load.run(PreferencesTask.java:91)
	at org.exoplatform.portal.pom.config.POMSession.execute(POMSession.java:405)

Expected results:
UI cache should be cleared automatically, and no error should be presented to the user

Additional info:

Comment 1 JBoss JIRA Server 2013-12-04 10:28:27 UTC
Trong Tran <trongtt@gmail.com> made a comment on jira GTNPORTAL-2072

Could you review it, Nick ?

Comment 2 JBoss JIRA Server 2013-12-04 10:28:37 UTC
Trong Tran <trongtt@gmail.com> made a comment on jira GTNPORTAL-2072

Could you review the PR, Nick ?

Comment 3 JBoss JIRA Server 2013-12-04 17:06:16 UTC
Nick Scavelli <nscavell@redhat.com> made a comment on jira GTNPORTAL-2072

Currently reviewing. Looks like I'm not getting any errors, which is good. But I can also see that my page is not updated anymore. I believe it was able to update the page, even though an exception was thrown. For example if I export the classic site, add a portlet to the homepage, import the exported site (with overwrite), I believe I was able to see that the portlet I added to be removed. If I got to edit that page, it then gets removed. I would say it's a step further, going to investigate if we can get better.

Comment 4 JBoss JIRA Server 2013-12-04 20:14:31 UTC
Nick Scavelli <nscavell@redhat.com> made a comment on jira GTNPORTAL-2072

[~phuong_vu] I missed your one comment, yea let's handle the cache in POMSessionManager too. I think this is the main usecase actually. When data is saved through backend services, and not the UI, the UI should be able to see non stale data. I think this what the customer is actually after in https://bugzilla.redhat.com/show_bug.cgi?id=1038029

Comment 5 JBoss JIRA Server 2013-12-04 20:15:52 UTC
Nick Scavelli <nscavell@redhat.com> made a comment on jira GTNPORTAL-2072

I'm not getting the exception, so I think this is good. Will open another to see if we can handle the stale cache in POMSessionManager. I think this PR is good to go.

Comment 6 Nick Scavelli 2013-12-05 15:37:06 UTC
Proposed solution is to manually clear the POMSessionManager cache. If there's stale data, then the user will see a display message that they need to refresh the browser. After refreshing they should see the new content. In light of this change I am also adding the ability to clear the POMSessionManager cache for import, so users don't need to log out, and rather refresh to see new changes.

Martin will this suffice with the customer ?

Comment 7 Boleslaw Dawidowicz 2013-12-10 08:26:01 UTC
I'm closing this - please reopen if this resolution is not enough. However at the moment it is rather hard for us to go any further than that.

Comment 8 Peter Palaga 2013-12-10 09:48:24 UTC
The upstream PR was merged to master but there conflicts when cherry-picking the master PR to 3.6.x. I do not feel self-confident enough to resolve them. Nick, could you please have a look (read: prepare a new PR against 3.6.x branch)?

It is this commit in master: ba5f44ceb39c5d212039c8e97cf7c8064ffb5f10

Comment 9 JBoss JIRA Server 2013-12-10 10:17:12 UTC
Peter Palaga <ppalaga@redhat.com> made a comment on jira GTNPORTAL-2072

Keeping open as it was fixed in 3.7.0 only but the fix for 3.6.x is still pending.

Comment 10 Peter Palaga 2013-12-11 13:20:10 UTC
Fixed in both 3.7.0 and 3.6.x now.

Note You need to log in before you can comment on or make changes to this bug.