[#9296] - JasperStudio doesn't find/update classes in bin directory

Category:
Bug report
Priority:
Normal
Status:
New
Project: Severity:
Minor
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:
0

When I used the "Dataset and Query Dialog" to select a Java Bean from the same project as the Jasper Report a Class Not Found exception appeaed. The "Data Adapter Wizard" for a "Collection of JavaBeans" had the same problem.

I could work-around this problem be deleting the eclipse project (without deleting it's contents) and re-importing again.

The "Refresh Preview Data" does not show modification on the corresponding bean factory. The report-preview does not either.

When I added an additional property to the bean, that property appeared immediately in the fields-list. After adding that new field and clicking Referesh Preview Data I got:

net.sf.jasperreports.engine.JRException: Error retrieving field value from bean: value2.
at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getBeanProperty(JRAbstractBeanDataSource.java:193)
at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getFieldValue(JRAbstractBeanDataSource.java:158)
at net.sf.jasperreports.engine.data.JRBeanCollectionDataSource.getFieldValue(JRBeanCollectionDataSource.java:104)
at net.sf.jasperreports.engine.fill.JRFillDataset.setOldValues(JRFillDataset.java:1489)
at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:1390)
at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:1366)
at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1085)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:113)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:582)
at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:163)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:474)
at com.jaspersoft.studio.data.reader.DatasetReader.fillReport(DatasetReader.java:245)
at com.jaspersoft.studio.data.reader.DatasetReader.start(DatasetReader.java:309)
at com.jaspersoft.studio.property.dataset.dialog.DataPreviewTable$5.run(DataPreviewTable.java:256)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.lang.NoSuchMethodException: Unknown property 'value2' on class 'class sample.jasper.Bean'
at org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty(PropertyUtilsBean.java:1277)
at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:808)
at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:884)
at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:464)
at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getBeanProperty(JRAbstractBeanDataSource.java:173)
... 14 more

Thus the preview did not recognize the updated Bean.class in the bin directory.

v6.3
hajo70_1's picture
Joined: Mar 1 2017 - 11:39pm
Last seen: 1 week 1 day ago
Feedback
randomness