Chart Creator + JSF + Liferay

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
tg
Posts: 2
Joined: Wed Aug 08, 2007 8:19 am

Chart Creator + JSF + Liferay

Post by tg » Wed Aug 08, 2007 8:36 am

Hello,

I am working on a liferay portlet which would use Chart Creator. I read an installation guide provided by Cagatay Civici on his blog. Everything seems to work but no chart is generated. There is an empty box showing that the picture is corrupted. The size of this box is equal to that specified in a tag:
<c:chart id="chart1" datasource="#{ChartBean.pieDataSet}" type="pie" is3d="true" antialias="true" title="Example Chart" xlabel="X Label" ylabel="Y Label" height="300" width="400"></c:chart>
It looks like the following request: chartcreatorrequest.chart?ts=1186556816781&chartId=chart1
could not create an image.

When I use phase listener I get the following exception:
2007-08-08 09:01:15,891 ERROR [org.apache.myfaces.lifecycle.PhaseListenerManager] Exception in PhaseListener RESTORE_VIEW(1) afterPhase
java.lang.RuntimeException: Unsupported chart type
at net.sf.jsfcomp.chartcreator.utils.ChartUtils.createChartWithType(Unknown Source)
at net.sf.jsfcomp.chartcreator.ChartListener.handleChartRequest(Unknown Source)
at net.sf.jsfcomp.chartcreator.ChartListener.afterPhase(Unknown Source)
at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:92)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:99)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
at org.apache.myfaces.portlet.MyFacesGenericPortlet.processAction(MyFacesGenericPortlet.java:246)
at com.comarch.twp.web.portlet.MyFacesTWPPortlet.processAction(MyFacesTWPPortlet.java:92)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:160)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at com.liferay.portlet.CachePortlet._invoke(CachePortlet.java:333)
at com.liferay.portlet.CachePortlet.processAction(CachePortlet.java:157)
at com.liferay.portal.action.LayoutAction._processPortletRequest(LayoutAction.java:248)
at com.liferay.portal.action.LayoutAction._processActionRequest(LayoutAction.java:268)
at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:92)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:156)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:477)
at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:875)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.secure.SecureFilter.doFilter(SecureFilter.java:143)
If I switch to servlet mode I don't get any exceptions but the chart is not generated as well.

Did anyone have any problems with Liferay and ChartCreator?

I would be grateful for any help in this problem.

Kind regards,
tg[/quote][/code]

jim
Posts: 1
Joined: Thu Aug 30, 2007 4:24 pm

No chart under Liferay

Post by jim » Thu Aug 30, 2007 5:04 pm

When running the barCharts.jsp and sample code under Liferay 4.30 the chartData is not available (is null) in the handleChartRequest of the ChartListener. I am running the example as is, just changed to use listener instead of chartlet.

ChartData chartData = (ChartData) sessionMap.get(id);

Has anyone had success with JSF charts in Liferay?

I am able to use JFreeChart in other portlets without jsf-comp JSFChartCreator

Locked