Jump to content
Changes to the Jaspersoft community edition download ×

java.lang.NoSuchMethodException: Unknown property


csplrj

Recommended Posts

I have used JRBeanCollectionDataSource but the following exception arrives.

 

Code:
java.lang.NoSuchMethodException: Unknown property 'PurchasePackingId'
at org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(PropertyUtils.java:1157)
at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:754)
at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:783)
at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getBeanProperty(JRAbstractBeanDataSource.java:104)
at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getFieldValue(JRAbstractBeanDataSource.java:93)
at net.sf.jasperreports.engine.data.JRBeanCollectionDataSource.getFieldValue(JRBeanCollectionDataSource.java:104)
at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:727)
at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:980)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:126)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:747)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:663)
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601)
at net.sf.jasperreports.engine.JasperManager.fillReport(JasperManager.java:836)
at com.inventory.ReportPurchase.showReportVer6(ReportPurchase.java:142)
at com.inventory.ReportPurchase.print(ReportPurchase.java:124)
at com.utility.view.ui.mdiMenu.jbutPrintActionPerformed(mdiMenu.java:882)
at com.utility.view.ui.mdiMenu.access$1400(mdiMenu.java:19)
at com.utility.view.ui.mdiMenu$15.actionPerformed(mdiMenu.java:682)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

NESTED BY :
java.lang.NoSuchMethodException: Unknown property 'PurchasePackingId'
at org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(PropertyUtils.java:1157)
at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:754)
at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:783)
at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getBeanProperty(JRAbstractBeanDataSource.java:104)
at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getFieldValue(JRAbstractBeanDataSource.java:93)
at net.sf.jasperreports.engine.data.JRBeanCollectionDataSource.getFieldValue(JRBeanCollectionDataSource.java:104)
at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:727)
at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:980)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:126)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:747)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:663)
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601)
at net.sf.jasperreports.engine.JasperManager.fillReport(JasperManager.java:836)
at com.inventory.ReportPurchase.showReportVer6(ReportPurchase.java:142)
at com.inventory.ReportPurchase.print(ReportPurchase.java:124)
at com.utility.view.ui.mdiMenu.jbutPrintActionPerformed(mdiMenu.java:882)
at com.utility.view.ui.mdiMenu.access$1400(mdiMenu.java:19)
at com.utility.view.ui.mdiMenu$15.actionPerformed(mdiMenu.java:682)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

NESTED BY :
net.sf.jasperreports.engine.JRException: Error retrieving field value from bean : PurchasePackingId
at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getBeanProperty(JRAbstractBeanDataSource.java:116)
at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getFieldValue(JRAbstractBeanDataSource.java:93)
at net.sf.jasperreports.engine.data.JRBeanCollectionDataSource.getFieldValue(JRBeanCollectionDataSource.java:104)
at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:727)
at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:980)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:126)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:747)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:663)
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601)
at net.sf.jasperreports.engine.JasperManager.fillReport(JasperManager.java:836)
at com.inventory.ReportPurchase.showReportVer6(ReportPurchase.java:142)
at com.inventory.ReportPurchase.print(ReportPurchase.java:124)
at com.utility.view.ui.mdiMenu.jbutPrintActionPerformed(mdiMenu.java:882)
at com.utility.view.ui.mdiMenu.access$1400(mdiMenu.java:19)
at com.utility.view.ui.mdiMenu$15.actionPerformed(mdiMenu.java:682)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: java.lang.NoSuchMethodException: Unknown property 'PurchasePackingId'
at org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(PropertyUtils.java:1157)
at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:754)
at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:783)
at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getBeanProperty(JRAbstractBeanDataSource.java:104)
... 39 more
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at java.awt.Container.addImpl(Container.java:1015)
at java.awt.Container.add(Container.java:351)
at com.inventory.ReportPurchase.showReportVer6(ReportPurchase.java:154)
at com.inventory.ReportPurchase.print(ReportPurchase.java:124)
at com.utility.view.ui.mdiMenu.jbutPrintActionPerformed(mdiMenu.java:882)
at com.utility.view.ui.mdiMenu.access$1400(mdiMenu.java:19)
at com.utility.view.ui.mdiMenu$15.actionPerformed(mdiMenu.java:682)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

 

 

 

The bean used is

 

Code:
[code]public class ReportPurchaseObject
{
private int purchasePackingId;
private java.sql.Date transDate;
private int supplierId;
private int productId;
private String supplier;
private String product;
private Double sumOfQuantity;
ReportPurchaseObject(int purchasePackingId,java.sql.Date transDate,int supplierId,int productId,String supplier,String product,Double sumOfQuantity)
{
this.setPurchasePackingId(purchasePackingId);
this.setTransDate(transDate);
this.setSupplierId(supplierId);
this.setProductId(productId);
this.setSupplier(supplier);
this.setProduct(product);
this.setSumOfQuantity(sumOfQuantity);
}

public int getPurchasePackingId() {
return purchasePackingId;
}

public java.sql.Date getTransDate() {
return transDate;
}

public int getSupplierId() {
return supplierId;
}

public int getProductId() {
return productId;
}
public String getSupplier() {
return supplier;
}

public String getProduct() {
return product;
}


public Double getSumOfQuantity() {
return sumOfQuantity;
}

public void setPurchasePackingId(int purchasePackingId) {
this.purchasePackingId = purchasePackingId;
}

public void setTransDate(java.sql.Date transDate) {
this.transDate = transDate;
}

public void setSupplierId(int supplierId) {
this.supplierId = supplierId;
}

public void setProductId(int productId) {
this.productId = productId;
}

public void setSupplier(String supplier) {
this.supplier = supplier;
}

public void setProduct(String product) {
this.product = product;
}

public void setSumOfQuantity(Double sumOfQuantity) {
this.sumOfQuantity = sumOfQuantity;
}


}

 

Please help me

 

Thanks in advance

 

Bye for now

 

CSJakharia

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

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...