cancel
Showing results for 
Search instead for 
Did you mean: 

The lookup of Destination Service returns null

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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:

dan_getliffe
Explorer
0 Kudos

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.

Former Member
0 Kudos

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>