[opencms-dev] deleting a file

bart vandendriessche bart at nascom.be
Wed Dec 22 15:40:13 CET 2004


One more thing, locking the resource before publishing it is not the 
solution, just tried that again as well.

- bart

bart vandendriessche wrote:

> I seem to be having an odd problem when trying to delete a file. This 
> is my code:
>
> try {
>            cmso.lockResource(file, true);
>            cmso.deleteResource(file);
>            cmso.publishResource(file);
>            response.sendRedirect("index.html");
>        } catch ( CmsException cmse ) {
>            cmse.printStackTrace();
>            out.println("couldn't delete file " + file);
>        }
>
> Now, for some reason, the file is always properly deleted from the 
> offline project (it is strikedthrough and marked as deleted in the 
> explorer) but I keep getting errors when trying to publish the file 
> after deleting. Anybody have any idea why this would be the case ? The 
> error is as follows:
>      com.opencms.core.CmsException: 32 Resource deleted. Detailed 
> error: [com.opencms.file.mySql.CmsDbAccess] <nameoffile>
>
> Any help or insights would be greatly appreciated.
>
> -Bart
>
>
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please 
> visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
>




More information about the opencms-dev mailing list