I have some updates on this topic. After a restart of Glassfish and a 
redeployment of the application I can see the following in the roller.log:

DEBUG 2015-12-28 19:29:11,460 ThemeManagerImpl:initialize - Initializing Theme 
Manager
INFO  2015-12-28 19:29:11,462 ThemeManagerImpl:loadAllThemesFromDisk - Loading 
themes from /opt/roller/themes...
DEBUG 2015-12-28 19:29:11,468 SharedThemeFromDir:loadThemeFromDisk - Parsing 
theme descriptor for /opt/roller/themes/basicmobile
DEBUG 2015-12-28 19:29:11,479 SharedThemeFromDir:loadThemeFromDisk - Loading 
Theme Basic Mobile
INFO  2015-12-28 19:29:11,485 ThemeManagerImpl:loadAllThemesFromDisk - Loaded 
theme 'basicmobile‘
[...]
WARN  2015-12-28 19:29:11,638 SharedThemeFromDir:loadThemeFromDisk - Couldn't 
read theme [Kivio] preview image file [images/theme-gaurav.png]
INFO  2015-12-28 19:29:11,638 ThemeManagerImpl:loadAllThemesFromDisk - Loaded 
theme 'kivio'
INFO  2015-12-28 19:29:11,639 ThemeManagerImpl:initialize - Successfully loaded 
6 themes from disk.

In my opinion that log looks very well and the Drop-Down-List for selecting a 
theme should be filled. But after calling the page again, list was still empty.

So I removed my own theme and voilà list is filled with the basic templates.

Adding my theme with a preview image fixed the problem. I think template 
parsing should be more secured at this point and a missing image should not 
destroy the whole workflow.

Björn


> Am 28.12.2015 um 09:49 schrieb Bjoern Berg <[email protected]>:
> 
> Dave, thank you for your hint. I changed the log level but it does not get 
> much more informative:
>  
> DEBUG 2015-12-28 08:05:13,627 ThemeManagerImpl:initialize - Initializing 
> Theme Manager
> INFO  2015-12-28 08:05:13,631 ThemeManagerImpl:loadAllThemesFromDisk - 
> Loading themes from /opt/roller/themes...
> INFO  2015-12-28 08:05:13,631 ThemeManagerImpl:initialize - Successfully 
> loaded 0 themes from disk.
>  
> I have looked into the code and for me it seems, that the ThemeManager can 
> read from the directory and it is accessible, otherwise it would have thrown 
> an exception.
>  
> Seems to me that the array in Line 390 returned by the FileFilter is empty:
> String[] themenames = themesdir.list(filter);
> because I cannot see a message like "Loaded theme...".
>  
> But I do not understand why this could happen...
>  
> Björn
> Gesendet: Sonntag, 27. Dezember 2015 um 23:17 Uhr
> Von: Dave <[email protected]>
> An: [email protected]
> Betreff: Re: Problems with themes.dir in roller-custom.properties
> Do you see a message in your logs that starts with "Loading themes from"?
> 
> Adding this to your roller-custom.properties might give us some more clues:
> 
> log4j.logger.org.apache.roller.weblogger.business.themes=DEBUG
> 
> Dave
> 
> 
> On Sun, Dec 27, 2015 at 4:29 PM Björn Berg <[email protected]> wrote:
> 
> > Hi,
> >
> > I have created a simple roller-custom.properties to change the directories
> > for roller. Currently it looks like:
> >
> > installation.type=auto
> > mediafiles.storage.dir=/opt/roller/mediafiles
> > search.index.dir=/opt/roller/searchindex
> > log4j.appender.roller.File=/opt/roller/logs/roller.log
> >
> > themes.dir=/opt/roller/themes/
> > themes.reload.mode=true
> >
> > Now I have problems with the themes in Roller application. The
> > Dropdown-List for selecting a shared theme is empty. The log does not tell
> > me anything about the problem. The used Vagrant environment is a mirror for
> > the upcoming production environment (Glassfish 3, MySQL). Log files are
> > written to the logs directory.
> >
> >
> > Directory below /opt/roller/themes looks like:
> > vagrant@vagrant-ubuntu-trusty-64:/opt/roller/themes$ ls -al
> > total 40
> > drwxrwxrwx 8 root root 4096 Dec 27 18:50 .
> > drwxr-xr-x 6 root root 4096 Dec 27 21:08 ..
> > -rwxrwxrwx 1 root root 6854 Dec 27 18:50 base.css
> > drwxrwxrwx 2 root root 4096 Dec 27 18:50 basic
> > drwxrwxrwx 3 root root 4096 Dec 27 18:50 basicmobile
> > drwxrwxrwx 5 root root 4096 Dec 27 18:50 fauxcoly
> > drwxrwxrwx 2 root root 4096 Dec 27 18:50 frontpage
> > drwxrwxrwx 7 root root 4096 Dec 27 18:50 gaurav
> > drwxrwxrwx 9 root root 4096 Dec 27 18:36 kivio
> >
> > What’s going wrong here? I have tested the same on my local machine (OS X,
> > Glassfish 3) and it worked without problems.
> >
> > Kind regards,
> > Björn
> >
> >
>  
>  

Björn Berg
Böllerts Höfe 1
45479 Mülheim an der Ruhr

Telefon: (0208) 62 62 800
Mobil:  (0163) 699 23 74
E-Mail:         [email protected]



Reply via email to