cancel
Showing results for 
Search instead for 
Did you mean: 

Programming generic sync with the MDK in 6.20

Former Member
0 Kudos

Has anyone been able to get the generic sync examples provided with the MDK working - GenericSyncExample.java in particular?

I imported and compiled the example without a problem but when I run it I get teh foll dump. Unfortunately the source code is not provided for the section which dumps so I cannot debug further...

Thanks

Ratna

2004-12-17 14:47:47 - Ctx( /NEWPROJECT 😞 Exception in: R( /NEWPROJECT + /start + null) - java.lang.NullPointerException

at com.sap.ip.me.sync.SyncHeader.<init>(Unknown Source)

at com.sap.ip.me.sync.SyncOutboundContainer.<init>(Unknown Source)

at com.sap.ip.me.sync.SyncOutboundContainer.<init>(Unknown Source)

at com.sap.ip.me.sync.ContainerFactory.createOutboundContainer(Unknown Source)

at genericsyncexample1.GenericSyncExample.getUserInfo(GenericSyncExample.java:124)

at genericsyncexample1.GenericSyncExample.doHandleEvent(GenericSyncExample.java:81)

at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.doPost(Unknown Source)

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

at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.service(Unknown Source)

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

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:479)

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I think there was a requirement, that the .war file should be named as the application's name, i.e. as given in the file Constants.java from the example:

// MI Application Name ** is also used by the MDK

// developer plug-in to define the correct archive name

String MI_APPLICATION_NAME = "MDK_genericsync_simpleJSP";

(this constant is returned from the method GenericSyncExample.getApplicationName())

In other words, you have to name your archive as

MDK_genericsync_simpleJSP.war

Later, I think it is used as directory name, and your current directory is named NEWPROJECT, i.e. your war file is perheps called NEWPROJECT.war?

I hope this helps,

Regards

Former Member
0 Kudos

Hello Ratna,

please be aware of the fact that a generic sync application needs a mobile solution descriptor (MSD) When you look at ther trace file in the log-directory of SAP ME you should find a similar entry:

"There is no MSD for current application (genericSyncExample)"

The missing MSD results in a missing conversation ID which leads to the NullpointerException that effectively is thrown in the class

ConversationIdHandler.getCurrentConversationId().

My current understanding is that the only way to get a MSD assigned, is to upload the application to the web console and install it from there on the client device.

However, this means that launching a genSync ME application from Eclipse is useless. I am wondering, if this is the way it was intended to be....

Best regards,

Tim