ruthst00 Posted April 6, 2007 Report Share Posted April 6, 2007 Hi, I'm using ChartFX CE with Sun Java Studio Creator 2 Update 1. Development was going great for several months, but then I started getting the following runtime error: ApplicationDispatcher[/FML3] Servlet.service() for servlet jsp threw exception java.lang.ClassCastException at SfxNET.sfxUtils.vwzw.Vw$(Unknown Source) at SoftwareFX.ChartFX.Chart.setDataSource(Unknown Source) at com.softwarefx.chartfx.component.Chart.setRowSet(Chart.java... To isolate the problem I started from scratch: I created a new page, dragged a chart component onto the page, then dragged a rowset from SessionBean1 to the new chart. When I compile and run, I get the same error. If I clear the chart's rowset property, the error goes away, so it must be something related to the rowset or jdbc data source. The query defined by the rowset is: SELECT ALL MeetingSpend.MeetingType, MeetingSpend.MeetingSpend FROM MeetingSpend which returns the following values: MeetingType MeetingSpend 1 50000.00 2 125000.00 3 12000.00 4 14000.00 5 350000.00 6 34000.00 Any ideas? Could it be a jdbc data source problem? Here's a full stack trace from the server log: ApplicationDispatcher[/FML3] Servlet.service() for servlet jsp threw exception java.lang.ClassCastException at SfxNET.sfxUtils.vwzw.Vw$(Unknown Source) at SoftwareFX.ChartFX.Chart.setDataSource(Unknown Source) at com.softwarefx.chartfx.component.Chart.setRowSet(Chart.java at com.softwarefx.chartfx.component.Chart.setBoundValues(Chart.java:1116)at com.softwarefx.chartfx.render.ChartRenderer.encodeBegin(ChartRenderer.java:15)at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:683)at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:591)at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:543)at org.apache.jsp.chartTest_jsp._jspx_meth_chart_chart_0(chartTest_jsp.java:258)at org.apache.jsp.chartTest_jsp._jspx_meth_ui_form_0(chartTest_jsp.java:236)at org.apache.jsp.chartTest_jsp._jspx_meth_ui_body_0(chartTest_jsp.java:215)at org.apache.jsp.chartTest_jsp._jspx_meth_ui_html_0(chartTest_jsp.java:154)at org.apache.jsp.chartTest_jsp._jspx_meth_ui_page_0(chartTest_jsp.java:131)at org.apache.jsp.chartTest_jsp._jspx_meth_f_view_0(chartTest_jsp.java:104)at org.apache.jsp.chartTest_jsp._jspService(chartTest_jsp.java:74)at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297)at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247)at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:585)at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)at java.security.AccessController.doPrivileged(Native Method)at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)at java.security.AccessController.doPrivileged(Native Method)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:482)at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:417)at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:80)at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:95)at java.security.AccessController.doPrivileged(Native Method)at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:313)at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:311)at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:585)at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)at java.security.AccessController.doPrivileged(Native Method)at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)at java.security.AccessController.doPrivileged(Native Method)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:210)at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)at java.security.AccessController.doPrivileged(Native Method)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83) Link to comment Share on other sites More sharing options...
GabrielA Posted April 9, 2007 Report Share Posted April 9, 2007 It looks like a casting issue. What are the types for MeetingSpend.MeetingType and MeetingSpend.MeetingSpend. Also, give us some more information about the DB and the JDBC driver you are using. Link to comment Share on other sites More sharing options...
ruthst00 Posted April 9, 2007 Author Report Share Posted April 9, 2007 Thanks very much for your reply. Here's the DDL for the table: CREATE TABLE `ruthst00_test`.`MeetingSpend` ( `ID` int(11) default NULL, `AccountType` int(11) default NULL, `TherapeuticArea` int(11) default NULL, `MeetingType` int(11) default NULL, `MeetingSpend` decimal(10,2) default NULL) ENGINE=InnoDB DEFAULT CHARSET=latin1; I thought there might be an issue with MeetingSpend being a decimal, so I created a test table of integer columns, which also causes the same error: CREATE TABLE `ruthst00_test`.`test` ( `col1` int(11) default NULL, `col2` int(11) default NULL) ENGINE=InnoDB DEFAULT CHARSET=latin1; Here's information on the database and jdbc driver, which have not changed since I started the project a few months ago. Maybe I should grab the latest version? MySQL Database: 5.0.27 MySQL JDBC Driver: MySQL Connector 5.0.4 Database URL: jdbc:mysql://localhost/ruthst00_test Driver Class: org.gjt.mm.mysql.Driver Thanks for your help! Link to comment Share on other sites More sharing options...
GabrielA Posted April 9, 2007 Report Share Posted April 9, 2007 I have one more question, is the error happening only with this query, or with any query to the mySql Database? Link to comment Share on other sites More sharing options...
ruthst00 Posted April 9, 2007 Author Report Share Posted April 9, 2007 So far, it fails with either of these two queries, the second one I created because I thought the casting issue was with decimal data types, but I'd be happy to try a different query if you think that would help isolate the problem: SELECT ALL MeetingSpend.MeetingType, MeetingSpend.MeetingSpend FROM MeetingSpend SELECT ALL test.col1, test.col2 FROM test Link to comment Share on other sites More sharing options...
ruthst00 Posted April 9, 2007 Author Report Share Posted April 9, 2007 By the way, in an effort to solve the problem, I reinstalled Sun Java Creator Studio, the Sun app server, and ChartFX. I did not reinstall the jdbc driver since that's referenced from a different directory and not packaged with my app. None of these actions resolved the problem, however. I'll try downloading the latest MySQL jdbc driver to see if that helps... Link to comment Share on other sites More sharing options...
GabrielA Posted April 9, 2007 Report Share Posted April 9, 2007 Thanks, I have enough info now to try to reproduce the problem. I'll check back as soon as I have any news. Link to comment Share on other sites More sharing options...
ruthst00 Posted April 9, 2007 Author Report Share Posted April 9, 2007 BTW: I just upgraded the MySQL jdbc driver from 5.0.4 to 5.0.5 and I get the same error. Thanks for your help looking into this. It really has me stumped! Link to comment Share on other sites More sharing options...
GabrielA Posted April 12, 2007 Report Share Posted April 12, 2007 I have tried this with the latest build of the complib, and it seems to work: http://files.softwarefx.com/temp/chartfx62-6.2.0.2.zip. Please let me know if it solves the problem. Link to comment Share on other sites More sharing options...
ruthst00 Posted April 13, 2007 Author Report Share Posted April 13, 2007 I downloaded the new complib from the url you provided, removed the existing complib from the Sun JSC IDE, reinstalled ChartFX CE, and added the new complib to the IDE. I dragged a new chart component to a page, and dragged a rowset to it. Now get the following error. I get the same error if no rowset is bound to the chart component. Should I have downloaded and installed the latest version of ChartFX CE as well? java.lang.ExceptionInInitializerErrorat SoftwareFX.ChartFX.ChartServer.<init>(Unknown Source)at com.softwarefx.chartfx.component.Chart.<init>(Chart.java:50)at fml3.home.<init>(home.java:455)at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)at java.lang.reflect.Constructor.newInstance(Constructor.java:494)at java.lang.Class.newInstance0(Class.java:350)at java.lang.Class.newInstance(Class.java:303)at java.beans.Beans.instantiate(Beans.java:204)at java.beans.Beans.instantiate(Beans.java:48)at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:203)at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:298)at com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:78)at com.sun.rave.web.ui.appbase.faces.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:96)at com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:125)at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.pageBean(ViewHandlerImpl.java:753)at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.pageBean(ViewHandlerImpl.java:728)at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:278)at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:585)at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)at java.security.AccessController.doPrivileged(Native Method)at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)at java.security.AccessController.doPrivileged(Native Method)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:210)at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)at java.security.AccessController.doPrivileged(Native Method)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83) Caused by: SfxNET.System.zvxxat SfxNET.System.Reflection.Assembly.Load(Unknown Source)at SfxNET.System.Type.getAssembly(Unknown Source)at SoftwareFX.internal.ChartFX.Internet.Server.ChartCore.ZvXz(Unknown Source)at SoftwareFX.internal.ChartFX.Internet.Server.ChartCore.ZYXz(Unknown Source)at SoftwareFX.internal.ChartFX.Internet.Server.ChartCore.<clinit>(Unknown Source)... 63 more Link to comment Share on other sites More sharing options...
ruthst00 Posted April 13, 2007 Author Report Share Posted April 13, 2007 FYI -- installing the latest version of ChartFX CE doesn't seem to fix the problem. Same error... Thanks. Link to comment Share on other sites More sharing options...
ruthst00 Posted April 23, 2007 Author Report Share Posted April 23, 2007 Hi GabrielA, Any advice on this? I've tried the new complib but get a new error (see thread). I've tried deinstalling/reinstalling everything and putting a blank chart on a blank page, but I get the same errors for the 6.2.01 or 6.2.02 complibs. Do I need to wipe down my developer machine and reinstall OS, etc? Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.