Comment 8 for bug 491906

Revision history for this message
Niall Creech (sevenmachines-deactivatedaccount) wrote :

it seems the net.sf.zekr.engine.theme.TemplateEngine constructor catches the
exception,
Error using VM library : VM_global_library.vm
meaning that context is never initialised. but since the exceptions been handled by catch zekr carries on. better to initialise context no matter what here? this is a
slightly better hacky fix than previously

diff -ruN net/sf/zekr/engine/template/TemplateEngine.java net.new/sf/zekr/engine/template/TemplateEngine.java
--- net/sf/zekr/engine/template/TemplateEngine.java 2008-06-26 19:15:32.000000000 +0100
+++ net.new/sf/zekr/engine/template/TemplateEngine.java 2010-01-14 01:30:48.022705986 +0000
@@ -41,10 +41,10 @@
                        System.setProperty("zekr.home", Naming.getWorkspace());^M
                        Velocity.setExtendedProperties(new ExtendedProperties("res/config/lib/velocity.properties"));^M
                        Velocity.init();^M
- context = new VelocityContext();^M
                } catch (Exception e) {^M
                        Logger.getLogger(this.getClass()).log(e);^M
                }^M
+ context = new VelocityContext();^M
        }^M
 ^M
        /**^M