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

Class cast exception

Hi All,

I have created a java dc with the following code in the java class

Context ctx = new InitialContext();

DestinationService dstService = (DestinationService) ctx.lookup(DestinationService.JNDI_KEY);

if (dstService == null)

throw new NamingException("Destination Service not available");

RFCDestination dst =

(RFCDestination) dstService.getDestination("RFC", "ABC");

int maxPoolSize = dst.getMaxPoolSize();

long maxWaitTime = dst.getMaxWaitTime();

Properties jcoProperties = dst.getJCoProperties();

JCO.Client client = JCO.createClient(jcoProperties);




I added the java dc in a j2ee library dc .Iam calling the java class in web dynpro.I am getting class cast exception in the line

RFCDestination dst =

(RFCDestination) dstService.getDestination("RFC", "ABC");

The same code works fine in web dynpro.

I guess so i need to add refernce to tc/sec/destinations/interface.But where do i add the reference.

Thanks in advance


Radhika Kuthiala

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Nov 12, 2009 at 07:49 AM

    Hi Radhika Kuthiala

    You shall add the reference in .dcdef file of your library DC.

    BR, Siarhei

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi ,

      Thanks for your reply .I have added the refences in provider.xml but no success" >





      But how do i add in .dcdef..



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.