Page 1 of 1

Images don't show up for demo site

Posted: Wed Jan 29, 2014 11:06 am
by DeanWade
Class "StaticAssetStorageServiceImpl" didn't close the stream after finishing writing the temp file, resulting error message "java.io.IOException: Failed to delete original '...' after copy to '...'", possible resolution will be:

Code: Select all

File tmpFile = new File(appendTrailingSlash(workArea.getFilePathLocation()) + baseLocalFile.getName());

            bos = new BufferedOutputStream(new FileOutputStream(tmpFile));
 
            boolean eof = false;
            int temp;
            while (!eof) {
                temp = is.read();
                if (temp < 0) {
                    eof = true;
                } else {
                    bos.write(temp);
                }
            }
            bos.close() // add close stream
            FileUtils.moveFile(tmpFile, baseLocalFile);

Re: Images don't show up for demo site

Posted: Fri Feb 07, 2014 2:57 pm
by rodrigo.aiello
Any progress on this?

Re: Images don't show up for demo site

Posted: Mon Feb 10, 2014 10:28 am
by RapidTransit
Are you using 3.1-SNAPSHOT, I was getting the same error on my Windows machine but on my linux laptop.

Re: Images don't show up for demo site

Posted: Tue Feb 11, 2014 3:15 pm
by phillipuniverse
Could you submit a pull request to https://github.com/BroadleafCommerce/BroadleafCommerce with this change

Re: Images don't show up for demo site

Posted: Sun Mar 02, 2014 9:52 am
by prabhat.kataria
I am using 3.1-SNAPSHOT and facing the same problem. Is there a workaround available for it?

Re: Images don't show up for demo site

Posted: Wed Mar 19, 2014 3:04 pm
by sunil0791

Re: Images don't show up for demo site

Posted: Thu Mar 20, 2014 7:53 am
by gowthamgutha
The url of the images is

Code: Select all

/cmsstatic/img/sauces/....
which doesn't exist. I solved the problem by creating that folder in the

Code: Select all

site\src\main\webapp\cmsstatic\img\sauces
and pasting those images there.