• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

CEWOLF: ClassCastException DataTag cannot be cast to de.laures.cewolf.taglib.tags.Parameterized

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am suffering from this error for lots of times, and after searching all over the internet but without any clues found to solve the problem.

I am using cewolf to draw High-Low charts . when trying to pass parameters from JSP to my DatasetProduer, I got this error:

---------------------------------------------------------------------------------------------------------------------------
HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: de.laures.cewolf.taglib.tags.DataTag cannot be cast to de.laures.cewolf.taglib.tags.Parameterized
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:431)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:319)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

java.lang.ClassCastException: de.laures.cewolf.taglib.tags.DataTag cannot be cast to de.laures.cewolf.taglib.tags.Parameterized
de.laures.cewolf.taglib.tags.ParamTag.doEndTag(ParamTag.java:42)
org.apache.jsp.CandleStick2_jsp._jspx_meth_cewolf_005fparam_005f0(CandleStick2_jsp.java:252)
org.apache.jsp.CandleStick2_jsp._jspx_meth_cewolf_005fdata_005f0(CandleStick2_jsp.java:203)
org.apache.jsp.CandleStick2_jsp._jspx_meth_cewolf_005fchart_005f0(CandleStick2_jsp.java:164)
org.apache.jsp.CandleStick2_jsp._jspService(CandleStick2_jsp.java:122)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:389)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:319)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.0 logs.
Apache Tomcat/6.0.0
---------------------------------------------------------------------------------------------------------------------

//* in CandleStick2.jsp */

<%@taglib uri='/WEB-INF/cewolf-1.1.tld' prefix='cewolf' %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
<title>Insert title here</title>
</head>
<body>
<H1>Page View Statistics</H1>
<HR>

<jsp:useBean id="postproducer" class="com.cck.util.MyChartPostProcessor"/>
<jsp:useBean id="CandleStickProducer1" class="com.cck.dataproducer.CandleStickProducer1"/>
<jsp:useBean id="params" class="com.cck.dataproducer.ParamBean" scope="request"/>
<jsp:setProperty name="params" property="*"/>
<%String symbol = "000001";%>
<cewolf:chart id="CandleStick" title="CandleStick" type="candlestick" xaxislabel="Date/Time">
<cewolf:data>
<cewolf:producer id="CandleStickProducer1" />

<cewolf:param name="symbol" value="<%=symbol%>"></cewolf:param>
</cewolf:data>
<cewolf:chartpostprocessor id="postproducer"/>
</cewolf:chart>
<cewolf:img chartid="CandleStick" renderer="cewolf" width="1024" height="400"/>
</body>
</html>

-----------------------------------------------------------------------------------------------------


/* in CandleStickProducer1 */----------------------------------------------------

public class CandleStickProducer1 implements DatasetProducer, CategoryToolTipGenerator,CategoryItemLinkGenerator, Serializable {

..........................
@Override
public Object produceDataset(Map params) throws DatasetProduceException {
// TODO Auto-generated method stub

...........
String symbol = (String) params.get("symbol");

..............


--------------------------------------------------------------------------------------------

Tomcat: 6
Jre: 6
Cewolf 1.1
Jfreechart: 1.0.13


Any comments will be most appriceated!

Thanks in advance!

Ken






 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you check out the tagdocs you'll see that only cewolf:producer can have cewolf:param childs, not cewolf:data. Try something like this:

Also, you can avoid scriptlets by using value="${symbol}" instead of value="<%=symbol%>".
 
ken zeng
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI Ulf,

Thanks very much for your reply, the problem is now solved, it`s really the case as you said.

Ken
reply
    Bookmark Topic Watch Topic
  • New Topic