ununpentium Report post Posted June 26, 2011 (edited) I am using an evaluation copy of FusionCharts v3.2. I deployed the J2EE war in Tomcat 6.0.32. I am running JDK 1.6 and MySQL 5.1.55. I have not altered the sample files/code in anyway, other than the context file per the tutorial. I am simply running through the J2EE samples html file that demonstrates the various charts (http://50.56.71.157:6080/FusionCharts_J2EE/JSP/index.html). All of the sample charts are rendering fine. The database samples using a single dataset are also rendering fine. The problem is running the MSDBExample.jsp When I launch the page from the tutorial link (http://50.56.71.157:6080/FusionCharts_J2EE/JSP/DBExample/MSDBExample.jsp), I get the following error: "Error in loading data." Viewing the catalina.out log, when the MSDBExample.jsp file is accessed the log displays: "Could not close the statement" Being that I am new to FusionCharts, I do not know how to fix the tutorial file(s) to make this example work. I have searched the forum and have not yet found an answer. Thank you for any help. Edited June 26, 2011 by ununpentium Share this post Link to post Share on other sites
srividya_sharma Report post Posted June 27, 2011 Hi I am unable to replicate your problem here. Can you please turn on the debugMode once and tell me what problem is indicated there? To turn on debugMode, please do the following: 1. Open FusionCharts_J2EE\JSP\DBExample\MSDBExample.jsp 2. Change debugMode="true" in this line: <fc:render chartId="${factoriesBean.chartId}" swfFilename="${folderPath}${factoriesBean.filename}" width="${factoriesBean.width}" height="${factoriesBean.height}" debugMode="false" registerWithJS="false" xmlData="${factoriesBean.xml}" /> You can find this statement towards the end of the file. Thanks Srividya Sharma Share this post Link to post Share on other sites
ununpentium Report post Posted June 27, 2011 Here is the debug output: Info: Chart loaded and initialized. Initial Width: 700 Initial Height: 400 Scale Mode: noScale Debug Mode: Yes Application Message Language: EN Version: 3.2.1 Chart Type: Multi Series 2D Line Chart Chart Objects: BACKGROUND CANVAS CAPTION SUBCAPTION YAXISNAME XAXISNAME DIVLINES VDIVLINES YAXISVALUES HGRID VGRID DATALABELS DATAVALUES TRENDLINES TRENDVALUES DATAPLOT ANCHORS TOOLTIP VLINES LEGEND VLINELABELS INFO: Chart registered with external script. DOM Id of chart is FactorySum WARNING: Could not find dataXML or dataURL parameter. Setting dataURL to default data file Data.xml. dataURL provided: Data.xml dataURL invoked: Data.xml?FCTime=500 ERROR: An error occurred while loading data. Please check your dataURL, by clicking on the "dataURL invoked" link above, to see if it's returing valid XML data. Common causes for error are: No URL Encoding provided for querystrings in dataURL. If your dataURL contains querystrings as parameters, you'll need to URL Encode the same. e.g., Data.asp?id=101&subId=242 should be Data%2Easp%3Fid%3D101%26subId%3D242 Different sub-domain of chart .swf and dataURL. Both need to be same owing to sandbox security. Network error Share this post Link to post Share on other sites
srividya_sharma Report post Posted June 28, 2011 Hi I am not sure what is wrong... can you please try once with the attached war file? regards, Srividya Sharma FusionCharts_J2EE.zip Share this post Link to post Share on other sites
ununpentium Report post Posted June 28, 2011 I deployed the new WAR you attached. I didn't touch/alter any files. Same exact problem exists.The output for debugging is also the same. The other database samples for single datasets work. For some reason, the problem resides only in the sample multi-series chart/file. Additionally, your WAR is missing the fchelperfunctions.tld file in the META-INF folder. I had to manually add it in order for some other sample charts to work. Thank you for helping me with this. Share this post Link to post Share on other sites
ununpentium Report post Posted June 28, 2011 One more thing... Tomcat is displaying the following error: The requested resource (/FusionCharts_J2EE/JSP/DBExample/Data.xml) is not available. It looks like the multi-series chart is trying to look for a Data.xml file, and not use the database connection. Share this post Link to post Share on other sites
srividya_sharma Report post Posted June 28, 2011 Hi Since the sample I provided is also not working, it looks like it is a problem with your database. Please verify that you have run all the database scripts and the corresponding tables and data have been created. Thank you for pointing out the missing file. I will check that. Srividya Sharma Share this post Link to post Share on other sites
ununpentium Report post Posted June 28, 2011 I followed this line of instruction when creating the databases: "Run the scripts FactoryDBCreation.sql and UTFExampleTablesCreation.sql to create the required tables and sample data." After loading both sql scripts, the following database was created: factorydb It has the following tables (and record count): Factory_Master (3) Factory_Output (60) Japanese_Factory_Master (3) I have done this step twice, and both times the same tables and rows were created. Will you please let me know if these tables are correct, or if there is something missing? Share this post Link to post Share on other sites
Guest Angshu Report post Posted June 30, 2011 Hi, Thanks for your response. Could you please try to replace the jars with ones present in the sample and ensure that older class files/ jar files are not present in tomcat cache? Looking forward to your reply. Share this post Link to post Share on other sites
ununpentium Report post Posted July 15, 2011 Could you please try to replace the jars with ones present in the sample and ensure that older class files/ jar files are not present in tomcat cache? Ok, I've replaced the jars with the ones in your attached sample and I cleared the cached class and jar files. The problem still exists. Furthermore, since my last post, I have purchased a Pro/SaaS version of FusionCharts. I have also created a brand new server, new MySQL install, etc., and loaded the purchased files. I went through the Database tutorial again, and the same problem exists in the pro tutorial: that is, the database examples work, but the Multi-series db example does not - it just displays "Error in loading data". I ran debug, and the same trace appears with the same error: "WARNING: Could not find dataXML or dataURL parameter. Setting dataURL to default data file Data.xml." So, if I read this error correctly, not only is the dataURL parameter apparently missing in the MSDBExample.jsp file (or related bean), but a Data.xml file is also missing from the DBExample folder in the tutorial, which can't be defaulted to. What is the next support step? Thank you. Share this post Link to post Share on other sites
srividya_sharma Report post Posted July 16, 2011 Hi I am unable to replicate the problem here and I am running out of ideas too. Let me see... Let's do this. You send me your war file, I will just deploy it as it is here and see if I encounter the same problem as you do. Srividya Share this post Link to post Share on other sites
ununpentium Report post Posted July 16, 2011 You send me your war file, I will just deploy it as it is here and see if I encounter the same problem as you do. Here it is attached. Thank you. FusionCharts_J2EE.zip Share this post Link to post Share on other sites
srividya_sharma Report post Posted July 16, 2011 Hi The zip file you attached works like a charm here! ok, here is another idea. Please modify the MSDBExample.jsp present within JSP/DBExample folder as follows: 1. remove the existing fc:render tag and put the following in its place: <fc:render chartId="${factoriesBean.chartId}" swfFilename="${folderPath}${factoriesBean.filename}" width="${factoriesBean.width}" height="${factoriesBean.height}" debugMode="true" registerWithJS="false" dataFormat="xml"> <?xml version="1.0" encoding="UTF-8" standalone="no"?><chart animation="1" caption="Factory Output report" formatNumberScale="0" rotateValues="1" showValues="0" subCaption="By Quantity" xAxisName="Factory" yAxisName="Units"><categories><category label="1-02-2003" /><category label="1-03-2003" /><category label="1-04-2003" /><category label="1-05-2003" /><category label="1-06-2003" /><category label="1-07-2003" /><category label="1-08-2003" /><category label="1-09-2003" /><category label="1-10-2003" /><category label="1-11-2003" /><category label="1-12-2003" /><category label="1-13-2003" /><category label="1-14-2003" /><category label="1-15-2003" /><category label="1-16-2003" /><category label="1-17-2003" /><category label="1-18-2003" /><category label="1-19-2003" /><category label="1-20-2003" /></categories><dataset seriesName="Factory 1"><set value="23" /><set value="22" /><set value="24" /><set value="32" /><set value="21" /><set value="34" /><set value="32" /><set value="32" /><set value="23" /><set value="23" /><set value="32" /><set value="53" /><set value="23" /><set value="26" /><set value="43" /><set value="16" /><set value="45" /><set value="65" /><set value="54" /></dataset><dataset seriesName="Factory 2"><set value="121" /><set value="123" /><set value="122" /><set value="124" /><set value="132" /><set value="121" /><set value="134" /><set value="132" /><set value="132" /><set value="123" /><set value="123" /><set value="132" /><set value="153" /><set value="123" /><set value="126" /><set value="143" /><set value="116" /><set value="145" /><set value="165" /><set value="154" /></dataset><dataset seriesName="Factory 3"><set value="54" /><set value="56" /><set value="89" /><set value="56" /><set value="98" /><set value="76" /><set value="65" /><set value="45" /><set value="75" /><set value="54" /><set value="75" /><set value="76" /><set value="34" /><set value="97" /><set value="55" /><set value="43" /><set value="16" /><set value="35" /><set value="78" /><set value="75" /></dataset></chart> </fc:render> What this does is, it puts the xml generated from my database as hardcoded xml for the chart. If this works on your end, then the problem is either with the retrieval of data and/or generation of xml. Lets take it from there. Srividya Sharma Share this post Link to post Share on other sites
ununpentium Report post Posted July 16, 2011 The hardcoded XML works, so it has something to do with the JSP multi-string file/bean retrieving data from the database. It seems to be isolated to the JSP tutorial. As a test, I loaded the PHP tutorial and its multi-string file reads the database just fine (at this URL): http://50.56.69.110/PHP/DBExample/MSChart.php At this point, I need to figure out the JSP multi-string problem. Our business needs to use the JSP solution. As we are a paid client, how might I move away from the forum and invoke professional tech support? Thank you. Share this post Link to post Share on other sites
srividya_sharma Report post Posted July 17, 2011 Hi Please contact [email protected] or submit a ticket at http://support.fusioncharts.com/ for professional help. One last shot, can you tell me the version of JSTL and tomcat you are using? Srividya Sharma Share this post Link to post Share on other sites
ununpentium Report post Posted July 17, 2011 can you tell me the version of JSTL and tomcat you are using? Tomcat 6.0.32 As for JSTL, I assumed it just used the jars already present in the tutorial J2EE app's /WEB-INF/lib folder: jstl-api-1.2 jstl-imp-1.2 Thanks. Share this post Link to post Share on other sites
srividya_sharma Report post Posted July 18, 2011 Hi I took a look at the code in the bean again. I think I figured it out. There were a few duplicate statements in the MSFactoriesData bean. Hence, the connection might have been busy and the xml was not generated correctly. Please replace the attached fcsampleshelper.jar in your application and try it out. ( remove cache from tomcat if needed ) rename .zip to .jar. Hope this helps! Srividya Sharma fcsampleshelper.zip Share this post Link to post Share on other sites