Custom Visualization Component with community version faild


hi, guys, I have successfully run the Custom Visualization Component in the jasperserver-pro(localhost:8080/jasperserver-pro), which is commercial version. but faild in the community version(localhost:8080/jasperserver). so I want to know the reason is the difference between the two version or something I have donw wrong. I do this cause I want to integrate with D3.js

any suggestions would be appreciated 


follow up , there is no error message , and when I view the report in jasperserver, the page will continue loading all the time. and the server will create temp file like svg and html file in temp folder. and these file works perfectly , so why jasperserver not show these thing ?

this is the link I followed, worked on pro version :

the community version I use:


jars:htmlcomponent.jar, jasperreports-customvisualization-6.0.1.jar, mysql-connector-java-5.1.25-bin.jar, phantomjs works

and my

#limit the crosstab bucket/measure count to prevent out of memory errors
#suppress page and column footers and all but the first page and column headers when exporting to XLS
# report exporter hints override export parameters
# use the workaround for the Sun JDK Glyph synchronization bug
# the fast/single line text measurer factory
# the default chart theme to use
# override the JR MDX query executer
# save line break positions at fill time
# nested tables can cause column misalignments
# ignore missing fonts in reports
# allow element negative width
# switch between new XHTML to the former HTML exporter
# date patterns for JR interactive components
#com.jaspersoft.jrs.export.odt.paginated=false's picture
Joined: Mar 16 2015 - 3:53pm
Last seen: 2 years 3 months ago

4 Answers:


hi, the problem is still not solved. and I want to post my tutorial on how to integrate jasperserver and studio with D3.js in case someone need this.

and this tutorial is just for someguy's enviroment same like me, mac, haha. 


jasper server integrate with d3.js

1,install the tomcat:

in terminal type:

brew search tomcat

and type:

brew install tomcat7

so, tomcat7 will installed in your /usr/local/Cellar

2,install jasper server-ce

download the jasper server source code, link:


unzip the zip file and then folllow the TIBCO jasperreporats server source build guide to install jasper server in your tomcat

steps are :

copy config file you need from the sample config file and rename it, like if you want to run jasper server on mysql and tomcat, run these command in your terminal:

cd <PATH>/JasperReports-Server-cp-6.0.1-src/jasperserver/buildomatic

cp sample_conf/

and change the data in it :

dbUsername = root

dbPassword = password

maven = /home/devuser/apache-maven-3.0.4/bin/mvn

js-path = /home/<user>/JasperReports-Server-6.0-src/jasperserver

repo-path = /home/<user>/JasperReports-Server-6.0-src/jasperserver-repo

js-pro-path = /home/<user>

(no idea why it need this, just give some location you like, any one works, but if you comment this line, it will get error when you install)

maven.home = /usr/local/apache-maven/apache-maven-3.2.3

(this is optional, in case jasper can not have your maven home)

make sure you have start your database and stop your tomcat , then follow these command in your terminal to build the source code:

cd <PATH>/JasperReports-Server-cp-6.0.1-src/jasperserver/buildomatic

./js-ant clean-config

./js-ant gen-config

./js-ant add-jdbc-driver

./js-ant build-ce

./js-ant create-load-js-db-ce

./js-ant deploy-webapp-ce

(if you failed when on one step, and the error message mentioned something like request address is already used.. you can search the result from google and get the solution, but easy way to fix this is turn off your wifi)

now, the jasper server has been deployed to your tomcat, so go to tomcat and start the server:

cd /usr/local/Cellar/tomcat7/7.0.59/libexec/bin


then go to http://localhost:8080/jasperserver

(if you can not see the welcome page, and a hug 404 come into your eye, an easy way to fix this is to turn off your wifi, and restart your server)

you will see the welcome page, then use account:jasperadmin, password:jasperadmin to login

3,install jasper studio

download page is

4,Custom Visualization Component

official link :

the only thing jasper studio need is phantoms, the other things are for jasper server:

1,install phantomjs

you will need phantom js

download it from its website:

if your system is yosemity or later , you may want this version of this phantom:

other wise it will not work

after download, unzip the file, and add it to your PATH, and it is ready to use.

to find which PATH you use, just type

echo $PATH

terminal will give you all the PATH you are using, move phantomjs to any of them

you can run phantomjs —version in your command to make sure phantomjs works

if you are running linux, please follow the link bellow to install the source code,

very sorry for the 30 minutes you will take:

2,add require.js

go to :


add these two line in



Replace /path/to/require.js with a proper absolute path to require.js


the location of jasper server jars is :


check if you have jasperreports-customvisualization-x.y.z.jar in your jasper server lib file,

if you do not have it , download it from website. this jar include D3.js and other stuff you will need to customize your jasper

find htmlcomponentX_X_X.jar in studio, this is shipped with studio, but not shipped with jasper server. so extract htmlcomponentX_X_X.jar, and get another htmlcomponent.jar, put it in server lib file. this file is used for html component in server side

(if you do not have this jar in server side, it will get your error when you deploy report from studio to server)

5,run the sample

before this, you may wan to see 3rd part in errors and solutions

this is official link tell you how to run the D3 samples;

you can follow the tutorial. they use sample DB which is a postgre database created by studio. so if you want to make these samples viewed in jasper server, you will need to make a same database and connect with server

Or, you can create a simple D3.js by yourself, no database needed

1, click File-> new -> other ->jaspersoft Studio -> custom visualization component


errors and solution:

1,start the server, and there is error like this:

2013-12-09 15:35:47,869 ERROR JNDIResourceProvider,localhost-startStop-1:75 - error closing context

javax.naming.OperationNotSupportedException: Context is read only

solution link:

2,if you get an error from catalina.out said your java memory not enough, just increase it in tomcat setting:

add following two line to your <USER>/.bash_profile file:


export JAVA_OPTS="$JAVA_OPTS -Xms1024m -Xmx2048m -XX:PermSize=512m”

and run

source ~/.bash_profile

in your terminal to restart the bash_profile

3,if you can not see the preview in jasperstudio in java format, you may try this :


4,when you add data source in jasper studio, and there is an error said you do not have XXX driver, you may click Driver Classpath and add your jars here.

and same thing when you run your project in studio, and you can add your jars in the project class path. by right click your project, and click Build Path -> Configure Build Path ->Libraries -> add extenal JARS's picture
Joined: Mar 16 2015 - 3:53pm
Last seen: 2 years 3 months ago


Have you ever successfully run custom visualization component in Jasperserver CE?

Cause I have faced some problem when trying to deploy in server. It always says "Internal server error".

But if i remove cvc element in the report file, it deployed well.

I have follow your intruction above to add some line in and some jar too.

is it ever happen to you?


Thanks & Regards

newbie wan's picture
Joined: Nov 12 2014 - 10:20pm
Last seen: 6 months 2 weeks ago

Hi newbie wan

I think you may NOT add html component to the jasperserver, check that

d's picture
Joined: Mar 16 2015 - 3:53pm
Last seen: 2 years 3 months ago

:D yeah you're right,

i removed that html component jar and its works well.


newbie wan's picture
Joined: Nov 12 2014 - 10:20pm
Last seen: 6 months 2 weeks ago