cancel
Showing results for 
Search instead for 
Did you mean: 

Error 500 while running the application on Mobile Client

Former Member
0 Kudos

Hi all,

I have made a smart sync project using the XML file of SYNCBo's.

When I synchronize in my MI client,the application name is appearing on the homepage.

But when i click on the application I get the following error trace::

Error: 500

Location: /MIAPP2/start

Internal Servlet Error:

java.lang.NullPointerException

at com.sap.ip.me.smartsync.data.RowManager$1.elementCount(RowManager.java:115)

at com.sap.ip.me.smartsync.data.SyncBoCollectionImpl.(SyncBoCollectionImpl.java:27)

at com.sap.ip.me.smartsync.data.SyncBoDataFacadeImpl.getSyncBos(SyncBoDataFacadeImpl.java:129)

at miProjectPackage.dataaccess.SmartSyncDBAccess.getRowInstances(SmartSyncDBAccess.java:94)

at miProjectPackage.dataaccess.TableContentProvider.getTableWithSyncBoNames(TableContentProvider.java:83)

at miProjectPackage.MiProjectClass.showSyncBoNames(MiProjectClass.java:236)

at miProjectPackage.MiProjectClass.doHandleEvent(MiProjectClass.java:71)

at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.doGetNotThreadSafe(AbstractMEHttpServlet.java:347)

at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.doGet(AbstractMEHttpServlet.java:689)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.service(AbstractMEHttpServlet.java:313)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)

at org.apache.tomcat.core.Handler.service(Handler.java:287)

at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)

at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806)

at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)

at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)

at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)

at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)

at java.lang.Thread.run(Thread.java:534)

Im new to MI .Can anybody suggest where am i wrong?

Juhi..

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Got the application running.

thanks to all.

Former Member
0 Kudos

Hi,

I think this might be the problem from SmartSync api.Make sure that the MDK is properly pluged in to nwds.Make sure that all the required jar files are included ,like

crimpson.jar,jasper.jar,jaxp.jar,MEg.jar,pinstall.jar,servlet.jar,webserver.jar,xalan.jar,MDKext.jar and tools.jar.

Regards,

Sri

Former Member
0 Kudos

Dear Juhi,

The error might be simpler than thought in the discussion. Is the Application name in the server and the one inside the generated war file (or optionally, in turn to SDA) same?

Check the NWDS help on MDK / Mobile applications depending on your NWDS version for the same. It is mentioned clearly in the smart sync example.

Regards,

Veera

Former Member
0 Kudos

Hi Juhi,

Check the SyncBo and Worklist monitor in merep_sbuilder.

Go to merep_sbuilder, enter the syncbo and mobile id and execute it.Then check the worklist monitor (click the monitor icon) whether it is in Finished state or Waiting state.If it is in waiting state chage it to Ignore state and run the application from client.

Regards,

Sri

Edited by: Srikanth Thatipally on Jan 27, 2009 1:20 PM

Former Member
0 Kudos

hi

check whether the data is being retrieved in the getlist and getdetail Bapi wrappers.

as per the exception your bapi wrappers are not working fine so test them with ABAP emulator in merep_sbuilder and if they are working fine,

check whether the synbo in enabled or not.

Regards

Manohar

Former Member
0 Kudos

Hi Gouri..

the BAPI is working fine, as in the function modules are fetching the results..

but as u said wen i try in ABAP emulator merep_sbuilder, there im not getting any data.

What could be the reason...

please help..new to MI

Former Member
0 Kudos

Dear Juhi,

If the Bapi's at the backend is getting executed successfully and still there's no data in merep_sbuilder,

then could you check the coneection between the Backend and the Middleware.

If the RFC connection is not proper then also the data would not flow till the Middleware.

Kindly check the same.

Regards,

Abhivaykti

Former Member
0 Kudos

Hi Abhi,

cheked the connection between R3 (backend) and middleware...

evrythng is fine there....there i sno problem in the RFC connectivity...

Could you suggest anything else..

From the lines that the trace is showing..

I can figure out that wherevr the SYNCBO name is involved, there is exception..

What cud be the error?

Juhi

Former Member
0 Kudos

hi

so when the bapi wrappers are not fetching the data in emulator so null pointer exception is expected and to resolve this check whethere the RFC destination is fine or not.

if so can you attach the trace file.

Regards

Manohar

Edited by: Gouri Manohar Gadhamsetty on Jan 27, 2009 1:08 PM

Former Member
0 Kudos

hi

check the status in MEREP_MON

refer this link http://help.sap.com/saphelp_nw70/helpdata/en/ff/a3214174abef23e10000000a155106/content.htm

regards

manohar

Edited by: Gouri Manohar Gadhamsetty on Jan 27, 2009 1:19 PM

Former Member
0 Kudos

Hi Gouri..

have alrdy chkd the points mentioned by you....

attatching the trace again...

java.lang.NullPointerException

at com.sap.ip.me.smartsync.data.RowManager$1.elementCount(RowManager.java:115)

at com.sap.ip.me.smartsync.data.SyncBoCollectionImpl.(SyncBoCollectionImpl.java:27)

at com.sap.ip.me.smartsync.data.SyncBoDataFacadeImpl.getSyncBos(SyncBoDataFacadeImpl.java:129)

at miProjectPackage.dataaccess.SmartSyncDBAccess.getRowInstances(SmartSyncDBAccess.java:94)

at miProjectPackage.dataaccess.TableContentProvider.getTableWithSyncBoNames(TableContentProvider.java:83)

at miProjectPackage.MiProjectClass.showSyncBoNames(MiProjectClass.java:236)

at miProjectPackage.MiProjectClass.doHandleEvent(MiProjectClass.java:71)

at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.doGetNotThreadSafe(AbstractMEHttpServlet.java:347)

at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.doGet(AbstractMEHttpServlet.java:689)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.service(AbstractMEHttpServlet.java:313)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)

at org.apache.tomcat.core.Handler.service(Handler.java:287)

at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)

at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806)

at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)

at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)

at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)

at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)

at java.lang.Thread.run(Thread.java:534)

Please help

Former Member
0 Kudos

Hi Juhi,

Are you able to navigate from merep_sbuilder to the backed function modules?

Like giving the sync_BO name and then clicking on function module name.It should auto. direct you to the backend function module.

If yes,please check the status of all generated SyncBO's on merep_pd.

Regards,

Abhi

Former Member
0 Kudos

Hi Veera,

while creating the project from XML file, I assigned a name to the application.

Thereafter, I have used the same name everywhere.

I hope this is the right method..

Former Member
0 Kudos

Dear Juhi,

Please refer to the Smart Sync Example in the NWDS. You will be able to make out what I am saying here.

Regards,

Veera

Former Member
0 Kudos

Hi all,

I realized that the application name in smartsync project should be same as the MCD described in the SYNC BO and also the mobile component in J2EE engine deployment should be same.

I undeployed the previous MC and made anthr one with the right names.

After deployment, I assigned it to my Mobile device and then synchronized from the MI Client.

My application's name is viisible in th homepage now,but when i click on it it shows this error.

Error: Cannot start application

Application 'MIApp2' is not registered; upload application to SAP Web Console

where MIApp2 is the older application which I have alrdy undeplyed...

Have closed and strtd the Mobile engine many times but no use...

any trick...?

Former Member
0 Kudos

Hi,

Can u tell me which version of MI r u using?

Regards,

Sri

Former Member
0 Kudos

Dear Juhi,

The "app name" thing is what I tried telling you yesterday. I advice you to reset the client data from settings link in client, sync a couple of times, check the status of the undeployed app in the Web Console / NWA, and if problem persists, remove assignment of the new app, sync couple of times, and then add app again.

By the way, have you got the name thing right? See the Application name, not the project name should be the same with the name of the war/sda file and the app/component name in the j2ee engine. I had wanted you to see the following text in your NWDS help - > SAP Net. Dev. Studio Doc.->MI Dev./MDK ->Go and create ->First Example JSP:

The class SystemInfo extends AbstractMEHttpServlet which extends javax.servlet.http.HttpServlet itself. The method doHandleEvent does:

Implemented Classes in the Servlet for the Example

We create a class SystemInfo that extends the class AbstractMEHttpServlet and implements Constants. Constants is an interface in which we define all relevant variables for the application. All variables used in Constants are written in uppercase characters. So anytime you see an uppercase variable used in class SystemInfo you will find the definition in interface Constants.

The class SystemInfo extends AbstractMEHttpServlet which extends javax.servlet.http.HttpServlet itself. The method doHandleEvent does:

public String getApplicationName()

This method has to be overwritten. It returns the name of the MI client application. The name specified here has to be the same used for the WAR file name and the name of the application specified in the MI Webconsole.

Regards,

Veera

Former Member
0 Kudos

Hi..

Im using MI 7.0

I unisnstalled and reinstalled the MI client.

NOw that error is not soming but the first error is coming again.

The NWDS help suggests a way to test the syncBO in the backend in merep_sbuilder..

That test is not getting the data,but if I check the BAPI alone it is fetching the data.

What cud be the reason?

Former Member
0 Kudos

hi,

i just want to confirm whether you have enabled the syncbo in MEREP_PD,if not enable that .

if you have selected the syncbo of type T01 start the replicator and enable it.

regards

manohar

Former Member
0 Kudos

Dear Juhi,

Yes,you have undeployed everything and deploy new applications with right naming conventions.

But after creating new application/MCD,have you registered this new MCD to the Web-Console?

Make sure that the new MCD is registered and assigned to your mobile device from Web-Console.

Please check following links,

http://help.sap.com/saphelp_nw04/helpdata/en/57/b3b2a5b71c7c43b4cd39fe40fed192/frameset.htm

Regards,

Abhi

Former Member
0 Kudos

Hi All,

Im stil stuck.

Can anyone explain this..:

The RFC connects backend to the abap stack of the middleware.

JCO connects J2EE stack and ABAP stack of the middleware.

BUt in out case the JCO is not referred anywhere.

How will the data flow??

In the MDK help smartsync tutorial,I tried to deploy it to my device and only the jSP's are showing,there is no data.

Any help??

Former Member
0 Kudos

Hi Juhi,

The RFC connects backend to the abap stack of the middleware.

>>MI Server(2.5 and 7.0 ) consists of two parts.

1.) Java stack-- it recieves data from the client in form of https requests and also compresses them.it is also used for application deployment.

2.)Abap stack-- it usually interacts with the Backend in the form of queues using the RFC connection set using TRX sm59.

JCO connects J2EE stack and ABAP stack of the middleware.

>>JCO( Java Connector) is used to pass the data from Java stack to the Abap stack..

BUt in out case the JCO is not referred anywhere.

JCO is alraedy there in the MI server and takes care of data transfer from java stack to abap stack.

In the MDK help smartsync tutorial,I tried to deploy it to my device and only the jSP's are showing,there is no data.

>> Have you created the required SyncBo's following all the rules given in MDK.

Regards,

Akhil

Former Member
0 Kudos

Hi,

I checked for the SyncBo of the smartsync tutorial...it exists only in the backend and not in the ABAP stack of the middleware.

I understand that it shud be present in the abap stack too,right??

But cant understnd why my own application is not working..The syncbO for that are very much present in the MIddleware as well as backend.

Hasnt anybody faced such an error before??

Former Member
0 Kudos

Hi,

instead of exporting the application from NWDS you better stop the MI Client manually and start it once again.

if not stop the MI Client and now export the application.And before exporting the application make sure that the Run button is checked.

Regards

Manohar

Former Member
0 Kudos

Dear Juhi,

SyncBo's should only be present at Middleware ,...what is needed at backend is the bapis they use.

Goto your middleware in and TRX: merep_sbuilder and open ur SyncBo mapping.

Double click on the bapis of SyncB and see whether you are able to navigate to ur backend system which has these bapis.

Also check whether all ur SyncBos are enabled.

Regards,

Akhil

Former Member
0 Kudos

Hi Akhil,

i have checked all the point that you have mentioned out here.

ANy other check that I can perform??

Former Member
0 Kudos

Dear Juhi,

Did you assign and check whether the app is working in any other PC's MI client? If it works in another PC then, just shutdown / exit your MI Client, go into the client installation folder -> webapps->Delete ur app's folder and /or war file. Export app again from NWDS, start the MI client again, now check the working of the app in client.

Regards,

Veera

Former Member
0 Kudos

Hi,

I have checked all the points mentioned till now.

But no use.

Can anybody tell me if DB2E application is something required.??

Also the standard smartsync tutorial application is not geting the

data from the backend because those SyncBO do not exist in the Middleware.

How can I replicate the standard SyncBO which are present in the backend, into the middleware??

Former Member
0 Kudos

Dear Juhi,

I got it at last. Yes DB2e is required. You can download a trial from this link for 9.1.0 (though 9.1.2 might be required - the zip file should work)

http://www14.software.ibm.com/webapp/download/product.jsp?s=p&id=JPEN-4HNW2H&S_CMP=rnav

You may get a full blown download from the above link. After full download, get the db2e zip file which can be installed as an add on to your mobile app.

You can alternatively try using an older version of DB2e (8.2.2) which can be got from:

https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/1a29541d-0a01-0010-81bf-fdab6713a9d4

Edit: You will get an SDK zip file. Under that there is an MI folder, which contains the zip files which need to be uploaded to the NWA Mobile Admin / WebConsole as ADD-ON component.

Regards,

Veera

Edited by: Veeraraagavan R on Feb 2, 2009 11:37 AM

Former Member
0 Kudos

HI all,

db2e has got licensing issues.

i got to know from some threads that for PDA'a file i/o is also an option.

Can u please tell me what exactly is file i/o and how do I use it in place of db2e??