[ 
https://issues.apache.org/jira/browse/OFBIZ-5870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14321733#comment-14321733
 ] 

Jacques Le Roux commented on OFBIZ-5870:
----------------------------------------

Hi Leon,

Using trunk HEAD, despite reverting these 2 changes, so having
{code}
Index: ControlServlet.java
===================================================================
--- ControlServlet.java (revision 1659774)
+++ ControlServlet.java (working copy)
@@ -37,6 +37,7 @@
 import org.ofbiz.base.util.UtilHttp;
 import org.ofbiz.base.util.UtilTimer;
 import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.base.util.template.FreeMarkerWorker;
 import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.DelegatorFactory;
 import org.ofbiz.entity.GenericDelegator;
@@ -49,6 +50,8 @@
 import org.ofbiz.webapp.stats.VisitHandler;
 import org.ofbiz.entity.util.EntityClassLoader;
 
+import freemarker.ext.servlet.ServletContextHashModel;
+
 /**
  * ControlServlet.java - Master servlet for the web application.
  */
@@ -191,6 +194,9 @@
 
         request.setAttribute("_REQUEST_HANDLER_", requestHandler);
         
+        ServletContextHashModel ftlServletContext = new 
ServletContextHashModel(this, FreeMarkerWorker.getDefaultOfbizWrapper());
+        request.setAttribute("ftlServletContext", ftlServletContext);
+
         // setup some things that should always be there
         UtilHttp.setInitialRequestInfo(request);
         VisitHandler.getVisitor(request, response);
{code}

I still get the same error. Maybe there is another change since which prevent 
things to work as when you tested? Though like you I found only those 2 
changes. Could you please check on your side? Thanks!

> Birt doesn't work
> -----------------
>
>                 Key: OFBIZ-5870
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5870
>             Project: OFBiz
>          Issue Type: Bug
>          Components: specialpurpose/birt
>    Affects Versions: Trunk
>            Reporter: Leon
>             Fix For: Trunk
>
>
> Birt report does't work anymore.
> access following url: 
> [http://demo-trunk-ofbiz.apache.org/birt/control/Report].
> error cut out :
> {quote}
> FreeMarker template error: Could not find an instance of 
> freemarker.ext.servlet.ServletContextHashModel in the data model under either 
> the name __FreeMarkerServlet.Application__ or Application ---- FTL stack 
> trace ("~" means nesting-related): - Failed at: @birt.report id="birtReport" 
> reportDe... [in template "component://birt/webapp/birt/birt/chartReport.ftl" 
> at line 22, column 1] ---- Java stack trace (for programmers): ---- 
> freemarker.template.TemplateModelException: [... Exception message was 
> already printed; see it above ...] at 
> freemarker.ext.jsp.FreeMarkerPageContext.<init>(FreeMarkerPageContext.java:92)
>  at 
> freemarker.ext.jsp._FreeMarkerPageContext21.<init>(_FreeMarkerPageContext21.java:53)
>  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>  at 
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to