Skip to Content
author's profile photo Former Member
Former Member

Web Dynpro Java: Mobile Device Recognition Problem

Hi, all!

I' m building an WD App with different UIs for Mobile and Desktop usage and therefore try to get a com.sap.mobile.clientinfo.ClientInfo Object via:

ClientInfoFactory clientInfoFactory = ClientInfoFactory.newInstance();
		ClientInfo clientInfo = clientInfoFactory.newClientInfo();
		IWDProtocolAdapter protAdapter = WDProtocolAdapter.getProtocolAdapter();
		IWDRequest request = protAdapter.getRequestObject();
		clientInfo.load(request);

For this I added DC "com.sap.mobile.clientinfo" out of SAP_JTECHS as Used DC.

When starting the Application, I receive the following error:

java.lang.NoClassDefFoundError: com/sap/mobile/clientinfo/ClientInfoFactory
	at at.tmobile.proj.intern.vis4.start.StartCompInterface.getClientInfo(StartCompInterface.java:156)
	at at.tmobile.proj.intern.vis4.start.StartCompInterface.wdDoInit(StartCompInterface.java:112)
	at at.tmobile.proj.intern.vis4.start.wdp.InternalStartCompInterface.wdDoInit(InternalStartCompInterface.java:112)
	at com.sap.tc.webdynpro.progmodel.generation.DelegatingCustomController.doInit(DelegatingCustomController.java:73)
	at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
	at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
	at com.sap.tc.webdynpro.progmodel.controller.Component.getCustomControllerInternal(Component.java:448)
	at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.createComponentInternal(ComponentUsage.java:167)
	at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.createComponent(ComponentUsage.java:116)
	at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.createInstanceIfDemanded(ComponentUsage.java:728)
	at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.getImplementingInterfaceViewInfo(ComponentUsage.java:403)
	at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.getViewManagerFor(ClientComponent.java:304)
	at com.sap.tc.webdynpro.progmodel.view.ViewManager.createUninitializedView(ViewManager.java:619)
	at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:685)
	at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:546)
	at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:715)
	at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:546)
	at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:715)
	at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:570)
	at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:155)
	at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.doOpen(WebDynproWindow.java:300)
	at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.open(ApplicationWindow.java:204)
	at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:364)
	at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:700)
	at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:269)
	at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:707)
	at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:661)
	at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:229)
	at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:152)
	at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
	at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
	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)

Im a referencing the wrong DC in the wrong way? Any hints more than appreciated!

Regards,

Thoams

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 02, 2006 at 07:49 AM

    Thomas,

    In your WD project right-click on project node, open "Properties", switch to "WebDynpro References" then select "Library References". Add here library <b>com.sap.mobile.clientinfo</b>

    If you add it in wrong place before, then remove it. If you add run-time dependecy for used DC, then remove it (just left build-time dependency).

    To find corresponding library/service in future, run Visual Administrator, find your service/library in Services/Libraries tree and copy the value of <b>Service Name</b> or <b>Library Name</b> respectively.

    Valery Silaev

    SaM Solutions

    http://www.sam-solutions.net

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 02, 2006 at 02:36 AM

    hey Thomas,

    I guess you need to include a jar file which provides you class ClientInfoFactory.

    Please make sure it has been placed into lib folder incase you are deploying and testing locally.

    Regards,

    Ashutosh Moharir

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 07:35 AM

    Hi Thomas,

    I have a similar requirement wherein I would have two views one for Desktop and one for Mobile device.

    Is there anything else you have done to find out from which device the user logged on from (i.e a Mobile or Desktop) as when I tried executing the code snippet you have mentioned I am getting NullPointerException for the request object.

    Appreciate your help in this.

    Regards,

    Praveen.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 07:39 AM

    Hi Thomas,

    I have a similar requirement wherein I would have two views one for Desktop and one for Mobile device.

    Is there anything else you have done to find out from which device the user logged on from (i.e a Mobile or Desktop) as when I tried executing the code snippet you have mentioned I am getting NullPointerException for the request object.

    Appreciate your help in this.

    Regards,

    Praveen.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.