cancel
Showing results for 
Search instead for 
Did you mean: 

ClassCastException at lookup for DestinationService

Former Member
0 Kudos

Hi Profs!

I try to get the DestinationService from a bean and i get a ClassCastException

I do

<i>Context ctx = new InitialContext();

Object ob = ctx.lookup(DestinationService.JNDI_KEY);</i>

<i>DestinationService dstserv = (DestinationService) ob;</i> --> ClassCastException

At the Lookup i get <i>java.lang.reflect.Proxy</i> - Object

I added both <i>security.class</i> and <i>tc/sec/destinations/interface</i> Additional Librarys to my EJB-Project and <i>application-j2ee-engine.xml</i>.

Has anyone an idea why i don't get a DestinationService-Object?

Regards Waldemar

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Waldemar, what about tcsecdestinations~service service?

Check

Former Member
0 Kudos

Hi Maksim!

Thanks for fast reply!

I ask me why i dont found it with the search!

Prob solved!

Edit:

Additional info:

When you set the reference to tc/wd/webdynpro service you get an exception at runtime, because the service tc/wd/webdynpro does not exist. At runtime the name of the service is webdynpro

I'm confused about this but it is true!

<reference reference-type="hard">

<reference-target provider-name="sap.com" target-type="service">

webdynpro

</reference-target>

</reference>

Cheers

Answers (0)