on 2007 Jul 11 10:15 AM
hi
my app is showing this error while deploying..
can any1 explain??
java.lang.NullPointerException
at java.math.BigDecimal.multiply(BigDecimal.java:412)
at com.sap.tut.wd.tutwd_table_init.tablecomp.TableComp.getProductTOTAL_PER_ARTICLE(TableComp.java:184)
at com.sap.tut.wd.tutwd_table_init.tablecomp.wdp.InternalTableComp.getProductTOTAL_PER_ARTICLE(InternalTableComp.java:159)
at com.sap.tut.wd.tutwd_table_init.tablecomp.wdp.IPublicTableComp$IProductElement.wdGetObject(IPublicTableComp.java:437)
at com.sap.tc.webdynpro.progmodel.context.MappedNodeElement.wdGetObject(MappedNodeElement.java:351)
at com.sap.tc.webdynpro.progmodel.context.AttributePointer.getObject(AttributePointer.java:141)
at com.sap.tc.webdynpro.clientserver.data.DataContainer.getAndFormat(DataContainer.java:1066)
at com.sap.tc.webdynpro.clientserver.data.DataContainer.getAndFormat(DataContainer.java:1038)
at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.TextView.getText(TextView.java:812)
at com.sap.tc.webdynpro.clientimpl.html.uielib.standard.uradapter.TextViewAdapter.getText(TextViewAdapter.java:270)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.TextViewRenderer.render(TextViewRenderer.java:40)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:294)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:102)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableCellRenderer.renderSapTableGenericCellFragment(SapTableCellRenderer.java:1201)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableCellRenderer.renderSapTableCellFragment(SapTableCellRenderer.java:226)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableCellRenderer.render(SapTableCellRenderer.java:71)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:294)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:102)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableRowRenderer.renderSapTableRowFragment(SapTableRowRenderer.java:90)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableRowRenderer.render(SapTableRowRenderer.java:41)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:294)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:102)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableDefaultBodyRenderer.renderSapTableDefaultBodyFragment(SapTableDefaultBodyRenderer.java:168)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableDefaultBodyRenderer.render(SapTableDefaultBodyRenderer.java:36)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:294)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:102)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableRenderer.renderSapTableFragment(SapTableRenderer.java:570)
Hi,
The parameter for the method multiply holds null value.
Check the parameters.
Regards
Satish Kumar SV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
BigDecimal total=new BigDecimal(0),pricePerProduct;
int n= wdContext.nodeProduct().size();
try {
for(int i=0;i<n;++i)
{
total=total.add(wdContext.nodeProduct().getProductElementAt(i).getTOTAL_PER_ARTICLE());
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Have u initialized the arraylist total as
ArrayList total=new ArrayList();
before using it?
Also, there is no need of assigning total to total.
So
total.add(wdContext.nodeProduct().getProductElementAt(i).getTOTAL_PER_ARTICLE());
is enough.
Also check whether wdContext.nodeProduct() is null beforre taking size.
Regards
Fahad Hamsa
Hi Kanwalpreet,
Can u send the code for TableComp.getProductTOTAL_PER_ARTICLE () ??What u r doing on line 184?
regards
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The the parameter that u r passing to the BigDecimal.multiply(multipland) is getting null value.so the exception is raised.
Thanks
ritu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
10 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.