c.huettermann Posted January 28, 2015 Share Posted January 28, 2015 Thank you for the documentation of creating and using Custom Visualization Component for JSS 6.x (http://community.jaspersoft.com/wiki/custom-visualization-component-v60x).Unfortunately I am not able to preview the components with other previewers than HTML. Probably PhantomJS causes the problems.Here is a brief shortcut of my configuration (and environment):1.) OS: Windows 72.) JSS 6.0.1 final3.) PhantomJS 1.9.8 for windows4.) Properties:com.jaspersoft.jasperreports.components.customvisualization.require.js = C:/bin/TIBCO/Jaspersoft Studio-6.0.1.final/configuration/org.eclipse.osgi/bundles/11/1/.cp/resources/scripts/require-2.1.6.src.jscom.jaspersoft.jasperreports.components.customvisualization.phantomjs.executable.path = C:/bin/phantomjs-1.9.8-windows/phantomjs.exe5.) I created a new CVC with the help of the Wizard (template Circle Sample based on D3.js library)6.) Build component with build.js7.) Preview of report d3_Circle_sample.jrxml in Java-Previewer throws the following Exception:net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRRuntimeException: Error while executing the javascript file to generate the SVG image: External process did not end properly; exit value: 1; process output:svgs...1Source is <svg id="element1988531457svg" width="555" height="376" version="1.1" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink"><style type="text/css"><![CDATA[#element1988531457svg circle { fill: #f000ff; }]]></style><circle cx="277.5" cy="188" r="178"></circle></svg>SCRIPT_SUCCESS at com.jaspersoft.jasperreports.customvisualization.export.CVElementPhantomJSImageProvider.createSvgImage(CVElementPhantomJSImageProvider.java:106) at com.jaspersoft.jasperreports.customvisualization.export.CVElementImageProvider.createRenderable(CVElementImageProvider.java:159) at com.jaspersoft.jasperreports.customvisualization.export.CVElementImageProvider.getImage(CVElementImageProvider.java:135) at com.jaspersoft.jasperreports.customvisualization.export.CVElementPdfHandler.exportElement(CVElementPdfHandler.java:57) at net.sf.jasperreports.engine.export.JRPdfExporter.exportGenericElement(JRPdfExporter.java:2836) at net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:993) at net.sf.jasperreports.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:944) at net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:816) at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:519) at com.jaspersoft.studio.editor.preview.actions.export.AExportAction.exportWithProgress(AExportAction.java:174) at com.jaspersoft.studio.editor.preview.actions.export.AExportAction.doExport(AExportAction.java:201) at com.jaspersoft.studio.editor.preview.actions.export.AExportAction$2.run(AExportAction.java:149) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)Caused by: net.sf.jasperreports.engine.JRRuntimeException: Error while executing the javascript file to generate the SVG image: External process did not end properly; exit value: 1; process output:svgs...1Source is <svg id="element1988531457svg" width="555" height="376" version="1.1" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink"><style type="text/css"><![CDATA[#element1988531457svg circle { fill: #f000ff; }]]></style><circle cx="277.5" cy="188" r="178"></circle></svg>SCRIPT_SUCCESS at com.jaspersoft.jasperreports.customvisualization.export.CVElementPhantomJSImageProvider.getImageData(CVElementPhantomJSImageProvider.java:241) at com.jaspersoft.jasperreports.customvisualization.export.CVElementPhantomJSImageProvider.createSvgImage(CVElementPhantomJSImageProvider.java:86) ... 12 more Link to comment Share on other sites More sharing options...
quikman5988 Posted January 29, 2015 Share Posted January 29, 2015 Hi.I had a similar problem earlier today. I fixed it by selecting in the "design" tab of the jrxml file, then top-right, click "settings > preview format", then select "html"Hopefully that will work for you.Have you found any resource on custom visualization components? Because I'm trying to create my own from scratch and I can't find much information. And Jaspersoft studio isn't very helpful.Thanks. Link to comment Share on other sites More sharing options...
c.huettermann Posted January 29, 2015 Author Share Posted January 29, 2015 HTML Preview works as I mentioned above, but this is not sufficient for me, because PDF generation must work, too (and it does not work :( ). I didn't find helpful resources on cvc for version 6.x, but I hope the wiki-documentation will give useful hints (it's still in progress). I found some more information here (http://community.jaspersoft.com/wiki/custom-visualization-component-jaspersoft-studio-v56x), but I don't know if it's still up to date (Version 5.6). The best resource seems to be the source code of the examples :). Let's hope for further help of the community :) Link to comment Share on other sites More sharing options...
mustafa_2 Posted February 4, 2015 Share Posted February 4, 2015 The wiki for version 6 is available now. (http://community.jaspersoft.com/wiki/custom-visualization-component-v60x) Though it is still in progress, it is helpful, and better than the previous version wiki. Link to comment Share on other sites More sharing options...
chenyang.feng.cn Posted March 27, 2015 Share Posted March 27, 2015 check your phantomjs REALLY WORK,,,when I use another version of phantomjs, the java preview works Link to comment Share on other sites More sharing options...
manders_1 Posted June 2, 2015 Share Posted June 2, 2015 I had a similar problem and solved it by using older version of phantomjs - 1.9.2 Link to comment Share on other sites More sharing options...
naga6471 Posted June 3, 2015 Share Posted June 3, 2015 Hi i am facing same problem even i changed phantomjs 2.0 to 1.9plese gie me any solution for this naga Link to comment Share on other sites More sharing options...
newbie wan Posted June 11, 2015 Share Posted June 11, 2015 try to define your phantomjs in your environment system path, so you don't need to define in properties anymore.for windows:1. Download phantomjs-x.y.z-windows.zip and extract it.2. Move the contents of phantomjs-x.y.z-windows to C:binphantomjs3. Add C:binphantomjs to PATH (Environment Variables) 4. Check that it works by issuing "phantomjs --version" in cmd[/code]for Ubuntu:cd /usr/local/share/sudo wget http://phantomjs.googlecode.com/files/phantomjs-x.y.z-linux-x86_64.tar.bz2sudo tar jxvf phantomjs-x.y.z-linux-x86_64.tar.bz2sudo ln -s /usr/local/share/phantomjs-x.y.z-linux-x86_64/ /usr/local/share/phantomjssudo ln -s /usr/local/share/phantomjs/bin/phantomjs /usr/local/bin/phantomjs####check that it works by issuing "phantomjs --version" in terminal[/code]source : http://attester.ariatemplates.com/usage/phantom.html Link to comment Share on other sites More sharing options...
akthar.itzme Posted January 28, 2016 Share Posted January 28, 2016 Still the problem exist. Tried all said answers. Kindly help as soon as possible. Jasper guys help us. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now