on 06-14-2007 9:13 PM
I started to get this error after pushing a search button (with a adaptive RFC) in a webdynpro created by me. The ivew worked just fine... dont know why started this problem.
java.lang.NullPointerException
at sap.com.ot.SearchView.onActionSearch(SearchView.java:205)
at sap.com.ot.wdp.InternalSearchView.wdInvokeEventHandler(InternalSearchView.java:174)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)
at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleAction(WebDynproMainTask.java:101)
at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleActionEvent(WebDynproMainTask.java:304)
at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:659)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:251)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:55)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
BTW, the search button sometimes works... sometimes not.. any idea ??
Message was edited by:
Rodrigo Ariel Giner de la Vega
Just change the if-statement into
if ( wdContext.nodeOutput().getLeadSelection()!=-1 && "x".equalsIgnoreCase( wdContext.currentOutputElement().getSubrc() ) )
Avinash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vega
wdContext.currentOutputElement().getSubrc()
This is throwing Exception.
Can you comment and Check?
Rgds
SS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, u guys were right.
This is the problem
if (wdContext.currentOutputElement().getSubrc().matches("X"))
But now I have a problem... How can I check if the node were filled ?
My iview page... make a validation, the RFC search for a person, if doesnt find him I have to put it into a message, if does find him I bring values in a table to show them.
before I used this if, so when some1 searched with certanly values and nothing is return. (because the user put the values wrong)
if (wdContext.nodeTable_Ot().size() == 0)
{
wdComponentAPI.getMessageManager().reportWarning(
"Registry doest found, check the values");
}
else
continue... with the Iview.
So I check if the tables were filled... the problem is that sometimes and I dont know WHY, if the user put the values right and SHOULD return info the tables the message that nothing was found is rised.
I tought that could be some problem with delay...so in R3 after I check the person and before starting to search for data. I pass this "Subrc" value if the person doesnt exits. This worked... until...yesterday.
Some1 could tell me the way to handle this kind of validation with adaptive RFC ?
Hi,
i think the null pointer exception must be getting triggered in the <i>if</i> statements.
This usually happens when the application does not get any value from the RFC node, and so it ends up taking a <i>null value</i>
Try debugging and check whether the <i>if</i> statements are getting executed!!
Also, try using
.equalsIgnoreCase()
to compare the values in the <i>if</i> statements, in place of
.matches()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rodrigo,
Note the exception, it shows that exception was at line number 205 of SearchView.java.. So please, highlight the statement at line number 205 in the code..
Regards,
Prabhakaran.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post the code on "onActionSearch"
Regards,Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is the code... I dont think that the problem is in the code... this worked just fine until a moment.
The only thing that I touch was the JCO connector I have to change it because the user to the backend system changed. Can be related to that ? Oo
//@@begin onActionSearch(ServerEvent)
this.CheckMandatory("Numot");
this.CheckMandatory("Cod");
wdComponentAPI
.getComponent()
.getMessageManager()
.raisePendingException();
wdThis.wdGetMultiCustController().executeZtrae_Ot_Input();
if (wdContext.currentOutputElement().getSubrc().matches("X"))
{
wdComponentAPI.getMessageManager().reportWarning(
"Registro no encontrado, verificar los datos ingresados");
}
else{
String ESTA = wdContext.nodeTable_Ot().currentTable_OtElement().getEstado();
String MAIL = wdContext.nodeTable_Ot().currentTable_OtElement().getMail();
if (MAIL.matches("")){ wdThis.wdFirePlugToMailView();
}
else{
if (ESTA.matches("ENTR")){
wdThis.wdFirePlugToEntrView();}
if (ESTA.matches("TERM")||ESTA.matches("ST05")){
wdThis.wdFirePlugToTermView();}
if (ESTA.matches("ESPE")){
wdThis.wdFirePlugToEspeView();}
if (ESTA.matches("PREP")){
wdThis.wdFirePlugToPrepView();}
if (ESTA.matches("ABIE")){
wdThis.wdFirePlugToAbiertaView();}
if (ESTA.matches("PREA")||ESTA.matches("PRER")){
wdThis.wdFirePlugToPrexView();}
ESTA = "";
}
}
MultiModel empModel = (MultiModel) WDModelFactory.getModelInstance(MultiModel.class);
empModel.disconnectIfAlive();
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.