on 12-01-2006 12:55 AM
Hello Everybody,
I wanted to use Destinations API in webdynpro api.
I have written following line of code:
Context ctx = new InitialContext();
wdComponentAPI.getMessageManager().reportWarning("JNDI: "+DestinationService.JNDI_KEY);
DestinationService dstService = (DestinationService) ctx.lookup(DestinationService.JNDI_KEY);
if (dstService == null)
throw new NamingException("Destination Service not available");
RFCDestination dst =
(RFCDestination) dstService.getDestination("RFC", "CDMEXTN");
int maxPoolSize = dst.getMaxPoolSize();
long maxWaitTime = dst.getMaxWaitTime();
Properties jcoProperties = dst.getJCoProperties();
But at the time of look up it is giving me error:
java.lang.NoClassDefFoundError: com/sap/security/core/server/destinations/api/DestinationService
Why application cannot find this class on the server runtime?
what should be the problem?
Thanks in advance,
Bhavik
Hi Bhavik,
RightClick on the project->Goto Properties
try adding library "tcsecdestinations~interface" in the interface references of WebDynpro reference.
"tcsecdestinations~service " in the library references.
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhavik,
Check for the jar file in your server installation
Ex :C:\usr\sap\<ID>\<InstanceID>\j2ee\cluster\server0\bin\interfaces\tcsecdestinations~interface\
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anilkumar,
I have checked the jar file at the location you have specified. Jar file is there.
But still I am getting ClassNotFoundException when I am trying to execute following code in my Webdynpro application.
Context ctx = new InitialContext();
wdComponentAPI.getMessageManager().reportWarning("JNDI: "+DestinationService.JNDI_KEY);
DestinationService dstService = (DestinationService) ctx.lookup(DestinationService.JNDI_KEY);
if (dstService == null)
throw new NamingException("Destination Service not available");
RFCDestination dst =
(RFCDestination) dstService.getDestination("RFC", "CDMEXTN");
int maxPoolSize = dst.getMaxPoolSize();
long maxWaitTime = dst.getMaxWaitTime();
Properties jcoProperties = dst.getJCoProperties();
/**
Code example for establishing a direct connection
*/
JCO.Client client = JCO.createClient(jcoProperties);
wdContext.currentZcdm_Get_Saplov_InputElement().modelObject().modelInstance().setJcoClient(client);
wdContext.currentZcdm_Get_Saplov_InputElement().modelObject().execute();
Do I need to specify any sharing. service or library reference in Webdypro references?
Thanks,
Bhavik
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.