[ 
https://issues.apache.org/struts/browse/WW-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45137#action_45137
 ] 

Herak commented on WW-2742:
---------------------------

stack trace
java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0
        at 
java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:999)
        at java.awt.image.BufferedImage.<init>(BufferedImage.java:324)
        at org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1396)
        at org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1378)
        at 
org.jfree.chart.ChartUtilities.writeChartAsPNG(ChartUtilities.java:170)
        at 
org.jfree.chart.ChartUtilities.writeChartAsPNG(ChartUtilities.java:123)
        at 
org.apache.struts2.dispatcher.ChartResult.execute(ChartResult.java:110)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
        at 
com.opensymphony.xwork2.interceptor.annotations.AnnotationWorkflowInterceptor.intercept(AnnotationWorkflowInterceptor.java:121)
        at 
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
        at 
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
        at 
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
        at 
org.someorg.UserAuthenticationInterceptor.intercept(UserAuthenticationInterceptor.java:49)
        at 
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
        at 
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
        at 
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
        at 
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
        at 
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504)
        at 
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:637)


> Paramters not being set in JFreeChart Plugin
> --------------------------------------------
>
>                 Key: WW-2742
>                 URL: https://issues.apache.org/struts/browse/WW-2742
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>            Reporter: Herak
>             Fix For: 2.1.3
>
>
> <action name="ch" class="org.someorg.chart.ChartAction">
>               <result name="success" type="chart">
>                       <param name="width">${width}</param>
>                       <param name="height">${height}</param>
>               </result>
> </action>
> In the above case I am getting an IllegalArgumentException, although I have 
> defined width and height in ChartAction
> public class ChartAction extends ActionSupport
> {
>       private static final long serialVersionUID = -4845276888116145855L;
>       
>       private Integer width = 200;
>       private Integer height = 400;
>       public String execute() throws Exception
>       {
>               chart = new chart..
>               return SUCCESS;
>       }
>       public Integer getWidth()
>       {
>               return width;
>       }
>       public void setWidth(Integer width)
>       {
>               this.width = width;
>       }
>       public Integer getHeight()
>       {
>               return height;
>       }
>       public void setHeight(Integer height)
>       {
>               this.height = height;
>       }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to