on 03-28-2007 12:00 PM
When I was trying to do lookup for JNDI in my standalone application, I was replied with the following error...
"Cannot instantiate class: com.sap.engine.services.jndi.InitialContextFactoryImpl [Root exception is java.lang.ClassNotFoundException: com.sap.engine.services.jndi.InitialContextFactoryImpl"
Here is my code snippet
Properties p = System.getProperties();
p.put(Context.INITIAL_CONTEXT_FACTORY,"com.sap.engine.services.jndi.InitialContextFactoryImpl");
p.put(Context.PROVIDER_URL, "gbdci550.in.ibm.com:50300");
p.put(Context.SECURITY_PRINCIPAL, myusername);
p.put(Context.SECURITY_CREDENTIALS, mypassword);
Context ctx = new InitialContext(p);
queryOutHome = (FlightSeatAvailabilityQueryOut_PortTypeHome)
PortableRemoteObject.narrow(ctx.lookup("ejb/com/sap/FlightQuery"),FlightSeatAvailabilityQueryOut_PortTypeHome.class);
Here "FlightQuery" is application JNDI name.However I followed the documentation provided in SDN for building application.
Can any one assist me how can i call ejb from a standalone application.
Thanks
Hi,
If you are using non-central AE,
then
To compile the Java proxy source code you have to apply several libraries, which you
will find on your non-central Adapter Framework installation:
aii_proxy_xirt.jar C:\usr\sap\J2E\JC00\j2ee\cluster\server0\bin\ext\com.sap.aii.proxy.xiruntime
aii_msg_runtime.jar C:\usr\sap\J2E\JC00\j2ee\cluster\server0\bin\ext\com.sap.aii.messaging.runtime
aii_utilxi_misc.jar C:\usr\sap\J2E\JC00\j2ee\cluster\server0\bin\ext\com.sap.xi.util.misc
guidgenerator.jar C:\usr\sap\J2E\JC00\j2ee\cluster\server0\bin\ext\com.sap.guid
The path is an example from an installation on a Windows server and may be
different in your environment.
Did you configured.
Regards
Chilla
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The class com.sap.engine.services.jndi.InitialContextFactoryImpl
should be in the lib sapj2eeclient.jar
Check the jar, if the class is inside (with Winzip) and check if the lib is applied to your Java program.
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Have you assigned library References to the project accurately.
Please refer this doc it might help:
Are you using the central J2EE Adapter Framework Instance.
If yes then you can try installing a non-central separate instance of it and add it to SLD and then try.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sumit..
Thanks for u r response...
Currently we are using central Adapter Engine.So how can i configure an instance which refers a non-central adapter Engine? I followed the same documentation what u had provided. There u can observe the lookup() which caused an error..
How can i overcome this lookup problem?
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.