on 09-01-2009 7:52 AM
Hi experts,
I have a very strange problem. My web dynpro application works fine on the development portal. i am in the process of deploying to the production portal there is no issue it deploys perfectly without any problems. However i have noticed that some methods in my custom controlller which are called from the view do not run. there is no error message or anything data just doesnt get picked because the execute function which fills the context are in the custom controller methods.
For some reason the method in the custom controller does not get called even though i'm calling it for the view. I have this problem with two methods. the other methods work without any issue.
Now i overwrote what i have on production at the moment so am stuck and in need for a solution.
I have tried undeplying, restarting and re-deploying to no avail. what could be wrong?
thanks and regards,
dilanke
Try using messages on every call to see where exactly the issue is.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the quick response.
I already tried that. I put in messages before and after the calling of the method and one inside of the method right on top.
The messages before and after the call get printed but the message inside the method doesnt get printed. hence why i assumed that it doesnt go inside the method.
thanks and regards,
dilanke
Hi Dilanke,
If no issues, could you please provide the snapshot of your code. This is not a strange problem. Its just that you might have mis coded the try catch block. May be your dev server is supporting those features but not the production server.
Have you tested your application with all the test cases (Exception handling) this could be the prominent reason. Just Check & provide code if suits you. Thanks.
Best Regards
Chander Kararia
Deal all
This is the code. basically im calling it from the plug on the detail screen.
This is the method that doesnt get called anymore.
wdThis.wdGetGetPurchaseOrderCustController().getPODetail();
The reportSuccess() works fine.
regards,
Dilanke
public void onPlugFromListView(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onPlugFromListView(ServerEvent)
try
{
String po = wdThis.wdGetGetPurchaseOrderCustController().wdGetContext().currentContextElement().getPO_Id();
wdContext.currentZGETPODETAILS_INPUTElement().setI_Ebeln(po);
wdThis.wdGetGetPurchaseOrderCustController().getPODetail();
wdComponentAPI.getMessageManager().reportSuccess(po);
String fileName = "F://XML_Downloads//" + po + ".xml";
IWDResource resource = WDResourceFactory.createResource(new FileInputStream(new File(fileName)),fileName,WDWebResourceType.XML,true);
wdContext.currentContextElement().setXml_Resource(resource);
}
catch(Exception e)
{
e.printStackTrace();
}
//@@end
}
Hi experts,
I still have this issue. only thing now it got worse as now when i deployed to thedev box the dev box also came up with the same issue. I tested it and realized that the custom controller methods do not get called at all even within the controller.
I get the following exception when calling a method in the custom controller.
java.lang.NullPointerException
at com.sap.getpurchaseordercomp.GetPurchaseOrderCust.test(GetPurchaseOrderCust.java:627)
at com.sap.getpurchaseordercomp.GetPurchaseOrderCust.wdDoInit(GetPurchaseOrderCust.java:124)
at com.sap.getpurchaseordercomp.wdp.InternalGetPurchaseOrderCust.wdDoInit(InternalGetPurchaseOrderCust.java:500)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingCustomController.doInit(DelegatingCustomController.java:73)
basically it says cannot find the method. This holds true for both declared methods as well as custom methods. I have no idea why. I have tried undeploying and reploying to no avail. so something is obviously wrong with the custom controller. Thinking of creating another custom controller and moving the code and context to that but that is also alot of work.
any suggestions?
thanks and regards
dilanke
The code,
wdDoInit -
public void wdDoInit()
{
//@@begin wdDoInit()
test();
Zgetpodata_Input Head_Input = new Zgetpodata_Input();
wdContext.nodeZGETPODATA_INPUT().bind(Head_Input);
Det_Input = new Zgetpodetails_Input();
wdContext.nodeZGETPODETAILS_INPUT().bind(Det_Input);
//@@end
}
and the calling function. test(). This is just a test function to see if it gets called.
public void test()
{
mgr.reportSuccess("success");
}
I didnt post the entire code as it is quite long.
This results in a runtime error. There are no errors when building. it just falls over when running.
regards,
dilanke
Brilliant!!!!!.
Aviant You solved my problem. Unbelievable how one line of deleted code can change the whole application. I was clearinig the test messages and looks like i deleted the instantiation of the message manager.
thank you all for taking time to help me out.
Edited by: Dilanke Hettiaratchi on Sep 23, 2009 3:11 PM
Use the debugger. Maybe an exception is thrown and not handled correctly by your application.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
it seems that the control is not going inside the method as the message inside the method is not printed.
1.Try the following to test,
In the WdDoInit() method of controller call the method like getData(); and later in the below code define the method.
2. If pont 1 is not working try to define the code inside //@begin others, this line you will get at the end of code
//@@begin others
//@@end
Thanks
Susmita
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.