Jump to content
Changes to the Jaspersoft community edition download ×

Exceptions after JasperReports upgrade

2004 IR Help

Recommended Posts

By: rickm - rmillham

Exceptions after JasperReports upgrade

2005-07-26 06:30

We've been using JasperReports 0.6.0 for some time with no problems. We've recently

attempted to upgrade to JasperReports 1.0.0, and we get the following exception:



java.lang.NoSuchMethodException: Unknown property 'Port'

at org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(PropertyUtils.java:1175)

at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:772)

at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801)

at net.sf.jasperreports.engine.data.JRBeanCollectionDataSource.getFieldValue(JRBeanCollectionDataSource.java:115)

at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:860)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:117)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:613)

at net.sf.jasperreports.engine.fill.JRFillSubreport.run(JRFillSubreport.java:391)

at java.lang.Thread.run(Thread.java:595)



We get the same exception when attempting to upgrade to any other version than 0.6.0 (i.e. 0.6.6, 0.6.8, etc.).


The datasource that we're sending to the report is a vector of simple beans (shown below)

wrapped in a JRBeanCollectionDataSource object.



static public class ServerConfig {


private String ip;

private String port;


public ServerConfig(String ip, String port) {

this.ip = ip;

this.port = port;




public String getIp() {

return ip;



public String getPort() {

return port;




I've also made sure that the Jars that JasperReports is dependent on are current.

Is there something that we're missing here?








By: Teodor Danciu - teodord

RE: Exceptions after JasperReports upgrade

2005-07-26 08:40




Since 0.6.0, the JavaBeans data sources where subject

to modifications. We have removed the custom-made

code that was used to lookup for the getter methods

through Java Reflection and now we are relying on

Jakarta Commons BeanUtils for calling JavaBean

properties on the data source objects. This is more in

accordance with the standards.


In your case, the report does not work anymore because

the name of the JavaBean property has to be lower case:

"port" and not upper case "Port".


Note that these days, those data sources can work also

with the report field name which now can contain dots

and other special characters and you no longer have to

rely on the fields description.


I hope this helps.


Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...