Emmanouil Batsis (Manos) wrote:
Just in case anyone does an online search, it turns out my 4.x version
never created the blog directories inside uploads.dir (probably because
nobody ever actually uploaded a file) so the 5.x media stuff was
chocking on that. With Dave's help the solution for me was:
- stop the container (in my case tomcat)
- create a subdirectory in uploads.dir for each blog (named by weblog
handle)
- delete the contents of mediafiles.storage.dir (only had
migration-status.properties) to force another migration
- start the container
And the media file view works fine.
Oh, doesnt work. The migration code does not build DB entries for blog
dirs i think, so i will work on it ang get back with a patch or something.
Cheers,
Manos
Emmanouil Batsis (Manos) wrote:
Dave wrote:
On Wed, Apr 14, 2010 at 11:03 AM, Emmanouil Batsis (Manos)
<ma...@abiss.gr> wrote:
Using the trunk, I tried clicking 'Media Files' and got the following
exception in the logs. Is there any chance the blog-specific media
directories need to be created if they don't exist? Do i need to
patch this
or is there anything else going on? Ideas welcome!
java.lang.NullPointerException
at
org.apache.roller.weblogger.ui.struts2.editor.MediaFileView.execute(MediaFileView.java:185)
Here's some context for that NullPointerException:
MediaFileDirectory directory;
if (StringUtils.isNotEmpty(this.directoryId)) {
directory =
manager.getMediaFileDirectory(this.directoryId);
} else if (StringUtils.isNotEmpty(this.directoryPath)) {
directory =
manager.getMediaFileDirectoryByPath(getActionWeblog(),
this.directoryPath);
} else {
directory =
manager.getMediaFileRootDirectory(getActionWeblog());
}
this.directoryId = directory.getId(); // this is line 185
It appears that, perhaps, you don't have a media file root directory
for your weblog and therefore directory is null. Can you tell some
more about your install? Was it an upgrade or a fresh install?
An upgrade, but the previous installation had no blog dirs (in
uploads.dir) for the new version to upgrade towards the media files
directory. I think all images where hosted in a remote server, so
perhaps directories where never created?
--
Manos Batsis, Chief Technologist
__ _
____ _/ /_ (_)_________ ____ ______
/ __ `/ __ \/ / ___/ ___// __ `/ ___/
/ /_/ / /_/ / (__ |__ )/ /_/ / /
\__,_/_.___/_/____/____(_)__, /_/
/____/
http://www.Abiss.gr
19, Kalvou Street,
14231, Nea Ionia,
Athens, Greece
Tel: +30 211-1027-900
Fax: +30 211-1027-999
http://gr.linkedin.com/in/manosbatsis