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

The lookup of Destination Service returns null

Hi

I am calling the Destination Service from a Standalone Java Application.

The following is the code:

param.put(Context.INITIAL_CONTEXT_FACTORY,"com.sap.engine.services.jndi.InitialContextFactoryImpl");

param.put(Context.PROVIDER_URL,"localhost:50004");

param.put(Context.SECURITY_PRINCIPAL,"Administrator");

param.put(Context.SECURITY_CREDENTIALS,"sap123");

Context initialContext = new InitialContext(param);

Object dstService = initialContext.lookup(DestinationService.JNDI_KEY);

dstService returns null?????

I have ejb20.jar, logging.jar and sapj2eeclient.jar in the classpath.

Pls, provide me an answer.

Thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 29, 2005 at 06:38 AM

    I am having exactly the same problem.

    I have a local development with jars from the filesystem of the J2EE-Engine (everything works fine) and a track with DC's where I use the 3 DC`s for central development.

    The DC`S returns null.

    Can somebody give me a list of all necesary JAR`S I have to include (under Used DC) für build and runtime to use DestinationService?!

    I think this will also answer the question from Sowkhya.

    Here is the list of JAR`S I used in the local development, maybe it give's you an hint Sowkhya:

    <classpathentry kind="var" path="JRE_LIB" sourcepath="JRE_SRC"/>
    <classpathentry exported="true" kind="var" path="TSSAP_JAVAX_HOME/lib/servlet.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="TSSAP_JAVAX_HOME/lib/ejb20.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="TSSAP_JAVAX_HOME/lib/jms.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="TSSAP_JAVAX_HOME/lib/jdbc20.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/interfaces/tc~sec~destinations~interface/tc_sec_destinations_interface.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/services/tc~sec~destinations~service/tc_sec_destinations_service.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/services/naming/naming.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/services/p4/p4.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/services/rfcengine/rfcengine.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/system/frame.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/services/security/security.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/system/util.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/boot/boot.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/system/iq-lib.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/interfaces/log/log_api.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/interfaces/cross/cross_api.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/services/appclient/appclient.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/interfaces/security/security_api.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/system/bytecode.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/system/logging.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/system/exception.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/services/iiop/iiop.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/ext/security.class/tc_sec_compat.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/ext/security.class/tc_sec_csi.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/ext/security.class/tc_sec_https.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/ext/security.class/tc_sec_jaas_test.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/ext/security.class/tc_sec_jaas.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/ext/security.class/tc_sec_saml_jaas.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/ext/security.class/tc_sec_saml_service_api.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/ext/security.class/tc_sec_saml_toolkit_api.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/ext/security.class/tc_sec_saml_toolkit_core.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/ext/security.class/tc_sec_saml_util.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/ext/security.class/tc_sec_saml_xmlbind.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/ext/security.class/tc_sec_ssf.jar"></classpathentry>
    <classpathentry exported="true" kind="var" path="SAPJ2EE/ext/security.class/tc_sec_userstore_lib.jar"></classpathentry>
    <classpathentry kind="var" path="SAP_SYSTEM_ADD_LIBS/comp/SAP-JEE/DCs/sap.com/com.sap.mw.jco/_comp/gen/default/public/default/lib/java/jrfc.jar"></classpathentry>
    <classpathentry kind="var" path="SAP_SYSTEM_ADD_LIBS/comp/SAP_JTECHS/DCs/sap.com/com.sap.aii.proxy.framework/_comp/gen/default/public/default/lib/java/aii_proxy_rt.jar"></classpathentry>
    <classpathentry kind="var" path="SAP_SYSTEM_ADD_LIBS/comp/SAP_JTECHS/DCs/sap.com/com.sap.aii.util.misc/_comp/gen/default/public/default/lib/java/aii_util_misc.jar"></classpathentry>
    <classpathentry kind="var" path="SAP_SYSTEM_ADD_LIBS/comp/SAP_JTECHS/DCs/sap.com/com.sap.mdi/_comp/gen/default/public/default/lib/java/SAPmdi.jar"></classpathentry>
    <classpathentry kind="var" path="SAP_SYSTEM_ADD_LIBS/comp/SAP-JEE/DCs/sap.com/com.sap.exception/_comp/gen/default/public/default/lib/java/exception.jar"></classpathentry>
    <classpathentry kind="var" path="SAP_SYSTEM_ADD_LIBS/comp/SAP-JEE/DCs/sap.com/security_api/_comp/gen/default/public/default/lib/java/security_api.jar"></classpathentry>

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 30, 2005 at 11:05 AM

    Now I have a solution for my problem.

    In my EAR DC I have created a service-reference to "tcsecdestinations~service". When I deploy my DC everything works fine.

    But I can not debug the Web-DC because it does not have such a reference. To make this work I had to change the debug-configuration. I added the JAR's from the NWDS to the classpath (of the debuf-configuration) instead of the JAR's from the SAP-JEE or SAP_BUILDT.

    So my DC is working in the JDI an also on my local machine.

    special thx 2 Stefan Klensch

    usefull infos: Error in Running JCO code in Netweaver Devloper Studio

    Add a comment
    10|10000 characters needed characters exceeded

    • Can someone please tell me how to set up a reference to

      tcsecdestinations~service when you are doing a JCo call from a user defined function in XI? In this case you are simply importing a jar file into XI and then writing a simple bit of Java code in your user defined function to call a method on the class that you have imported.

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.