[jboss-jira] [JBoss JIRA] Resolved: (JBPORTAL-1085) CMS Export : Exception if empty folder or no file found for one language
Roy Russo (JIRA)
jira-events at jboss.com
Wed Nov 8 15:02:42 EST 2006
[ http://jira.jboss.com/jira/browse/JBPORTAL-1085?page=all ]
Roy Russo resolved JBPORTAL-1085.
---------------------------------
Fix Version/s: 2.6.Alpha1
Resolution: Done
> CMS Export : Exception if empty folder or no file found for one language
> ------------------------------------------------------------------------
>
> Key: JBPORTAL-1085
> URL: http://jira.jboss.com/jira/browse/JBPORTAL-1085
> Project: JBoss Portal
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Portal CMS
> Affects Versions: 2.4 Final
> Environment: JBPortal 2.4 / windows / CMS all stored in filesystem.
> Reporter: Antoine Herzog
> Assigned To: Roy Russo
> Fix For: 2.6.Alpha1
>
> Original Estimate: 1 hour
> Remaining Estimate: 1 hour
>
> when trying to export folder or files, there is sometimes this error :
> 14:03:38,140 ERROR [STDERR] java.lang.NullPointerException
> 14:03:38,140 ERROR [STDERR] at org.jboss.portal.cms.impl.jcr.command.GetArchiveCommand.zipFiles(GetArchiveCommand.java:112)
> 14:03:38,140 ERROR [STDERR] at org.jboss.portal.cms.impl.jcr.command.GetArchiveCommand.execute(GetArchiveCommand.java:72)
> 14:03:38,140 ERROR [STDERR] at org.jboss.portal.cms.impl.jcr.JCRCommand.dispatch(JCRCommand.java:61)
> 14:03:38,140 ERROR [STDERR] at org.jboss.portal.cms.impl.jcr.JCRCMS.execute(JCRCMS.java:436)
> sometimes is :
> - when asking to export a folder and there is some sub folders with no files in it (no file for the asked language)
> - when asking to export a file that exist in language A but you ask export for language B
> in the code of GetArchiveCommand.java :
> private ZipOutputStream zipFiles(String sPath, ZipOutputStream zos)
> {
> ....
> JCRCommand fileList = (JCRCommand) this.mContext.getCommandFactory().createFileGetCommand(node.getPath(), new Locale(this.msLanguage));
> File childFile = (File) this.mContext.execute(fileList);
> ZipEntry entry = new ZipEntry(this.rootFolderName + node.getPath());
> zos.putNextEntry(entry);
> Content content = childFile.getContent();
> ...
> line "112" is Content content = childFile.getContent();
> childFile is null when the file was not found for the language.
> It should be checked before use and do nothing if the file is not found.
> (optional log ?)
> enhancement : may be propose the export feature to take the default language file instead (a check box in the portal CMS management screen), so some exported site could be build with always a page shown (like in CMS Portlet).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list