[opencms-dev] CmsExport.exportData throwing ArrayIndexOutOfBoundsException

Christian Steinert christian_steinert at web.de
Mon Mar 9 07:08:49 CET 2009


Hi Roman

I am surprised, because I am quite sure that exportAllResources is the 
same Method that's also called by the workplace when triggering static 
export in the workplace.

You might have to debug this by connecting the eclipse debugger to your 
running instance and adding an exception breakpoint for 
ArrayIndexOutOfBoundsException. Also, it might be a good idea to look, 
if org.opencms.util.CmsDateUtil.getHeaderDate is implemented in a sane 
fashion.

No real ideas here, sorry. Best Regards
Christian
> I'm trying to export resources by using the OpenCms API (7.0.5). During the
> export, CmsExport.exportData() is throwing the following Exception:
>
>
> SEVERE: Servlet.service() for servlet jsp threw exception
> java.lang.ArrayIndexOutOfBoundsException: -2147483648
>         at java.text.SimpleDateFormat.subFormat(SimpleDateFormat.java:1066)
>         at java.text.SimpleDateFormat.format(SimpleDateFormat.java:899)
>         at java.text.SimpleDateFormat.format(SimpleDateFormat.java:869)
>         at java.text.DateFormat.format(DateFormat.java:316)
>         at org.opencms.util.CmsDateUtil.getHeaderDate(CmsDateUtil.java:167)
>         at
> org.opencms.importexport.CmsExport.appendResourceToManifest(CmsExport.java:654)
>         at org.opencms.importexport.CmsExport.exportFile(CmsExport.java:974)
>         at
> org.opencms.importexport.CmsExport.addChildResources(CmsExport.java:393)
>         at
> org.opencms.importexport.CmsExport.addChildResources(CmsExport.java:422)
>         at
> org.opencms.importexport.CmsExport.addChildResources(CmsExport.java:422)
>         at
> org.opencms.importexport.CmsExport.addChildResources(CmsExport.java:422)
>         at
> org.opencms.importexport.CmsExport.addChildResources(CmsExport.java:422)
>         at
> org.opencms.importexport.CmsExport.exportAllResources(CmsExport.java:898)
>         at org.opencms.importexport.CmsExport.exportData(CmsExport.java:203)
>
>
> Here's the related code (exporting all resources in the current site
> context):
>
>
> CmsJspActionElement cms = new CmsJspActionElement(pageContext, request,
> response);
>
> ArrayList<String> listResources = new ArrayList<String>();
> listResources.add("/");
>
> CmsExportParameters cmsExportParameters = 
> 	new CmsExportParameters(
> 		"backup_opencms_content_full.zip",
> 		null,
> 		true,
> 		true,
> 		true,
> 		listResources,
> 		true,
> 		true,
> 		0,
> 		true,
> 		false
> 	);
>
> CmsExport cmsExport = new CmsExport(cms.getCmsObject(), new
> CmsStringBufferReport(new java.util.Locale("de")));
> cmsExport.exportData(cmsExportParameters);
>
>
> When doing the export with the same parameters via the OpenCms workplace,
> everything is running fine. 
> Any ideas on this would be very appreciated.
>
> Thanks in advance,
> Roman
>   




More information about the opencms-dev mailing list